query
stringlengths 7
5.25k
| document
stringlengths 15
1.06M
| metadata
dict | negatives
sequencelengths 3
101
| negative_scores
sequencelengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
Determine if the user is authorized to make this request. | public function authorize()
{
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }",
"public function authorize()\n {\n return $this->user() !== null;\n }",
"public function authorize()\n {\n return $this->user() != null;\n }",
"public function authorize(): bool\n {\n return $this->user() !== null;\n }",
"public function authorize(): bool\n {\n return $this->isUserAuthorised();\n }",
"public function authorize()\n {\n return !is_null($this->user());\n }",
"public function authorize()\n {\n return request()->user() != null;\n }",
"public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }",
"public function isAuthorized()\n {\n return $this->cookieHelper->requestCookieExists('auth');\n }",
"public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }",
"public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }",
"public function authorize()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default:\n return $this->user()->type == 'App\\\\Staff' ? true : false;\n break;\n }\n\n return false;\n }",
"public function authorize()\n {\n if($this->user()->role == \"admin\" || $this->user()->id == $this->request->get('author_id')) return true;\n else return false;\n }",
"public function authorize()\n {\n if(\\Auth::guest())\n {\n return false;\n } else {\n // Action 1 - Check if authenticated user is a superadmin\n if(\\Auth::User()->hasRole('superadmin'))\n return true;\n\n // Action 2 - Find UUID from request and compare to authenticated user\n $user = User::where('uuid', $this->user_uuid)->firstOrFail();\n if($user->id == \\Auth::User()->id)\n return true;\n\n // Action 3 - Fail request\n return false;\n }\n }",
"public function authorize()\n {\n $this->model = $this->route('user');\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }",
"public function isAuthorized(): bool\n {\n // TODO: implement authorization check\n\n return true;\n }",
"public function isAuthorized() {}",
"public function authorize()\n {\n return request()->loggedin_role === 1;\n }",
"public function authorize()\n {\n $this->model = $this->route('user');\n\n if ($this->isEdit() && !is_null($this->model)) {\n if (!user()->hasPermissionTo('Administrations::admin.user') && $this->model->id != user()->id) {\n return false;\n }\n }\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }",
"public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }",
"public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }",
"public function authorize()\n {\n return auth()->check() ? true : false;\n }",
"public function authorize()\n {\n return auth()->check() ? true : false;\n }",
"public function authorize()\n {\n /**\n * @var User $user\n * @var Document $document\n */\n $user = Auth::user();\n $document = $this->route('document');\n\n return (int)$user->id === (int)$document->user_id;\n }",
"public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }",
"public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n return $organisation->admin_id == $user->id;\n }",
"public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }",
"function isAuthorized()\n {\n $authorized = parent::isAuthorized();\n return $authorized;\n }",
"public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }",
"public function authorize()\n {\n $this->user = User::query()->find($this->route()->parameter('user'));\n $this->merge(['verified' => $this->get('verified') ? 1 : 0]);\n\n return true;\n }",
"public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }",
"public function authorize()\n {\n return is_client_or_staff();\n }",
"public function isAuthorized() {\n\t\treturn true;\n\t}",
"public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }",
"public function authorize()\n {\n switch ($this->method()) {\n case 'POST':\n return true;\n case 'GET':\n default:\n {\n return false;\n }\n }\n }",
"public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }",
"public function isAuthorized()\n\t{\n\t\t$sessionVal = Yii::$app->session->get($this->sessionParam);\n\t\treturn (!empty($sessionVal));\n\t}",
"public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }",
"public function authorize()\n {\n return session('storefront_key') || request()->session()->has('api_credential');\n }",
"public function authorize()\n {\n if ($this->user()->isAdmin($this->route('organization'))) {\n return true;\n }\n\n return false;\n\n }",
"public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }",
"public function authorized()\n {\n return $this->accepted && ! $this->test_mode;\n }",
"public function authorize()\n {\n if (!auth()->check()) {\n return false;\n }\n return true;\n }",
"public function hasAuthorized() {\n return $this->_has(1);\n }",
"public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }",
"public function authorize()\n {\n /*\n if ($this->loan_id && is_numeric($this->loan_id) && $loan = Loan::whereId($this->loan_id)->first()) {\n // loan_id belongs to requesting user\n return $loan && $this->user()->id == $loan->user_id;\n }\n */\n return true; // let rules handle it\n }",
"public function authorize()\n {\n //TODO Authorice Request (without Controller)\n return auth()->user()->role_id === 1;\n }",
"public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }",
"public function isAuth()\n {\n return $this->session->hasAuthorisation();\n }",
"public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }",
"public function authorize()\n {\n if(Auth::user())\n {\n return true;\n }\n else\n {\n return false;\n }\n }",
"public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }",
"public function authorize()\n {\n return \\Auth::check() ? true : false;\n }",
"public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t}",
"public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }",
"public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }",
"public function authorize()\n {\n return !empty(Auth::user());\n }",
"public function authorize()\n {\n return $this->groupHasUser() || $this->hasSeller();\n }",
"public function isAuthorized() {\n\t\t\n\t}",
"public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}",
"public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}",
"public function authorize()\n {\n if(Auth::check())\n {\n return (Auth::user()->has_world_admin_access);\n }\n return false;\n }",
"public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }",
"public function authorize()\n {\n if (auth()->user()->is_admin) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n if ($this->user()->is_admin){\n return true;\n }\n else if ($this->method == \"PUT\"){\n if ($this->user()->id == $this->input('id')){\n return true;\n }\n }\n return false;\n }",
"public function authorize(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }",
"public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}",
"public function authorize()\n {\n if (Auth::check()) {\n \n return true;\n \n }\n return false;\n }",
"public function authorize()\n {\n $user = Auth::user();\n return $user && $user->rol == 'admin';\n }",
"public function authorize()\n\t{\n\t\t// Nutzern akzeptiert werden\n\t\tif(Auth::check())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function authorize()\n {\n // TODO: Check if has business\n return session()->has('id');\n }",
"public function authorize()\n {\n return $this->auth->check();\n }",
"public function authorize()\n {\n if (auth()->check() && auth()->user()->isAdmin()) {\n return true;\n }\n\n return false;\n }",
"public function authorize() {\n\t\t$user = \\Auth::user();\n\n\t\tif ( $user->isAdmin() ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function authorize()\n {\n if (auth()->user()->isAdmin() || auth()->user()->isCustomer()) {\n return true;\n }\n return false;\n }",
"public function authorize()\n {\n return $this->container['auth']->check();\n }",
"function isAuthorized($request) {\n return true;\n }",
"public function authorize()\n {\n return Auth::guest() || isMember();\n }",
"public function authorize()\n {\n return auth()->user() && auth()->user()->isCeo();\n }",
"public function authorize(): bool\n {\n $deckId = $this->request->get('deck_id');\n $userId = Deck::whereKey($deckId)->value('user_id');\n\n return $userId === user()->id;\n }",
"public function authorize()\n {\n return Auth::check() && Auth::user()->is_contractor;\n }",
"public function authorize()\n {\n return TRUE;\n }",
"public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }",
"public function authorize()\n {\n # if it's false, it will rejected\n return true;\n }",
"public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }",
"public function authorize()\n {\n $user = Auth::user();\n\n return ($user->getRole() == 'admin');\n }",
"public function is_authorized() {\n\t\t$authorized = true;\n\t\tif ( $this->is_access_token_expired() ) {\n\t\t\t$authorized = false;\n\t\t}\n\n\t\treturn $authorized;\n\t}",
"public function authorize()\n {\n $user = User::findOrFail($this->route('id'));\n\n return $user->hasRole('admin') || $user->hasRole('teacher');\n }",
"public function authorize()\n {\n $project = \\App\\Project::find($this->request->get('project'));\n return $project && $project->isManager($this->user()->name);\n }",
"public function isAuthorized() {\n\t\treturn (bool)$this->_storage->hasData();\n\t}",
"public function authorize()\n {\n // User system not implemented\n return true;\n }",
"public function authorize() : bool\n {\n // TODO check request to xhr in middleware\n return true;\n }",
"public function authorize()\n {\n $idExpense = $this->input('expense');\n $expense = Expense::find($idExpense);\n\n return $expense && $this->user()->id == $expense->user_id;\n }",
"public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }",
"public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }",
"public function authorize()\n {\n $user = Auth::user();\n $orderElement = OrderElement::find($this->input(\"order_element_id\"));\n $order = $orderElement->order;\n\n if ($user->id == $order->user_id) {\n return true;\n } else {\n return false;\n }\n }",
"public function authorize()\n {\n $current_user = auth()->user();\n $convention = Convention::find($this->route('convention_id'));\n\n // Use ClientPolicy here to authorize before checking the fields\n return $current_user->can('store', Convention::class)\n || $current_user->can('update', $convention);\n }",
"public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }",
"public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }"
] | [
"0.839992",
"0.8375952",
"0.8375952",
"0.8342815",
"0.8252745",
"0.82473254",
"0.8211478",
"0.81453574",
"0.810956",
"0.80823004",
"0.79912364",
"0.7989508",
"0.7982261",
"0.7959524",
"0.79507357",
"0.7948338",
"0.79256135",
"0.79145455",
"0.79002494",
"0.7893071",
"0.7889318",
"0.7889047",
"0.7859889",
"0.78410757",
"0.78410757",
"0.783742",
"0.7823091",
"0.7812151",
"0.7807754",
"0.77919126",
"0.7786674",
"0.7781593",
"0.7780777",
"0.7762826",
"0.7753834",
"0.77178144",
"0.77178144",
"0.771564",
"0.77118343",
"0.77043885",
"0.7693797",
"0.7691735",
"0.76900935",
"0.76898056",
"0.76733977",
"0.76662993",
"0.7664653",
"0.76545596",
"0.764996",
"0.7642534",
"0.764228",
"0.7641884",
"0.7634402",
"0.762985",
"0.76291037",
"0.7626811",
"0.76197964",
"0.76197964",
"0.76127744",
"0.76032645",
"0.7603009",
"0.7601598",
"0.7601598",
"0.7600797",
"0.7598501",
"0.75954676",
"0.75872594",
"0.7584999",
"0.7580122",
"0.756261",
"0.7553521",
"0.7551973",
"0.75506663",
"0.7544154",
"0.754182",
"0.7538652",
"0.7537086",
"0.7529288",
"0.75156945",
"0.7513393",
"0.74994284",
"0.74953514",
"0.7494652",
"0.7491306",
"0.7486971",
"0.74858564",
"0.74782985",
"0.74769115",
"0.7471861",
"0.7470534",
"0.7463947",
"0.74632055",
"0.74620247",
"0.7461856",
"0.7460523",
"0.7448737",
"0.7438837",
"0.7435204",
"0.74337536",
"0.7430899",
"0.74234605"
] | 0.0 | -1 |
Get the validation rules that apply to the request. | public function rules()
{
$isCreate = $this->method() === 'POST';
return [
'ativo' => 'sometimes|boolean',
'nome' => ($isCreate ? 'required' : 'sometimes').'|string|min:2|max:255',
'senha' => ($isCreate ? 'required' : 'sometimes').'|min:8|max:255|regex:/^(?=.*[A-Z])(?=.*[0-9]+)(?=.*[a-z])([A-Za-z0-9$@$!%*#?&]){8,}$/',
'email' => [
($isCreate ? 'required' : 'sometimes'),'email','max:255',
(!$isCreate ? Rule::unique('clientes','email')->ignore($this->cliente->id) : 'unique:clientes,email')
],
'telefone' => [($isCreate ? 'required' : 'sometimes'),'regex:/^(\(\d{2}\)\s?)(\d{4,5}\-\d{4})|(\(\d{2}\)\s?)(\d{8,9})$/'],
'estado' => ($isCreate ? 'required' : 'sometimes').'|in:'.join(',', array_keys(__('estados'))),
'cidade' => 'sometimes|string|min:2|max:255',
'data_nascimento' => 'sometimes|date_format:Y-m-d|after_or_equal:1890-01-01',
'imagem' => 'sometimes|file|image|dimensions:min_width=100,min_height=200|max:2048',
'planos' => 'sometimes|array|distinct',
'planos.*' => ['numeric','integer', Rule::exists('planos','id')->where('ativo', true)],
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }",
"public function getRules()\n {\n return $this->validator->getRules();\n }",
"public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }",
"public function rules()\n {\n return $this->validationRules;\n }",
"public function rules()\n {\n $rules = [];\n switch ($this->getMethod()):\n case \"POST\":\n $rules = [\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"PUT\":\n $rules = [\n 'id' => 'required|numeric',\n 'course_id' => 'required|numeric',\n 'questions' => 'required|array',\n ];\n break;\n case \"DELETE\":\n $rules = [\n 'id' => 'required|numeric'\n ];\n break;\n endswitch;\n return $rules;\n }",
"public static function getRules()\n {\n return (new static)->getValidationRules();\n }",
"public function getRules()\n {\n return $this->validation_rules;\n }",
"public function getValidationRules()\n {\n return [];\n }",
"public function getValidationRules() {\n return [\n 'email' => 'required|email',\n 'name' => 'required|min:3',\n 'password' => 'required',\n ];\n }",
"public function rules()\n {\n if($this->isMethod('post')){\n return $this->post_rules();\n }\n if($this->isMethod('put')){\n return $this->put_rules();\n }\n }",
"public function rules()\n {\n $rules = [];\n\n // Validation request for stripe keys for stripe if stripe status in active\n if($this->has('stripe_status')){\n $rules[\"api_key\"] = \"required\";\n $rules[\"api_secret\"] = \"required\";\n $rules[\"webhook_key\"] = \"required\";\n }\n\n if($this->has('razorpay_status')){\n $rules[\"razorpay_key\"] = \"required\";\n $rules[\"razorpay_secret\"] = \"required\";\n $rules[\"razorpay_webhook_secret\"] = \"required\";\n }\n\n // Validation request for paypal keys for paypal if paypal status in active\n if($this->has('paypal_status')){\n $rules[\"paypal_client_id\"] = \"required\";\n $rules[\"paypal_secret\"] = \"required\";\n $rules[\"paypal_mode\"] = \"required_if:paypal_status,on|in:sandbox,live\";\n }\n\n\n return $rules;\n }",
"protected function getValidationRules()\n {\n $rules = [\n 'title' => 'required|min:3|max:255',\n ];\n\n return $rules;\n }",
"public function getRules()\n\t{\n\t\t$rules['user_id'] = ['required', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n\t\t$rules['org_id'] = ['required', 'exists:' . app()->make(Org::class)->getTable() . ',id'];\n\t\t$rules['role'] = ['required', 'string', 'in:' . implode(',', Static::ROLES)];\n\t\t$rules['scopes'] = ['nullable', 'array'];\n\t\t$rules['ended_at'] = ['nullable', 'date'];\n\t\t$rules['photo_url'] = ['nullable', 'string'];\n\n\t\treturn $rules;\n\t}",
"public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n case 'PUT':\n return [\n 'username' => 'required|max:255',\n 'user_id' => 'required',\n 'mobile' => 'required|regex:/^1[34578][0-9]{9}$/',\n 'birthday' => 'required',\n 'cycle_id' => 'required',\n 'expired_at' => 'required',\n 'card_price' => 'required',\n ];\n }\n }",
"public function rules()\n {\n\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6|same:password',\n 'role_id' => 'required'\n ];\n break;\n case 'PUT':\n case 'PATCH':\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n\n default:\n $rules = [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,'.$this->id,\n ];\n break;\n }\n return $rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n return $this->rules;\n }",
"public function rules()\n {\n switch($this->method()) {\n case 'GET':\n return [];\n case 'POST':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'name' => 'required|max:50',\n 'company' => 'required|max:100',\n 'position' => 'required|max:50',\n 'email' => 'required|email|max:150',\n 'phone' => 'required|max:25',\n 'description' => 'nullable|max:500',\n ];\n case 'DELETE':\n return [];\n default:break;\n }\n \n }",
"public function rules($request) {\n $function = explode(\"@\", $request->route()[1]['uses'])[1];\n return $this->getRouteValidateRule($this->rules, $function);\n // // 获取请求验证的函数名\n // // ltrim(strstr($a,'@'),'@')\n // if (count(explode(\"@\", Request::route()->getActionName())) >= 2) {\n // $actionFunctionName = explode(\"@\", Request::route()->getActionName()) [1];\n // }\n\n // // 取配置并返回\n // if (isset($this->rules[$actionFunctionName])) {\n // if (is_array($this->rules[$actionFunctionName])) {\n // return $this->rules[$actionFunctionName];\n // }\n // else {\n // return $this->rules[$this->rules[$actionFunctionName]];\n // }\n // }\n // else {\n // return [];\n // }\n }",
"function getValidationRules() {\n\t\treturn array(\n\t\t\t'_MovieID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CountryID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_BroadCastDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t\t'_CreatedDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}",
"public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }",
"public function rules()\n {\n $validation = [];\n if ($this->method() == \"POST\") {\n $validation = [\n 'name' => 'required|unique:users',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n 'roles' => 'required',\n ];\n } elseif ($this->method() == \"PUT\") {\n $validation = [\n 'name' => 'required|unique:users,name,' . $this->route()->parameter('id') . ',id',\n 'email' => 'required|unique:users,email,' . $this->route()->parameter('id') . ',id|email',\n 'roles' => 'required',\n ];\n\n if ($this->request->get('change_password') == true) {\n $validation['password'] = 'required|min:6|confirmed';\n $validation['password_confirmation'] = 'required|min:6';\n }\n }\n\n return $validation;\n }",
"protected function getValidationRules()\n {\n $class = $this->model;\n\n return $class::$rules;\n }",
"public function rules()\n {\n $data = $this->request->all();\n $rules['username'] = 'required|email';\n $rules['password'] = 'required'; \n\n return $rules;\n }",
"public function rules()\n {\n $rules = $this->rules;\n\n $rules['fee'] = 'required|integer';\n $rules['phone'] = 'required|min:8|max:20';\n $rules['facebook'] = 'required|url';\n $rules['youtube'] = 'required|url';\n $rules['web'] = 'url';\n\n $rules['requestgender'] = 'required';\n $rules['serviceaddress'] = 'required|max:150';\n $rules['servicetime'] = 'required|max:150';\n $rules['language'] = 'required|max:150';\n $rules['bust'] = 'required|max:100|integer';\n $rules['waistline'] = 'required|max:100|integer';\n $rules['hips'] = 'required|max:100|integer';\n $rules['motto'] = 'max:50';\n\n return $rules;\n }",
"protected function getValidRules()\n {\n return $this->validRules;\n }",
"public function rules()\n {\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n case 'PUT':\n {\n return [\n 'name' => 'required',\n ];\n }\n default:break;\n }\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'POST':\n {\n return [\n 'mobile' => ['required','max:11','min:11'],\n 'code' => ['required','max:6','min:6'],\n 'avatar' => ['required'],\n 'wx_oauth' => ['required'],\n 'password' => ['nullable','min:6','max:20']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }",
"public function rules()\n {\n switch ($this->getRequestMethod()) {\n case 'index':\n return [\n 'full_name' => 'nullable|string',\n 'phone' => 'nullable|string',\n ];\n break;\n case 'store':\n return [\n 'crm_resource_id' => 'required|exists:crm_resources,id',\n 'channel' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$channel),\n 'call_status' => 'required|in:' . get_validate_in_string(CrmResourceCallLog::$call_statuses),\n ];\n break;\n default:\n return [];\n break;\n }\n }",
"public function rules()\n {\n //With password\n if(request('password') || request('password_confirmation')) {\n return array_merge($this->passwordRules(), $this->defaultRules());\n }\n //Without password\n return $this->defaultRules();\n }",
"public function rules()\n {\n $rules = [\n '_token' => 'required'\n ];\n\n foreach($this->request->get('emails') as $key => $val) {\n $rules['emails.'.$key] = 'required|email';\n }\n\n return $rules;\n }",
"function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CoverImageID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_TrackID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Status' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_Rank' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_CreateDate' => array(\n\t\t\t\t'dateTime' => array(),\n\t\t\t),\n\t\t);\n\t}",
"public function rules()\n { \n return $this->rules;\n }",
"public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }",
"public function getValidationRules()\n {\n $rules = $this->getBasicValidationRules();\n\n if (in_array($this->type, ['char', 'string', 'text', 'enum'])) {\n $rules[] = 'string';\n if (in_array($this->type, ['char', 'string']) && isset($this->arguments[0])) {\n $rules[] = 'max:' . $this->arguments[0];\n }\n } elseif (in_array($this->type, ['timestamp', 'date', 'dateTime', 'dateTimeTz'])) {\n $rules[] = 'date';\n } elseif (str_contains(strtolower($this->type), 'integer')) {\n $rules[] = 'integer';\n } elseif (str_contains(strtolower($this->type), 'decimal')) {\n $rules[] = 'numeric';\n } elseif (in_array($this->type, ['boolean'])) {\n $rules[] = 'boolean';\n } elseif ($this->type == 'enum' && count($this->arguments)) {\n $rules[] = 'in:' . join(',', $this->arguments);\n }\n\n return [$this->name => join('|', $rules)];\n }",
"public function rules()\n {\n $rules = [];\n if ($this->isMethod('post')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n } elseif ($this->isMethod('put')) {\n $rules = [\n 'vacancy_name' => 'required|string|min:4|max:20',\n 'workers_amount' => 'required|integer|min:1|max:10',\n 'organization_id'=> 'required|integer|exists:organizations,id',\n 'salary' => 'required|integer|min:1|max:10000000',\n ];\n }\n return $rules;\n }",
"public function validationRules()\n {\n return [];\n }",
"public function rules()\n {\n $rules = $this->rules;\n if(Request::isMethod('PATCH')){\n $rules['mg_name'] = 'required|min:2,max:16';\n }\n return $rules;\n }",
"function getValidationRules() {\n\t\treturn array(\n\t\t\t'_ID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_EventID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_SourceID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_UserID' => array(\n\t\t\t\t'number' => array(),\n\t\t\t),\n\t\t\t'_HasEvent' => array(\n\t\t\t\t'inArray' => array('values' => array(self::HASEVENT_0, self::HASEVENT_1),),\n\t\t\t),\n\t\t);\n\t}",
"public function rules()\n {\n $rules = [];\n switch ($this->method()){\n case 'GET':\n $rules['mobile'] = ['required', 'regex:/^1[3456789]\\d{9}$/'];\n break;\n case 'POST':\n if($this->route()->getActionMethod() == 'sms') {\n $rules['area_code'] = ['digits_between:1,6'];\n if(in_array($this->get('type'), ['signup', 'reset_pay_pwd'])) {\n $rules['mobile'] = ['required', 'digits_between:5,20'];\n if($this->get('type') == 'signup' && !$this->get('area_code')) {\n $this->error('请选择区号');\n }\n }\n $rules['type'] = ['required', Rule::in(\\App\\Models\\Captcha::getSmsType())];\n }\n break;\n }\n return $rules;\n }",
"public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }",
"public function rules()\n {\n $rules = [\n 'first_name' => ['required'],\n 'birthdate' => ['required', 'date', 'before:today'],\n ];\n\n if (is_international_session()) {\n $rules['email'] = ['required', 'email'];\n }\n\n if (should_collect_international_phone()) {\n $rules['phone'] = ['phone'];\n }\n\n if (is_domestic_session()) {\n $rules['phone'] = ['required', 'phone'];\n }\n\n return $rules;\n }",
"public function rules()\n {\n dd($this->request->get('answer'));\n foreach ($this->request->get('answer') as $key => $val)\n {\n $rules['answer.'.$key] = 'required';\n }\n\n return $rules;\n }",
"public function rules()\n {\n return static::$rules;\n }",
"function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}",
"public static function getValidationRules(): array\n {\n return [\n 'name' => 'required|string|min:1|max:255',\n 'version' => 'required|float',\n 'type' => 'required|string',\n ];\n }",
"public function rules()\n {\n $rules = [\n 'name' => 'required',\n 'phone' => 'required|numeric',\n 'subject' => 'required',\n 'message' => 'required',\n 'email' => 'required|email',\n ];\n\n return $rules;\n }",
"public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|email',\n 'email_type' => 'nullable|in:html,text',\n 'status' => 'required|in:subscribed,unsubscribed,cleaned,pending',\n 'merge_fields' => 'nullable|array',\n 'interests' => 'nullable|array',\n 'language' => 'nullable|string',\n 'vip' => 'nullable|boolean',\n 'location' => 'nullable|array',\n 'location.latitude' => ['regex:/^[-]?(([0-8]?[0-9])\\.(\\d+))|(90(\\.0+)?)$/'], \n 'location.longitude' => ['regex:/^[-]?((((1[0-7][0-9])|([0-9]?[0-9]))\\.(\\d+))|180(\\.0+)?)$/'],\n 'marketing_permissions' => 'nullable|array',\n 'tags' => 'nullable|array'\n ];\n }",
"protected function getValidationRules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email|max:255',\n 'new_password' => 'required_with:current_password|confirmed|regex:' . config('security.password_policy'),\n ];\n }",
"public function rules()\n {\n // get 直接放行\n if( request()->isMethod('get') ){\n return []; // 规则为空\n }\n\n // 只在post的时候做验证\n return [\n 'username' => 'required|min:2|max:10', \n 'password' => 'required|min:2|max:10', \n 'email' => 'required|min:2|max:10|email', \n 'phoneNumber' => 'required|min:2|max:10', \n\n ];\n }",
"public function rules()\n {\n\n $rules = [\n 'id_tecnico_mantenimiento' => 'required',\n 'id_equipo_mantenimiento' => 'required'\n ];\n\n if ($this->request->has('status')) {\n $rules['status'] = 'required';\n }\n\n if ($this->request->has('log_mantenimiento')) {\n $rules['log_mantenimiento'] = 'required';\n }\n\n return $rules;\n }",
"public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }",
"public function rules()\n {\n $rules = [];\n\n if ($this->isUpdate() || $this->isStore()) {\n $rules = array_merge($rules, [\n 'name' => 'required|string',\n 'email' => 'email',\n 'password' => 'confirmed|min:6',\n\n ]);\n }\n\n if ($this->isStore()) {\n $rules = array_merge($rules, [\n\n ]);\n }\n\n if ($this->isUpdate()) {\n $rules = array_merge($rules, [\n ]);\n }\n\n return $rules;\n }",
"public function rules()\n {\n switch (true) {\n case $this->wantsToList():\n $rules = $this->listRules;\n break;\n case $this->wantsToStore():\n $rules = $this->storeRules;\n break;\n case $this->wantsToUpdate():\n $this->storeRules['email'] = 'required|email|between:5,100|unique:users,email,' . $this->route('administrators');\n\n $rules = $this->storeRules;\n break;\n default:\n $rules = [];\n }\n\n return $rules;\n }",
"public function rules()\n {\n if($this->isMethod('post')) {\n return $this->storeRules();\n }\n else if($this->isMethod('put') || $this->isMethod('patch')){\n return $this->updateRules();\n }\n }",
"abstract protected function getValidationRules();",
"public function rules()\n\t{\n\t\treturn ModelHelper::getRules($this);\n\t}",
"public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return $this->getPostRules();\n case 'PUT':\n return $this->getPutRules();\n }\n }",
"public function rules()\n {\n $rules = [\n 'name' => 'required|string|min:2',\n 'email' => \"required|email|unique:users,email, {$this->request->get('user_id')}\",\n 'role_id' => 'required|numeric',\n 'group_id' => 'required|numeric',\n ];\n\n if ($this->request->has('password')){\n $rules['password'] = 'required|min:6';\n }\n\n return $rules;\n }",
"public function rules()\n {\n if($this->method() == 'POST')\n {\n return [\n 'reason'=>'required',\n 'date_from'=>'required',\n 'date_to'=>'required',\n 'attachment'=>'required',\n ];\n }\n }",
"public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n // $this->offsetUnset('_method');\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $mailRules = \\Config::get('database.default').'.users';\n break;\n case 'PUT':\n $user = $this->authService->authJWTUserForm();\n $mailRules = \\Config::get('database.default').'.users,email,'.$user->getKey();\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n \n return [\n 'name' => 'required|string|max:256',\n 'email' => 'required|string|email|max:255|unique:'.$mailRules,\n 'password' => 'required|string|min:3',\n ];\n }",
"public function rules() {\n $rule = [\n 'value' => 'bail|required',\n ];\n if ($this->getMethod() == 'POST') {\n $rule += ['type' => 'bail|required'];\n }\n return $rule;\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'from' => 'required|max:100',\n 'to' => 'required|max:500',\n 'day' => 'required|max:500',\n ];\n }\n default:\n break;\n }\n\n return [\n //\n ];\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST':\n case 'PUT':\n case 'PATCH': {\n return [\n 'name' => 'required|string|max:255',\n 'iso_code_2' => 'required|string|size:2',\n 'iso_code_3' => 'required|string|size:3',\n ];\n }\n default:\n return [];\n }\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'name' => 'required|string',\n 'lastName' => 'string',\n 'gender' => 'boolean',\n 'avatar' => 'sometimes|mimes:jpg,png,jpeg|max:3048'\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'oldPassword' => 'required|string',\n 'newPassword' => 'required|string',\n ];\n default:\n break;\n }\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n {\n return [\n 'validation' => [\n 'accepted'\n ]\n ];\n }\n case 'POST':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'published_at_time' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n 'unpublished_time' => [\n 'nullable',\n ],\n ];\n }\n case 'PUT':\n {\n return [\n 'title' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250'\n ],\n 'body' => [\n 'required',\n 'string',\n 'min:3',\n 'max:250000'\n ],\n 'online' => [\n 'required',\n ],\n 'indexable' => [\n 'required',\n ],\n 'published_at' => [\n 'required',\n ],\n 'unpublished_at' => [\n 'nullable',\n ],\n ];\n }\n case 'PATCH':\n {\n return [];\n }\n default:\n break;\n }\n }",
"public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $user = User::findOrFail(\\Request::input('id'))->first();\n\n array_forget($this->rules, 'email');\n $this->rules = array_add($this->rules, 'email', 'required|email|max:255|unique:users,email,' . $user->id);\n }\n\n return $this->rules;\n }",
"public function rules()\n {\n $method = explode('@', $this->route()->getActionName())[1];\n return $this->get_rules_arr($method);\n }",
"public function rules()\n {\n $rules = parent::rules();\n $extra_rules = [];\n $rules = array_merge($rules, $extra_rules);\n return $rules;\n }",
"public function rules()\n {\n\t\tswitch($this->method()) {\n\t\t\tcase 'POST':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tcase 'PUT':\n\t\t\t\t{\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'field_id' => 'integer|required',\n\t\t\t\t\t\t'label' => 'string|required',\n\t\t\t\t\t\t'value' => 'alpha_dash|required',\n\t\t\t\t\t\t'selected' => 'boolean',\n\t\t\t\t\t\t'actif' => 'boolean',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\tdefault:break;\n\t\t}\n }",
"public function rules()\n {\n $this->sanitize();\n return [\n 'event_id' => 'required',\n 'member_id' => 'required',\n 'guild_pts' => 'required',\n 'position' => 'required',\n 'solo_pts' => 'required',\n 'league_id' => 'required',\n 'solo_rank' => 'required',\n 'global_rank' => 'required',\n ];\n }",
"public function rules()\n {\n $this->rules['email'] = ['required', 'min:6', 'max:60', 'email'];\n $this->rules['password'] = ['required', 'min:6', 'max:60'];\n\n return $this->rules;\n }",
"public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }",
"public function getValidationRules() : array;",
"public function rules()\n {\n switch ($this->route()->getActionMethod()) {\n case 'login': {\n if ($this->request->has('access_token')) {\n return [\n 'access_token' => 'required',\n 'driver' => 'required|in:facebook,github,google',\n ];\n }\n return [\n 'email' => 'required|email',\n 'password' => 'required|min:6',\n ];\n }\n case 'register': {\n return [\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|min:6',\n 'name' => 'required',\n ];\n }\n default: return [];\n }\n }",
"public function rules()\n {\n Validator::extend('mail_address_available', function($attribute, $value, $parameters, $validator){\n return MailAddressSpec::isAvailable($value);\n });\n Validator::extend('password_available', function($attribute, $value, $parameters, $validator){\n return PassWordSpec::isAvailable($value);\n });\n\n return [\n 'mail_address' => [\n 'required',\n 'mail_address_available'\n ],\n 'password' => [\n 'required',\n 'password_available',\n ],\n ];\n }",
"public function rules()\n {\n switch (strtolower($this->method())) {\n case 'get':\n return $this->getMethodRules();\n case 'post':\n return $this->postMethodRules();\n case 'put':\n return $this->putMethodRules();\n case 'patch':\n return $this->patchMethodRules();\n case 'delete':\n return $this->deleteMethodRules();\n }\n }",
"public function rules()\n {\n /**\n * This is the original way, expecting post params for each user value\n */\n return [\n 'firstName' => 'required|min:2|max:255',\n 'lastName' => 'required|min:2|max:255',\n 'phone' => 'min:9|max:25',\n 'gender' => 'in:M,V',\n 'dateOfBirth' => 'before:today|after:1890-01-01',\n 'email' => 'email|min:12|max:255',\n ];\n }",
"public function getValidationRules(): array {\n\t\t$result = [];\n\t\t\n\t\tforeach ($this->getSections() as $section) {\n\t\t\t$result = array_merge($result, $section->getValidationRules());\n\t\t}\n\t\t\n\t\treturn $result;\n\t}",
"public function rules()\n\t{\n\t\t$rule = [];\n\t\tif(Request::path() == 'api/utility/upload-image'){\n\t\t\t$rule = [\n\t\t\t\t'imagePath' => 'required',\n\t\t\t];\n\t\t}else if(Request::path() == 'api/utility/check-transaction'){\n\t\t\t$rule = [\n\t\t\t\t'countNumber' => 'required',\n\t\t\t];\n\t\t}\n\t\treturn $rule;\n\t}",
"public function rules()\n {\n $rules = array();\n return $rules;\n }",
"public function rules()\n {\n $this->setValidator($this->operation_type);\n return $this->validator;\n }",
"public function rules()\n {\n switch($this->method()){\n case 'POST':\n return [\n 'name' => 'required',\n 'app_id' => 'required',\n 'account_id' => 'required',\n 'start_at' => 'required',\n 'end_at' => 'required',\n 'content' => 'required',\n ];\n break;\n default:\n return [];\n break;\n }\n\n }",
"protected function get_validation_rules()\n {\n }",
"public function rules()\n {\n $rules = [\n 'users' => 'required|array',\n ];\n\n foreach($this->request->get('users') as $key => $user) {\n $rules['users.'. $key . '.name'] = 'required|string|min:3|max:255';\n $rules['users.'. $key . '.phone'] = 'required|regex:/^[0-9\\+\\s]+$/|min:10|max:17';\n $rules['users.'. $key . '.country'] = 'required|string|min:2:max:3';\n }\n\n return $rules;\n }",
"public function rules()\n {\n $rules = [\n 'mail_driver' => 'required',\n 'mail_name' => 'required',\n 'mail_email' => 'required',\n ];\n\n $newRules = [];\n\n if($this->mail_driver == 'smtp') {\n $newRules = [\n 'mail_host' => 'required',\n 'mail_port' => 'required|numeric',\n 'mail_username' => 'required',\n 'mail_password' => 'required',\n 'mail_encryption' => 'required',\n ];\n }\n\n return array_merge($rules, $newRules);\n }",
"public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n $rules['location'] = 'required';\n $rules['end_recruit_date'] = 'required';\n $rules['time_taken'] = 'required';\n $rules['payment'] = 'required';\n $rules['objective'] = 'required';\n $rules['method_desc'] = 'required';\n $rules['health_condition'] = 'required';\n $rules['required_applicant'] = 'required|integer';\n $rules['applicant'] = 'nullable';\n $rules['datetime'] = 'required';\n\n return $rules;\n }",
"public function rules()\n {\n switch($this->method()) {\n\n case 'PUT':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n case 'POST':\n {\n return [\n 'company_name' => 'required',\n 'status' => 'required|integer',\n 'notify_url' => 'required',\n 'name' => 'required'\n ];\n }\n default:\n return [];\n }\n\n }",
"public function rules()\n {\n $rules['name'] = 'required';\n $rules['poa'] = 'required';\n $rules['background'] = 'required';\n $rules['tester_name'] = 'required';\n\n return $rules;\n }",
"public function rules()\n {\n switch(Route::currentRouteName()){\n case 'adminBinding' :\n return [\n 'order_id' => 'required|integer',\n 'money' => 'required|numeric',\n ];\n case 'adminUnbinding' :\n return [\n 'order_id' => 'required|integer',\n 'pivot_id' => 'required|integer',\n ];\n case 'adminReceiptSave' :\n case 'adminReceiptUpdate' :\n return [\n 'customer_id' => 'required',\n 'receiptcorp' => 'required',\n 'account' => 'required',\n 'account_id' => 'required',\n 'bank' => 'required',\n 'currency_id' => 'required',\n 'advance_amount' => 'required|numeric',\n 'picture' => 'required',\n 'business_type' => 'required|in:1,2,3,4,5',\n 'exchange_type' => 'required_unless:currency_id,354|in:1,2',\n 'expected_received_at' => 'required|date_format:Y-m-d',\n ];\n case 'adminReceiptExchange' :\n return [\n 'rate' => 'required|numeric',\n ];\n default :\n return [];\n }\n }",
"public function rules()\n {\n $rules = [];\n $method = $this->getMethod();\n switch ($method) {\n case 'GET':\n if (Route::currentRouteName() === 'schoolActivity.getSchoolActivity') {\n $rules = [\n ];\n }\n break;\n }\n return $rules;\n }",
"public function rules()\n {\n $rules = new Collection();\n\n if (!$this->user() or !$this->user()->addresses()->count()) {\n $rules = $rules->merge($this->addressRules('billing'));\n if ($this->has('different_shipping_address')) {\n $rules = $rules->merge($this->addressRules('shipping'));\n }\n\n return $rules->toArray();\n }\n\n return $rules->merge([\n 'billing_address_id' => 'required|numeric',\n 'shipping_address_id' => 'required|numeric',\n ])->toArray();\n }",
"public function rules(): array\n {\n switch ($this->method()) {\n case 'POST':\n return $this->__rules() + $this->__post();\n case 'PUT':\n return $this->__rules() + $this->__put();\n default:\n return [];\n }\n }",
"public function defineValidationRules()\n {\n return [];\n }",
"public function rules(Request $request)\n {\n return Qc::$rules;\n }",
"public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'user_name' => 'nullable|string',\n 'excel' => 'nullable|file|mimes:xlsx',\n 'category' => 'required|int|in:' . implode(',', array_keys(UserMessage::$categories)),\n 'content' => 'required|string|max:500',\n 'member_status' => 'required|int|in:' . implode(',', array_keys(User::$statuses)),\n ];\n break;\n }\n }",
"public function rules()\n {\n return [\n 'lead_id' => [\n 'required', 'string',\n ],\n 'api_version' => [\n 'required', 'string',\n ],\n 'form_id' => [\n 'required', 'int',\n ],\n 'campaign_id' => [\n 'required', 'int',\n ],\n 'google_key' => [\n 'required', 'string', new GoogleKeyRule,\n ],\n ];\n }"
] | [
"0.8342703",
"0.80143493",
"0.7937251",
"0.79264987",
"0.79233825",
"0.79048395",
"0.78603816",
"0.7790699",
"0.77842164",
"0.77628785",
"0.7737272",
"0.7733618",
"0.7710535",
"0.7691693",
"0.76849866",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7683038",
"0.7675849",
"0.76724476",
"0.76665044",
"0.7657698",
"0.7641827",
"0.7630892",
"0.76293766",
"0.7617708",
"0.76102096",
"0.7607475",
"0.7602442",
"0.7598732",
"0.7597544",
"0.75924",
"0.75915384",
"0.7588146",
"0.7581354",
"0.7555758",
"0.755526",
"0.7551423",
"0.7546329",
"0.7541439",
"0.75366044",
"0.75363225",
"0.7530296",
"0.7517988",
"0.75155175",
"0.7508439",
"0.75069886",
"0.7505724",
"0.749979",
"0.7495976",
"0.74949056",
"0.7492888",
"0.7491117",
"0.74901396",
"0.7489651",
"0.7486808",
"0.7486108",
"0.7479687",
"0.7478561",
"0.7469412",
"0.74635684",
"0.74619836",
"0.7461325",
"0.74591017",
"0.7455279",
"0.745352",
"0.7453257",
"0.7449877",
"0.74486",
"0.7441391",
"0.7440429",
"0.7435489",
"0.7435326",
"0.74341524",
"0.7430354",
"0.7429103",
"0.7423808",
"0.741936",
"0.74152505",
"0.7414828",
"0.741382",
"0.74126065",
"0.74105227",
"0.740555",
"0.7404385",
"0.74040926",
"0.74015605",
"0.73905706",
"0.73837525",
"0.73732615",
"0.7371123",
"0.7369176",
"0.73619753",
"0.73554605",
"0.73448825",
"0.7344659",
"0.73427117",
"0.73357755"
] | 0.0 | -1 |
ga:hits UI Name: Hits Total number of hits sent to Google Analytics. This metric sums all hit types (e.g. pageview, event, timing, etc.). Attributes: | public function dashboard_display_(){
$this->data["analytics"] = false;
$this->ci->load->model("user_model");
$this->data["logged_user"] = $this->ci->user_model->is_user_logged();
// dump($this->data["logged_user"]);die;
// quando tiver internet de novo pode descomentar
// if(1!=1){
if(!empty($this->data["logged_user"]->profile_id)){
// dump($this->data["logged_user"]);
$this->ci->load->library('ga_api');
$this_month = date("Y-m-t") ;
$last_month = date("Y-m-1", strtotime("-1 month") ) ;
// TODO verifica isso aqui, não sei se esta certo
// if(!$this->ci->ga_api->login()) return;
$this->ga = $this->ci->ga_api->login()->init(array('profile_id' => $this->data["logged_user"]->profile_id));
$this->data["analytics"] = $this->ci->ga_api->login()
->dimension('ga:month,ga:day')
->metric('ga:newUsers,ga:users,ga:percentNewSessions,ga:timeOnPage,ga:exitRate')
->sort_by('ga:month,ga:day',true)
->when($last_month,$this_month)
->limit(60)
->get_object();
$arr = array();
$arr[] = array("Data", "Acessos este mês", "Acessos mês anterior");
$month_data=array();
$elements = $this->data["analytics"];
unset($elements["summary"]);
$current_month_data = $elements[date("m")];
unset($elements[date("m")]);
$last_month_data = (array) current($elements);
foreach ($current_month_data as $day => $data) {
//usando o mes como chave, ele bugava no 10, muito estranho
$last_month_usage = 0;
foreach($last_month_data as $key => $ele){
if($day==$key){
$last_month_usage = $ele->users;
}
}
$arr[]= array("{$day}/".date("m"), (float) $data->users, (float) $last_month_usage);
}
$this->data["analytics_json"] = json_encode($arr);
return $this->ci->load->view('libraries_view/analytics',$this->data,true);
}
// print(json_encode($arr));die;
// dump($this->data["analytics"]);
// die;
return "";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function countHit() {\n\n $this->saveField('hits', $this->data['Ringsite']['hits']+1, false);\n }",
"public function getHits()\n {\n return (int)$this->data['hits'];\n }",
"public function getHits()\n {\n return Arr::get($this->meta, 'hits', []);\n }",
"public function getNumber_hits()\n {\n return $this->number_hits;\n }",
"function countHit() {\n App::import('Vendor', 'ip');\n\n $ip = _getip();\n $client = ip2long($ip);\n\n $sql = \"SELECT count(*) FROM hits WHERE \";\n $sql .= \"ip='\".$client.\"' AND link_id='\".$this->id.\"' \";\n // mySQL >=5: $sql .= \"AND DATEDIFF(NOW(), created) < 1\";\n $sql .= \"AND (TO_DAYS(NOW()) - TO_DAYS(created)) < \".Configure::read('Clicks.NoCountPeriod');\n $allreadyClicked = $this->query($sql);\n\n if ($allreadyClicked[0][0]['count(*)'] == 0) {\n $this->Hit->create();\n $this->Hit->data['Hit']['link_id'] = $this->id;\n $this->Hit->data['Hit']['ip'] = $client;\n $this->Hit->save($this->Hit->data);\n\n $this->saveField('hit_count', $this->data['Link']['hit_count']+1, false);\n }\n }",
"public function getPageHits()\n\t{\n\t\treturn $this->pageHits;\n\t}",
"private function ts_countHits()\n {\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n if ( $this->count_hits[ $this->curr_tableField ] != null )\n {\n return $this->count_hits[ $this->curr_tableField ];\n }\n\n\n // Short var\n $count_hits = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ][ 'count_hits' ];\n switch ( $count_hits )\n {\n case( true ):\n $this->count_hits[ $this->curr_tableField ] = true;\n break;\n default:\n $this->count_hits[ $this->curr_tableField ] = false;\n break;\n }\n\n // RETURN\n return $this->count_hits[ $this->curr_tableField ];\n }",
"public function getTotalHits()\n {\n if (isset($this->results)) {\n return $this->results->getTotalHits();\n }\n }",
"public function getHits(): array\n {\n return $this->hits;\n }",
"public function hasTotalHits() {\n return $this->_has(2);\n }",
"public function hasTotalHits() {\n return $this->_has(2);\n }",
"private function checkForNumberOfHits()\n {\n // Get number of hits per page\n $hits = $this->app->request->getGet(\"hits\", 4);\n\n if (!(is_numeric($hits) && $hits > 0 && $hits <= 8)) {\n $hits = 4;\n }\n return $hits;\n }",
"function counterHits(){\n\tglobal $pth; include($pth['app']['globals']);\n\t$count \t\t= '';\n\t$counterHits= $pth['site']['counterHits'];\n\tclearstatcache();\n\tif(!is_file($counterHits)){ $handle\t= fopen($counterHits,'w'); fwrite($handle,'0'); fclose($handle); }\n\t// get current Hits + count\n\t$count\t= file_get_contents($counterHits);\n\tif(!$adm){\n\t\t$count = $count+1;\n\t\t// save Hits\n\t\t$files = fopen($counterHits,'w'); \n\t\tfwrite($files,$count);\n\t\tfclose($files);\n\t}\n\t\n\treturn '<p><strong>'.$count.'</strong> '.$txt['counterHits']['views'].'.</p>';\n}",
"public function getPageViewsAttribute()\n {\n return $this->hits()->groupBy('session_id')->count();\n }",
"abstract public function getHitCount() : string;",
"public function setHits($hits) {\n $hits = (int) $hits;\n\n if (!isset($hits) || $hits == \"\") {\n $hits = \"0\";\n }\n $this->fields[\"hits\"] = $hits;\n\n return $this;\n }",
"public function hasHits(){\n return $this->_has(3);\n }",
"public function getCount()\r\n {\r\n\t\tif (defined(\"WITH_SPHINX_TAGS\") && WITH_SPHINX_TAGS)\r\n\t\t{\r\n\t\t\t$count = parent::getCount();\r\n\t\t} else {\r\n\t\t\t$count = $this->getGroupTagsCount() +\r\n\t\t\t\t$this->getMembersTagsCount() +\r\n\t\t\t\t$this->getDocumentsTagsCount() +\r\n\t\t\t\t$this->getEventsTagsCount() +\r\n\t\t\t\t$this->getPhotosTagsCount() +\r\n\t\t\t\t$this->getListsTagsCount();\r\n\t\t}\r\n return (int) $count;\r\n }",
"public function hasHits() {\n return $this->_has(3);\n }",
"public function hasHits() {\n return $this->_has(2);\n }",
"public function hasHits() {\n return $this->_has(2);\n }",
"public function hasHits() {\n return $this->_has(2);\n }",
"public function addHits(\\iface\\ExperimentInfo\\HitsEntry $value){\n return $this->_add(3, $value);\n }",
"public abstract function get_counts();",
"public function getHitsList(){\n return $this->_get(3);\n }",
"private function ts_getDisplayHits()\n {\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // Short var\n $currFilterWrap = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ][ 'wrap.' ];\n\n // Get TS value\n $display_hits = $currFilterWrap[ 'item.' ][ 'display_hits' ];\n\n // RETURN TS value\n return $display_hits;\n }",
"public function getHpInfoCount()\n {\n return $this->count(self::_HP_INFO);\n }",
"protected function get_request_counts() {\n\t\tglobal $wpdb;\n\n\t\t$cache_key = $this->post_type . '-' . $this->request_type;\n\t\t$counts = wp_cache_get( $cache_key, 'counts' );\n\n\t\tif ( false !== $counts ) {\n\t\t\treturn $counts;\n\t\t}\n\n\t\t$query = \"\n\t\t\tSELECT post_status, COUNT( * ) AS num_posts\n\t\t\tFROM {$wpdb->posts}\n\t\t\tWHERE post_type = %s\n\t\t\tAND post_name = %s\n\t\t\tGROUP BY post_status\";\n\n\t\t$results = (array) $wpdb->get_results( $wpdb->prepare( $query, $this->post_type, $this->request_type ), ARRAY_A );\n\t\t$counts = array_fill_keys( get_post_stati(), 0 );\n\n\t\tforeach ( $results as $row ) {\n\t\t\t$counts[ $row['post_status'] ] = $row['num_posts'];\n\t\t}\n\n\t\t$counts = (object) $counts;\n\t\twp_cache_set( $cache_key, $counts, 'counts' );\n\n\t\treturn $counts;\n\t}",
"private function sum_hits( $rows )\n {\n // Get the label for the hit field\n $hitsField = $this->sql_filterFields[ $this->curr_tableField ][ 'hits' ];\n\n // Init sum hits\n $sum_hits = 0;\n\n // Tree view flag\n $bTreeView = false;\n list( $table ) = explode( '.', $this->curr_tableField );\n // #i0117, 141223, dwildt, 1-/+\n //if ( in_array( $table, $this->arr_tablesWiTreeparentfield ) )\n if ( in_array( $this->curr_tableField, $this->arr_tablesWiTreeparentfield ) )\n {\n $bTreeView = true;\n }\n // Tree view flag\n // Tree view : get lowest uid_parent\n if ( $bTreeView )\n {\n // Get the field label\n $treeParentField = $this->sql_filterFields[ $this->curr_tableField ][ 'treeParentField' ];\n // Set lowest uid_parent 'unlimited'\n $lowestPid = 9999999;\n // LOOP all rows : set lowest pid\n foreach ( ( array ) $rows as $row )\n {\n if ( ( $row[ $treeParentField ] < $lowestPid ) && ( $row[ $treeParentField ] !== null ) )\n {\n $lowestPid = $row[ $treeParentField ];\n }\n }\n // LOOP all rows : set lowest pid\n }\n // Tree view : get lowest uid_parent\n // LOOP all rows : count hits\n foreach ( ( array ) $rows as $row )\n {\n // Default case : count each row\n if ( !$bTreeView )\n {\n $sum_hits = $sum_hits + $row[ $hitsField ];\n }\n // Default case : count each row\n // Tree view case : count top level rows only\n if ( $bTreeView )\n {\n if ( $row[ $treeParentField ] == $lowestPid )\n {\n $sum_hits = $sum_hits + $row[ $hitsField ];\n }\n }\n // Tree view case : count top level rows only\n }\n // LOOP all rows : count hits\n // Set class var $this->hits_sum\n $this->hits_sum[ $this->curr_tableField ] = ( int ) $sum_hits;\n\n return;\n }",
"public function getCacheHits()\n\t{\n\t\treturn $this->cacheHits;\n\t}",
"public function hits()\n {\n return $this->hasMany('App\\Hit');\n }",
"public function GetTotalHits($unique = false)\n {\n $select = $this->select();\n $select->cols(['hitcount'])->from(self::TBL_HITS)\n ->where('isunique=:isunique')\n ->bindValues(['isunique' => $unique]);\n $rows = $this->db->fetchAll($select->getStatement(), $select->getBindValues());\n\n $total = 0;\n foreach ($rows as $row) {\n $total += (int)$row['hitcount'];\n }\n return $total;\n }",
"public function getHpCount()\n {\n return $this->count(self::_HP);\n }",
"public function setNumber_hits($number_hits)\n {\n $this->number_hits = $number_hits;\n }",
"private function areas_countHits( $areas )\n {\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // Get TS configuration of the current filter / tableField\n //$conf_name = $this->conf_view['filter.'][$table . '.'][$field];\n $conf_array = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ];\n\n // Get labels for the fields hits and value\n $hitsField = $this->sql_filterFields[ $this->curr_tableField ][ 'hits' ];\n $valueField = $this->sql_filterFields[ $this->curr_tableField ][ 'value' ];\n\n // Get the key of the area of the current filter: 'strings' or 'interval'\n $area_key = $this->pObj->objCal->arr_area[ $this->curr_tableField ][ 'key' ];\n\n // LOOP each area\n foreach ( array_keys( ( array ) $areas ) as $areas_uid )\n {\n // Short var\n $conf_area = $conf_array[ 'area.' ][ $area_key . '.' ][ 'options.' ][ 'fields.' ][ $areas_uid . '.' ];\n\n // Get from\n $from = $conf_area[ 'valueFrom_stdWrap.' ][ 'value' ];\n $from_conf = $conf_area[ 'valueFrom_stdWrap.' ];\n $from = $this->pObj->local_cObj->stdWrap( $from, $from_conf );\n\n // #41814, dwildt, +\n if ( empty( $from ) )\n {\n $from = $value;\n }\n // #41814, dwildt, +\n // Get to\n $to = $conf_area[ 'valueTo_stdWrap.' ][ 'value' ];\n $to_conf = $conf_area[ 'valueTo_stdWrap.' ];\n $to = $this->pObj->local_cObj->stdWrap( $to, $to_conf );\n\n // #41814, dwildt, +\n if ( empty( $to ) )\n {\n $to = $value;\n }\n // #41814, dwildt, +\n // LOOP rows\n foreach ( $this->rows as $rows_uid => $rows_row )\n {\n $value = $rows_row[ $valueField ];\n // Count the hits, if row value match from to condition\n if ( $value >= $from && $value <= $to )\n {\n $areas[ $areas_uid ][ $hitsField ] = $areas[ $areas_uid ][ $hitsField ] + $this->rows[ $rows_uid ][ $hitsField ];\n }\n }\n // LOOP rows\n }\n // LOOP each area\n // RETURN areas with hits\n return $areas;\n }",
"public function stats() {\n\t\techo \"<p>\";\n\t\techo \"<strong>Cache Hits:</strong> {$this->cache_hits}<br />\";\n\t\techo \"<strong>Cache Misses:</strong> {$this->cache_misses}<br />\";\n\t\techo \"</p>\";\n\t\techo '<ul>';\n\t\tforeach ( $this->cache as $group => $cache ) {\n\t\t\techo \"<li><strong>Group:</strong> $group - ( \" . number_format( strlen( serialize( $cache ) ) / 1024, 2 ) . 'k )</li>';\n\t\t}\n\t\techo '</ul>';\n\t}",
"public function totalCount();",
"public function totalCount();",
"public static function googleTotal2($query)\r\n\t{\r\n\t\t$url = 'http://ajax.googleapis.com/ajax/services/search/web?v=1.0&rsz=1&q='.$query;\r\n\t\t$str = SEOstats::cURL($url);\r\n\t\t$data= json_decode($str);\r\n\t\t\r\n\t\treturn intval($data->responseData->cursor->estimatedResultCount);\r\n\t}",
"private function countSearchResults(): void\n {\n $this->SearchResult->total_matches = count($this->SearchResult->matches);\n $this->SearchResult->total_indecisive_matches = count($this->SearchResult->indecisive_matches);\n $this->SearchResult->total_no_matches = count($this->SearchResult->no_matches);\n }",
"public function getNbResults(): int\n {\n return $this->adapter->getTotalHits();\n }",
"function getCount() {\n $this->putCount();\n //opens countlog.data to read the number of hits\n $datei = fopen(dirname(__FILE__) . DIRECTORY_SEPARATOR .\"countlog.data\", \"r\");\n $count = fgets($datei, 1000);\n fclose($datei);\n return $count;\n }",
"function countsreport(){\n\t\t//$this->set('surveyexports',$this->Surveyexport->find('count', array('conditions'=>array('id'=>'all'))));\n\t\t//$this->set('surveyexports',$this->Surveyexport->find('all'));\n\t\t//$this->set('surveyexports',$this->Surveyexport->find('count'));\n\t\t//$this->set('surveyexports',$this->Surveyexport->findAllById('*'),id);\n\t\t//$this->set('totalCount',$this->Surveyexport->find('count', array('fields'=>' DISTINCT state')));\n\t\t$this->set(('totalCount[0]'),$this->Surveyexport->find('count', array('fields'=>' DISTINCT id'))); // count individual ids in the database\n\t\t//$this->set('totalCount',$this->Surveyexport->find('count', array('fields'=>' DISTINCT focus_id'))); // ??????????????????????????? needs set in DB\n\t\t$this->set('totalCount[1]',$this->Surveyexport->find('count', array('fields'=>'id'))); // count all id's in the database\n\t\t\n\t}",
"public function getScenarioStatCounts();",
"public function setCountHits(?int $value): void {\n $this->getBackingStore()->set('countHits', $value);\n }",
"public function fetchTotal($start=null, $end=null)\r\n {\r\n $conditions = array(\r\n 'action' => 'Visited Site'\r\n );\r\n \r\n if (!empty($start)) {\r\n \t$conditions['created'] = array('$gte' => strtotime($start));\r\n }\r\n \r\n if (!empty($end)) {\r\n if (empty($conditions['created'])) {\r\n $conditions['created'] = array('$lt' => strtotime($end));\r\n } else {\r\n $conditions['created']['$lt'] = strtotime($end);\r\n }\r\n \r\n }\r\n \r\n $return = \\Activity\\Models\\Actions::collection()->count($conditions);\r\n\r\n return $return;\r\n }",
"protected function get_request_counts()\n {\n }",
"public function GetHits($pageID, $unique = false)\n {\n $select = $this->select();\n $select->cols(['hitcount'])->from(self::TBL_HITS)\n ->where('pageid=:pageid AND isunique=:isunique')\n ->bindValues(['pageid' => $pageID, 'isunique' => $unique]);\n $res = $this->db->fetchAll($select->getStatement(), $select->getBindValues());\n\n if (count($res)) {\n return (int)$res[0]['hitcount'] ?? 0;\n } else {\n //die(\"Missing hit count from database!\");\n return 0;\n }\n }",
"public function countOverallVisits(Carbon $start, Carbon $end = null, $url = null) {\n return $this->where($start, $end, $url)->sum('count');\n }",
"public function count()\r\n {\r\n\t\tif ( null === $this->totalResults )\r\n\t\t{\r\n\t\t\t$this->warmUp();\r\n\t\t}\r\n\r\n\t\treturn $this->totalResults;\r\n\t}",
"public function getAttackCount()\n {\n return $this->count(self::ATTACK);\n }",
"private function get_count( array $stats, $type = 'getCorrectCount' ) {\n\t\t\t$count = 0;\n\n\t\t\tforeach ( $stats as $stat ) {\n\t\t\t\t$count = $count + $stat->$type();\n\t\t\t}\n\n\t\t\treturn $count;\n\t\t}",
"public function getTotalClickCountAttribute(): int\n {\n return (int)$this->clicks()->sum('click_count');\n }",
"private function _countTags($param) {\n\n\t\t$output = ['all' => 0 ];\n\t\t$param['select'] = 'type, count(`type`) as count';\n\t\t$param['group_by'] = 'type';\n\n\t\tunset($param['limit']);\n\n\t\t$count = $this->CI->model->get($param);\n\n\t\tforeach($count as $c) {\n\t\t\t$c['count'] = (int) $c['count'];\n\t\t\t$output['all'] += $c['count'];\n\t\t\tif (!isset($output[$c['type']])) {\n\t\t\t\t$output[$c['type']] = 0;\n\t\t\t}\n\t\t\t$output[$c['type']] += $c['count'];\n\t\t}\n\t\treturn $output;\n\t}",
"function hit(){\r\n\t\t$query = \"UPDATE #__rsgallery2_galleries SET hits = hits + 1 WHERE id = {$this->id}\";\r\n\t\t\r\n\t\t$db = &JFactory::getDBO();\r\n\t\t$db->setQuery( $query );\r\n\t\t\r\n\t\tif( !$db->query() ) {\r\n// \t\t\t$this->setError( $db->getErrorMsg() );\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$this->hits++;\r\n\t}",
"public function getVisitedCount()\n {\n return $this->count(self::visited);\n }",
"public function statsMenusHits($userId, $accountId)\n {\n $url = $this->weconnectDomain . \"/accounts/$accountId/statistics/users/$userId/profile\";\n return $this->_curl(self::METHOD_GET, $url, 'member');\n }",
"public function getWeeklyHits() {\n\t\t$sql = 'SELECT *, ROUND((counter / (SELECT sum(counter) FROM analytics WHERE insertdate BETWEEN DATE_SUB(NOW(),INTERVAL 1 WEEK) AND NOW() ORDER BY counter DESC LIMIT 10)*100),2) as hits FROM analytics WHERE insertdate BETWEEN DATE_SUB(NOW(),INTERVAL 1 WEEK) AND NOW() GROUP BY pagename ORDER BY counter DESC LIMIT 10';\n\t\t//execute the query\n\t\t$rows = $this->db->clean($sql);\n\t\t\n\t\t$maxwidth = 173;\n\t\t$max = $rows[0]['hits'];\n\t\t\n\t\tforeach($rows as $key => $row) {\n\t\t\n\t\t\t$rows[$key]['maxwidth'] = round($maxwidth * ($row['hits']/$max));\n\t\t}\n\t\t\n\t\t//return the results\n\t\treturn array('week' => $rows);\n\t}",
"public function statHit(Stats_OLP_Client $stats, $event_type_key, $date_occurred = NULL, $event_amount = NULL, $track_key = NULL, $space_key = NULL)\n\t{\n\t\t$mode = $stats->getMode();\n\t\t$application_id = $stats->getApplicationID();\n\t\t\n\t\tif ($application_id)\n\t\t{\n\t\t\t$this->insertEventLog($event_type_key, $mode, $application_id);\n\t\t}\n\t}",
"public function getNumberOfHMetrics() {}",
"public function setPageHits($pageHits)\n\t{\n\t\tif ($pageHits < 1)\n\t\t{\n\t\t\tdie($this->className . \"::setPageHits(): No int pageHits given.\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->pageHits = $pageHits;\n\t\t\treturn true;\n\t\t}\n\t}",
"public static function googleTotal($query)\r\n\t{\r\n\t\t$url = 'http://www.google.'. GOOGLE_TLD .'/custom?num=1&q='.$query;\r\n\t\t$str = SEOstats::cURL($url);\r\n\t\tpreg_match_all('#<b>(.*?)</b>#',$str,$matches);\r\n\t\t$result = (!empty($matches[1][2])) ? $matches[1][2] : '0';\r\n\t\t\r\n\t\treturn $result;\r\n\t}",
"protected function determine_hit_dice() {\n\t\t$this->hit_dice = 2;\n\t}",
"function dokan_count_posts( $post_type, $user_id ) {\n global $wpdb;\n\n $cache_key = 'dokan-count-' . $post_type . '-' . $user_id;\n $counts = wp_cache_get( $cache_key, 'dokan' );\n\n if ( false === $counts ) {\n $query = \"SELECT post_status, COUNT( * ) AS num_posts FROM {$wpdb->posts} WHERE post_type = %s AND post_author = %d GROUP BY post_status\";\n $results = $wpdb->get_results( $wpdb->prepare( $query, $post_type, $user_id ), ARRAY_A );\n $counts = array_fill_keys( get_post_stati(), 0 );\n\n $total = 0;\n foreach ( $results as $row ) {\n $counts[ $row['post_status'] ] = (int) $row['num_posts'];\n $total += (int) $row['num_posts'];\n }\n\n $counts['total'] = $total;\n $counts = (object) $counts;\n wp_cache_set( $cache_key, $counts, 'dokan' );\n }\n\n return $counts;\n}",
"private function sql_resWiHits()\n {\n // Count hits\n $bool_count = true;\n\n // Get query parts\n $select = $this->sql_select( $bool_count );\n $from = $this->sql_from();\n $where = $this->sql_whereWiHits();\n $groupBy = $this->sql_groupBy();\n $orderBy = $this->sql_orderBy();\n $limit = $this->sql_limit();\n\n// $query = $GLOBALS['TYPO3_DB']->SELECTquery\n// (\n// $select,\n// $from,\n// $where,\n// $groupBy,\n// $orderBy,\n// $limit\n// );\n//var_dump( __METHOD__, __LINE__, $query );\n // Execute query\n $arr_return = $this->pObj->objSqlFun->exec_SELECTquery\n (\n $select, $from, $where, $groupBy, $orderBy, $limit\n );\n // Execute query\n\n return $arr_return;\n }",
"public function getAttributeCount();",
"public function getUsageCount()\n {\n $today = Carbon::now('Asia/Singapore')->toDateTimeString();\n $timezone = new Carbon('Asia/Singapore');\n $last_thirty_days = $timezone->subDays(30);\n\n return count($this->appUserBlurb->where('interaction_type', 'use')->whereBetween('created_at', array($last_thirty_days->toDateTimeString(), $today))->groupBy('app_user_id')->get());\n }",
"function get_statistics_data_hit($params)\r\n {\r\n return $this->get_statistics_data_view($params);\r\n }",
"public function getDailyHits() {\n\t\t$sql = 'SELECT *, ROUND((counter / (SELECT sum(counter) FROM analytics WHERE insertdate = CURDATE() ORDER BY counter DESC LIMIT 10)*100),2) as hits FROM analytics WHERE insertdate = CURDATE() GROUP BY pagename ORDER BY counter DESC LIMIT 10';\n\t\t//execute the query\n\t\t$rows = $this->db->clean($sql);\n\t\t\n\t\t$maxwidth = 173;\n\t\t$max = $rows[0]['hits'];\n\t\t\n\t\tforeach($rows as $key => $row) {\n\t\t\n\t\t\t$rows[$key]['maxwidth'] = round($maxwidth * ($row['hits']/$max));\n\t\t}\n\t\t\n\t\t//return the results\n\t\treturn array('day' => $rows);\n\t}",
"function gethits($id)\r\n\t{\r\n\t\t$query = 'SELECT hits FROM #__content WHERE id = '.(int)$id;\r\n\t\t$this->_db->setQuery($query);\r\n\t\t$hits = $this->_db->loadResult();\r\n\t\t\r\n\t\treturn $hits;\r\n\t}",
"function badge_stats() {\n\n\t\t/*\n\t\targuments:\n\t\t\tnone\n\n\t\treturns:\n\t\n\t\tReturn:\n\t\t\tif successful:\n\t\t\t{\n\t\t\t\t{\n\t\t\t\t\tbadge_id: the badge id\n\t\t\t\t\tbadge_name: the name of the badge\n\t\t\t\t\tqty: how many people have this badge\n\t\t\t\t},\n\t\t\t\t..\n\t\t\t\t..\n\t\t\t}\n\n\t\t\tif error:\n\t\t\t{\n\t\t\t\terror_code: The error code\n\t\t\t\terror_msg: The error message\n\t\t\t}\n\t\t*/\n\n\t\tglobal $dbh;\n\n\t\t// Iterate through each badge and retrieve stats for that badge\n\t\t// Iterate through each action type and determine stats for each action type\n\t\t$badges = array();\n\n\t\t$sql = 'SELECT\n\t\t\tbadge_id,\n\t\t\tbadge_name,\n\t\t\t(\n\t\t\t\tSELECT\n\t\t\t\tcount(*)\n\t\t\t\tFROM ' . CORE_DB . '.users_info\n\t\t\t\tWHERE ' . CORE_DB . '.users_info.badge_id = ' . CORE_DB . '.badges.badge_id\n\t\t\t) AS badge_qty\n\t\t\tFROM ' . CORE_DB . '.badges\n\t\t\tORDER BY badge_name ASC\n\t\t\t';\n\n\t\t$sth = $dbh->prepare($sql);\n\t\t$sth->execute();\n\n\t\twhile($row = $sth->fetch()) {\n\n\t\t\tarray_push($badges, Core::remove_numeric_keys($row));\n\n\t\t}\n\n\t\t$badges = Core::multi_sort($badges, 'badge_qty', 'desc');\n\n\t\treturn $badges;\n\n\t}",
"public function getTotalNumberOfResults();",
"public function metricHit(): MetricHit\n {\n return new MetricHit($this->_provider);\n }",
"public function countReports(){\n return count($this->getReports());\n }",
"function simple_visitor_counter_shortcode( $atts_total_view_counter )\n{\n\t$total_count_key = 'site_visit_counter';\n\t$totalvisitcount = get_option( $total_count_key );\n\t\n\n\t$atts_total_view_counter = shortcode_atts( array(\n\t\t\t\t\t\t\t\t\t'start' => add_option( $total_count_key, 0 ),\n\t\t\t\t\t\t\t\t), $atts_total_view_counter, 'svc' );\n\tif($atts_total_view_counter['start'] !='')\n\t{\n\t\t$totalvisitcount = $atts_total_view_counter['start'] + $totalvisitcount ;\n\t}\n\t\n\n\treturn \"Total Site Visit = {$totalvisitcount}\";\n}",
"function trackMetricCount($body) {\r\n $end_point = $this->tpi_server_domain . '/log/metrics/count';\r\n\r\n $args = array(\r\n 'headers' => $this->defaultHeader(),\r\n 'timeout' => WC_Xendit_PG_API::DEFAULT_TIME_OUT,\r\n 'body' => json_encode($body)\r\n );\r\n\r\n try {\r\n $response = wp_remote_post($end_point, $args);\r\n return true;\r\n } catch (Exception $e) {\r\n return false;\r\n }\r\n }",
"public function getTotalCount();",
"public function getTotalCount();",
"public function getTotalCount();",
"protected function get_stats()\n\t{\n\t\tif ($this->index_created())\n\t\t{\n\t\t\t$sql = 'SELECT COUNT(post_id) as total_posts\n\t\t\t\tFROM ' . POSTS_TABLE;\n\t\t\t$result = $this->db->sql_query($sql);\n\t\t\t$this->stats['total_posts'] = (int) $this->db->sql_fetchfield('total_posts');\n\t\t\t$this->db->sql_freeresult($result);\n\n\t\t\t$sql = 'SELECT COUNT(p.post_id) as main_posts\n\t\t\t\tFROM ' . POSTS_TABLE . ' p, ' . SPHINX_TABLE . ' m\n\t\t\t\tWHERE p.post_id <= m.max_doc_id\n\t\t\t\t\tAND m.counter_id = 1';\n\t\t\t$result = $this->db->sql_query($sql);\n\t\t\t$this->stats['main_posts'] = (int) $this->db->sql_fetchfield('main_posts');\n\t\t\t$this->db->sql_freeresult($result);\n\t\t}\n\t}",
"function update_post_counts($response){\r\n \t$count_key = 'post_views_count';\r\n \t$success = 0;\r\n \t$failure = 0;\r\n \tforeach ($response as $item){\r\n\t \t$post_id = $item[\"post_id\"];\r\n\t \tif(update_post_meta($post_id, $count_key, $item[\"views\"])) {\r\n\t \t\t$success++;\r\n\t \t} else {\r\n\t \t\t$failure++;\r\n\t \t}\r\n\t\t}\r\n\r\n\t\treturn array('success' => $success, 'failure' => $failure);\r\n\t}",
"public static function addStatCount($name, $count)\n\t{\n\t\tif (isset(MHTTPD::$stats[$name])) {\n\t\t\tMHTTPD::$stats[$name] += $count;\n\t\t}\n\t}",
"function search_requests_count()\n {\n $count=$this->db->count_all_results('lic_requests');\n\t\t$this->db->flush_cache();\n\t\treturn $count;\n }",
"public function get_counts() {\n\n\t\t$this->counts = [];\n\n\t\t// Base params with applied filters.\n\t\t$base_params = $this->get_filters_query_params();\n\n\t\t$total_params = $base_params;\n\t\tunset( $total_params['status'] );\n\t\t$this->counts['total'] = ( new EmailsCollection( $total_params ) )->get_count();\n\n\t\tforeach ( $this->get_statuses() as $status => $name ) {\n\t\t\t$collection = new EmailsCollection( array_merge( $base_params, [ 'status' => $status ] ) );\n\n\t\t\t$this->counts[ 'status_' . $status ] = $collection->get_count();\n\t\t}\n\n\t\t/**\n\t\t * Filters items counts by various statuses of email log.\n\t\t *\n\t\t * @since 2.7.0\n\t\t *\n\t\t * @param array $counts {\n\t\t * Items counts by statuses.\n\t\t *\n\t\t * @type integer $total Total items count.\n\t\t * @type integer $status_{$status_key} Items count by status.\n\t\t * }\n\t\t */\n\t\t$this->counts = apply_filters( 'wp_mail_smtp_pro_emails_logs_admin_table_get_counts', $this->counts );\n\t}",
"public function get_total_badges() {\n\t\t\treturn $this->total_badges;\n\t\t}",
"public function getDamagesCount()\n {\n return $this->count(self::_DAMAGES);\n }",
"public function emailCounts($email);",
"public function getMonthlyHits() {\n\t\t$sql = 'SELECT *, ROUND((counter / (SELECT sum(counter) FROM analytics WHERE insertdate BETWEEN DATE_SUB(NOW(),INTERVAL 1 MONTH) AND NOW() ORDER BY counter DESC LIMIT 10)*100),2) as hits FROM analytics WHERE insertdate BETWEEN DATE_SUB(NOW(),INTERVAL 1 MONTH) AND NOW() GROUP BY pagename ORDER BY counter DESC LIMIT 10';\n\t\n\t\t//execute the query\n\t\t$rows = $this->db->clean($sql);\n\t\t\n\t\t$maxwidth = 173;\n\t\t$max = $rows[0]['hits'];\n\t\t\n\t\tforeach($rows as $key => $row) {\n\t\t\n\t\t\t$rows[$key]['maxwidth'] = round($maxwidth * ($row['hits']/$max));\n\t\t}\n\t\t\n\t\t//return the results\n\t\treturn array('month' => $rows);\n\t}",
"function getStatistic() {\n\t\t$ret = array();\n\t\tforeach ($this->data as $entry) {\n\t\t\tif (array_key_exists($entry['entryType'], $ret)) {\n\t\t\t\t$ret[$entry['entryType']]++;\n\t\t\t} else {\n\t\t\t\t$ret[$entry['entryType']] = 1;\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}",
"public function view(){\n $viewsCount = $this->views_count();\n\n if ( Config::get('counter.isViewCountEveryTime') ){\n //$viewCount = Cache::increment($this->cacheViewName, Config::get('counter.viewIncrementAmount', 1));\n $viewsCount = $this->incView();\n //$this->setViewed();\n }else if ( !$this->isViewed() ){\n $viewsCount = $this->incView();\n //$this->setViewed();\n }\n\n return $viewsCount;\n }",
"public function getNbResults()\n {\n $this->sphinxQL->execute();\n\n $helper = Helper::create($this->sphinxQL->getConnection());\n $meta = $helper->showMeta()->execute()->fetchAllAssoc();\n\n foreach ($meta as $item) {\n if ('total_found' === $item['Variable_name']) {\n return (int) $item['Value'];\n }\n }\n\n return 0;\n }",
"public function count()\n {\n return count($this->getResults());\n }",
"public static function record_count()\r\r\n {\r\r\n global $wpdb;\r\r\n $result = false;\r\r\n $totalRecords = 0;\r\r\n $countKey = 'total';\r\r\n $mitambo_json_api = wpsearchconsole::getInstance()->mitambo_json_api;\r\r\n $lastCollectDate = $mitambo_json_api->last_collect_date;\r\r\n $tabName = List_of_Data::getCurrentTabName(isset($_GET['tab']) ? $_GET['tab'] : 1);\r\r\n $type = List_of_Data::getDefaultType($tabName);\r\r\n $type = (isset($_GET['type']) ? $_GET['type'] : $type);\r\r\n\r\r\n $sql = \"SELECT json_value FROM {$wpdb->prefix}wpsearchconsole_data\";\r\r\n\r\r\n $sql .= \" WHERE api_key = '$tabName'\";\r\r\n $sql .= ($tabName == 'keywords' && $type == 0) ? \" AND api_subkey = '$type'\" : \"\";\r\r\n $sql .= ($type && $type != 'all') ? \" AND api_subkey = '$type'\" : \"\";\r\r\n $sql .= \" AND datetime = '\" . substr($lastCollectDate, 0, 10) . \"'\";\r\r\n $sql .= \"GROUP BY api_subkey\";\r\r\n\r\r\n if ($tabName == 'duplication') {\r\r\n $countKey = 'DuplicateGroupsCount';\r\r\n }\r\r\n $response = $wpdb->get_results($sql);\r\r\n foreach ($response as $key => $val) {\r\r\n\r\r\n if (!empty($val) && array_key_exists('json_value', $val)) {\r\r\n\r\r\n $result = json_decode($val->json_value);\r\r\n $totalRecords += ($result && array_key_exists($countKey, $result)) ? $result->$countKey : 0;\r\r\n }\r\r\n }\r\r\n\r\r\n return $totalRecords;\r\r\n }",
"function apc_cache_click_updates_count() {\n\t$count = 0;\n\tif(apc_exists(APC_CACHE_CLICK_INDEX)) {\n\t\t$clickindex = apc_fetch(APC_CACHE_CLICK_INDEX);\n\t\t$count = count($clickindex);\n\t}\n\treturn $count;\n}",
"public function computeCount() {\n if ($str = elis_consumer_http_request($this->url_pattern . '&rows=0', array('Accept' => 'application/json'))) {\n if ($json = json_decode($str)) {\n $this->totalCount = $json->response->numFound;\n }\n }\n return $this->totalCount;\n }",
"public function getStatistics()\n\t{\n\t\treturn $this->counter;\n\t}",
"function getHitsPerPage($hits) {\n $nav = \"Träffar per sida: \";\n foreach($hits AS $val) {\n $nav .= \"<a href='\" . getQueryString(array('hits' => $val)) . \"'>$val</a> \";\n } \n return $nav;\n}",
"public function countResult($currentLevel)\n {\n global $wp_query;\n\n $counts = array(\n 'all' => 0,\n 'subscriptions' => 0,\n 'current' => 0,\n );\n\n $counts[$currentLevel] = $wp_query->found_posts;\n\n foreach ($counts as $level => $resultCount) {\n if ($resultCount <> 0) {\n continue;\n }\n\n $queryVars = $wp_query->query_vars;\n $sites = \\VcExtended\\Library\\Search\\ElasticSearch::getSitesFromLevel($level);\n\n $postStatuses = array('publish', 'inherit');\n\n if (is_user_logged_in()) {\n $postStatuses[] = 'private';\n }\n\n $query = new \\WP_Query(array(\n 's' => get_search_query(),\n 'orderby' => 'relevance',\n 'sites' => $sites,\n 'post_status' => $postStatuses,\n 'post_type' => \\VcExtended\\Library\\Helper\\PostType::getPublic(),\n 'cache_results' => false\n ));\n\n $counts[$level] = $query->found_posts;\n }\n\n $counts['users'] = isset($this->data['users']) ? count($this->data['users']) : 0;\n\n $this->data['counts'] = $counts;\n }",
"public function hasCounts(){\n return $this->_has(6);\n }",
"function wyz_business_stats_visits() {\n\tif ( ! isset($_POST['id']) || ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], 'wyz_ajax_custom_nonce' ) )\n\t\treturn;\n\t$id = esc_html( $_POST['id'] );\n\tif( false === get_post_status( $id ) )\n\t\treturn;\n\tWyzHelpers::maybe_increment_business_visits( $id );\n\twp_die();\n}",
"public static function getNumBadgesSent() {\n $all = DbBadge::getAll();\n return count($all);\n }"
] | [
"0.7251487",
"0.6947069",
"0.6924074",
"0.68192047",
"0.6801171",
"0.66215724",
"0.65849227",
"0.65541714",
"0.6365223",
"0.634498",
"0.634498",
"0.63298035",
"0.62473065",
"0.6211399",
"0.613222",
"0.6127551",
"0.5890233",
"0.5812902",
"0.5768887",
"0.5728775",
"0.5728775",
"0.5728775",
"0.56902343",
"0.5669768",
"0.5646451",
"0.5631942",
"0.56031555",
"0.5593529",
"0.55921125",
"0.5557284",
"0.5535115",
"0.54800946",
"0.54289913",
"0.5411337",
"0.53667235",
"0.53635937",
"0.53490776",
"0.53490776",
"0.53435564",
"0.534065",
"0.53279793",
"0.53181237",
"0.5310914",
"0.52981865",
"0.5288225",
"0.5273945",
"0.52717274",
"0.5266635",
"0.5230486",
"0.5212029",
"0.5188084",
"0.5179838",
"0.5172776",
"0.51664484",
"0.5163324",
"0.5159136",
"0.5158522",
"0.51557165",
"0.5150881",
"0.5147536",
"0.51414055",
"0.5139811",
"0.5139161",
"0.5136753",
"0.5126627",
"0.5111015",
"0.51019734",
"0.5089376",
"0.5084182",
"0.5070805",
"0.50692546",
"0.5052446",
"0.5045561",
"0.50390613",
"0.50357723",
"0.5031357",
"0.50277704",
"0.50277704",
"0.50277704",
"0.502431",
"0.5008312",
"0.5002262",
"0.4997793",
"0.4997098",
"0.49959657",
"0.49900773",
"0.4989218",
"0.49808845",
"0.49804276",
"0.49766868",
"0.4964528",
"0.4958278",
"0.49514446",
"0.49497974",
"0.49432352",
"0.49417076",
"0.49402958",
"0.4938228",
"0.49355295",
"0.49355072",
"0.4927598"
] | 0.0 | -1 |
Creates and returns the Analytics service object. | function getService()
{
// Load the Google API PHP Client Library.
// require_once 'google-api-php-client/src/Google/autoload.php';
require_once APPPATH.'third_party/Google_api/src/Google/autoload.php';
$client = new Google_Client();
$client->setApplicationName("[email protected]");
$client->setDeveloperKey("AIzaSyBX98zkxCCkQcxS_-qfKftDKgAgYPgS078");
// Create and configure a new client object.
$client = new Google_Client();
$client->setApplicationName("HelloAnalytics");
$analytics = new Google_Service_Analytics($client);
// // Read the generated client_secrets.p12 key.
// $key = file_get_contents($key_file_location);
// $cred = new Google_Auth_AssertionCredentials(
// $service_account_email,
// array(Google_Service_Analytics::ANALYTICS_READONLY),
// $key
// );
// $client->setAssertionCredentials($cred);
// if($client->getAuth()->isAccessTokenExpired()) {
// $client->getAuth()->refreshTokenWithAssertion($cred);
// }
return $analytics;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAnalyticsService(): Google_Service_Analytics\n {\n return $this->client->getAnalyticsService();\n }",
"public function getAnalyticsConnection()\n {\n return new Analytics($this->apiEmail, $this->apiKey);\n }",
"function initializeAnalytics()\n {\n\n // Use the developers console and download your service account\n // credentials in JSON format. Place them in this directory or\n // change the key file location if necessary.\n $KEY_FILE_LOCATION = \"/home/genjerator/Downloads/My Project-5c94ecfcd7a7.json\";\n\n // Create and configure a new client object.\n $client = new \\Google_Client();\n $client->setApplicationName(\"Hello Analytics Reporting\");\n $client->setAuthConfig($KEY_FILE_LOCATION);\n $client->setScopes(['https://www.googleapis.com/auth/analytics.readonly']);\n\n $analytics = new \\Google_Service_AnalyticsReporting($client);\n\n return $analytics;\n }",
"function initializeAnalytics()\n{\n $KEY_FILE_LOCATION= __DIR__ . '/key_540635147.json';\n $client = new Google_Client();\n $client->setAuthConfig($KEY_FILE_LOCATION);\n $client->setScopes(['https://www.googleapis.com/auth/analytics.readonly']);\n $analytics = new Google_Service_Analytics ($client);\n \n return $analytics;\n}",
"protected function service()\n {\n return new Service();\n }",
"private function getAnalyticsResponse(RequestInterface $request, ResponseInterface $response)\n {\n return new AnalyticsResponse($request, $response);\n }",
"public static function get_instance() {\n\t\tif ( ! isset( self::$instance ) && ! ( self::$instance instanceof IBX_WPFomo_Analytics ) ) {\n\t\t\tself::$instance = new IBX_WPFomo_Analytics();\n\t\t}\n\n\t\treturn self::$instance;\n\t}",
"public function getAnalytics()\n {\n if (array_key_exists(\"analytics\", $this->_propDict)) {\n if (is_a($this->_propDict[\"analytics\"], \"\\Microsoft\\Graph\\Model\\ItemAnalytics\") || is_null($this->_propDict[\"analytics\"])) {\n return $this->_propDict[\"analytics\"];\n } else {\n $this->_propDict[\"analytics\"] = new ItemAnalytics($this->_propDict[\"analytics\"]);\n return $this->_propDict[\"analytics\"];\n }\n }\n return null;\n }",
"private function __construct() {\n\t\t// At this time, we only leverage universal analytics when enhanced ecommerce is selected and WooCommerce is active.\n\t\t// Otherwise, don't bother emitting the tracking ID or fetching analytics.js\n\t\tif ( class_exists( 'WooCommerce' ) && Jetpack_Google_Analytics_Options::enhanced_ecommerce_tracking_is_enabled() ) {\n\t\t\tself::$analytics = new Jetpack_Google_Analytics_Universal();\n\t\t\tnew Jetpack_Google_AMP_Analytics();\n\t\t} else {\n\t\t\tself::$analytics = new Jetpack_Google_Analytics_Legacy();\n\t\t}\n\t}",
"public function testComAdobeCqSocialReportingAnalyticsServicesImplAnalyticsReportI()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.cq.social.reporting.analytics.services.impl.AnalyticsReportImporterServiceImpl';\n\n $crawler = $client->request('POST', $path);\n }",
"public static function instance() {\n\t\treturn tribe( 'events-aggregator.service' );\n\t}",
"public function ga( )\n {\n // Grab the params\n $params = func_get_args();\n \n // If we have a create call, make sure we initialize a new tracker\n if($params[0] == 'create')\n {\n return call_user_func_array(array($this, 'create'), array_slice($params, 1));\n }\n \n foreach($this->instances as $instance)\n {\n // Call each instance->ga()\n call_user_func_array(array($instance, 'ga'), $params);\n }\n }",
"public static function init() {\n static $instance = false;\n\n if ( ! $instance ) {\n $instance = new WPUF_User_Analytics();\n }\n\n return $instance;\n }",
"public static function factory(): ServiceInterface\n {\n return new static();\n }",
"public function create()\n {\n $subscription = new Subscription();\n\n return $subscription;\n }",
"protected function create($account, $config = array())\n {\n if(!isset($config['name']))\n {\n // This shouldn't happen anymore... but just in case, force it!\n $config['name'] = 't' . count($this->instances);\n }\n \n // Grab overall config options\n $debug = $this->debug;\n $autoPageview = $this->autoPageview;\n \n // Finally, make a new instance\n $this->instances[$config['name']] = new UniversalAnalyticsInstance($account, $config, $debug, $autoPageview);\n \n // Return the newly created instance\n return $this->instances[$config['name']];\n }",
"public function getAnalytics(array $data = [])\n {\n $response = $this->request->get('user_account/analytics', $data);\n return new UserAccountAnalytic($this->master, $response);\n }",
"public static function getInstance() {\n if( !isset( self::$_instance ) ) {\n self::$_instance = new ServicesBuilder();\n }\n\n return self::$_instance;\n }",
"public function getGanalytics()\n {\n return $this->ganalytics;\n }",
"public function createService(AccountServiceManagerInterface $sl);",
"public function getService()\n {\n if (!$this->service) {\n /** @var \\OAuth\\ServiceFactory $serviceFactory */\n $serviceFactory = $this->app->make('oauth/factory/service');\n $this->service = $this->factory->createService($serviceFactory);\n }\n\n return $this->service;\n }",
"protected function registerOpenWebAnalytics()\n {\n $this->app->singleton('openwebanalytics', function ($app) {\n $config = $app['config']->get('services.owa');\n\n $baseUrl = isset($config['base_url']) ? $config['base_url'] : null;\n $apiKey = isset($config['api_key']) ? $config['api_key'] : null;\n $siteId = isset($config['site_id']) ? $config['site_id'] : null;\n $format = isset($config['rest_format']) ? $config['rest_format'] : null;\n\n return new OpenWebAnalytics($baseUrl, $apiKey, $siteId, $format);\n });\n\n $this->app->alias('openwebanalytics', 'Hafael\\OpenWebAnalytics\\OpenWebAnalytics');\n }",
"public function created(Service $Service)\n {\n //code...\n }",
"protected function getVictoireAnalytics_ViewHelperService()\n {\n return $this->services['victoire_analytics.view_helper'] = new \\Victoire\\Bundle\\AnalyticsBundle\\Helper\\AnalyticsViewHelper($this->get('victoire_view_reference.repository'), $this->get('doctrine.orm.default_entity_manager'), $this->get('victoire_page.page_helper'));\n }",
"public function setAnalytics($val)\n {\n $this->_propDict[\"analytics\"] = $val;\n return $this;\n }",
"public function __construct(AgencyServiceInterface $agencyService,\n ExtensionServiceInterface $extensionService)\n {\n// $this->middleware('auth');\n $this->agencyService = $agencyService;\n $this->extensionService = $extensionService;\n }",
"public function create($agency_service_feature_id = '') {\n return (object) array(\n 'agency_service_feature_id' => $agency_service_feature_id,\n 'service_feature_id' => '',\n 'created_at' => '',\n 'updated_at' => '',\n 'created_by' => '',\n 'updated_by' => '',\n );\n }",
"private function registerGoogleAnalytics()\r\n {\r\n // Only load the JS if this integration is enabled.\r\n if (!(bool) $this->config->get('event_tracking::settings.integrations.google_analytics', false)) {\r\n return;\r\n }\r\n\r\n $al = AssetList::getInstance();\r\n\r\n $al->register(\r\n 'javascript',\r\n 'event_tracking/google_analytics',\r\n 'js/google-analytics.js',\r\n [],\r\n 'event_tracking'\r\n );\r\n\r\n $assetGroup = ResponseAssetGroup::get();\r\n $assetGroup->requireAsset('javascript', 'event_tracking/google_analytics');\r\n }",
"public function get_tracker_data() {\n\t\t$option_object = $this->get_analytics_options();\n\n\t\t// Look for a site level Google Analytics ID\n\t\t$google_analytics_id = get_option( 'wsuwp_ga_id', false );\n\n\t\t// Look for a site level Google Analytics ID\n\t\t$ga4_google_analytics_id = get_option( 'wsuwp_ga4_id', false );\n\n\t\t// If a site level ID does not exist, look for a network level Google Analytics ID\n\t\tif ( ! $google_analytics_id ) {\n\t\t\t$google_analytics_id = get_site_option( 'wsuwp_network_ga_id', false );\n\t\t}\n\n\t\t// Provide this via filter in your instance of WordPress. In the WSUWP Platform, this will\n\t\t// be part of a must-use plugin.\n\t\t$app_analytics_id = apply_filters( 'wsu_analytics_app_analytics_id', '' );\n\n\t\t$spine_color = '';\n\t\t$spine_grid = '';\n\t\t$wsuwp_network = '';\n\n\t\tif ( function_exists( 'spine_get_option' ) ) {\n\t\t\t$spine_color = esc_js( spine_get_option( 'spine_color' ) );\n\t\t\t$spine_grid = esc_js( spine_get_option( 'grid_style' ) );\n\t\t}\n\n\t\tif ( is_multisite() ) {\n\t\t\t$wsuwp_network = get_network()->domain;\n\t\t}\n\n\t\t// Do not track site analytics on admin or preview views.\n\t\tif ( is_admin() || is_preview() ) {\n\t\t\t$option_object['track_site'] = false;\n\t\t}\n\n\t\t// Escaping of tracker data for output as JSON is handled via wp_localize_script().\n\t\t$tracker_data = array(\n\t\t\t'defaults' => array(\n\t\t\t\t'cookieDomain' => $this->get_cookie_domain(),\n\t\t\t),\n\n\t\t\t'wsuglobal' => array(\n\t\t\t\t'ga_code' => 'true' === $option_object['track_global'] ? 'UA-55791317-1' : false, // Hard coded global analytics ID for WSU.\n\t\t\t\t'campus' => $option_object['campus'],\n\t\t\t\t'college' => $option_object['college'],\n\t\t\t\t'unit_type' => $option_object['unit_type'],\n\t\t\t\t// Fallback to the subunit if a unit is not selected.\n\t\t\t\t'unit' => 'none' === $option_object['unit'] && 'none' !== $option_object['subunit'] ? $option_object['subunit'] : $option_object['unit'],\n\t\t\t\t// If a subunit has been used as a fallback, output \"none\" as the subunit.\n\t\t\t\t'subunit' => 'none' !== $option_object['unit'] ? $option_object['subunit'] : 'none',\n\t\t\t\t'is_editor' => $this->is_editor() ? 'true' : 'false',\n\t\t\t\t'track_view' => is_admin() ? 'no' : 'yes',\n\t\t\t\t'events' => array(),\n\t\t\t),\n\n\t\t\t'app' => array(\n\t\t\t\t'ga_code' => 'true' === $option_object['track_app'] ? $this->sanitize_ga_id( $app_analytics_id ) : false,\n\t\t\t\t'page_view_type' => $this->get_page_view_type(),\n\t\t\t\t'authenticated_user' => $this->get_authenticated_user(),\n\t\t\t\t'user_id' => ( is_admin() ) ? get_current_user_id() : 0,\n\t\t\t\t'server_protocol' => $_SERVER['SERVER_PROTOCOL'],\n\t\t\t\t'wsuwp_network' => $wsuwp_network,\n\t\t\t\t'spine_grid' => $spine_grid,\n\t\t\t\t'spine_color' => $spine_color,\n\t\t\t\t'events' => array(),\n\t\t\t),\n\n\t\t\t'site' => array(\n\t\t\t\t'ga_code' => 'true' === $option_object['track_site'] ? $google_analytics_id : false,\n\t\t\t\t'ga4_code' => $ga4_google_analytics_id,\n\t\t\t\t'track_view' => is_admin() ? 'no' : 'yes',\n\t\t\t\t'events' => array(),\n\t\t\t),\n\t\t);\n\n\t\treturn $tracker_data;\n\t}",
"public function createService($serviceLocator)\n {\n // Retrieve config from passed service locator\n $config = $serviceLocator->config;\n\n if (!$config) {\n $config = [];\n }\n\n $aws = Aws::factory($config);\n\n // Attach an event listener that will append the Yii2 version number in the user agent string\n $aws->getEventDispatcher()->addListener('service_builder.create_client', array($this, 'onCreateClient'));\n\n return $aws;\n }",
"function getReport($analytics) {\n\n // Replace with your view ID, for example XXXX.\n $VIEW_ID = \"UA-90471108-1\";\n\n // Create the DateRange object.\n $dateRange = new Google_Service_AnalyticsReporting_DateRange();\n $dateRange->setStartDate(\"7daysAgo\");\n $dateRange->setEndDate(\"today\");\n\n // Create the Metrics object.\n $sessions = new Google_Service_AnalyticsReporting_Metric();\n $sessions->setExpression(\"ga:sessions\");\n $sessions->setAlias(\"sessions\");\n\n // Create the ReportRequest object.\n $request = new Google_Service_AnalyticsReporting_ReportRequest();\n $request->setViewId($VIEW_ID);\n $request->setDateRanges($dateRange);\n $request->setMetrics(array($sessions));\n\n $body = new Google_Service_AnalyticsReporting_GetReportsRequest();\n $body->setReportRequests( array( $request) );\n return $analytics->reports->batchGet( $body );\n}",
"function create_report($analytics,$id){\n $VIEW_ID = $id;\n // $VIEW_ID = \"227162231\";\n // Create the DateRange object.\n $dateRange = new Google_Service_AnalyticsReporting_DateRange();\n $dateRange->setStartDate(\"7daysAgo\");\n $dateRange->setEndDate(\"today\");\n\n // Create the Metrics object.\n $sessions = new Google_Service_AnalyticsReporting_Metric();\n $sessions->setExpression(\"ga:sessions\");\n $sessions->setAlias(\"sessions\");\n\n//Create the Dimensions object.\n$browser = new Google_Service_AnalyticsReporting_Dimension();\n$browser->setName(\"ga:browser\");\n\n\n\n\n // Create Dimension Filter.\n $dimensionFilter = new Google_Service_AnalyticsReporting_DimensionFilter();\n $dimensionFilter->setDimensionName(\"ga:browser\");\n $dimensionFilter->setOperator(\"EXACT\");\n $dimensionFilter->setExpressions(array(\"Safari\"));\n\n $dimensionFilterClause = new Google_Service_AnalyticsReporting_DimensionFilterClause();\n $dimensionFilterClause->setFilters(array($dimensionFilter));\n // Create the ReportRequest object.\n $request = new Google_Service_AnalyticsReporting_ReportRequest();\n $request->setViewId($VIEW_ID);\n $request->setDateRanges($dateRange);\n $request->setDimensions(array($browser));\n $request->setDimensionFilterClauses(array($dimensionFilterClause));\n $request->setMetrics(array($sessions));\n\n// $request->setDimensionFilterClauses(array($dimensionFilter));\n $body = new Google_Service_AnalyticsReporting_GetReportsRequest();\n $body->setReportRequests( array( $request));\n return $analytics->reports->batchGet( $body);\n\n}",
"public function testComAdobeCqSocialReportingAnalyticsServicesImplAnalyticsReportM()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.cq.social.reporting.analytics.services.impl.AnalyticsReportManagementServiceImpl';\n\n $crawler = $client->request('POST', $path);\n }",
"public function created(Service $service)\n {\n //\n }",
"public static function get_google_analytics_script()\n {\n return self::get_google_analitycs_script();\n }",
"public function __construct()\n {\n $this->demoService = new DemoService();\n }",
"public function analytics()\n {\n return $this->hasMany(EntryAnalytic::class);\n }",
"public function creating(Service $Service)\n {\n //code...\n }",
"protected function getLoggerService()\n {\n $this->services['logger'] = $instance = new \\Symfony\\Bridge\\Monolog\\Logger('app');\n\n $instance->useMicrosecondTimestamps(true);\n $instance->pushHandler($this->get('monolog.handler.console'));\n $instance->pushHandler($this->get('monolog.handler.main'));\n\n return $instance;\n }",
"function EDD_Enhanced_Ecommerce_Tracking() {\n\t\treturn EDD_Enhanced_Ecommerce_Tracking::instance();\n\t}",
"public function testGa()\n {\n $instance = $this->universalAnalytics->ga('create', 'UA-123456-1');\n $this->assertInstanceOf('Lenrsmith\\UniversalAnalytics\\UniversalAnalyticsInstance', $instance);\n \n // Since this isn't a create call, we shouldn't get anything\n $return = $this->universalAnalytics->ga('send', 'pageview');\n $this->assertNull($return);\n \n // Make sure we automatically got a name\n $this->assertEquals('t0.', $instance->name);\n \n // Make sure we automatically got a name\n $secondInstance = $this->universalAnalytics->ga('create', 'UA-654321-1', array('name' => 'foobar'));\n $this->assertEquals('foobar.', $secondInstance->name);\n }",
"function createObject() {\n\t\treturn new InstitutionalSubscription();\n\t}",
"protected function resourceService(){\n return new $this->resourceService;\n }",
"final public function Add_Google_Analytics() {\n\t\tif (isset(self::$GOOGLE_ANALYTICS_ID) && !empty(self::$GOOGLE_ANALYTICS_ID)) {\n\t\t?>\n<script async src=\"https://www.googletagmanager.com/gtag/js?id=<?= self::$GOOGLE_ANALYTICS_ID; ?>\"></script>\n<script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', '<?= self::$GOOGLE_ANALYTICS_ID; ?>');</script>\n<?\n \t}\n\t}",
"private function instantiate_service( $class ) {\n\t\tif ( ! class_exists( $class ) ) {\n\t\t\tthrow Exception\\InvalidService::from_service( $class );\n\t\t}\n\n\t\t$service = new $class();\n\n\t\tif ( ! $service instanceof Service ) {\n\t\t\tthrow Exception\\InvalidService::from_service( $service );\n\t\t}\n\n\t\tif ( $service instanceof AssetsAware ) {\n\t\t\t$service->with_assets_handler( $this->assets_handler );\n\t\t}\n\n\t\treturn $service;\n\t}",
"public function getGA(Request $request){\n $p12FilePath = storage_path('fintech-ee34a09820c7.p12');\n\n // OAuth2 service account ClientId\n $serviceClientId = '455664926333-inmsn3c3g9m18s553clrh770bgoq505t.apps.googleusercontent.com';\n\n // OAuth2 service account email address\n $serviceAccountName = '[email protected]';\n\n // Scopes we're going to use, only analytics for this tutorial\n $scopes = array(\n 'https://www.googleapis.com/auth/analytics.readonly'\n );\n\n $googleAssertionCredentials = new \\Google_Auth_AssertionCredentials(\n $serviceAccountName,\n $scopes,\n file_get_contents($p12FilePath)\n );\n\n $client = new \\Google_Client();\n $client->setAssertionCredentials($googleAssertionCredentials);\n $client->setClientId($serviceClientId);\n $client->setApplicationName(\"Project\");\n\n // Create Google Service Analytics object with our preconfigured Google_Client\n $analytics = new \\Google_Service_Analytics($client);\n\n // Add Analytics View ID, prefixed with \"ga:\"\n $analyticsViewId = 'ga:140884579';\n\n $startDate = '2017-02-20';\n $endDate = '2017-02-22';\n $metrics = 'ga:sessions,ga:pageviews';\n\n $data = $analytics->data_ga->get($analyticsViewId, $startDate, $endDate, $metrics, array(\n 'dimensions' => 'ga:pagePath',\n // 'filters' => 'ga:pagePath==/url/to/product/',\n 'sort' => '-ga:pageviews',\n ));\n\n // Data \n $items = $data->getRows();\n dd($items);\n }",
"public function siteService() {\n return StatusBoard_SiteService::fromId($this->siteservice);\n }",
"public function injectAnalytics() {\n $googleAnalyticsId = Project::$googleAnalyticsId;\n if (isset($googleAnalyticsId) && $googleAnalyticsId != '') {\n\n ?>\n <script>\n (function (b, o, i, l, e, r) {\n b.GoogleAnalyticsObject = l;\n b[l] || (b[l] =\n function () {\n (b[l].q = b[l].q || []).push(arguments)\n });\n b[l].l = +new Date;\n e = o.createElement(i);\n r = o.getElementsByTagName(i)[0];\n e.src = 'https://www.google-analytics.com/analytics.js';\n r.parentNode.insertBefore(e, r)\n }(window, document, 'script', 'ga'));\n ga('create', '<?php echo $googleAnalyticsId; ?>', 'auto');\n ga('send', 'pageview');\n </script><?php\n }\n }",
"public function analytics(){\n $ads = \\Auth::user()->ads()->where('active', '>', 0)->get();\n foreach ($ads as $ad) {\n $ad->generateClicksByMonthChart();\n $ad->generateClicksByPageChart();\n $ad->generateClicksByZipChart();\n $ad->generateClicksByCityChart();\n $ad->generateClicksByStateChart();\n }\n return view('analytics/index',[\n 'business' => null,\n 'ads' => $ads\n ]);\n }",
"public function setService(){\n if($this->getRecord()->getRecordType() === \"yt\"){\n $this->service = new YoutubeService();\n }\n if($this->getRecord()->getRecordType() === \"gm\"){\n $this->service = new GoogleMapService();\n }\n }",
"public function createService($serviceClass);",
"protected function getLoggerService()\n {\n return $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger();\n }",
"protected function getMonolog_Logger_AsseticService()\n {\n $this->services['monolog.logger.assetic'] = $instance = new \\Symfony\\Bridge\\Monolog\\Logger('assetic');\n\n $instance->pushHandler($this->get('monolog.handler.console'));\n $instance->pushHandler($this->get('monolog.handler.main'));\n\n return $instance;\n }",
"protected function get_collector() {\n\t\t$collector = new WPSEO_Collector();\n\t\t$collector->add_collection( new WPSEO_Tracking_Default_Data() );\n\t\t$collector->add_collection( new WPSEO_Tracking_Server_Data() );\n\t\t$collector->add_collection( new WPSEO_Tracking_Theme_Data() );\n\t\t$collector->add_collection( new WPSEO_Tracking_Plugin_Data() );\n\n\t\treturn $collector;\n\t}",
"function generer_google_analytics(){\n\t/* CONFIG */\n\t$config = unserialize($GLOBALS['meta']['seo']);\n\n\t/* GOOGLE ANALYTICS */\n\tif ($config['analytics']['id']){\n\t\t// Nouvelle balise : http://www.google.com/support/analytics/bin/answer.py?hl=fr_FR&answer=174090&utm_id=ad\n\t\t$flux .= \"<script type=\\\"text/javascript\\\">\n\tvar _gaq = _gaq || [];\n\t_gaq.push(['_setAccount', '\" . $config['analytics']['id'] . \"']);\n\t_gaq.push(['_trackPageview']);\n\t(function() {\n\t\tvar ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n\t\tga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n\t\tvar s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n\t})();\n</script>\n\";\n\t}\n\n\treturn $flux;\n}",
"public static function getExtensionService(): ExtensionService\n {\n return ObjectManageable::createObject(ExtensionService::class);\n }",
"public function __construct()\n {\n $this->aiTurnService = App::make(AITurnService::class);\n }",
"function __construct($service) {\n // return new $class;\n }",
"protected function getAuthService()\n {\n return $this->services['auth'] = new \\phpbb\\auth\\auth();\n }",
"public function create()\n {\n return \\Response::view('service.create');\n }",
"public function store(StoreServiceRequest $request)\n {\n $service = Service::create($request->only(['name']));\n\n return new ServiceResource($service);\n\n }",
"public function createClient()\n {\n $scopes = implode(' ', [\\Google_Service_Calendar::CALENDAR]);\n\n $client = new \\Google_Client();\n $client->setApplicationName('P4 LMS');\n $client->setScopes($scopes);\n $client->setClientId(env('GOOGLE_API_ID'));\n $client->setClientSecret(env('GOOGLE_API_SECRET'));\n $client->setAccessType('offline');\n\n return $client;\n }",
"protected function getMonolog_Logger_PhpService()\n {\n $this->services['monolog.logger.php'] = $instance = new \\Symfony\\Bridge\\Monolog\\Logger('php');\n\n $instance->pushHandler($this->get('monolog.handler.console'));\n $instance->pushHandler($this->get('monolog.handler.main'));\n\n return $instance;\n }",
"public function service()\n {\n }",
"public static function get_instance() {\n\t\tstatic $instance = null;\n\t\tif ( $instance === null ) {\n\t\t\t$instance = new Ga_Lib_Api_Client();\n\t\t}\n\n\t\treturn $instance;\n\t}",
"protected function variablesService()\n {\n if (class_exists(VariablesService::class)) {\n return app()->make(VariablesService::class);\n }\n return;\n }",
"protected function getPhpbb_Report_HandlerFactoryService()\n {\n return $this->services['phpbb.report.handler_factory'] = new \\phpbb\\report\\handler_factory($this);\n }",
"protected static function createClient()\n {\n $log = new Logger('debug');\n $client = new Google_Client();\n $client->setApplicationName(self::APPLICATION_NAME);\n $client->useApplicationDefaultCredentials();\n $client->addScope('https://www.googleapis.com/auth/drive');\n $client->setLogger($log);\n return $client;\n }",
"public function analyticsIndexes(): AnalyticsIndexManager\n {\n throw new UnsupportedOperationException();\n }",
"public function getService(string $serviceId, array $arguments = []): Service;",
"public function testComAdobeCqScreensAnalyticsImplScreensAnalyticsServiceImpl()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.cq.screens.analytics.impl.ScreensAnalyticsServiceImpl';\n\n $crawler = $client->request('POST', $path);\n }",
"public function service()\n {\n return $this->service;\n }",
"public static function getInstance() {\r\n if (!Website_Service_Cache::$instance instanceof self) {\r\n Website_Service_Cache::$instance = new self();\r\n }\r\n return Website_Service_Cache::$instance;\r\n }",
"function analytics_init() {\n\t// load Google Analytics JS\n\telgg_extend_view(\"page/elements/head\", \"analytics/head/google\", 999);\n\telgg_extend_view(\"page/elements/head\", \"analytics/head/piwik\", 999);\n\t\n\t// extend the page footer\n\telgg_extend_view(\"page/elements/foot\", \"analytics/footer\", 999);\n\t\n\t// register page handler\n\telgg_register_page_handler(\"analytics\", \"analytics_page_handler\");\n\t\n\t// register tracking events\n\telgg_register_event_handler(\"all\", \"object\", \"analytics_event_tracker\");\n\telgg_register_event_handler(\"all\", \"group\", \"analytics_event_tracker\");\n\telgg_register_event_handler(\"all\", \"user\", \"analytics_event_tracker\");\n\t\n\t// register plugin hooks\n\telgg_register_plugin_hook_handler(\"action\", \"all\", \"analytics_action_plugin_hook\");\n\t\n}",
"public function getService()\n {\n return null;\n }",
"protected function getMonolog_Logger_CacheService()\n {\n $this->services['monolog.logger.cache'] = $instance = new \\Symfony\\Bridge\\Monolog\\Logger('cache');\n\n $instance->pushHandler($this->get('monolog.handler.console'));\n $instance->pushHandler($this->get('monolog.handler.main'));\n\n return $instance;\n }",
"public function __construct()\n {\n $this->service = new ComicService();\n }",
"protected function _construct()\n {\n $this->_init('jirafe_analytics/install');\n }",
"public function service()\r\n {\r\n return $this->service;\r\n }",
"public function testGet( )\n {\n $this->universalAnalytics->ga('create', 'UA-654321-1', array('name' => 'foobar'));\n \n // Grab it & test it\n $instance = $this->universalAnalytics->get('foobar');\n $this->assertInstanceOf('Lenrsmith\\UniversalAnalytics\\UniversalAnalyticsInstance', $instance);\n \n }",
"function getAmazonSDB(){\n $config = getConfig();\n \n $adapterClass = 'Zend_Cloud_DocumentService_Adapter_SimpleDb';\n $amazonSDB = Zend_Cloud_DocumentService_Factory::getAdapter(array(\n Zend_Cloud_DocumentService_Factory::DOCUMENT_ADAPTER_KEY => $adapterClass,\n Zend_Cloud_DocumentService_Adapter_SimpleDb::AWS_ACCESS_KEY => $config->amazon->aws_access_key,\n Zend_Cloud_DocumentService_Adapter_SimpleDb::AWS_SECRET_KEY => $config->amazon->aws_private_key\n ));\n \n //Check if we have to create the domain\n $domains = $amazonSDB->listCollections();\n \n foreach($config->analytics as $key => $item){\n if(!in_array($item->domain, $domains)){\n $amazonSDB->createCollection($item->domain);\n }\n }\n \n return $amazonSDB;\n}",
"public function __construct() {\n\n\t\tif ( defined( 'SERVICE_TRACKER_VERSION' ) ) {\n\t\t\t$this->version = SERVICE_TRACKER_VERSION;\n\t\t} else {\n\t\t\t$this->version = '1.0.0';\n\t\t}\n\t\t$this->plugin_name = 'service-tracker';\n\n\t\tif ( ! class_exists( 'WooCommerce' ) ) {\n\t\t\t$this->add_client_role();\n\t\t}\n\n\t\t$this->load_dependencies();\n\t\t$this->set_locale();\n\t\t$this->define_admin_hooks();\n\t\t$this->api();\n\t\t$this->define_public_hooks();\n\t\t$this->public_user_content();\n\t}",
"public static function getOrCreate(string $name)\n {\n $service = static::$services[$name];\n\n if (null === $service) {\n static::$services[$name] = new $name();\n return static::$services[$name];\n }\n\n return $service;\n }",
"public function __construct(EventsService $eventService)\n {\n $this->service = $eventService;\n }",
"public function create()\n {\n return new GuzzleHttp\\Client(['base_uri' => 'https://sisa.msal.gov.ar/sisa/services/rest/cmdb/obtener']);\n }",
"protected function getClient()\n\t{\n\t\tif (!static::$client) {\n\t\t\tstatic::$client = new \\AlgoliaSearch\\Client(\n\t\t\t\tConfig::get('search.connections.algolia.config.application_id'),\n\t\t\t\tConfig::get('search.connections.algolia.config.admin_api_key')\n\t\t\t);\n\t\t}\n\t\t\n\t\treturn static::$client;\n\t}",
"public static function getInstance()\n {\n\t\tif (self::$instance == null) {\n\t\t\tself::$instance = new ServiceProvider();\n\t\t}\n\t\treturn self::$instance;\n\t}",
"public function createCalendarService($accessToken)\n {\n $client = $this->createClient();\n $client->setAccessToken($accessToken);\n\n return new \\Google_Service_Calendar($client);\n }",
"function getReport($analytics) {\n $VIEW_ID = \"140601798\";\n\n // Create the DateRange object.\n $dateRange = new \\Google_Service_AnalyticsReporting_DateRange();\n $dateRange->setStartDate(\"7daysAgo\");\n $dateRange->setEndDate(\"today\");\n\n // Create the Metrics object.\n $sessions = new \\Google_Service_AnalyticsReporting_Metric();\n $sessions->setExpression(\"ga:sessions\");\n $sessions->setAlias(\"sessions\");\n\n // Create the ReportRequest object.\n $request = new \\Google_Service_AnalyticsReporting_ReportRequest();\n $request->setViewId($VIEW_ID);\n $request->setDateRanges($dateRange);\n $request->setMetrics(array($sessions));\n\n $body = new \\Google_Service_AnalyticsReporting_GetReportsRequest();\n $body->setReportRequests( array( $request) );\n return $analytics->reports->batchGet( $body );\n }",
"public static function createInstance()\n {\n return tx_rnbase::makeInstance(Statistics::class);\n }",
"public static function instance() {\n\t\t\tif ( ! isset( self::$instance ) && ! ( self::$instance instanceof AffiliateWP_Direct_Link_Tracking ) ) {\n\n\t\t\t\tself::$instance = new AffiliateWP_Direct_Link_Tracking;\n\t\t\t\tself::$version = '1.1.4';\n\n\t\t\t\tself::$instance->setup_constants();\n\t\t\t\tself::$instance->load_textdomain();\n\t\t\t\tself::$instance->init();\n\t\t\t\tself::$instance->includes();\n\t\t\t\tself::$instance->hooks();\n\n\t\t\t\tself::$instance->tracking = new AffiliateWP_Direct_Link_Tracking_Base;\n\t\t\t\tself::$instance->direct_links = new Affiliate_WP_Direct_Links_DB;\n\t\t\t\tself::$instance->frontend = new AffiliateWP_Direct_Link_Tracking_Frontend;\n\t\t\t\tself::$instance->emails = new AffiliateWP_Direct_Link_Tracking_Emails;\n\t\t\t}\n\n\t\t\treturn self::$instance;\n\t\t}",
"protected function getService()\n {\n return $this->service;\n }",
"protected function getService()\n {\n return $this->service;\n }",
"public function getService()\n {\n return $this->send('POST', 'getService');\n }",
"Public Function getAllAccountsAnalytics()\n\t{\n\t\t$AcctAnalytics = new Accounts_Analytics($this->id);\n\t\treturn $AcctAnalytics->GetAllAccounts();\n\t}",
"public function getApiClient()\n {\n return new alldadataApi();\n }",
"public function __construct(\n ContextServiceInterface $contextService = null\n ) {\n $container = Shopware()->Container();\n\n $this->db = Shopware()->Db();\n $this->eventManager = Shopware()->Events();\n $this->config = Shopware()->Config();\n $this->numberRangeIncrementer = $container->get('shopware.number_range_incrementer');\n\n $this->contextService = $contextService ?: $container->get('shopware_storefront.context_service');\n $this->attributeLoader = $container->get('shopware_attribute.data_loader');\n $this->attributePersister = $container->get('shopware_attribute.data_persister');\n $this->modelManager = $container->get('models');\n }",
"protected function factorySynchronizer( $serviceName ) {\n\n $class = 'ifrin\\\\SyncSocial\\\\components\\\\services\\\\' . ucfirst( $serviceName );\n if ( class_exists( $class ) ) {\n\n $settings = isset( $this->settings[ $serviceName ] ) ? $this->settings[ $serviceName ] : [ ];\n $connection = isset( $settings['connection'] ) ? $settings['connection'] : [ ];\n\n $key = isset( $connection['key'] ) ? $connection['key'] : null;\n $secret = isset( $connection['secret'] ) ? $connection['secret'] : null;\n $url = $this->getConnectUrl( $serviceName );\n\n $credentials = new Credentials( $key, $secret, $url );\n\n $service = $this->factory->createService( $serviceName, $credentials, $this->storage );\n $options = isset( $settings['options'] ) ? $settings['options'] : [ ];\n\n return new $class( $service, $options );\n }\n }",
"public function getService()\n {\n return $this->_service;\n }",
"protected function getAuth_Provider_Oauth_Service_GoogleService()\n {\n return $this->services['auth.provider.oauth.service.google'] = new \\phpbb\\auth\\provider\\oauth\\service\\google(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'}, ${($_ = isset($this->services['request']) ? $this->services['request'] : ($this->services['request'] = new \\phpbb\\request\\request(NULL, true))) && false ?: '_'});\n }"
] | [
"0.74358827",
"0.730972",
"0.66198874",
"0.6482955",
"0.61389273",
"0.60919607",
"0.5680975",
"0.56633514",
"0.561023",
"0.5534706",
"0.54578745",
"0.5405724",
"0.53953654",
"0.53800094",
"0.5330131",
"0.53170973",
"0.52993345",
"0.5298169",
"0.52447575",
"0.52071434",
"0.51703817",
"0.514577",
"0.5124028",
"0.50991046",
"0.5096565",
"0.50627744",
"0.5043443",
"0.5000051",
"0.49970326",
"0.4991788",
"0.49739942",
"0.49697998",
"0.49564186",
"0.4955939",
"0.494047",
"0.49164042",
"0.49121153",
"0.49038967",
"0.48932654",
"0.48892787",
"0.48687756",
"0.48643327",
"0.48525214",
"0.48443013",
"0.48404616",
"0.48268837",
"0.48261404",
"0.48221222",
"0.48075423",
"0.48041815",
"0.47974786",
"0.47867373",
"0.47828045",
"0.4762074",
"0.47507304",
"0.47463477",
"0.47445953",
"0.47433165",
"0.4729074",
"0.4703464",
"0.4696222",
"0.46793994",
"0.46722206",
"0.46648127",
"0.4663315",
"0.466",
"0.46527112",
"0.46477166",
"0.46439022",
"0.4641846",
"0.4638557",
"0.46369076",
"0.46327674",
"0.46290982",
"0.46252683",
"0.46215287",
"0.4621473",
"0.4609474",
"0.4607485",
"0.46070528",
"0.4591933",
"0.4591211",
"0.45881373",
"0.458144",
"0.45762753",
"0.45716456",
"0.45681715",
"0.45652223",
"0.4561986",
"0.45596787",
"0.45592985",
"0.45583966",
"0.45583966",
"0.4555015",
"0.455311",
"0.45505244",
"0.4550109",
"0.45407283",
"0.45369118",
"0.4535285"
] | 0.7007911 | 2 |
Get the user's first view (profile) ID. | function getFirstprofileId(&$analytics) {
// Get the list of accounts for the authorized user.
$accounts = $analytics->management_accounts->listManagementAccounts();
if (count($accounts->getItems()) > 0) {
$items = $accounts->getItems();
$firstAccountId = $items[0]->getId();
// Get the list of properties for the authorized user.
$properties = $analytics->management_webproperties
->listManagementWebproperties($firstAccountId);
if (count($properties->getItems()) > 0) {
$items = $properties->getItems();
$firstPropertyId = $items[0]->getId();
// Get the list of views (profiles) for the authorized user.
$profiles = $analytics->management_profiles
->listManagementProfiles($firstAccountId, $firstPropertyId);
if (count($profiles->getItems()) > 0) {
$items = $profiles->getItems();
// Return the first view (profile) ID.
return $items[0]->getId();
} else {
throw new Exception('No views (profiles) found for this user.');
}
} else {
throw new Exception('No properties found for this user.');
}
} else {
throw new Exception('No accounts found for this user.');
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getFirstprofileId(&$analytics) {\n\n // Get the list of accounts for the authorized user.\n $accounts = $analytics->management_accounts->listManagementAccounts();\n\n if (count($accounts->getItems()) > 0) {\n $items = $accounts->getItems();\n $firstAccountId = $items[0]->getId();\n\n // Get the list of properties for the authorized user.\n $properties = $analytics->management_webproperties\n ->listManagementWebproperties($firstAccountId);\n\n if (count($properties->getItems()) > 0) {\n $items = $properties->getItems();\n $firstPropertyId = $items[0]->getId();\n\n // Get the list of views (profiles) for the authorized user.\n $profiles = $analytics->management_profiles\n ->listManagementProfiles($firstAccountId, $firstPropertyId);\n\n if (count($profiles->getItems()) > 0) {\n $items = $profiles->getItems();\n\n // Return the first view (profile) ID.\n return $items[0]->getId();\n\n } else {\n throw new Exception('No views (profiles) found for this user.');\n }\n } else {\n throw new Exception('No properties found for this user.');\n }\n } else {\n throw new Exception('No accounts found for this user.');\n }\n}",
"public function GetId() {\n\t\t\n\t\t$user = self::GetUserProfile();\n\t\treturn $user['id'];\n\t}",
"protected function getUserId()\n {\n return object_get($this->getUser(), 'profile_id', $this->getDefaultProfileId() );\n }",
"private function getProfileId()\n {\n $identity = $this->getIdentity();\n \n return $identity !== null && $identity->getCurrentProfile() ? $identity->getCurrentProfile()->profile_id : null;\n }",
"public function id() {\n return isset($this->_adaptee->user_info['user_id']) ? $this->_adaptee->user_info['user_id'] : null;\n }",
"public static function getCurrentUserId()\n {\n $profile = self::getProfile();\n\n return $profile ? $profile->getProfileId() : 0;\n }",
"public function getCurrentViewId()\n {\n $view_data = $this->_getCurrentView();\n\n if (!empty($view_data)) {\n return $view_data['view_id'];\n }\n\n return null;\n }",
"function user_id () {\r\n\t$info = user_info();\r\n\treturn (isset($info[0]) ? $info[0] : 0);\r\n}",
"protected static function reviewer()\n {\n return auth()->check() ? auth()->id() : 1;\n }",
"public function get_user_id();",
"public function getUserId()\n {\n return $this->accessToken->user_id;\n }",
"function getProfileID() {\n\t\treturn $this->_ProfileID;\n\t}",
"protected function determine_user_id() {\n\t\t$user_id = $this->context->site_user_id;\n\n\t\t/**\n\t\t * Filter: 'wpseo_schema_person_user_id' - Allows filtering of user ID used for person output.\n\t\t *\n\t\t * @api int|bool $user_id The user ID currently determined.\n\t\t */\n\t\treturn apply_filters( 'wpseo_schema_person_user_id', $user_id );\n\t}",
"function get_user_id()\r\n {\r\n return $this->user->get_id();\r\n }",
"public function getCurrentUserId()\n\t{\n\t\treturn array_key_exists('user_id', $this->session->data) ? $this->session->data['user_id'] : 0;\n\t}",
"public function id()\n {\n if ($this->user()) {\n return $this->user()->getAuthIdentifier();\n }\n return null;\n }",
"public function getUserId() {\n\t\treturn $this->Session->read('UserAuth.User.id');\n\t}",
"public function getUserId()\n {\n \treturn $this->getCurrentUserid();\n }",
"public function getProfileId()\n {\n return $this->profile_id;\n }",
"public function id()\n {\n return $this->user->id;\n }",
"public function getUser_id()\n {\n return isset($this->user_id) ? $this->user_id : null;\n }",
"static function getProfileID($user_id)\n\t{\n\n\t\t$profile = ORM::for_table('PROFILE')->select('profile_id')->where('owner_id', $user_id)->find_one();\n\n\t\treturn $profile;\n\t}",
"public static function id ()\n {\n return self::user()->getId();\n }",
"public function getUserId() {\n\t\t$currentUser = $this->getLoggedUser();\n\t\tif ($currentUser) {\n\t\t\treturn $currentUser->getId();\n\t\t}\n\t}",
"protected function getFrontendUserId()\n {\n // is $GLOBALS set?\n if (\n ($GLOBALS['TSFE'])\n && ($GLOBALS['TSFE']->loginUser)\n && ($GLOBALS['TSFE']->fe_user->user['uid'])\n ) {\n return intval($GLOBALS['TSFE']->fe_user->user['uid']);\n //===\n }\n\n return 0;\n //===\n }",
"public function getUserId()\n {\n $CI = &get_instance();\n if (!$this->loggedIn()) {\n return null;\n } else {\n $userId = $CI->session->userdata('user_id');\n return $userId;\n }\n }",
"public function getUserId()\n {\n if (sfContext::hasInstance())\n {\n if ($userId = sfContext::getInstance()->getUser()->getAttribute('user_id'))\n {\n return $userId;\n }\n }\n return 1;\n }",
"public function getUserId() {\n return $this->user === null ? null : $this->user->id;\n }",
"public function get_id_user()\n {\n return (isset($this->_id_user)) ? $this->_id_user : null;\n }",
"public function user_id()\n\t{\n\t\tif ($this->logged_in())\n\t\t{\n\t\t\treturn $this->_facebook->getUser();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->login_url();\n\t\t\t\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"function current_user_id()\n{\n $user = \\Yii::$app->user;\n $user_id = $user->getId();\n return is_numeric($user_id) ? $user_id : 0;\n}",
"public function identity()\r\n {\r\n\t\t$storage = $this->get_storage();\r\n\r\n if ($storage->is_empty()) {\r\n return null;\r\n }\r\n if( is_null(self::$login_user) ){\r\n $u = $storage->read();\r\n\t\t\tself::$login_user = Model_User::instance()->user($u['uid']);\r\n \r\n global $VIEW_AUTH_USERID;\r\n $VIEW_AUTH_USERID = idtourl(self::$login_user['uid']);\r\n }\r\n return self::$login_user; \r\n }",
"public static function GetUserID()\n\t{\n\t\treturn self::GetFB()->getUser();\n\t}",
"public function getUserId()\r\n\t{\r\n\t\t$user = parent::getUser();\r\n\t\tif(!($user instanceof User))\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn $user->getId();\r\n\t}",
"public function get_user_id()\n {\n return self::getUser();\n }",
"function user_id() {\n isset($this->_user_id) || $this->_load_from_session();\n return $this->_user_id;\n }",
"private function getuserid() {\n\n $user_security = $this->container->get('security.context');\n // authenticated REMEMBERED, FULLY will imply REMEMBERED (NON anonymous)\n if ($user_security->isGranted('IS_AUTHENTICATED_FULLY')) {\n $user = $this->get('security.context')->getToken()->getUser();\n $user_id = $user->getId();\n } else {\n $user_id = 0;\n }\n return $user_id;\n }",
"public function getLoginUserId(){\n $auth = Zend_Auth::getInstance();\n if($auth->hasIdentity())\n {\n return $loginUserId = $auth->getStorage()->read()->id;\n }else{\n\t\t\treturn 1;\n\t\t}\n }",
"public function loggedInUserId()\n\t{\n\t\treturn auth()->id();\n\t}",
"public function getLoginUserId(){\n $auth = Zend_Auth::getInstance();\n if($auth->hasIdentity())\n {\n return $loginUserId = $auth->getStorage()->read()->id;\n }\n }",
"public function getUserId()\n {\n $value = $this->get(self::user_id);\n return $value === null ? (integer)$value : $value;\n }",
"public function get_id_user()\n\t{\n\t\treturn $this->id_user;\n\t}",
"public function profile()\n {\n $breadCrumb = $this->userEngine->breadcrumbGenerate('profile');\n\n return $this->loadPublicView('user.profile', $breadCrumb['data']);\n }",
"public function getUserId()\r\r\n {\r\r\n return $this->signedRequest ? $this->signedRequest->getUserId() : null;\r\r\n }",
"public static function current_id():int|null\n {\n try {\n return Auth::user()->activeProfile->id ?? null;\n } catch (\\Throwable $e) {\n report($e);\n }\n return null;\n }",
"public static function getCurrentUserId(){\n $user_data = parent::getSession('curent_user');\n $_get_id_user = isset($_GET['id_user']) ? $_GET['id_user'] : null;\n $_post_id_user = isset($_POST['id_user']) ? $_POST['id_user'] : null;\n return\n self::is_SuperUserSession()\n ? ($_post_id_user ? $_post_id_user : ( $_get_id_user ? $_get_id_user : $user_data['id_user'] ))\n : parent::getSession('id_user');\n }",
"public function getID() {\n return $this->user_id;\n }",
"function pms_get_current_user_id() {\r\n if( isset( $_GET['edit_user'] ) && !empty( $_GET['edit_user'] ) && current_user_can('edit_users') )\r\n return (int)$_GET['edit_user'];\r\n else\r\n return get_current_user_id();\r\n }",
"public function getUserId() {\n\t\t\tif ($this->getUser() !== null) {\n\t\t\t\treturn $this->getUser()->getId();\n\t\t\t}\n\t\t\treturn null;\n\t\t}",
"public function getUserId()\n {\n if ($this->isUserLoggedIn()) {\n return $this->_customerSession->getCustomerId();\n }\n\n return $this->getUserIdByVisitor();\n }",
"public function getUserId()\n {\n return (int) $this->_getVar('user_id');\n }",
"public function user_id()\n {\n if($this->logged_in())\n {\n $this->uid = $this->fb->getUser();\n\n return $this->uid;\n } \n else \n {\n return FALSE;\n }\n }",
"function getMyID()\n{\n $ci =& get_instance();\n $user = $ci->ion_auth->user()->row();\n if(isset($user->id)) {\n return $user->id;\n }else{\n \treturn null;\n }\n}",
"public static function get_user_id(){\n return isset(\\Yii::$app->user->id)?\\Yii::$app->user->id:'';\n }",
"public function getUserID () {\n return $this->id;\n }",
"public static function getProfileRoute()\n\t{\n\t\t// Get the items.\n\t\t$items\t= self::getItems();\n\t\t$itemid\t= null;\n\n\t\t// Search for a suitable menu id.\n\t\t//Menu link can only go to users own profile.\n\n\t\tforeach ($items as $item) {\n\t\t\tif (isset($item->query['view']) && $item->query['view'] === 'profile') {\n\t\t\t\t$itemid = $item->id;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\t\treturn $itemid;\n\t}",
"public function getProfileId() \n {\n if (!$this->hasProfileId()) \n {\n $this->profileId = '';\n }\n\n return $this->profileId;\n }",
"function getLoggedInId()\n{\n\tif(isLoggedIn()) {\n\t\treturn auth()->user()->id;\n\t}\n\treturn null;\n}",
"public function getUserId()\n {\n if (array_key_exists(\"userId\", $this->_propDict)) {\n return $this->_propDict[\"userId\"];\n } else {\n return null;\n }\n }",
"protected function _getCurrentView()\n {\n return db_get_row(\"SELECT * FROM ?:views WHERE user_id = ?i AND object = ?s\", $this->_auth['user_id'], 'lv_' . $this->_controller);\n }",
"public function getUserId()\n {\n return UsniAdaptor::app()->user->getId();\n }",
"public function get_user_id() {\n if (!empty($this->userid)) {\n return $this->userid;\n }\n\n global $SESSION, $USER;\n\n if (!empty($SESSION->homeworkblockuser)) {\n return $SESSION->homeworkblockuser;\n }\n\n $mode = $this->get_mode();\n\n if ($mode == 'parent') {\n\n // In parent mode, but no child is selected so select the first child.\n $children = $this->get_users_children($USER->id);\n $child = reset($children);\n $SESSION->homeworkblockuser = $child->userid;\n return $child->userid;\n } else {\n return $USER->id;\n }\n }",
"public function getUserProfileId() {\n return($this->userProfileId); \n }",
"public static function GetCurrentUserId() {\n try {\n $token = Helper::GetCookies('token');\n $now = new \\DateTime(date('Y-m-d H:i:s'));\n if(!isset($token) || $token == '' || $token == null) {\n return 0;\n }\n else {\n $userDB = DB::table('users')\n ->where('token', $token)\n ->where('timeout', '>=', $now)\n ->where('deleted_at', null)\n ->select('id')\n ->get()->toArray();\n if (isset($userDB) && !empty($userDB)) {\n return $userDB[0]->id;\n }\n }\n return 0;\n }\n catch(Exception $e) {\n throw $e;\n }\n }",
"public static function getUserId()\n {\n $uId = 0;\n if(Controller::$access_token)\n { \n global $zm_config ;\n $oZM_ME = new ZME_Me($zm_config) ;\n $result = $oZM_ME->getInfo(Controller::$access_token,'id');\n $uId = $result['id'] ;\n }\n return $uId;\n }",
"public function getUserId() {\n if (isset($_SESSION) && isset($_SESSION[self::SESSION_FIELD_USER_ID])) {\n return $_SESSION[self::SESSION_FIELD_USER_ID];\n } else {\n return null;\n }\n }",
"public function getFirstId() {\n return $this->id[0];\n }",
"public function profile() {\n\t\tif($this->checkLoggedIn()) {\n\t\t\treturn $this->view->render('profile_view');\n\t\t}\n\t}",
"private function getGlobalProfileId()\n {\n $identity = $this->getIdentity();\n \n return $identity !== null && $identity->getGlobalProfile() ? $identity->getGlobalProfile()->profile_id : null;\n }",
"public function getUserId() \n {\n if (!$this->hasUserId()) \n {\n $this->userId = 0;\n }\n\n return $this->userId;\n }",
"protected function getSimulatingUserId()\n {\n return session(static::SIMULATING_USER_PROFILE_ID);\n }",
"public function getUserId()\n {\n return parent::getValue('user_id');\n }",
"public function get_id()\n {\n\n $user_type = $this->isStaff ? \"staff\" : \"user\";\n\n return $this->database->get($user_type,'id',['user_url' => $this->username]);\n\n }",
"public function getProfileId() {\n\t\treturn($this->profileId);\n\t}",
"public function getUserId() {\n\t\tif ($this->logged()) {\n\t\t\treturn $_SESSION['auth']['id'];\n\t\t}\n\t\treturn false;\n\t}",
"public function getProfileId() {\n\t\treturn ($this->profileId);\n\t}",
"public function getProfileId() {\n\t\treturn ($this->profileId);\n\t}",
"public function _getID()\n {\n $this->selftest();\n return $this->objectUser->ID;\n }",
"public function getViewId()\n {\n return $this->view_id;\n }",
"public function getUserId()\n {\n return (int)$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 }",
"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.7082232",
"0.69861686",
"0.6930087",
"0.68306273",
"0.6772512",
"0.6764371",
"0.6719322",
"0.66364855",
"0.6531671",
"0.6465343",
"0.6411048",
"0.640664",
"0.6344409",
"0.6322275",
"0.6321008",
"0.6317186",
"0.6306605",
"0.63049",
"0.62854",
"0.6270869",
"0.62568945",
"0.6252455",
"0.6248614",
"0.62439746",
"0.6243426",
"0.6236472",
"0.6234385",
"0.6222601",
"0.6218682",
"0.62108845",
"0.61796457",
"0.61790437",
"0.61576575",
"0.61533594",
"0.614836",
"0.614827",
"0.6135204",
"0.6133472",
"0.6096544",
"0.60941404",
"0.609252",
"0.6076636",
"0.6069318",
"0.6066816",
"0.6060176",
"0.6055766",
"0.6046929",
"0.6041525",
"0.6035867",
"0.60230905",
"0.6018689",
"0.60186493",
"0.60063386",
"0.6000868",
"0.5993331",
"0.59819543",
"0.5981944",
"0.5976032",
"0.5973312",
"0.5972181",
"0.59703135",
"0.5968444",
"0.5967429",
"0.59627575",
"0.5956395",
"0.594896",
"0.59480906",
"0.5944059",
"0.5938574",
"0.5932425",
"0.59282917",
"0.5922304",
"0.5918734",
"0.5911456",
"0.59110785",
"0.5910716",
"0.5910716",
"0.5905968",
"0.5905793",
"0.59052914",
"0.5903958",
"0.5903958",
"0.5903958",
"0.5903958",
"0.5903958",
"0.5903958",
"0.5903958",
"0.5903958",
"0.5903958",
"0.5903958",
"0.5903958",
"0.5903958",
"0.5903958",
"0.5903958",
"0.5903958",
"0.5903958",
"0.5903958",
"0.5903958",
"0.5903958",
"0.5903958"
] | 0.6861746 | 3 |
Calls the Core Reporting API and queries for the number of sessions | function getResults(&$analytics, $profileId) {
// for the last seven days.
return $analytics->data_ga->get(
'ga:' . $profileId,
'7daysAgo',
'today',
'ga:sessions');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function retrieveConcurrentSessions()\n {\n $endpoint = self::$endpoint . '/statistics' . SessionEndpoint::$endpoint;\n return self::sendRequest(Method::GET, $endpoint);\n }",
"public function getreport(){\n $getTodayNumOfSessions = DB::table('sessions')->select(DB::raw('*'))->whereRaw('Date(date) = CURDATE()')->count();\n \n //number of sessions for each user for today\n $eachUsersSessionForToday = DB::table('users')\n ->join('sessions', 'sessions.userId', '=', 'users.id')\n ->select('users.id', 'users.fullname', DB::raw(\"count(*) as countNum\"))\n ->whereRaw('Date(date) = CURDATE()')\n ->groupBy('users.id')\n ->groupBy('users.fullname')\n ->get();\n\n //get all users which are NOT in sessions for today\n $allUsersNotInTodaySession = DB::table(\"users\")->select('*')\n ->whereNOTIn('id',function($query){\n $query->select('userId')->from('sessions')\n ->whereRaw('sessions.date = CURDATE()');\n })\n ->get();\n\n //number of sessions for each user for today - 1 week\n $eachUsersSessionForWeek = DB::table('users')\n ->join('sessions', 'sessions.userId', '=', 'users.id')\n ->select('users.id', 'users.fullname', DB::raw(\"count(*) as countNum\"))\n ->whereRaw('Date(date) BETWEEN CURDATE() -7 AND CURDATE()')\n ->groupBy('users.id')\n ->groupBy('users.fullname')\n ->get();\n\n \n //number of sessions for each user for today - 1 MONTH\n //SELECT * FROM `sessions` WHERE date >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH)\n $currentMonthSessionsOfUsers = DB::table('users')\n ->join('sessions', 'sessions.userId', '=', 'users.id')\n ->select('users.id', 'users.fullname', DB::raw(\"count(*) as countNum\"))\n ->whereRaw('date >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH)')\n ->groupBy('users.id')\n ->groupBy('users.fullname')\n ->get();\n\n\n //number of sessions for each user for this - YEAR\n //SELECT * FROM sessions WHERE sessions.date BETWEEN DATE_FORMAT(CURDATE(), '%Y-01-01') AND CURDATE()\n\n // SELECT Count(*) FROM sessions WHERE sessions.date BETWEEN DATE_FORMAT(CURDATE(), '%Y-01-01') AND CURDATE()\n \n $currentYearSessionsOfUsers = DB::table('users')\n ->join('sessions', 'sessions.userId', '=', 'users.id')\n ->select('users.id', 'users.fullname', DB::raw(\"count(*) as totalSessionNum\"))\n ->whereRaw('date BETWEEN DATE_FORMAT(CURDATE(), \"%Y-01-01\") AND CURDATE()')\n ->groupBy('users.id')\n ->groupBy('users.fullname')\n ->get();\n\n //number of sessions for each user\n $eachUserSessions = User::withCount(['sessions'])\n ->get();\n // dd($eachUserSessions);\n \n return view('admin.reports/reports', [\n 'getTodayNumOfSessions' =>$getTodayNumOfSessions,\n 'eachUsersSessionForToday' =>$eachUsersSessionForToday,\n 'allUsersNotInTodaySession' =>$allUsersNotInTodaySession,\n 'eachUsersSessionForWeek' =>$eachUsersSessionForWeek,\n 'currentMonthSessionsOfUsers' =>$currentMonthSessionsOfUsers,\n 'currentYearSessionsOfUsers' =>$currentYearSessionsOfUsers,\n 'eachUserSessions' =>$eachUserSessions,\n\n\n ]);\n\n }",
"public function count_session()\n\t\t{\n\t\t\treturn parent::count_list('session_items');\n\t\t}",
"public function get_action_count($serial_number = '')\n {\n $obj = new View();\n if (! $this->authorized()) {\n $obj->view('json', array('msg' => 'Not authorized'));\n return;\n }\n \n $queryobj = new User_sessions_model();\n \n if ($serial_number == ''){\n $sql = \"SELECT COUNT(1) as total,\n COUNT(CASE WHEN `event` = 'shutdown' THEN 1 END) AS 'shutdown',\n COUNT(CASE WHEN `event` = 'reboot' THEN 1 END) AS 'reboot',\n COUNT(CASE WHEN `event` = 'logout' THEN 1 END) AS 'logout',\n COUNT(CASE WHEN `event` = 'sshlogin' THEN 1 END) AS 'sshlogin',\n COUNT(CASE WHEN `event` = 'login' THEN 1 END) AS 'login'\n FROM user_sessions\n LEFT JOIN reportdata USING (serial_number)\n WHERE \".get_machine_group_filter('');\n } else {\n \n $current_time = time();\n $past_month = $current_time - 2592000;\n $past_year = $current_time - 31536000;\n \n $sql = \"SELECT COUNT(1) as total,\n COUNT(CASE WHEN `event` = 'shutdown' THEN 1 END) AS 'shutdown',\n COUNT(CASE WHEN `event` = 'reboot' THEN 1 END) AS 'reboot',\n COUNT(CASE WHEN `event` = 'logout' THEN 1 END) AS 'logout',\n COUNT(CASE WHEN `event` = 'sshlogin' THEN 1 END) AS 'sshlogin',\n COUNT(CASE WHEN `event` = 'login' THEN 1 END) AS 'login',\n \n COUNT(CASE WHEN `event` = 'shutdown' AND `time` > \".$past_month.\" THEN 1 END) AS 'shutdown_month',\n COUNT(CASE WHEN `event` = 'reboot' AND `time` > \".$past_month.\" THEN 1 END) AS 'reboot_month',\n COUNT(CASE WHEN `event` = 'logout' AND `time` > \".$past_month.\" THEN 1 END) AS 'logout_month',\n COUNT(CASE WHEN `event` = 'sshlogin' AND `time` > \".$past_month.\" THEN 1 END) AS 'sshlogin_month',\n COUNT(CASE WHEN `event` = 'login' AND `time` > \".$past_month.\" THEN 1 END) AS 'login_month',\n \n COUNT(CASE WHEN `event` = 'shutdown' AND `time` > \".$past_year.\" THEN 1 END) AS 'shutdown_year',\n COUNT(CASE WHEN `event` = 'reboot' AND `time` > \".$past_year.\" THEN 1 END) AS 'reboot_year',\n COUNT(CASE WHEN `event` = 'logout' AND `time` > \".$past_year.\" THEN 1 END) AS 'logout_year',\n COUNT(CASE WHEN `event` = 'sshlogin' AND `time` > \".$past_year.\" THEN 1 END) AS 'sshlogin_year',\n COUNT(CASE WHEN `event` = 'login' AND `time` > \".$past_year.\" THEN 1 END) AS 'login_year'\n \n FROM user_sessions\n LEFT JOIN reportdata USING (serial_number)\n WHERE serial_number = '$serial_number'\n \".get_machine_group_filter('AND');\n }\n\n $obj->view('json', array('msg' => current($queryobj->query($sql))));\n }",
"private function basicReport()\n {\n return $this->report->count();\n }",
"function get_number_of_sessions()\n {\n\t\treturn count($this->sessions);\n\t}",
"public function get_stats()\n { \n $sql = \"SELECT COUNT(CASE WHEN `status` = 'Enabled' THEN 1 END) AS 'Enabled',\n COUNT(CASE WHEN `status` = 'Disabled' THEN 1 END) AS 'Disabled'\n FROM findmymac\n LEFT JOIN reportdata USING (serial_number)\n \".get_machine_group_filter();\n\n $queryobj = new Findmymac_model();\n $out = [];\n foreach($queryobj->query($sql)[0] as $label => $value){\n $out[] = ['label' => $label, 'count' => $value];\n }\n \n jsonView($out);\n }",
"function getAllUsersCount() {\n\n $objUtil = new Util($this->apiKey, $this->secretKey);\n try {\n\t\t $params = null;\n $userObj = new App42Response();\n $headerParams = array();\n $queryParams = array();\n $signParams = $this->populateSignParams();\n $metaHeaders = $this->populateMetaHeaderParams();\n $headerParams = array_merge($signParams, $metaHeaders);\n $signature = urlencode($objUtil->sign($signParams)); //die();\n $headerParams['signature'] = $signature;\n $contentType = $this->content_type;\n $accept = $this->accept;\n $baseURL = $this->url;\n $baseURL = $baseURL . \"/count/all\";\n $response = RestClient::get($baseURL, $params, null, null, $contentType, $accept, $headerParams);\n $userObj->setStrResponse($response->getResponse());\n $userObj->setResponseSuccess(true);\n $userResponseObj = new UserResponseBuilder();\n $userObj->setTotalRecords($userResponseObj->getTotalRecords($response->getResponse()));\n } catch (App42Exception $e) {\n throw $e;\n } catch (Exception $e) {\n throw new App42Exception($e);\n }\n return $userObj;\n }",
"public function sessions() {\r\n\t\treturn self::request(self::HTTP_GET, 'sessions');\r\n\t}",
"public function get_stats()\n {\n $now = time();\n $three_months = $now + 3600 * 24 * 30 * 3;\n $sql = \"SELECT COUNT(1) as total, \n\t\t\tCOUNT(CASE WHEN cert_exp_time < '$now' THEN 1 END) AS expired, \n\t\t\tCOUNT(CASE WHEN cert_exp_time BETWEEN $now AND $three_months THEN 1 END) AS soon,\n\t\t\tCOUNT(CASE WHEN cert_exp_time > $three_months THEN 1 END) AS ok\n\t\t\tFROM certificate\n\t\t\tLEFT JOIN reportdata USING (serial_number)\n\t\t\t\".get_machine_group_filter();\n return current($this->query($sql));\n }",
"protected abstract function get_sessions();",
"protected function get_sessions()\n {\n }",
"public function countReports(){\n\t\t$date = date('Y-m-d');\n\t\t$from = Input::get('start');\n\t\tif(!$from) $from = date('Y-m-01');\n\t\t$to = Input::get('end');\n\t\tif(!$to) $to = $date;\n\t\t$toPlusOne = date_add(new DateTime($to), date_interval_create_from_date_string('1 day'));\n\t\t$counts = Input::get('counts');\n\t\t$accredited = array();\n\t\t//\tBegin grouped test counts\n\t\tif($counts==trans('messages.grouped-test-counts'))\n\t\t{\n\t\t\t$testCategories = TestCategory::all();\n\t\t\t$testTypes = TestType::all();\n\t\t\t$ageRanges = array('0-5', '5-15', '15-120');\t//\tAge ranges - will definitely change in configurations\n\t\t\t$gender = array(Patient::MALE, Patient::FEMALE); \t//\tArray for gender - male/female\n\n\t\t\t$perAgeRange = array();\t// array for counts data for each test type and age range\n\t\t\t$perTestType = array();\t//\tarray for counts data per testype\n\t\t\tif(strtotime($from)>strtotime($to)||strtotime($from)>strtotime($date)||strtotime($to)>strtotime($date)){\n\t\t\t\tSession::flash('message', trans('messages.check-date-range'));\n\t\t\t}\n\t\t\tforeach ($testTypes as $testType) {\n\t\t\t\t$countAll = $testType->groupedTestCount(null, null, $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t$countMale = $testType->groupedTestCount([Patient::MALE], null, $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t$countFemale = $testType->groupedTestCount([Patient::FEMALE], null, $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t$perTestType[$testType->id] = ['countAll'=>$countAll, 'countMale'=>$countMale, 'countFemale'=>$countFemale];\n\t\t\t\tforeach ($ageRanges as $ageRange) {\n\t\t\t\t\t$maleCount = $testType->groupedTestCount([Patient::MALE], $ageRange, $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t\t$femaleCount = $testType->groupedTestCount([Patient::FEMALE], $ageRange, $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t\t$perAgeRange[$testType->id][$ageRange] = ['male'=>$maleCount, 'female'=>$femaleCount];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn View::make('reports.counts.groupedTestCount')\n\t\t\t\t\t\t->with('testCategories', $testCategories)\n\t\t\t\t\t\t->with('ageRanges', $ageRanges)\n\t\t\t\t\t\t->with('gender', $gender)\n\t\t\t\t\t\t->with('perTestType', $perTestType)\n\t\t\t\t\t\t->with('perAgeRange', $perAgeRange)\n\t\t\t\t\t\t->with('accredited', $accredited)\n\t\t\t\t\t\t->withInput(Input::all());\n\t\t}\n\t\telse if($counts==trans('messages.ungrouped-specimen-counts')){\n\t\t\tif(strtotime($from)>strtotime($to)||strtotime($from)>strtotime($date)||strtotime($to)>strtotime($date)){\n\t\t\t\tSession::flash('message', trans('messages.check-date-range'));\n\t\t\t}\n\n\t\t\t$ungroupedSpecimen = array();\n\t\t\tforeach (SpecimenType::all() as $specimenType) {\n\t\t\t\t$rejected = $specimenType->countPerStatus([Specimen::REJECTED], $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t$accepted = $specimenType->countPerStatus([Specimen::ACCEPTED], $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t$total = $rejected+$accepted;\n\t\t\t\t$ungroupedSpecimen[$specimenType->id] = [\"total\"=>$total, \"rejected\"=>$rejected, \"accepted\"=>$accepted];\n\t\t\t}\n\n\t\t\t// $data = $data->groupBy('test_type_id')->paginate(Config::get('kblis.page-items'));\n\t\t\treturn View::make('reports.counts.ungroupedSpecimenCount')\n\t\t\t\t\t\t\t->with('ungroupedSpecimen', $ungroupedSpecimen)\n\t\t\t\t\t\t\t->with('accredited', $accredited)\n\t\t\t\t\t\t\t->withInput(Input::all());\n\n\t\t}\n\t\telse if($counts==trans('messages.grouped-specimen-counts')){\n\t\t\t$ageRanges = array('0-5', '5-15', '15-120');\t//\tAge ranges - will definitely change in configurations\n\t\t\t$gender = array(Patient::MALE, Patient::FEMALE); \t//\tArray for gender - male/female\n\n\t\t\t$perAgeRange = array();\t// array for counts data for each test type and age range\n\t\t\t$perSpecimenType = array();\t//\tarray for counts data per testype\n\t\t\tif(strtotime($from)>strtotime($to)||strtotime($from)>strtotime($date)||strtotime($to)>strtotime($date)){\n\t\t\t\tSession::flash('message', trans('messages.check-date-range'));\n\t\t\t}\n\t\t\t$specimenTypes = SpecimenType::all();\n\t\t\tforeach ($specimenTypes as $specimenType) {\n\t\t\t\t$countAll = $specimenType->groupedSpecimenCount([Patient::MALE, Patient::FEMALE], null, $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t$countMale = $specimenType->groupedSpecimenCount([Patient::MALE], null, $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t$countFemale = $specimenType->groupedSpecimenCount([Patient::FEMALE], null, $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t$perSpecimenType[$specimenType->id] = ['countAll'=>$countAll, 'countMale'=>$countMale, 'countFemale'=>$countFemale];\n\t\t\t\tforeach ($ageRanges as $ageRange) {\n\t\t\t\t\t$maleCount = $specimenType->groupedSpecimenCount([Patient::MALE], $ageRange, $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t\t$femaleCount = $specimenType->groupedSpecimenCount([Patient::FEMALE], $ageRange, $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t\t$perAgeRange[$specimenType->id][$ageRange] = ['male'=>$maleCount, 'female'=>$femaleCount];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn View::make('reports.counts.groupedSpecimenCount')\n\t\t\t\t\t\t->with('specimenTypes', $specimenTypes)\n\t\t\t\t\t\t->with('ageRanges', $ageRanges)\n\t\t\t\t\t\t->with('gender', $gender)\n\t\t\t\t\t\t->with('perSpecimenType', $perSpecimenType)\n\t\t\t\t\t\t->with('perAgeRange', $perAgeRange)\n\t\t\t\t\t\t->with('accredited', $accredited)\n\t\t\t\t\t\t->withInput(Input::all());\n\t\t}\n\t\telse{\n\t\t\tif(strtotime($from)>strtotime($to)||strtotime($from)>strtotime($date)||strtotime($to)>strtotime($date)){\n\t\t\t\tSession::flash('message', trans('messages.check-date-range'));\n\t\t\t}\n\n\t\t\t$ungroupedTests = array();\n\t\t\tforeach (TestType::all() as $testType) {\n\t\t\t\t$pending = $testType->countPerStatus([Test::PENDING, Test::STARTED], $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t$complete = $testType->countPerStatus([Test::COMPLETED, Test::VERIFIED], $from, $toPlusOne->format('Y-m-d H:i:s'));\n\t\t\t\t$ungroupedTests[$testType->id] = [\"complete\"=>$complete, \"pending\"=>$pending];\n\t\t\t}\n\n\t\t\t// $data = $data->groupBy('test_type_id')->paginate(Config::get('kblis.page-items'));\n\t\t\treturn View::make('reports.counts.ungroupedTestCount')\n\t\t\t\t\t\t\t->with('ungroupedTests', $ungroupedTests)\n\t\t\t\t\t\t\t->with('accredited', $accredited)\n\t\t\t\t\t\t\t->withInput(Input::all());\n\t\t}\n\t}",
"public function fetchSessionData() {}",
"protected function get_request_counts()\n {\n }",
"public function getClientCountInfo()\n {\n $payload = JWTAuth::parseToken()->getPayload();\n $logged_userid = $payload['login_db_userid']; \n $c_account_key = $payload['c_acc_key'];\n $db_name = $payload['db_name'];\n $agency_id = $payload['agencyid'];\n $qry_profpic = DB::select(\"SELECT * FROM [$db_name].[dbo].[user_accounts] \n WHERE user_id = \".$logged_userid);\n $userid = $qry_profpic[0]->user_id;\n $cw_Puserid = $qry_profpic[0]->case_worker_parent_user_id;\n $cw_agency_id = $qry_profpic[0]->agency_id;\n \n $dashclientarr= [array('responsecount' => $userid,'msgcount' => $cw_agency_id,'opencasecount' => $cw_Puserid )];\n \n return $dashclientarr;\n }",
"public function stats() {\n\t\t$userCount = 0;\n\t\tif ($this->isAdmin) {\n\t\t\t$countByBackend = $this->userManager->countUsers();\n\n\t\t\tif (!empty($countByBackend)) {\n\t\t\t\tforeach ($countByBackend as $count) {\n\t\t\t\t\t$userCount += $count;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t'@phan-var \\OC\\Group\\Manager $this->groupManager';\n\t\t\t$groups = $this->groupManager->getSubAdmin()->getSubAdminsGroups($this->userSession->getUser());\n\n\t\t\t$uniqueUsers = [];\n\t\t\tforeach ($groups as $group) {\n\t\t\t\tforeach ($group->getUsers() as $uid => $displayName) {\n\t\t\t\t\t$uniqueUsers[$uid] = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$userCount = \\count($uniqueUsers);\n\t\t}\n\n\t\treturn new DataResponse(\n\t\t\t[\n\t\t\t\t'totalUsers' => $userCount\n\t\t\t]\n\t\t);\n\t}",
"public static function apiCounts(Request $r) {\n\t\t\n\t\t$totalsCache = new Cache(Cache::RUN_COUNTS, \"\");\n\t\t$totals = $totalsCache->get();\n\t\t\n\t\tif (is_null($totals)) {\n\t\t\t$totals = array();\n\t\t\t$totals[\"total\"] = array();\n\t\t\t$totals[\"ac\"] = array();\n\t\t\ttry {\n\n\t\t\t\t// I don't like this approach but adodb didn't like too much to execute\n\t\t\t\t// store procedures. anyways we will cache the totals\n\t\t\t\t$date = date('Y-m-d', strtotime('1 days'));\n\t\t\t\tfor ($i = 0; $i < 30 * 6; $i++) {\n\t\t\t\t\t$totals[\"total\"][$date] = RunsDAO::GetRunCountsToDate($date);\n\t\t\t\t\t$totals[\"ac\"][$date] = RunsDAO::GetAcRunCountsToDate($date);\n\t\t\t\t\t$date = date('Y-m-d', strtotime('-'.$i.' days'));\n\t\t\t\t}\n\t\t\t} catch (Exception $e) {\n\t\t\t\tthrow new InvalidDatabaseOperationException($e);\n\t\t\t}\n\t\t\t\n\t\t\t$totalsCache->set($totals, 24*60*60);\n\t\t}\n\t\t\t\t\t\t\n\t\treturn $totals;\n\t}",
"public function count()\n {\n return count($this->sessionData);\n }",
"public function fetchStats()\n\t{\n\t\t$statsData = array();\n\t\t\n\t\t// Get all cache action\n\t\t$select = $this->_statsTable->select()\n\t\t\t\t\t\t\t\t\t->where('session_id = ?', $this->_sessionId);\n\t\t$rowSet = $this->_statsTable->fetchall($select);\n\t\t$statsData['AllActionCount'] = 0;\n\t\tforeach ($rowSet as $row)\n\t\t{\n\t\t\t$statsData['AllAction'][] = $row->toArray();\n\t\t\t$statsData['AllActionCount'] += 1;\n\t\t}\n\t\t\n\t\t// Calculate current cache use for every scope;\n\t\t//SELECT * FROM stats_ivc_cache WHERE session_id = 12 AND (action = \"insert\" OR action = \"cache_hit\") GROUP BY full_key;\n\t\t$select = $this->_statsTable->select()\n\t\t\t\t\t\t\t\t\t->where('session_id = ?', $this->_sessionId)\n\t\t\t\t\t\t\t\t\t->where('action = \"insert\" OR action = \"cache_hit\" OR action = \"replace\"')\n\t\t\t\t\t\t\t\t\t->group('full_key');\n\t\t$rowSet = $this->_statsTable->fetchall($select);\n\t\t$statsData['totalUse'] = 0;\n\t\t$statsData['ivcUse'] = 0;\n\t\t$statsData['clubUse'] = 0;\n\t\t$statsData['userUse'] = 0;\n\t\tforeach ($rowSet as $row)\n\t\t{\n\t\t\t$statsData['keyUseList'][$row['full_key']] = $row->toArray();\n\t\t\t$statsData['totalUse'] += $row['size'];\n\t\t\t$statsData[$row['scope'] . 'Use'] += $row['size'];\n\t\t}\n\t\t\n\t\t// Calculate average use of user session ... need user session for that\n\t\t\n\t\treturn ($statsData);\n\t}",
"public function getCounters()\n {\n $st = $this->db->query('SELECT COUNT(*) as count from users')->result_array();\n $data['users'] = $st[0]['count'];\n\n /*===== COUNT INSTANCES =====*/\n $st = $this->db->query('SELECT COUNT(*) as count from instances')->result_array();\n $data['instances'] = $st[0]['count'];\n\n\n /*===== COUNT SERVERS =====*/\n $st = $this->db->query('SELECT COUNT(*) as count from servers')->result_array();\n $data['servers'] = $st[0]['count'];\n\n /*==== COUNT MODULES ====*/\n $st = $this->db->query('SELECT COUNT(*) as count from modules')->result_array();\n $data['modules'] = $st[0]['count'];\n\n return $data;\n }",
"abstract public function getCount(RESTApiRequest $request);",
"public function statisticAction() {\n\t\t\t// @TODO: Check toArray\n\t\t$results = $this->resultRepository->findByFeuser((int) $GLOBALS['TSFE']->fe_user->user['uid'])->toArray();\n\t\t$this->view->assign('results', $results);\n\t\t$this->view->assign('page', $this->settings['certificate']['detailPid']);\n\t}",
"public function GetPatientsCount();",
"public function retrieveTotalReport()\n {\n return $this->start()->uri(\"/api/report/totals\")\n ->get()\n ->go();\n }",
"function countsreport(){\n\t\t//$this->set('surveyexports',$this->Surveyexport->find('count', array('conditions'=>array('id'=>'all'))));\n\t\t//$this->set('surveyexports',$this->Surveyexport->find('all'));\n\t\t//$this->set('surveyexports',$this->Surveyexport->find('count'));\n\t\t//$this->set('surveyexports',$this->Surveyexport->findAllById('*'),id);\n\t\t//$this->set('totalCount',$this->Surveyexport->find('count', array('fields'=>' DISTINCT state')));\n\t\t$this->set(('totalCount[0]'),$this->Surveyexport->find('count', array('fields'=>' DISTINCT id'))); // count individual ids in the database\n\t\t//$this->set('totalCount',$this->Surveyexport->find('count', array('fields'=>' DISTINCT focus_id'))); // ??????????????????????????? needs set in DB\n\t\t$this->set('totalCount[1]',$this->Surveyexport->find('count', array('fields'=>'id'))); // count all id's in the database\n\t\t\n\t}",
"public function count()\n {\n return count($_SESSION);\n }",
"function get_statistics() {\n $response = $this->api_query(array('mode' => 'statistics'));\n\n if ($response['error']) {\n return false;\n }\n return ($response['data']);\n }",
"function sessionStats()\n{\n return generateQuery('-st | sed \\'s/ */ /g\\' '); \n}",
"public function countReports(){\n return count($this->getReports());\n }",
"public static function get_count_win()\n {\n $unique = self::$unique_user_obj->get_unique_user();\n $user_id = self::$storage_obj->get_id_user($unique);\n $count_pc = self::$storage_obj->get_count_win($user_id, 'pc');\n $count_user = self::$storage_obj->get_count_win($user_id, 'user');\n\n return response()->json(['count_pc' => $count_pc, 'count_user' => $count_user]);\n }",
"public function index()\n {\n //\n return $this->respond($this->_repo->sessions());\n }",
"public function count() {\n\t\treturn count($this->session);\n\t}",
"function retrieve_client_statistics(){\n\t\t\n\t}",
"public function getCount() {}",
"public function getCount() {}",
"public function getCount() {}",
"public function count()\r\n\t{\r\n\t\t$sql = \"SELECT COUNT(*) AS total FROM \" . DB_PREFIX . \"program_record_log WHERE 1 \";\r\n\r\n\t\t//获取查询条件\r\n\t\t$condition = $this->get_condition();\t\t\t\t\r\n\t\t$sql = $sql . $condition;\r\n\t\t$r = $this->db->query_first($sql);\r\n\r\n\t\t//暂时这样处理\r\n\t\techo json_encode($r);\r\n\t}",
"function monitor_stats() {\n $res = Array();\n $res['active_processes'] = $this->getOne(\"select count(*) from `\".GALAXIA_TABLE_PREFIX.\"processes` where `wf_is_active`=?\",array('y'));\n $res['processes'] = $this->getOne(\"select count(*) from `\".GALAXIA_TABLE_PREFIX.\"processes`\");\n $result = $this->query(\"select distinct(`wf_p_id`) from `\".GALAXIA_TABLE_PREFIX.\"instances` where `wf_status`=?\",array('active'));\n $res['running_processes'] = $result->numRows();\n // get the number of instances per status\n $query = \"select wf_status, count(*) as num_instances from \".GALAXIA_TABLE_PREFIX.\"instances group by wf_status\";\n $result = $this->query($query);\n $status = array();\n while($info = $result->fetchRow()) {\n $status[$info['wf_status']] = $info['num_instances'];\n }\n $res['active_instances'] = isset($status['active']) ? $status['active'] : 0;\n $res['completed_instances'] = isset($status['completed']) ? $status['completed'] : 0;\n $res['exception_instances'] = isset($status['exception']) ? $status['exception'] : 0;\n $res['aborted_instances'] = isset($status['aborted']) ? $status['aborted'] : 0;\n return $res;\n }",
"public function getRecordCount($api, $args)\n {\n $reportDef = $this->getReportDef($api, $args);\n $report = new Report($reportDef);\n return array('record_count' => $report->getRecordCount());\n }",
"public function getTotalCount();",
"public function getTotalCount();",
"public function getTotalCount();",
"public function GetTotalCount(){\n if($this->get_request_method()!= \"POST\"){\n $this->response('',406);\n }\n $format = $_POST['format'];\n $db_access = $this->dbConnect();\n $conn = $this->db;\n $res = new getService();\n $res->get_total_count($conn);\n }",
"public function sessions() {\n return $this->rich_model->get_sessions();\n // return $this->rich_model->get_mikrotik_sessions();\n }",
"public static function record_count()\r\r\n {\r\r\n global $wpdb;\r\r\n $result = false;\r\r\n $totalRecords = 0;\r\r\n $countKey = 'total';\r\r\n $mitambo_json_api = wpsearchconsole::getInstance()->mitambo_json_api;\r\r\n $lastCollectDate = $mitambo_json_api->last_collect_date;\r\r\n $tabName = List_of_Data::getCurrentTabName(isset($_GET['tab']) ? $_GET['tab'] : 1);\r\r\n $type = List_of_Data::getDefaultType($tabName);\r\r\n $type = (isset($_GET['type']) ? $_GET['type'] : $type);\r\r\n\r\r\n $sql = \"SELECT json_value FROM {$wpdb->prefix}wpsearchconsole_data\";\r\r\n\r\r\n $sql .= \" WHERE api_key = '$tabName'\";\r\r\n $sql .= ($tabName == 'keywords' && $type == 0) ? \" AND api_subkey = '$type'\" : \"\";\r\r\n $sql .= ($type && $type != 'all') ? \" AND api_subkey = '$type'\" : \"\";\r\r\n $sql .= \" AND datetime = '\" . substr($lastCollectDate, 0, 10) . \"'\";\r\r\n $sql .= \"GROUP BY api_subkey\";\r\r\n\r\r\n if ($tabName == 'duplication') {\r\r\n $countKey = 'DuplicateGroupsCount';\r\r\n }\r\r\n $response = $wpdb->get_results($sql);\r\r\n foreach ($response as $key => $val) {\r\r\n\r\r\n if (!empty($val) && array_key_exists('json_value', $val)) {\r\r\n\r\r\n $result = json_decode($val->json_value);\r\r\n $totalRecords += ($result && array_key_exists($countKey, $result)) ? $result->$countKey : 0;\r\r\n }\r\r\n }\r\r\n\r\r\n return $totalRecords;\r\r\n }",
"public function count()\n\t{\n\t\treturn count($_SESSION);\n\t}",
"public function loggedinCount ()\r\n\t{\t\r\n\t\t\t\r\n\t\trequire_once SITE_PATH.'/../model/gettersettermodel.php';\r\n\t\t$objInitiateUser = new Register ();\r\n\t\t$b=$objInitiateUser->loggedinCount () ;\r\n\t\tprint_r($b);\r\n\t\t\r\n\t}",
"function countsreport(){\n\t\t//$this->set('surveyexports',$this->Surveyexport->find('count', array('conditions'=>array('id'=>'all'))));\n\t\t//$this->set('surveyexports',$this->Surveyexport->find('all'));\n\t\t//$this->set('surveyexports',$this->Surveyexport->find('count'));\n\t\t//$this->set('surveyexports',$this->Surveyexport->findAllById('*'),id);\n\t\t//$this->set('totalCount',$this->Surveyexport->find('count', array('fields'=>' DISTINCT state')));\n\t\t//$this->set(('totalCount[0]'),$this->Surveyexport->find('count', array('fields'=>' DISTINCT id'))); // count individual ids in the database\n\t\t//$this->set('totalCount',$this->Surveyexport->find('count', array('fields'=>' DISTINCT focus_id'))); // ??????????????????????????? needs set in DB\n\t\t//$this->set('totalCount[1]',$this->Surveyexport->find('count', array('fields'=>'id'))); // count all id's in the database\n\t\t\n\t\t\n\t\t// new approach build entire array then pass it set up array list then pass vs. append\n\t\t$idDistinctField=$this->Surveyexport->find('count', array('fields'=>' DISTINCT id'));\n\t\t$idCountField=$this->Surveyexport->find('count', array('fields'=>'id'));\n\t\t$ucdCount=\"MISSING TABLE IN DB PLEASE ADD\"; // ADD ME LATER WHEN DATABASE IS FINALIZED //=$this->Surveyexport->find('count', array('fields'=>'ucd???'));\n\t\t$ucdUnique=\"MISSING TABLE IN DB PLEASE ADD\"; // ADD ME LATER WHEN DATABASE IS FINALIZED ////=$this->Surveyexport->find('count', array('fields'=>'DISTINCT ucd???'));\n\t\t$tempCounts=array( array($idDistinctField), array($idCountField), array($ucdCount), array($ucdUnique)); // array containing distinct id and id count\n\t\t$this->set('totalCount',$tempCounts); // set total count in view to tempcounts array\n\t\t\n\t\t\n\t\t\n\t}",
"public function getTotal()\n {\n $response = $this->client->post( 'https://idf.intven.com/public_patent_listing.json', [\n 'verify' => false,\n 'json' => [\n \"report_type\" => \"public_patent_listing\",\n \"queryFields\" => new \\stdClass(),\n \"filters\" => new \\stdClass(),\n \"per_page\" => 0,\n \"from\" => 0,\n \"sort\" => \"issued_on\",\n \"sort_order\" => \"desc\"\n ],\n ]);\n $data = json_decode($response->getBody()->getContents());\n return $data->meta_data->total_count;\n }",
"public function get_counts() {\n\n\t\t$this->counts = [];\n\n\t\t// Base params with applied filters.\n\t\t$base_params = $this->get_filters_query_params();\n\n\t\t$total_params = $base_params;\n\t\tunset( $total_params['status'] );\n\t\t$this->counts['total'] = ( new EmailsCollection( $total_params ) )->get_count();\n\n\t\tforeach ( $this->get_statuses() as $status => $name ) {\n\t\t\t$collection = new EmailsCollection( array_merge( $base_params, [ 'status' => $status ] ) );\n\n\t\t\t$this->counts[ 'status_' . $status ] = $collection->get_count();\n\t\t}\n\n\t\t/**\n\t\t * Filters items counts by various statuses of email log.\n\t\t *\n\t\t * @since 2.7.0\n\t\t *\n\t\t * @param array $counts {\n\t\t * Items counts by statuses.\n\t\t *\n\t\t * @type integer $total Total items count.\n\t\t * @type integer $status_{$status_key} Items count by status.\n\t\t * }\n\t\t */\n\t\t$this->counts = apply_filters( 'wp_mail_smtp_pro_emails_logs_admin_table_get_counts', $this->counts );\n\t}",
"public function index()\n {\n $count = Count::all();\n return response()->json($count);\n }",
"function analyzeBusiness()\n{\n $config = include('config.php');\n $dataService = DataService::Configure(array(\n 'auth_mode' => 'oauth2',\n 'ClientID' => $config['client_id'],\n 'ClientSecret' => $config['client_secret'],\n 'RedirectURI' => $config['oauth_redirect_uri'],\n 'scope' => $config['oauth_scope'],\n 'baseUrl' => \"development\"\n ));\n\n /*\n * Retrieve the accessToken value from session variable\n */\n $accessToken = $_SESSION['sessionAccessToken'];\n $dataService->throwExceptionOnError(true);\n\n /*\n * Update the OAuth2Token of the dataService object\n */\n $dataService->updateOAuth2Token($accessToken);\n\n /*\n * Initialize the Report service from the data service context\n */\n $serviceContext = $dataService->getServiceContext();\n $reportService = new ReportService($serviceContext);\n if (!$reportService) {\n exit(\"Problem while initializing ReportService.\\n\");\n }\n\n /*\n * Usecase 1\n * Choose the reports - Balance Sheet, ProfitAndLoss\n */\n $balancesheet = $reportService->executeReport(\"BalanceSheet\");\n $profitAndLossReport = $reportService->executeReport(\"ProfitAndLoss\");\n\n /*\n * Print the reports\n */\n echo(\"ProfitAndLoss Report Execution Start!\" . \"\\n\");\n if (!$profitAndLossReport) {\n exit(\"ProfitAndLossReport Is Null.\\n\");\n } else {\n $result = json_encode($profitAndLossReport, JSON_PRETTY_PRINT);\n print_r($result);\n echo(\"Profit And Loss Report Execution Successful!\" . \"\\n\");\n }\n echo(\"\\nBalanceSheet Execution Start!\" . \"\\n\");\n if (!$balancesheet) {\n exit(\"BalanceShee Is Null.\\n\");\n } else {\n $result = json_encode($balancesheet, JSON_PRETTY_PRINT);\n print_r($result);\n echo(\"BalanceSheet Execution Successful!\" . \"\\n\");\n }\n\n /*\n * Usecase 2\n * Configure report service to be summarized by Customer\n * Report service is default configured for the Current Year end, so no conf needed there\n */\n $reportService->setSummarizeColumnBy(\"Customers\");\n\n /*\n * Once the report service is configured, Choose the reports - Balance Sheet, ProfitAndLoss\n */\n $balancesheet = $reportService->executeReport(\"BalanceSheet\");\n $profitAndLossReport = $reportService->executeReport(\"ProfitAndLoss\");\n\n /*\n * Print the reports\n */\n echo(\"Year End Profit And Loss Report Summarized by Customers Start!\" . \"\\n\");\n if (!$profitAndLossReport) {\n exit(\"ProfitAndLossReport Is Null.\\n\");\n } else {\n $result = json_encode($profitAndLossReport, JSON_PRETTY_PRINT);\n print_r($result);\n echo(\"Year End Profit And Loss Report Summarized by Customers Execution Successful!\" . \"\\n\");\n }\n echo(\"Year End BalanceSheet Summarized by Customers Start!\" . \"\\n\");\n if (!$balancesheet) {\n exit(\"BalanceSheet Is Null.\\n\");\n } else {\n $result = json_encode($balancesheet, JSON_PRETTY_PRINT);\n print_r($result);\n echo(\"BalanceSheet Execution Successful!\" . \"\\n\");\n }\n\n return;\n}",
"public function record_count_activities() {\n return $this->db->count_all(\"page\");\n }",
"function mfcs_request_statistics_load_counts($start, $stop) {\n if (!is_null($start) && !cf_is_integer($start) || is_null($start) && !is_null($stop)) {\n cf_error::invalid_integer('start');\n return FALSE;\n }\n\n if (!is_null($stop) && !cf_is_integer($stop) || !is_null($start) && is_null($stop)) {\n cf_error::invalid_integer('stop');\n return FALSE;\n }\n\n $counts = array();\n\n // main\n $counts['main'] = array(\n 'total' => NULL,\n );\n\n try {\n $query = db_select('mfcs_requests', 'mer');\n\n $query->addExpression('count(mer.id)');\n\n $query->condition('mer.status', MFCS_REQUEST_STATUS_DELETED, '<>');\n\n // total\n $the_query = clone($query);\n\n if (!is_null($start)) {\n $the_query->condition('mer.created', $start, '>=');\n $the_query->condition('mer.created', $stop, '<');\n }\n\n $counts['main']['total'] = $the_query->execute()->fetchField();\n\n\n // status\n $counts['status'] = array(\n 'locked' => NULL,\n 'unlocked' => NULL,\n 'accepted' => NULL,\n 'denied' => NULL,\n 'unavailable' => NULL,\n 'due_to_lock' => NULL,\n 'cancelled' => NULL,\n 'accepted_cancelled' => NULL,\n );\n\n $query = db_select('mfcs_requests', 'mer');\n\n $query->addExpression('count(mer.id)');\n\n $query->condition('mer.status', MFCS_REQUEST_STATUS_DELETED, '<>');\n\n if (!is_null($start)) {\n $query->condition('mer.created', $start, '>=');\n $query->condition('mer.created', $stop, '<');\n }\n\n // status (locked)\n $the_query = clone($query);\n $the_query->condition('mer.status', MFCS_REQUEST_STATUS_LOCKED);\n $counts['status']['locked'] = $the_query->execute()->fetchField();\n\n // status (unlocked)\n $the_query = clone($query);\n $the_query->condition('mer.status', MFCS_REQUEST_STATUS_UNLOCKED);\n $counts['status']['unlocked'] = $the_query->execute()->fetchField();\n\n // status (closed, accepted)\n $the_query = clone($query);\n $the_query->condition('mer.status', MFCS_REQUEST_STATUS_CLOSED_ACCEPTED);\n $counts['status']['accepted'] = $the_query->execute()->fetchField();\n\n // status (closed, denied)\n $the_query = clone($query);\n $the_query->condition('mer.status', MFCS_REQUEST_STATUS_CLOSED_DENIED);\n $counts['status']['denied'] = $the_query->execute()->fetchField();\n\n // status (closed, unavailable)\n $the_query = clone($query);\n $the_query->condition('mer.status', MFCS_REQUEST_STATUS_CLOSED_UNAVAILABLE);\n $counts['status']['unavailable'] = $the_query->execute()->fetchField();\n\n // status (closed, due to lock)\n $the_query = clone($query);\n $the_query->condition('mer.status', MFCS_REQUEST_STATUS_CLOSED_DUE_TO_LOCK);\n $counts['status']['due_to_lock'] = $the_query->execute()->fetchField();\n\n // status (cancelled)\n $the_query = clone($query);\n $the_query->condition('mer.status', MFCS_REQUEST_STATUS_CANCELLED);\n $counts['status']['cancelled'] = $the_query->execute()->fetchField();\n\n // status (accepted, but cancelled)\n $the_query = clone($query);\n $the_query->condition('mer.status', MFCS_REQUEST_STATUS_CLOSED_ACCEPTED_CANCELLED);\n $counts['status']['accepted_cancelled'] = $the_query->execute()->fetchField();\n\n\n // step\n $counts['step'] = array(\n 'changes_required' => NULL,\n 'completed' => NULL,\n 'final_decision' => NULL,\n 'release_hold' => NULL,\n 'review' => NULL,\n 'requirements' => NULL,\n 'venue_available' => NULL,\n );\n\n $query = db_select('mfcs_requests', 'mer');\n\n $query->addExpression('count(mer.id)');\n\n $query->condition('mer.status', MFCS_REQUEST_STATUS_DELETED, '<>');\n\n if (!is_null($start)) {\n $query->condition('mer.created', $start, '>=');\n $query->condition('mer.created', $stop, '<');\n }\n\n // step (changes required)\n #$the_query = clone($query);\n #$the_query->condition('mer.step', MFCS_REVIEW_STEP_CHANGES_REQUIRED);\n #$counts['step']['changes_required'] = $the_query->execute()->fetchField();\n\n // step (completed)\n $the_query = clone($query);\n $the_query->condition('mer.step', MFCS_REVIEW_STEP_COMPLETED);\n $counts['step']['completed'] = $the_query->execute()->fetchField();\n\n // step (final approval)\n $the_query = clone($query);\n $the_query->condition('mer.step', MFCS_REVIEW_STEP_FINAL_DECISION);\n $counts['step']['final_decision'] = $the_query->execute()->fetchField();\n\n // step (release hold)\n #$the_query = clone($query);\n #$the_query->condition('mer.step', MFCS_REVIEW_STEP_RELEASE_HOLD);\n #$counts['step']['release_hold'] = $the_query->execute()->fetchField();\n\n // step (review)\n $the_query = clone($query);\n $the_query->condition('mer.step', MFCS_REVIEW_STEP_REVIEW);\n $counts['step']['review'] = $the_query->execute()->fetchField();\n\n // step (venue available)\n $the_query = clone($query);\n $the_query->condition('mer.step', MFCS_REVIEW_STEP_VENUE_AVAILABLE);\n $counts['step']['venue_available'] = $the_query->execute()->fetchField();\n\n\n // request classification\n $counts['classification'] = array(\n 'student' => NULL,\n 'camps' => NULL,\n 'facility' => NULL,\n 'external' => NULL,\n );\n\n $query = db_select('mfcs_requests', 'mer');\n\n $query->addExpression('count(mer.id)');\n\n $query->condition('mer.status', MFCS_REQUEST_STATUS_DELETED, '<>');\n\n if (!is_null($start)) {\n $query->condition('mer.created', $start, '>=');\n $query->condition('mer.created', $stop, '<');\n }\n\n // classification (student)\n $the_query = clone($query);\n $the_query->condition('mer.classification', MFCS_REQUEST_CLASSIFICATION_STUDENT);\n $counts['classification']['student'] = $the_query->execute()->fetchField();\n\n // classification (camps)\n $the_query = clone($query);\n $the_query->condition('mer.classification', MFCS_REQUEST_CLASSIFICATION_CAMPS);\n $counts['classification']['camps'] = $the_query->execute()->fetchField();\n\n // classification (faculty)\n $the_query = clone($query);\n $the_query->condition('mer.classification', MFCS_REQUEST_CLASSIFICATION_FACULTY);\n $counts['classification']['faculty'] = $the_query->execute()->fetchField();\n\n // classification (external)\n $the_query = clone($query);\n $the_query->condition('mer.classification', MFCS_REQUEST_CLASSIFICATION_EXTERNAL);\n $counts['classification']['external'] = $the_query->execute()->fetchField();\n\n\n // request type\n $counts['type'] = array(\n 'athletic' => NULL,\n 'banquery' => NULL,\n 'ceremony' => NULL,\n 'fair' => NULL,\n 'lecture' => NULL,\n 'meeting' => NULL,\n 'other' => NULL,\n 'performance' => NULL,\n 'quick_meeting' => NULL,\n 'talent' => NULL,\n 'workshop' => NULL,\n );\n\n $query = db_select('mfcs_requests', 'mer');\n\n $query->addExpression('count(mer.id)');\n\n $query->condition('mer.status', MFCS_REQUEST_STATUS_DELETED, '<>');\n\n if (!is_null($start)) {\n $query->condition('mer.created', $start, '>=');\n $query->condition('mer.created', $stop, '<');\n }\n\n // type (athletic)\n $the_query = clone($query);\n $the_query->condition('mer.type', MFCS_REQUEST_TYPE_ATHLETIC);\n $counts['type']['athletic'] = $the_query->execute()->fetchField();\n\n // type (banquet)\n $the_query = clone($query);\n $the_query->condition('mer.type', MFCS_REQUEST_TYPE_BANQUET);\n $counts['type']['banquet'] = $the_query->execute()->fetchField();\n\n // type (ceremony)\n $the_query = clone($query);\n $the_query->condition('mer.type', MFCS_REQUEST_TYPE_CEREMONY);\n $counts['type']['ceremony'] = $the_query->execute()->fetchField();\n\n // type (fair)\n $the_query = clone($query);\n $the_query->condition('mer.type', MFCS_REQUEST_TYPE_FAIR);\n $counts['type']['fair'] = $the_query->execute()->fetchField();\n\n // type (lecture)\n $the_query = clone($query);\n $the_query->condition('mer.type', MFCS_REQUEST_TYPE_LECTURE);\n $counts['type']['lecture'] = $the_query->execute()->fetchField();\n\n // type (meeting)\n $the_query = clone($query);\n $the_query->condition('mer.type', MFCS_REQUEST_TYPE_MEETING);\n $counts['type']['meeting'] = $the_query->execute()->fetchField();\n\n // type (other)\n $the_query = clone($query);\n $the_query->condition('mer.type', MFCS_REQUEST_TYPE_OTHER);\n $counts['type']['other'] = $the_query->execute()->fetchField();\n\n // type (performance)\n $the_query = clone($query);\n $the_query->condition('mer.type', MFCS_REQUEST_TYPE_PERFORMANCE);\n $counts['type']['performance'] = $the_query->execute()->fetchField();\n\n // type (quick_meeting)\n $the_query = clone($query);\n $the_query->condition('mer.type', MFCS_REQUEST_TYPE_QUICK_MEETING);\n $counts['type']['quick_meeting'] = $the_query->execute()->fetchField();\n\n // type (reception)\n $the_query = clone($query);\n $the_query->condition('mer.type', MFCS_REQUEST_TYPE_RECEPTION);\n $counts['type']['reception'] = $the_query->execute()->fetchField();\n\n // type (talent)\n $the_query = clone($query);\n $the_query->condition('mer.type', MFCS_REQUEST_TYPE_TALENT);\n $counts['type']['talent'] = $the_query->execute()->fetchField();\n\n // type (workshop)\n $the_query = clone($query);\n $the_query->condition('mer.type', MFCS_REQUEST_TYPE_WORKSHOP);\n $counts['type']['workshop'] = $the_query->execute()->fetchField();\n\n // type (club_meeting)\n $the_query = clone($query);\n $the_query->condition('mer.type', MFCS_REQUEST_TYPE_CLUB_MEETING);\n $counts['type']['club_meeting'] = $the_query->execute()->fetchField();\n }\n catch (Error $e) {\n cf_error::on_exception($e);\n\n return FALSE;\n }\n catch (Exception $e) {\n cf_error::on_exception($e);\n\n return FALSE;\n }\n\n return $counts;\n}",
"public function index()\n {\n $user_id = auth()->user()->id;\n $task_counter = JtiPlan::where('assign_to', $user_id)\n ->where('new_flag', true)\n ->count();\n\n Session::put('task_counter', $task_counter);\n \n }",
"public function count() \n { \n $query = $this->processInput();\n \n $model = $this->model;\n \n $result['total'] = $model::countAll($query['where']);\n\n $jsend = JSend\\JSendResponse::success($result);\n return $jsend->respond();\n }",
"public function count()\n {\n return $this->getCartSessionCollection()->map(function($item, $key) {\n return $item['quantity'];\n })->reduce(function($carry, $item) {\n return $carry + $item;\n }, 0);\n }",
"function getUserCount(){\n try{\n $api = $this->routerosapi;\n $user = $this->devices->getUserRouter(array('id' => '1111'));\n $api->port = $user['port'];\n if($api->connect(\"10.10.10.1\",$user['username'],$user['password'])){\n $api->write('/ip/hotspot/host/print');\n $read = $api->read();\n $api->disconnect(); \n return count($read); \n }\n }catch(Exeption $error){\n return $error;\n }\n }",
"public function reportListing()\n {\n\t$strsql = \"SELECT r.*,rs.* FROM \" . TBL_REPORTS . \" r inner join \" . TBL_REPORTS_SUBMISSION . \" rs on r.report_id=rs.report_id where r.site_id='\" . $_SESSION['site_id'] . \"' and r.report_id='\".$_GET['rid'].\"'\";\n\t$objRs = $this->objDatabase->dbQuery($strsql);\n\tparent:: reportListing($objRs);\n }",
"public function getMeetingRequestsCount()\n\t{\n\t\t//get initial value for old and new count\n\t\t$oldMeetingCount = $this->Session->read('oldMeetingCount');\n\t\t$newMeetingCount = $this->Session->read('newMeetingCount');\n\n\t\t//initialise the str\n\t\t$str = \"\";\n\t\t//get current login user\n\t\t$user = $this->Session->read('UserData.userName');\n\t\t//get the user course name.\n\t\t$userCourse = $this->Session->read('UserData.usersCourses');\n\t\t$user_course_section = $userCourse[0];\n\n\t\t//get Course and section name\n\t\t$course_info = $this->getCourseNameOfUser($user_course_section);\n\t\t$course_name = $course_info->course_name;\n\t\t$course_section = $course_info->section_name;\n\t\t$requests = array();\n\t\t//get allsection setting sections for same course\n\t\t$sections_list = $this->__allSections();\n\t\t$postoptions[] = array('Meetinginfo.chat_from_course'=>$course_name,\n\t\t\t\t'Meetinginfo.chat_from_section'=>$sections_list, 'MeetingUser.chat_meeting_name = Meetinginfo.chat_meeting_name'\n\t\t);\t\n\t\t$options['conditions'][] = array('MeetingUser.to_user' => $user, 'MeetingUser.is_read = '=> 0);\n\t\t$options['joins'][] = array(\n\t\t\t\t'table' => 'chat_meeting_info',\n\t\t\t\t'alias' => 'Meetinginfo',\n\t\t\t\t'type' => 'INNER',\n\t\t\t\t'conditions'=> $postoptions\n\t\t);\n\t\t$meeting_count = $this->MeetingUser->find('count', $options);\n\t\t//check to show alert notification\n\t\t$newMeetingCount = $meeting_count;\n\t\tif ($oldMeetingCount < $newMeetingCount ) {\n\t\t\t$showAlert = 1;\n\t\t} else {\n\t\t\t$showAlert = 0;\n\t\t}\n\t\t$oldMeetingCount = $newMeetingCount;\n\t\t$this->Session->write('oldMeetingCount', $oldMeetingCount);\n\t\t$this->Session->write('newMeetingCount', $newMeetingCount);\n\t\t$data = array('count'=>$meeting_count, 'showAlert'=>$showAlert);\n\t\techo json_encode($data);\n\t\texit;\n\t}",
"public static function getCount(){\n \t$sql = \"SELECT COUNT(*) as count FROM yy_hospital\";\n \t$res = self::getDb()->query($sql)->fetchAll();\n \t$count = $res[0]['count'];\n \treturn $count;\n }",
"function ListRecordCount() {\n\t\t$filter = $this->getSessionWhere();\n\t\tew_AddFilter($filter, $this->CurrentFilter);\n\t\t$filter = $this->ApplyUserIDFilters($filter);\n\t\t$this->Recordset_Selecting($filter);\n\t\t$sql = ew_BuildSelectSql(\"SELECT * FROM \" . $this->getSqlFrom(), $this->getSqlWhere(), \"\", \"\", \"\", $filter, \"\");\n\t\t$cnt = $this->TryGetRecordCount($sql);\n\t\tif ($cnt == -1) {\n\t\t\t$conn = &$this->Connection();\n\t\t\tif ($rs = $conn->Execute($sql)) {\n\t\t\t\t$cnt = $rs->RecordCount();\n\t\t\t\t$rs->Close();\n\t\t\t}\n\t\t}\n\t\treturn intval($cnt);\n\t}",
"public function requestDailyReport()\n {\n $client = $this->guzzleClient ?: new GuzzleClient($this->apiEndpoint);\n\n $request = $client->get(\n '/anapi/daily_summary_feed',\n ['Accept' => 'application/json'],\n ['query' => ['key' => $this->apiKey, 'format' => $this->format]]\n );\n\n $response = $request->send();\n\n return $this->handleResponse($response);\n }",
"public function listRecordCount()\n\t{\n\t\t$filter = $this->getSessionWhere();\n\t\tAddFilter($filter, $this->CurrentFilter);\n\t\t$filter = $this->applyUserIDFilters($filter);\n\t\t$this->Recordset_Selecting($filter);\n\t\t$select = $this->TableType == 'CUSTOMVIEW' ? $this->getSqlSelect() : \"SELECT * FROM \" . $this->getSqlFrom();\n\t\t$groupBy = $this->TableType == 'CUSTOMVIEW' ? $this->getSqlGroupBy() : \"\";\n\t\t$having = $this->TableType == 'CUSTOMVIEW' ? $this->getSqlHaving() : \"\";\n\t\t$sql = BuildSelectSql($select, $this->getSqlWhere(), $groupBy, $having, \"\", $filter, \"\");\n\t\t$cnt = $this->getRecordCount($sql);\n\t\treturn $cnt;\n\t}",
"public function listRecordCount()\n\t{\n\t\t$filter = $this->getSessionWhere();\n\t\tAddFilter($filter, $this->CurrentFilter);\n\t\t$filter = $this->applyUserIDFilters($filter);\n\t\t$this->Recordset_Selecting($filter);\n\t\t$select = $this->TableType == 'CUSTOMVIEW' ? $this->getSqlSelect() : \"SELECT * FROM \" . $this->getSqlFrom();\n\t\t$groupBy = $this->TableType == 'CUSTOMVIEW' ? $this->getSqlGroupBy() : \"\";\n\t\t$having = $this->TableType == 'CUSTOMVIEW' ? $this->getSqlHaving() : \"\";\n\t\t$sql = BuildSelectSql($select, $this->getSqlWhere(), $groupBy, $having, \"\", $filter, \"\");\n\t\t$cnt = $this->getRecordCount($sql);\n\t\treturn $cnt;\n\t}",
"function RecordCount() {}",
"function landing_visit_counter($_url_params) {\n\t$_url_params['key'] = _KEY;\n\t$_url_params['landing'] = _LANDING_URL;\n\n $_landing = request_post_api(_VISIT_COUNT_URL,$_url_params);\n return $_landing;\n}",
"public function getTotalNumberOfResults();",
"public function userStats() {\n\n try {\n \n $workouts = Workout::select('id', 'workout_date')\n ->where('user_id', Auth::id())\n ->orderBy('id', 'DESC')\n ->get();\n \n $last_weight_logged = Weight::select('weight', 'date')\n ->where('user_id', Auth::id())\n ->latest('date')\n ->first();\n\n if($workouts->isEmpty()) {\n $workouts = \"N/A\";\n $last_workout = \"N/A\";\n }\n else {\n $last_workout = $workouts->pluck('workout_date')->first();\n $workouts = count($workouts);\n }\n\n return response()->json([\n \"workout_count\" => $workouts,\n \"last_workout\" => $last_workout,\n \"last_weight_logged\" => $last_weight_logged,\n ], 200);\n \n } catch (Exception $e) {\n return response()->json([\n 'message' => '500_message',\n 'error' => (object)[\n $e->getCode() => [$e->getMessage()],\n ],\n ]);\n }\n }",
"public function count() {}",
"public function count() {}",
"public function reportRe()\n{\n print_r($this->requestReport(\n \"campaigns\",\n array(\"reportDate\" => \"20190501\",\n \"campaignType\" => \"sponsoredProducts\",\n \"metrics\" => \"impressions,clicks,cost\")));\n\n // amzn1.clicksAPI.v1.m1.5CD444B4.e3c2f999-14b0-4385-bf71-41f8538f712a\n \n \n}",
"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 buildAllTimeVisitors(): string\n {\n $startDate = Carbon::createFromFormat('Y-m-d', config('analytics.start_date'));\n $endDate = Carbon::now();\n\n $visitorsData = AnalyticsFacade::performQuery(Period::create($startDate, $endDate), 'ga:sessions');\n\n return $visitorsData->totalsForAllResults['ga:sessions'];\n }",
"public function statistics()\n {\n $places = $this->placeRepository->makeModel();\n\n $confirmed_places = $places->where('confirmed', true)->count();\n $unconfirmed_places = $places->where('confirmed', false)->count();\n $trashed_places = $places->onlyTrashed()->count();\n\n $clients = $this->clientRepository->all()->count();\n $admins = $this->userRepository->all()->count();\n $oracles = $this->oracleUserRepository->all()->count();\n\n $owner_requests = $this->ownerRequestRepository->all()->count();\n $advertisers = $this->advertiserRepository->all()->count();\n $service_ads = $this->adRepository->all()->count();\n\n $data = [\n 'confirmed_places' => $confirmed_places,\n 'unconfirmed_places' => $unconfirmed_places,\n 'trashed_places' => $trashed_places,\n 'clients' => $clients,\n 'admins' => $admins,\n 'oracles' => $oracles,\n 'owner_requests' => $owner_requests,\n 'advertisers' => $advertisers,\n 'service_ads' => $service_ads\n ];\n\n if (request()->wantsJson()) {\n\n return response()->json($data);\n }\n }",
"public function indexAction()\n {\n $date = $this->params()->fromQuery('date');\n $init = new Google();\n $response = $init->getReport($date, $date);\n $result = $init->printResults($response);\n foreach ($result as $key => $item) {\n\n $sql = \"insert into analytics(source_medium,users,new_users,session,bounce_rate,pages_session,\n avg_session_duration,ecommerce_conversion_rate,transactions,revenue,created_date) values('{$key}','{$item['ga:users']}','{$item['ga:newUsers']}','{$item['ga:sessions']}'\n ,'{$item['ga:bounceRate']}','{$item['ga:pageviewsPerSession']}','{$item['ga:avgSessionDuration']}'\n ,'{$item['ga:transactionsPerSession']}','{$item['ga:transactions']}','{$item['ga:transactionRevenue']}','{$date}') on duplicate key update\n users = '{$item['ga:users']}',new_users ='{$item['ga:newUsers']}' ,session='{$item['ga:sessions']}',bounce_rate='{$item['ga:bounceRate']}',pages_session='{$item['ga:pageviewsPerSession']}',\n avg_session_duration='{$item['ga:avgSessionDuration']}',ecommerce_conversion_rate='{$item['ga:transactionsPerSession']}',transactions='{$item['ga:transactions']}',revenue='{$item['ga:transactionRevenue']}'\";\n $statement = $this->conn->createStatement($sql);\n $statement->execute();\n }\n }",
"function getNumberOfEntriesInStatsPerProvider($sp, $idp, $sp_name, $idp_name, $from, $to, $counter) {\n global $LA;\n\n\t$count = 0;\n\n\t$extend = \"\"; \n\tif (isset($from) && isset($to)) {\n\t\t$extend = \" AND stats_day_id IN (SELECT day_id FROM log_analyze_day WHERE day_day BETWEEN '\".$from.\"' AND '\".$to.\"')\";\n\t}\n\n\t$selector = \"sum(stats_logins)\";\n\tif ($counter == \"user\") {\n\t\t$selector = \"sum(stats_users)\";\n\t}\n\n\t$result = mysql_query(\"SELECT \".$selector.\" as number FROM log_analyze_stats WHERE stats_provider_id IN (SELECT provider_id FROM log_analyze_provider,log_analyze_sp, log_analyze_idp WHERE provider_sp_id = sp_id AND provider_idp_id = idp_id AND sp_name = '\".$sp_name.\"' AND idp_name = '\".$idp_name.\"')\".$extend, $LA['mysql_link_stats']);\n\t\n\tif (mysql_num_rows($result) == 1) {\n\t\t$result_row = mysql_fetch_assoc($result);\n\t\t$count = $result_row['number'];\n\t}\n\telse {\n\t\t# try a 'U' entry...\n\t\t$result = mysql_query(\"SELECT \".$selector.\" as number FROM log_analyze_stats WHERE stats_provider_id IN (SELECT provider_id FROM log_analyze_provider,log_analyze_sp, log_analyze_idp WHERE provider_sp_id = sp_id AND provider_idp_id = idp_id AND sp_name = '\".$sp.\"' AND idp_name = '\".$idp.\"')\".$extend, $LA['mysql_link_stats']);\n\t\t\n\t\tif (mysql_num_rows($result) == 1) {\n\t\t\t$result_row = mysql_fetch_assoc($result);\n\t\t\t$count = $result_row['number'];\n\t\t}\t\n\t}\n\t\n\treturn $count;\n}",
"protected function get_stats()\n\t{\n\t\tif ($this->index_created())\n\t\t{\n\t\t\t$sql = 'SELECT COUNT(post_id) as total_posts\n\t\t\t\tFROM ' . POSTS_TABLE;\n\t\t\t$result = $this->db->sql_query($sql);\n\t\t\t$this->stats['total_posts'] = (int) $this->db->sql_fetchfield('total_posts');\n\t\t\t$this->db->sql_freeresult($result);\n\n\t\t\t$sql = 'SELECT COUNT(p.post_id) as main_posts\n\t\t\t\tFROM ' . POSTS_TABLE . ' p, ' . SPHINX_TABLE . ' m\n\t\t\t\tWHERE p.post_id <= m.max_doc_id\n\t\t\t\t\tAND m.counter_id = 1';\n\t\t\t$result = $this->db->sql_query($sql);\n\t\t\t$this->stats['main_posts'] = (int) $this->db->sql_fetchfield('main_posts');\n\t\t\t$this->db->sql_freeresult($result);\n\t\t}\n\t}",
"function getResults(&$analytics, $profileId) {\n // for the last seven days.\n return $analytics->data_ga->get(\n 'ga:' . $profileId,\n '7daysAgo',\n 'today',\n 'ga:sessions');\n}",
"function get_num_queries()\n {\n }",
"function wp_get_all_sessions()\n {\n }",
"public function count()\r\n\t{\r\n//\t\techo json_encode($this->db->query_first($sql));\r\n\t\techo json_encode(array('total'=>30));\r\n\t}",
"public function getTotalResults();",
"public function index()\n\t{\n\t\t//\n\t\t$_data = Input::get();\n\t\t$_session = $_data['session'];\n\t\t\n\t\t$_newSession = $this->_checkSession($_session);\n\t\t\t$_runs = array();\n\t\t\t$_runCollection = Run::all();\n\t\t\tforeach($_runCollection as $_run)\n\t\t\t{\n\t\t\t\t$_runs[$_run->id] = $_run->toArray();\n\t\t\t\t$_runs[$_run->id]['user'] = $_run->user->toArray();\n\t\t\t}\n\n\t\t\t$_json = array(\n\t\t\t\t'runs' => $_runs,\n\t\t\t\t'user' => array(\n\t\t\t\t\t'session' => $_newSession\n\t\t\t\t)\n\t\t\t);\n\t\t\treturn $this->_jsonReturn($_json, 200);\n\n\t}",
"protected function collectSessionData() {\n\n\t\t$time_started = time();\n\t\t$time_ended = $time_started;\n\n\t\t$user_guid = elgg_get_logged_in_user_guid();\n\n\t\t$ip_address = $this->getIpAddress();\n\n\t\t$geolite = elgg_get_config('geolite_db');\n\t\tif (file_exists($geolite)) {\n\t\t\t$reader = new Reader($geolite);\n\t\t\t$geoip = $reader->get($ip_address);\n\t\t} else {\n\t\t\t$geoip = [];\n\t\t}\n\n\t\t$city = '';\n\t\tif (!empty($geoip['city']['names']['en'])) {\n\t\t\t$city = $geoip['city']['names']['en'];\n\t\t}\n\n\t\t$state = '';\n\t\tif (!empty($geoip['subdivisions'])) {\n\t\t\t$state = array_shift($geoip['subdivisions']);\n\t\t\tif (!empty($state['names']['en'])) {\n\t\t\t\t$state = $state['names']['en'];\n\t\t\t}\n\t\t}\n\n\t\t$country = '';\n\t\tif (!empty($geoip['country']['iso_code'])) {\n\t\t\t$country = $geoip['country']['iso_code'];\n\t\t}\n\n\t\t$latitude = '';\n\t\tif (!empty($geoip['location']['latitude'])) {\n\t\t\t$latitude = $geoip['location']['latitude'];\n\t\t}\n\n\t\t$longitude = '';\n\t\tif (!empty($geoip['location']['longitude'])) {\n\t\t\t$longitude = $geoip['location']['longitude'];\n\t\t}\n\n\t\t$timezone = '';\n\t\tif (!empty($geoip['location']['time_zone'])) {\n\t\t\t$timezone = $geoip['location']['time_zone'];\n\t\t}\n\n\t\treturn [\n\t\t\t'user_guid' => $user_guid,\n\t\t\t'time_started' => $time_started,\n\t\t\t'time_ended' => $time_ended,\n\t\t\t'ip_address' => $ip_address,\n\t\t\t'city' => $city,\n\t\t\t'state' => $state,\n\t\t\t'country' => $country,\n\t\t\t'latitude' => $latitude,\n\t\t\t'longitude' => $longitude,\n\t\t\t'timezone' => $timezone,\n\t\t];\n\t}",
"public function count()\n {\n return $this->client->count($this->compile())['count'];\n }",
"public function computeCount() {\n $count = 0;\n if (empty($this->httpOptions)) {\n $json = file_get_contents($this->listUrl);\n }\n else {\n $response = drupal_http_request($this->listUrl, $this->httpOptions);\n $json = $response->data;\n }\n if ($json) {\n $data = drupal_json_decode($json);\n if ($data) {\n $count = count($data);\n }\n }\n return $count;\n }",
"public function countAll() {}",
"public function countAll() {}",
"public function countAll() {}"
] | [
"0.639608",
"0.62577766",
"0.61901736",
"0.6046171",
"0.5898656",
"0.58827037",
"0.585875",
"0.58329135",
"0.5773779",
"0.57500315",
"0.57176626",
"0.5715898",
"0.57090306",
"0.5657324",
"0.5654734",
"0.5640916",
"0.56081283",
"0.5604047",
"0.55876064",
"0.5583254",
"0.55671424",
"0.5557924",
"0.55462927",
"0.5532281",
"0.5518999",
"0.5515647",
"0.5515501",
"0.55055904",
"0.54936016",
"0.54879266",
"0.548595",
"0.5480541",
"0.5480095",
"0.54785556",
"0.5439691",
"0.54392594",
"0.54392594",
"0.54391664",
"0.54014796",
"0.5384473",
"0.53798217",
"0.53798217",
"0.53798217",
"0.5369473",
"0.53667593",
"0.5363378",
"0.53440446",
"0.53089863",
"0.5290261",
"0.52867264",
"0.5284608",
"0.52758527",
"0.5274398",
"0.52723193",
"0.52659756",
"0.526151",
"0.52604216",
"0.5251758",
"0.52379763",
"0.5212059",
"0.52063555",
"0.520482",
"0.52003103",
"0.51983494",
"0.51786953",
"0.51786953",
"0.51741856",
"0.5172185",
"0.5171369",
"0.5169759",
"0.5169568",
"0.5169568",
"0.5169082",
"0.5168968",
"0.5168968",
"0.5168968",
"0.5168968",
"0.5168968",
"0.5168968",
"0.5168968",
"0.5168968",
"0.5168968",
"0.5168968",
"0.5168968",
"0.5161251",
"0.51606613",
"0.5157221",
"0.5156563",
"0.515485",
"0.5149952",
"0.51400054",
"0.5137583",
"0.51373553",
"0.5136405",
"0.5134846",
"0.51339877",
"0.51273566",
"0.5116956",
"0.5112427",
"0.5112427",
"0.5112427"
] | 0.0 | -1 |
Parses the response from the Core Reporting API and prints | function printResults(&$results) {
// the profile name and total sessions.
if (count($results->getRows()) > 0) {
// Get the profile name.
$profileName = $results->getProfileInfo()->getProfileName();
// Get the entry for the first entry in the first row.
$rows = $results->getRows();
$sessions = $rows[0][0];
// Print the results.
print "First view (profile) found: $profileName\n";
print "Total sessions: $sessions\n";
} else {
print "No results found.\n";
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract function parse_api_response();",
"public function printResponse()\n {\n $request = $this->request;\n $response = $this->response;\n\n echo sprintf(\n \"%s %s => %d:\\n%s\",\n $this->request->getMethod(),\n $this->request->getUri(),\n $response->getStatusCode(),\n $response->getBody()\n );\n }",
"function show_response()\n\t{\n\t\tprint_r($this->http_response);\n\t}",
"public function testParseResponse() {\n $data = $this->dl->parseResponse($this->sampleData, \"JSON\");\n $this->assertion($data['zip'], \"37931\", \"Parsed zip should equal 37931.\");\n $this->assertion($data['conditions'], \"clear sky\", \"Parsed conditions should equal clear sky.\");\n $this->assertion($data['pressure'], \"1031\", \"Parsed pressure should equal 1031.\");\n $this->assertion($data['temperature'], \"35\", \"Parsed temperature should equal 35.\");\n $this->assertion($data['windDirection'], \"ESE\", \"Parsed wind direction should equal ESE.\");\n $this->assertion($data['windSpeed'], \"1.06\", \"Parsed wind speed should equal 1.06.\");\n $this->assertion($data['humidity'], \"80\", \"Parsed humidity should equal 80.\");\n $this->assertion($data['timestamp'], \"1518144900\", \"Parsed timestamp should equal 1518144900.\");\n }",
"function parse_response($response)\n {\n $data = $response->getBody();\n\n // Note we could not use Guzzle XML method becuase Endicia does not return valid XML it seems\n $sxe = new SimpleXMLElement($data);\n\n if ($sxe->status == 0) {\n $return_data = array();\n $return_data['Status'] = (string)$sxe->Status;\n $return_data['Base64LabelImage'] = (string)$sxe->Base64LabelImage;\n $return_data['TrackingNumber'] = (string)$sxe->TrackingNumber;\n $return_data['FinalPostage'] = (string)$sxe->FinalPostage;\n $return_data['TransactionID'] = (string)$sxe->TransactionID;\n $return_data['PostmarkDate'] = (string)$sxe->PostmarkDate;\n $return_data['DeliveryTimeDays'] = (string)$sxe->PostagePrice->DeliveryTimeDays;\n\t $return_data['error'] = (string)$data;\n \n\t\treturn $return_data;\n } else {\n return array('status' => 'error', 'message' => $sxe);\n }\n }",
"function printInfo($response) {\n\t// Check for errors\n\tif($response === FALSE){\n\t\techo $response . \"</br>\";\n\t\tdie($response);\n\t}\n\n\t$responseData = json_decode($response, TRUE);\n\techo \"<pre>\"; print_r($responseData); echo \"</pre>\";\n}",
"public function printResponse()\n {\n $request = $this->request;\n $response = $this->response;\n\n echo sprintf(\n \"%s %s => %d:\\n%s\",\n $request->getMethod(),\n (string) ($request instanceof RequestInterface ? $request->getUri() : $request->getUrl()),\n $response->getStatusCode(),\n (string) $response->getBody()\n );\n }",
"private function handleDiagnosticsRequest()\n {\n $statusApiConfigurator = new Webinterpret_Connector_StatusApi_StatusApiConfigurator(Mage::app(), Mage::getConfig());\n\n $statusApi = $statusApiConfigurator->getExtendedStatusApi();\n\n $json = $statusApi->getJsonTestResults();\n header('Content-Type: application/json');\n header('Content-Length: '.strlen($json));\n echo $json;\n }",
"public function display()\n {\n if (waRequest::isXMLHttpRequest()) {\n $this->getResponse()->addHeader('Content-Type', 'application/json');\n }\n $this->getResponse()->sendHeaders();\n if (!$this->errors) {\n $data = $this->response;\n echo json_encode($data);\n } else {\n $type = ifset($this->response, 'type', null);\n $timestamp = ifset($this->response, 'timestamp', null);\n $errors = array('error' => $this->errors);\n if ($type) {\n $errors['type'] = $type;\n }\n if ($timestamp) {\n $errors['timestamp'] = $timestamp;\n }\n echo json_encode($errors);\n }\n }",
"private function parseResponse() {\n $headers = Strings::split(substr($this->response, 0, $this->info['header_size']), \"~[\\n\\r]+~\", PREG_SPLIT_NO_EMPTY);\n $this->headers = static::parseHeaders($headers);\n $this->body = substr($this->response, $this->info['header_size']);\n $this->response = NULL;\n }",
"public function actionParseReport()\n {\n //->addUpdate([\n // [\n // 'date_delivered' => ['$not' => ['$exists' => true]],\n // 'status' => 'sended',\n // ],\n // ], ['status' => 'sendedddd'])->executeBatch(Message_Phone_List::collectionName());\n\n $vm = ViberMessage::find()->where(['in', 'status', ['wait', 'process']])->one();\n if (! $vm) {\n echo 'No distribution messages';\n\n return;\n }\n $pf = new ProviderFactory();\n $provider = $pf->createProvider($vm);\n $provider->answer = $this->getReportData2();\n $provider->parseDeliveryReport();\n }",
"protected function analyzeResponse() {\n\t\tvar_dump($this->curlResponse);\n\t\t$parts = explode(\"\\r\\n\\r\\n\", $this->curlResponse);\n\n\t\t$response_body = array_pop($parts);\n\t\t$response_headers = implode('', $parts);\n\t\t$http_status_code = $this->curl->getinfo(CURLINFO_HTTP_CODE); \n\n\t\treturn array(trim($response_headers), trim($response_body), $http_status_code);\n\t}",
"function display_charges_list(GuzzleHttp\\Message\\Response $response)\n{\n if (count($response->json()['response'])) {\n $charges = $response->json()['response'];\n print \"Available charges\\n\";\n foreach ($charges as $charge) {\n printf(\n \"token: %s | transaction date: %s | currency: %s | amount: %s | fees: %s\\n\",\n $charge['token'], $charge['created_at'], $charge['currency'],\n money_format('%(#5n', $charge['amount']),\n money_format('%(#5n', $charge['total_fees'])\n );\n }\n } else {\n print \"\\nNo charges available in response object\\n\";\n }\n}",
"public function response() {\n $response = (object)[\n 'count' => $this->response,\n 'errors' => $this->errors\n ];\n echo json_encode($response); \n }",
"function printResponse($response){\n if($response['status']){\n print_r(json_encode($response));\n }else{\n die(json_encode($response));\n }\n}",
"function debugAPI()\n{\n global $wpHelper;\n ob_start();\n $wpHelper->cacheRefresh(true);\n $data = $wpHelper->report_types();\n echo \"<pre>\";\n print_r($data);\n echo \"</pre>\";\n //$edReports->reports(2);\n //$edReports->reportsDetail(2);\n //$edReports->reportTypes();\n return ob_get_clean();\n}",
"function deliver_response($format, $api_response)\n {\n\n // Define HTTP responses\n $http_response_code = array(200 => 'OK', 400 => 'Bad Request', 401 => 'Unauthorized', 403 => 'Forbidden', 404 => 'Not Found');\n\n // Set HTTP Response\n header('HTTP/1.1 ' . $api_response['status'] . ' ' . $http_response_code[$api_response['status']]);\n header('Content-Type: application/json; charset=utf-8');\n\n $json_response = json_encode($api_response);\n echo $json_response;\n exit;\n\n }",
"abstract protected function parseResponse($response);",
"private function getResponse() {\n $this->response['status_code'] = $this->status->getStatusCode();\n $this->response['reason_phrase'] = $this->status->getReasonPhrase();\n \n $this->readHeaders();\n }",
"protected function parseResponse()\n {\n $data = simplexml_load_string($this->body);\n \n $this->data = $data;\n }",
"public function print_result(){\n $parsed_result = (array) $this->get_result()->parse_result();\n foreach($parsed_result['items'] as $repository_detail){\n $out .= $repository_detail->full_name.': '.$repository_detail->description.'<br />';\n }\n echo $out;\n }",
"public function getExportAllEdcFromTerminal(){\n\t\t$token = $this->input->cookie('token');\n\t\t\t\n\t\t$api = api_url.\"/api/report/\";\n\n\t\t$curl = curl_init($api);\n\n\t\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"POST\");\n\n\t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, array(\n\t\t'Content-Type: application/json',\n\t\t'token: Bearer '.$token)\n\t\t);\n\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true); // Make it so the data coming back is put into a string\n\t\t\n\n\t\t// Send the request\n\t\t$result = curl_exec($curl);\n\n\t\t// Free up the resources $curl is using\n\t\tcurl_close($curl);\n\t\t$jsonData = json_decode($result,true);\n\n\t\t\n\n\t\treturn (object) $jsonData;\n\t}",
"public function getResponseOutput() {\n // Empty, to be overridden\n }",
"public function chartApiOutput() {\n\n $user = Auth::user();\n $chart = new DataChart();\n $mounthOutput = $this->getQueryChart($user);\n $chart->dataset('Last Mounth output', 'line', $mounthOutput->values())\n ->color('rgb(0,123,255)');;\n return json_decode($chart->api());\n }",
"public function getReport() {}",
"public function getReport() {}",
"public static function getResponse1013() {\n\n return '{\"indicator\":{\"name\":\"Término de facturación de energía activa del PVPC peaje por defecto\",\"short_name\":\"PVPC T. Defecto\",\"id\":1013,\"composited\":false,\"step_type\":\"linear\",\"disaggregated\":false,\"magnitud\":[{\"name\":\"Precio\",\"id\":23}],\"tiempo\":[{\"name\":\"Hora\",\"id\":4}],\"geos\":[{\"geo_id\":3,\"geo_name\":\"España\"}],\"values_updated_at\":\"2017-03-01T21:01:30.000+01:00\",\"values\":[{\"value\":116.62,\"datetime\":\"2017-03-01T00:00:00.000+01:00\",\"datetime_utc\":\"2017-02-28T23:00:00Z\",\"tz_time\":\"2017-02-28T23:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":110.32,\"datetime\":\"2017-03-01T01:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T00:00:00Z\",\"tz_time\":\"2017-03-01T00:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":108.17,\"datetime\":\"2017-03-01T02:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T01:00:00Z\",\"tz_time\":\"2017-03-01T01:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":107.71,\"datetime\":\"2017-03-01T03:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T02:00:00Z\",\"tz_time\":\"2017-03-01T02:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":107.73,\"datetime\":\"2017-03-01T04:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T03:00:00Z\",\"tz_time\":\"2017-03-01T03:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":108.94,\"datetime\":\"2017-03-01T05:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T04:00:00Z\",\"tz_time\":\"2017-03-01T04:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":119.5,\"datetime\":\"2017-03-01T06:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T05:00:00Z\",\"tz_time\":\"2017-03-01T05:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":121.41,\"datetime\":\"2017-03-01T07:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T06:00:00Z\",\"tz_time\":\"2017-03-01T06:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":119.35,\"datetime\":\"2017-03-01T08:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T07:00:00Z\",\"tz_time\":\"2017-03-01T07:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":119.0,\"datetime\":\"2017-03-01T09:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T08:00:00Z\",\"tz_time\":\"2017-03-01T08:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":118.97,\"datetime\":\"2017-03-01T10:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T09:00:00Z\",\"tz_time\":\"2017-03-01T09:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":117.2,\"datetime\":\"2017-03-01T11:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T10:00:00Z\",\"tz_time\":\"2017-03-01T10:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":113.84,\"datetime\":\"2017-03-01T12:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T11:00:00Z\",\"tz_time\":\"2017-03-01T11:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":114.1,\"datetime\":\"2017-03-01T13:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T12:00:00Z\",\"tz_time\":\"2017-03-01T12:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":113.76,\"datetime\":\"2017-03-01T14:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T13:00:00Z\",\"tz_time\":\"2017-03-01T13:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":111.74,\"datetime\":\"2017-03-01T15:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T14:00:00Z\",\"tz_time\":\"2017-03-01T14:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":107.47,\"datetime\":\"2017-03-01T16:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T15:00:00Z\",\"tz_time\":\"2017-03-01T15:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":110.25,\"datetime\":\"2017-03-01T17:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T16:00:00Z\",\"tz_time\":\"2017-03-01T16:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":116.76,\"datetime\":\"2017-03-01T18:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T17:00:00Z\",\"tz_time\":\"2017-03-01T17:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":120.51,\"datetime\":\"2017-03-01T19:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T18:00:00Z\",\"tz_time\":\"2017-03-01T18:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":121.13,\"datetime\":\"2017-03-01T20:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T19:00:00Z\",\"tz_time\":\"2017-03-01T19:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":123.15,\"datetime\":\"2017-03-01T21:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T20:00:00Z\",\"tz_time\":\"2017-03-01T20:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":121.9,\"datetime\":\"2017-03-01T22:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T21:00:00Z\",\"tz_time\":\"2017-03-01T21:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":120.44,\"datetime\":\"2017-03-01T23:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T22:00:00Z\",\"tz_time\":\"2017-03-01T22:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":123.3,\"datetime\":\"2017-03-02T00:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T23:00:00Z\",\"tz_time\":\"2017-03-01T23:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"}]}}';\n }",
"public function getTextReport() {\n \n $r = '';\n \n // date and POST url\n for ($i=0; $i<80; $i++) { $r .= '-'; }\n $r .= \"\\n[\".date('m/d/Y g:i A').'] - '.$this->getPostUri();\n if ($this->use_curl) $r .= \" (curl)\\n\";\n else $r .= \" (fsockopen)\\n\";\n \n // HTTP Response\n for ($i=0; $i<80; $i++) { $r .= '-'; }\n $r .= \"\\n{$this->getResponse()}\\n\";\n \n // POST vars\n for ($i=0; $i<80; $i++) { $r .= '-'; }\n $r .= \"\\n\";\n \n foreach ($this->post_data as $key => $value) {\n $r .= str_pad($key, 25).\"$value\\n\";\n }\n $r .= \"\\n\\n\";\n \n return $r;\n }",
"public function getTextReport() {\n \n $r = '';\n \n // date and POST url\n for ($i=0; $i<80; $i++) { $r .= '-'; }\n $r .= \"\\n[\".date('m/d/Y g:i A').'] - '.$this->getPostUri();\n if ($this->use_curl) $r .= \" (curl)\\n\";\n else $r .= \" (fsockopen)\\n\";\n \n // HTTP Response\n for ($i=0; $i<80; $i++) { $r .= '-'; }\n $r .= \"\\n{$this->getResponse()}\\n\";\n \n // POST vars\n for ($i=0; $i<80; $i++) { $r .= '-'; }\n $r .= \"\\n\";\n \n foreach ($this->post_data as $key => $value) {\n $r .= str_pad($key, 25).\"$value\\n\";\n }\n $r .= \"\\n\\n\";\n \n return $r;\n }",
"public function getResponse() {\n if($this->response) {\n $response = explode($this->responseDelimeter, $this->response);\n if(is_array($response)) {\n return $response;\n }\n else {\n return '';\n } \n }\n else {\n return '';\n }\n }",
"public function displayArray()\r\n\t{\r\n\t\t$this->addThingsToPrint(\"<h2><a href=\\\"\" . $this->contentURL . \"\\\">\" . $this->contentURL . \"</a></h2>\");\r\n\t\t$this->addThingsToPrint(\"<pre>\" . print_r(json_decode($this->getJsonData()), TRUE) . \"</pre>\");\r\n\t\t$fullContent = RestUtils::getHTTPHeader('Testing') . $this->dataToPrint . RestUtils::getHTTPFooter(); \r\n\t\tRestUtils::sendResponse(200, $fullContent);\r\n\t}",
"private function smpResponse($response, $payload=null, $reports=null) {\n echo json_encode($response);\n }",
"public function getResponse() {}",
"public function getResponse() {}",
"function print_response($response) {\n foreach($response as $value) {\n if (is_array($value)) {\n print_response($value);\n }\n else {\n print sm_encode_html_special_chars($value).\"<br />\\n\";\n }\n }\n}",
"public function reportRe()\n{\n print_r($this->requestReport(\n \"campaigns\",\n array(\"reportDate\" => \"20190501\",\n \"campaignType\" => \"sponsoredProducts\",\n \"metrics\" => \"impressions,clicks,cost\")));\n\n // amzn1.clicksAPI.v1.m1.5CD444B4.e3c2f999-14b0-4385-bf71-41f8538f712a\n \n \n}",
"public function printData(){\r\n\t\tif ($this->options['active']){\r\n\t\t\t$result = $this->options['handler']->printData($this->profiler);\r\n\t\t\r\n\t\t\tif ($this->options['handler']->returnData()){\r\n\t\t\t\treturn $result;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function Statistics_General()\n\t{\n\t\t$Data = $this -> HTTPRequest($this -> APIURL.'Statistics:General');\n\t\treturn $this -> ParseResponse($Data);\n\t}",
"public function report()\n {\n $formatter = new PullRequestSlackFormatter($this);\n return $formatter->format();\n }",
"protected function process_response() {\n\t\t\t$this->response['response']['Message'] = isset($this->response['response']['Message']) ? $this->response['response']['Message'] : '';\n\t\t\t$this->response['response']['error'] = (strpos(strtolower($this->response['response']['Message']), 'invalid') !== false) ? true : $this->response['response']['error'];\n\t\t\t$this->response['response']['error'] = (strpos(strtolower($this->response['response']['Message']), 'the item code was specified more than once') !== false) ? true : $this->response['response']['error'];\n\t\t\t$this->response['response']['Level1Code'] = $this->request['Level1Code'];\n\t\t\t\n\t\t\tif (!$this->response['response']['error']) { // IF Error is False\n\t\t\t\tif (in_array($this->response['server']['http_code'], array('200', '201', '202', '204'))) {\n\t\t\t\t\t$this->log_sendlogitem($this->request['Level1Code']);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->log_error($this->response['response']['Message']);\n\t\t\t}\n\t\t}",
"public function APIreports()\n {\n $processed_fields= Processed_field::with('field','tractor')->paginate(15);\n\n return Processed_fieldResource::collection($processed_fields);\n }",
"public function parseResponse() {\r\r\n\r\r\n return true;\r\r\n }",
"protected function parseResponse()\n {\n // get the status code from response.\n $statusCode = $this->httpResponse->getStatusCode();\n\n // set as error, if http status code is not between 200 and 299 (inclusive).\n $this->networkError = !($statusCode >= 200 && $statusCode <= 299);\n\n // decode the response body.\n $body = $this->decodeBody();\n\n // stop when no body is present.\n if ($body) {\n // parse the response id from the body.\n $this->id = (int) array_get($body, 'id', null);\n\n // set as error when there is a an error key and it's not null.\n $this->isError = array_get($body, 'error', null) !== null;\n\n // parse the response data, from result or error.\n $this->data = collect(array_get($body, $this->isError ? 'error' : 'result', []));\n }\n\n // just return the response body.\n return $this->body;\n }",
"function getReport() ;",
"private function parseResult()\n {\n $code = $this->statusCode;\n\n if($code == \"01\")\n {\n $this->success = true;\n $this->message = \"Payment Successful\";\n }\n elseif($code == \"515\")\n {\n $this->success = false;\n $this->message = \"This number does not have a mobile money account\";\n }\n elseif($code == \"529\")\n {\n $this->success = false;\n $this->message = \"You don't have enough money in your account. Please Recharge\";\n }\n elseif($code == \"100\")\n {\n $this->success = false;\n $this->message = \"Transaction Failed. Declined by user.\";\n }\n else{\n $this->success = false;\n $this->message = \"Unknown Response\";\n }\n }",
"private function get_reporting_html()\n {\n $html = array();\n \n // Reporting title\n $html[] = '<div class=\"title\" style=\"border-bottom:1px dotted #D3D3D3;width:100%;border-top:1px dotted #D3D3D3;\n padding-top:5px\">';\n $html[] = Translation::get('Reporting');\n $html[] = '</div><div class=\"clear\"> </div><br />';\n \n $html[] = '<div style=\"font-weight:bold;float:left\">';\n \n if (! $this->assignment->get_allow_group_submissions())\n {\n $html[] = Translation::get('UsersSubmissions') . ': <br />';\n $html[] = Translation::get('UsersFeedback') . ': <br />';\n \n if ($this->assignment->get_allow_late_submissions())\n {\n $html[] = Translation::get('UsersLateSubmissions') . ': <br />';\n }\n }\n else\n {\n $type = Request::get(self::PARAM_TYPE);\n \n if ($type == null)\n {\n $type = self::TYPE_COURSE_GROUP;\n }\n switch ($type)\n {\n case self::TYPE_COURSE_GROUP :\n $html[] = Translation::get('CourseGroupsSubmissions') . ': <br />';\n $html[] = Translation::get('CourseGroupsFeedback') . ': <br />';\n if ($this->assignment->get_allow_late_submissions())\n {\n $html[] = Translation::get('CourseGroupsLateSubmissions') . ': <br />';\n }\n break;\n \n case self::TYPE_GROUP :\n $html[] = Translation::get('PlatformGroupsSubmissions') . ': <br />';\n $html[] = Translation::get('PlatformGroupsFeedback') . ': <br />';\n if ($this->assignment->get_allow_late_submissions())\n {\n $html[] = Translation::get('PlatformGroupsLateSubmissions') . ': <br />';\n }\n break;\n }\n }\n $html[] = '</div>';\n \n // Reporting data\n $html[] = '<div style=\"float:left\">';\n $html[] = $this->get_reporting_block_html();\n $html[] = '</div>';\n \n return implode(PHP_EOL, $html);\n }",
"public function parseErrors(Response $response);",
"function api_response($res)\n{\n $response_code = $res['code'];\n $response_data = $res['data'];\n\n header('Content-Type: application/json');\n if(DEBUG)\n {\n exit('<pre>' . print_r(\n array(\n 'response'=>$response_code,\n 'data'=>$response_data\n\n ),true));\n }\n exit(json_encode(\n array(\n 'response'=>$response_code,\n 'data'=>$response_data\n )\n ));\n}",
"public static function getReport() {\n\t\t//IDs of the ski fields we want from the feed\n\t\t$targets = array(13); //Broken River's feed ID\n\t\t$feed = file_get_contents('https://[email protected]:[email protected]/nz/canterbury/broken-river/broken-river-snow-report/xml');\n\t\tif ($feed) {\n\t\t\t$xml = simplexml_load_string($feed);\n\t\t\t\n\t\t\t$report = null;\n\t\t\tforeach($xml->skiareas->skiarea as $data){\n\t\t\t\tif (in_array($data->id, $targets)) {\n\t\t\t\t\tif ($data->id == 13){//BR\n\t\t\t\t\t\t//$data->status->code = 5;\n\t\t\t\t\t\t$report = new Report($data);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $report;\n\t\t}\n\t}",
"public function getMetrics(): Response\n {\n\n $registry = \\Prometheus\\CollectorRegistry::getDefault();\n\n $renderer = new RenderTextFormat();\n $result = $renderer->render($registry->getMetricFamilySamples());\n\n return $this->responseFactory->make($result, 200, ['Content-Type' => RenderTextFormat::MIME_TYPE]);\n }",
"function parse_response($response){ \r\n \r\n list($response_headers,$response_body) = explode(\"\\r\\n\\r\\n\",$response,2); \r\n $response_header_lines = explode(\"\\r\\n\",$response_headers); \r\n \r\n // first line of headers is the HTTP response code \r\n $http_response_line = array_shift($response_header_lines); \r\n if (preg_match('/^HTTP\\/[0-9]\\.[0-9a-z] ([0-9]{3})/i',$http_response_line,$matches)) { \r\n $response_code = $matches[1]; \r\n }\r\n // put the rest of the headers in an array \r\n $response_header_array = array(); \r\n foreach ($response_header_lines as $header_line) { \r\n list($header,$value) = explode(': ',$header_line,2); \r\n $response_header_array[$header] = $value; \r\n } \r\n \r\n return array($response_code,$response_header_array,$response_body); \r\n}",
"public function format($response)\n {\n parent::format($response);\n if (!is_string($response->content)) {\n $response->content =\n \"<PRE>\"\n . var_export($response->content, true)\n . \"</PRE>\";\n }\n }",
"function deliver_response($format, $api_response){\n\n\t// Define HTTP responses\n\t$http_response_code = array(\n\t\t200 => 'OK',\n\t\t400 => 'Bad Request',\n\t\t401 => 'Unauthorized',\n\t\t403 => 'Forbidden',\n\t\t404 => 'Not Found'\n\t);\n\n\t// Set HTTP Response\n\theader('HTTP/1.1 '.$api_response['status'].' '.$http_response_code[ $api_response['status'] ]);\n\n\t// Process different content types\n\tif( strcasecmp($format,'json') == 0 ){\n\n\t\t// Set HTTP Response Content Type\n\t\theader('Content-Type: application/json; charset=utf-8');\n\n\t\t// Format data into a JSON response\n\t\t$json_response = json_encode($api_response);\n\n\t\t// Deliver formatted data\n\t\techo $json_response;\n\n\t}elseif( strcasecmp($format,'xml') == 0 ){\n\n\t\t// Set HTTP Response Content Type\n\t\theader('Content-Type: application/xml; charset=utf-8');\n\n\t\t// Format data into an XML response (This is only good at handling string data, not arrays)\n\t\t$xml_response = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>'.\"\\n\".\n\t\t\t'<response>'.\"\\n\".\n\t\t\t\"\\t\".'<code>'.$api_response['code'].'</code>'.\"\\n\".\n\t\t\t\"\\t\".'<data>'.$api_response['data'].'</data>'.\"\\n\".\n\t\t\t'</response>';\n\n\t\t// Deliver formatted data\n\t\techo $xml_response;\n\n\t}else{\n\n\t\t// Set HTTP Response Content Type (This is only good at handling string data, not arrays)\n\t\theader('Content-Type: text/html; charset=utf-8');\n\n\t\t// Deliver formatted data\n\t\techo $api_response['data'];\n\n\t}\n\n\t// End script process\n\texit;\n\n}",
"function printResponse($response){\n foreach($response as $type => $text){\n switch($type) {\n case 'success':\n $icon = 'check';\n break;\n case 'danger':\n $icon = 'exclamation-triangle';\n break;\n case 'warning':\n $icon = 'exclamation-circle';\n break;\n case 'info':\n $icon = 'info';\n break;\n }\n echo '<div class=\"alert alert-' . $type . ' alert-dismissible\" role=\"alert\">\n <button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\">×</span></button>\n <i class=\"fa fa-' . $icon . '\"></i> ' . $text . '\n\n </div>';\n }\n }",
"public function apiOutput()\n\t{\n\t\treturn array(\n\t\t\t'id'\t\t\t=> $this->_id,\n\t\t\t'publicName'\t=> \\IPS\\Member::loggedIn()->language()->addToStack( 'nexus_status_' . $this->id . '_front' ),\n\t\t\t'internalName'\t=> \\IPS\\Member::loggedIn()->language()->addToStack( 'nexus_status_' . $this->id . '_admin' )\n\t\t);\n\t}",
"protected function parseAdlibResponse() {\n $xml = new SimpleXMLElement($this->raw);\n $results = $xml->xpath('//record');\n $docs = array();\n foreach ($results as $result) {\n $doc = array();\n foreach ($this->fields as $field) {\n // check if we have multiple values\n $children = $this->getGroupedFieldByXpath($result, $field);\n // $children = $result->{$field}->children();\n if(empty($children)) {\n continue;\n }\n if (count($children) > 1) {\n $field_array = array();\n // get all values\n foreach ($children as $value) {\n if ((string) $value != '' && (string) $value != 'Array') {\n $field_array[] = $this->replaceTokenCharacters((string) $value);\n }\n else {\n $field_array[] = $this->replaceTokenCharacters((string) $value->value);\n }\n }\n // and put the resulting array in $doc[$field]\n $doc[$field] = $field_array;\n }\n else {\n // single value\n // First try if there is a result without value.\n if ((string) $children[0] !== '' && (string) $children[0] !== 'Array') {\n $doc[$field] = $this->replaceTokenCharacters((string) $children[0]);\n }\n else {\n $doc[$field] = $this->replaceTokenCharacters((string) $children[0]->value);\n }\n }\n }\n $doc['priref'] = (string) $xml->record->attributes()->priref;\n $doc['raw_xml'] = $result->asXML();\n $docs[] = $doc;\n }\n return $docs;\n }",
"public function getResponse() {\n }",
"function api_response($res)\n{\nheader('Content-Type: application/json');\n if(ENABLE_DEBUG)\n {\n exit('<pre>' . print_r(\n $res,true));\n }\n exit(json_encode(\n $res\n ));\n}",
"private function ParseResponse($response)\n {\n\n $xml = new SimpleXMLElement($response->getBody());\n\n foreach ($xml->entry as $entry) {\n //https://www.electrictoolbox.com/php-simplexml-element-attributes/\n if ((string) $entry->category->attributes()->term === $this->ghType) {\n\n //instead of returning the simpleXMlElement in an array i pulled the strings'\n //not sure if this matters but it is less data sent back to the ajax success function\n $tmp[] = array(\n $this->FixUuid($entry->id),\n (string)$entry->title,\n );\n // echo (json_encode('id: ' . $entry->id . ' title: ' . $entry->title) .\"<br /> <br />\");\n \n }\n \n }\n\n $this->response = json_encode($tmp);\n }",
"public function getParsedResponse()\n {\n return json_decode($this->response);\n }",
"public function getPrint()\n\t{\n\t\t$books = BookRepository::printRanking();\n\t\treturn Response::json($books, 200);\n\t}",
"function response() {\n \t\t\n \t\t$secret_key = filter_var(urldecode(trim($_REQUEST['skey'])), FILTER_SANITIZE_STRING);\n \t\t\n \t\tif(isset($_REQUEST['response'])) $response_format = trim($_REQUEST['response']);\n\t\telse $response_format = 'xml';\n\t\t\n\t\t// User ID\n \t\t$rs = $this->checkBulkSecretKey($secret_key);\n\t \t$user_id = $rs['user_id'];\n\t \t$server = $rs['server'];\n\t \t\n \t\tif(!$user_id) {\n \t\t\t$this->_throwError('<error><message>Invalid Secret Key</message></error>', $response_format);\n \t\t}\n \t\t\n \t\t$output = '';\n\t\tif(isset($_REQUEST['key']) && $_REQUEST['key'] != 'RESPONSE_KEY') {\n\t \t\t$key = filter_var(trim($_REQUEST['key']), FILTER_SANITIZE_STRING);\n\t \t\t$key = explode(',', $key);\n\t\t\t\n\t \t\tif(!empty($key)) {\n\t \t\t\t\n\t\t \t\t/*\tSanitize the array elements\t*/\n\t\t \t\tarray_walk($key, 'AppController::sanitize');\n\t\t \t\t\n\t\t \t\t/*\tLimit API call\t*/\n\t\t \t\tif(count($key) > RID_LIMIT_IN_API) $key = array_slice($key, 0, RID_LIMIT_IN_API);\n\t \t\t\t\n\t\t \t\t$c['conditions']['BulkSmsLogDetail.status'] = '0';\n\t\t \t\t$c['conditions']['BulkSmsLogDetail.response_key'] = $key;\n\t\t \t\t$c['fields'] = array('BulkSmsLogDetail.response_status', 'BulkSmsLogDetail.response_key');\n\t\t \t\t$this->BulkSmsLogDetail->setSource('bulk_sms_log_detail_' . $server);\n\t\t \t\t$data = $this->BulkSmsLogDetail->find('all', $c);\n\t\t \t\t\n\t\t \t\tif(!empty($data)) {\n\t\t\t \t\tforeach($data as $value) {\n\t\t\t \t\t\t$output[] = '<contacts><rid>'.$value['BulkSmsLogDetail']['response_key'].'</rid><status>'.$value['BulkSmsLogDetail']['response_status'].'</status></contacts>'; \n\t\t\t \t\t}\n\t\t\t \t\t$output = implode('', $output);\n\t\t\t \t\t$this->_throwError($output, $response_format);\n\t\t \t\t\n\t\t \t\t} else {\n\t\t \t\t\t\n\t\t \t\t\t$output = '<error><message>Invalid Response ID</message></error>';\n \t\t\t\t\t$this->_throwError($output, $response_format);\n\t\t \t\t\n\t\t \t\t}\n\t \t\t}\n\t \t\t\n \t\t} else {\n \t\t\t$output = '<error><message>Invalid Response ID</message></error>';\n \t\t\t$this->_throwError($output, $response_format);\n \t\t}\n \t\texit;\n \t}",
"function displayResults($response_files)\n{\n for ($idx = 0; $idx < count($response_files); $idx++) {\n $id = $response_files[$idx]->id;\n $date = $response_files[$idx]->license_date;\n $url = $response_files[$idx]->thumbnail_240_url;\n # print id, title and thumbnail URL for each result\n printf(\"[%s] : Licensed on %s\\nPreview: %s\\n\", $id, $date, $url);\n }\n}",
"private function _parse_response($xml)\n\t{\t\n\t\t$details = (object) array();\n\n\t\t$as_array = $this->payments->arrayize_object($xml);\n\t\t\n\t\t$signon = $as_array['SignonMsgsRs']['SignonDesktopRs'];\n\t\t$response = $as_array['QBMSXMLMsgsRs'];\n\t\t$result = '';\n\t\t$message = '';\n\t\t$identifier = '';\n\t\t\n\t\tif(isset($response['CustomerCreditCardChargeRs']))\n\t\t{\n\t\t\t$result = $response['CustomerCreditCardChargeRs']['@attributes']['statusCode'];\n\t\t\t$message = $response['CustomerCreditCardChargeRs']['@attributes']['statusMessage'];\t\n\t\t\t$identifier = $response['CustomerCreditCardChargeRs']['CreditCardTransID'];\t\n\t\t}\n\n\t\tif(isset($response['CustomerCreditCardAuthRs']))\n\t\t{\n\t\t\t$result = $response['CustomerCreditCardAuthRs']['@attributes']['statusCode'];\n\t\t\t$message = $response['CustomerCreditCardAuthRs']['@attributes']['statusMessage'];\t\n\t\t\t$identifier = $response['CustomerCreditCardAuthRs']['CreditCardTransID'];\t\n\t\t}\n\t\n\t\tif(isset($response['CustomerCreditCardCaptureRs']))\n\t\t{\n\t\t\t$result = $response['CustomerCreditCardCaptureRs']['@attributes']['statusCode'];\n\t\t\t$message = $response['CustomerCreditCardCaptureRs']['@attributes']['statusMessage'];\t\n\t\t\t$identifier = $response['CustomerCreditCardCaptureRs']['CreditCardTransID'];\t\n\t\t}\n\t\t\n\t\tif(isset($response['CustomerCreditCardTxnVoidRs']))\n\t\t{\n\t\t\t$result = $response['CustomerCreditCardTxnVoidRs']['@attributes']['statusCode'];\n\t\t\t$message = $response['CustomerCreditCardTxnVoidRs']['@attributes']['statusMessage'];\t\n\t\t\t$identifier = $response['CustomerCreditCardTxnVoidRs']['CreditCardTransID'];\t\t\n\t\t}\n\t\t\n\t\tif(isset($response['CustomerCreditCardTxnVoidOrRefundRs']))\n\t\t{\n\t\t\t$result = $response['CustomerCreditCardTxnVoidOrRefundRs']['@attributes']['statusCode'];\n\t\t\t$message = $response['CustomerCreditCardTxnVoidOrRefundRs']['@attributes']['statusMessage'];\n\t\t\tif(isset($response['CustomerCreditCardTxnVoidOrRefundRs']['CreditCardTransID']))\n\t\t\t{\t\n\t\t\t\t$identifier = $response['CustomerCreditCardTxnVoidOrRefundRs']['CreditCardTransID'];\t\t\n\t\t\t}\n\t\t}\t\t\n\t\t\t\n\t\t$details->gateway_response = $as_array;\n\t\t\n\t\tif($result === '0')\n\t\t{ //Transaction was successful\n\t\t\t$details->identifier = $identifier;\n\t\t\t\n\t\t\t$details->timestamp = $signon['ServerDateTime'];\n\t\t\t\n\t\t\treturn $this->payments->return_response(\n\t\t\t\t'Success',\n\t\t\t\t$this->payments->payment_type.'_success',\n\t\t\t\t'gateway_response',\n\t\t\t\t$details\n\t\t\t);\t\t\t\n\t\t}\n\t\telse\n\t\t{ //Transaction failed\n\t\t\t$details->reason = $message;\n\n\t\t\treturn $this->payments->return_response(\n\t\t\t\t'Failure',\n\t\t\t\t$this->payments->payment_type.'_gateway_failure',\n\t\t\t\t'gateway_response',\n\t\t\t\t$details\n\t\t\t);\t\t\t\t\n\t\t}\n\t}",
"private function parse_curl_response()\n {\n $this->status_code = curl_getinfo($this->curl_handle, CURLINFO_HTTP_CODE);\n #$this->http_info = array_merge($this->http_info, curl_getinfo($this->curl_handle));\n\n $header_size = curl_getinfo($this->curl_handle, CURLINFO_HEADER_SIZE);\n\n // Capture the HTTP response headers\n $this->http_response_headers = substr($this->curl_response, 0, $header_size);\n\n // Capture the HTTP response body\n $this->http_body = substr($this->curl_response, $header_size);\n\n if(!$this->do_not_exit)\n {\n $this->_check_valid_response($this->http_body);\n }\n //close connection\n curl_close($this->curl_handle);\n }",
"public function getResponse() {\n\t}",
"public function parseResponse($message);",
"public function getParsedResponse()\n {\n return $this->parsedResponse;\n }",
"public function getResponse()\n {\n }",
"protected function c_parsePrinterAttributes() {\n\n //if ($this->clientoutput->status != \"successfull-ok\")\n // return false;\n \n $pr = -1;\n for ($i = 0 ; $i < count($this->clientoutput->response) ; $i++) {\n\t\t\n if ($this->clientoutput->response[$i]['attributes'] == \"printer-attributes\")\n $pr ++;\n\t\t\t\t\n $k = -1; \n for ($j = 0 ; $j < (count($this->clientoutput->response[$i]) - 1) ; $j ++)\n if (!empty($this->clientoutput->response[$i][$j]['name'])) {\n $k++;\n $l = 0;\n $this->parsed[$pr][$k]['range'] = $this->clientoutput->response[$i]['attributes'];\n $this->parsed[$pr][$k]['name'] = $this->clientoutput->response[$i][$j]['name'];\n $this->parsed[$pr][$k]['type'] = $this->clientoutput->response[$i][$j]['type'];\n $this->parsed[$pr][$k][$l] = $this->clientoutput->response[$i][$j]['value'];\n } else {\n $l ++;\n $this->parsed[$pr][$k][$l] = $this->clientoutput->response[$i][$j]['value'];\n }\n }\n \n //$this->clientoutput->response = array();\n\n $this->client_printer_attributes = new stdClass();\n\t\t\n for ($pr_nbr = 0 ; $pr_nbr <= $pr ; $pr_nbr ++) {\n\t\t\n $pr_index = \"pr_\".$pr_nbr;\n $this->client_printer_attributes->$pr_index = new stdClass();\n\t\t\t\n for ($i = 0 ; $i < count($this->parsed[$pr_nbr]) ; $i ++) {\n $name = $this->parsed[$pr_nbr][$i]['name'];\n $php_name = str_replace('-','_',$name);\n $type = $this->parsed[$pr_nbr][$i]['type'];\n $range = $this->parsed[$pr_nbr][$i]['range'];\n $this->client_printer_attributes->$pr_index->$php_name = new stdClass();\n $this->client_printer_attributes->$pr_index->$php_name->_type = $type;\n $this->client_printer_attributes->$pr_index->$php_name->_range = $range;\n for ($j = 0 ; $j < (count($this->parsed[$pr_nbr][$i]) - 3) ; $j ++) {\n # This causes incorrect parsing of integer job attributes.\n # 2010-08-16\n # bpkroth\n #$value = self::_interpretAttribute($name,$type,$this->parsed[$job_nbr][$i][$j]);\n $value = $this->parsed[$pr_nbr][$i][$j];\n $index = '_value'.$j;\n $this->client_printer_attributes->$pr_index->$php_name->$index = $value;\n }\n }\n }\n \n $this->parsed = array(); \n }",
"public function parse()\n\t{\n\t\t//we don't need to hit the API everytime parse is called\n\t\tif (!$this->response)\n\t\t\t$this->response = $this->request->execute();\n\t\t\n\t\treturn $this->invokeParserMethod();\t\n\t}",
"function deliver_response($api_response){\r\n \r\n // Set HTTP Response\r\n header('HTTP/1.1 200 OK');\r\n\r\n // Set HTTP Response Content Type\r\n header('Content-Type: application/json; charset=utf-8');\r\n \r\n // Format data into a JSON response\r\n $json_response = json_encode($api_response);\r\n\r\n // Deliver formatted data\r\n echo $json_response;\r\n \r\n // End script process\r\n exit;\r\n \r\n}",
"public function query() {\n if (!$this->servicesHealthStatus->getFetcherState()) {\n $this->messenger->addError(t('The fetcher services does not responding'));\n return [];\n }\n\n $query = <<<'GRAPHQL'\n query {\n systemField {\n Id\n Label\n }\n reportsType {\n Id\n Label\n }\n fromYearRange {\n Years\n Quarters {\n Id\n Label\n }\n }\n toYearRange {\n Years\n Quarters {\n Id\n Label\n }\n }\n }\n GRAPHQL;\n\n $response = $this->sendQuery($query);\n return json_decode($response, true)['data'];\n }",
"private function sendResponse(){\n\t\tif(!isset($this->rpcRequest->id)){ return; } // never respond to Notifications\n\n\t\t$response = new stdClass();\n\t\t$response->jsonrpc = \"2.0\";\n\t\t$response->id = $this->rpcRequest->id;\n\n\t\tif($this->responseError){\n\t\t\t$response->error = $this->responseError; // error response\n\t\t}else{\n\t\t\t$response->result = $this->responseResult; // normal response\n\t\t}\n\n\t\tif($this->rpcDebugLevel != self::LOG_NONE){\n\t\t\t$response->log = array();\n\t\t\tforeach($this->log as $msg){\n\t\t\t\tif($msg[\"level\"] <= $this->rpcDebugLevel){\n\t\t\t\t\t$response->log[] = $msg[\"message\"];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\techo $this->toJson($response);\n\t}",
"private function parseExportRequestResponse(HTTPResponse $myResponse)\n\t{\n\t\t$responseContent = $myResponse->getResponseContent();\n\t\t\n\t\t$feed = new SimpleXMLElement($responseContent);\n\t\tif (!isset($feed->entry))\n\t\t{\n\t\t\treturn false;\t\n\t\t}\n\t\t\n\t\tforeach($feed->entry as $item)\n\t\t{\n\t\t\t$status = new MailboxExportStatus();\n\t\t\t$ns_dc = $item->children('http://schemas.google.com/apps/2006');\n\t\t\tforeach ($ns_dc->property as $property)\n\t\t\t{\t\n\t\t\t\t$propertyArrtibutes = $property->attributes();\n\t\t\t\tswitch ($propertyArrtibutes['name'])\n\t\t\t\t{\n\t\t\t\t\tcase 'status': \n\t\t\t\t\t\t$status->setStatus($propertyArrtibutes['value']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'adminEmailAddress': \n\t\t\t\t\t\t$status->setAdminEmailAddress($propertyArrtibutes['value']);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'userEmailAddress': \n\t\t\t\t\t\t$status->setUserEmailAddress($propertyArrtibutes['value']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'requestDate':\n\t\t\t\t\t\t$status->setRequestDate($propertyArrtibutes['value']);\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'requestId':\n\t\t\t\t\t\t$status->setRequestId($propertyArrtibutes['value']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 'fileUrl0':\n\t\t\t\t\t\t$status->setFileUrl($propertyArrtibutes['value']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'completedDate':\n\t\t\t\t\t\t$status->setCompletedDate($propertyArrtibutes['value']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 'expiredDate':\n\t\t\t\t\t\t$status->setExpiredDate($propertyArrtibutes['value']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tLogger::add_info_log_entry(__FILE__ . __LINE__ . ' Parsed Mailbox Export Status Response Variable ' . $propertyArrtibutes['name'] . ' With Value ' . $propertyArrtibutes['value']);\n\t\t\t}\n\t\t\t$this->exportStatusList->addMailboxExportStatus($status);\n\t\t}\n\t}",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"public function evaluate()\n {\n $httpResponse = new Response();\n $httpResponse->setVersion($this->getHttpVersion());\n $httpResponse->setStatus($this->getStatusCode());\n $httpResponse->setHeaders(new Headers());\n\n foreach ($this->getHeaders() as $name => $value) {\n $httpResponse->setHeader($name, $value);\n }\n\n return implode(\"\\r\\n\", $httpResponse->renderHeaders()) . \"\\r\\n\\r\\n\";\n }",
"public function requestDailyReport()\n {\n $client = $this->guzzleClient ?: new GuzzleClient($this->apiEndpoint);\n\n $request = $client->get(\n '/anapi/daily_summary_feed',\n ['Accept' => 'application/json'],\n ['query' => ['key' => $this->apiKey, 'format' => $this->format]]\n );\n\n $response = $request->send();\n\n return $this->handleResponse($response);\n }",
"protected function _handleResponse(){\n $this->_results[] = array(\n 'http_code' => $this->getInfoHTTPCode(),\n 'response' => $this->getResponse(),\n 'server' => $this->getUrl()\n );\n }",
"function report()\n {\n if ($this->acl->otentikasi2($this->title) == TRUE){\n $cur = $this->input->post('ccurrency');\n $start = $this->input->post('start');\n $end = $this->input->post('end');\n\n $data['currency'] = $cur;\n $data['start'] = tglin($start);\n $data['end'] = tglin($end);\n $data['rundate'] = tglin(date('Y-m-d'));\n $data['log'] = $this->decodedd->log;\n\n // Property Details\n $data['company'] = $this->properti['name'];\n\n $result = null;\n foreach ($this->model->report($cur,$start,$end)->result() as $res) {\n $result[] = array (\"id\"=>$res->id, \"no\"=>$res->no, \"notes\"=>$res->notes, \"dates\"=>tglin($res->dates), \n \"currency\"=>$res->currency, \"from\"=>$this->get_acc($res->from), \"to\"=>$this->get_acc($res->to), \n \"posted\"=>$res->approved, \"amount\"=>$res->amount);\n }\n $data['result'] = $result; $this->output = $data;\n }else { $this->reject_token(); }\n $this->response('content');\n }",
"public function getList()\n {\n if ($_SERVER[\"REQUEST_METHOD\"] != \"GET\")\n {\n echo $this->encodeJson(\"Wrong resource call\", 0xDEAD, NULL);\n\n return;\n }\n\n $report_arr = $this->inspection->readAllReport();\n\n if (count($report_arr) > 0)\n {\n echo $this->encodeJson(\"Inspections found.\", 0x00, $report_arr);\n }\n else\n {\n echo $this->encodeJson(\"No inspections found.\", 0xD1ED, NULL);\n }\n }",
"public function getResponse()\n {\n // TODO: Implement getResponse() method.\n }",
"function debug_output() {\n\t\tglobal $ac_tos_response, $ac_status_response;\n\t\t$response = 'tos' == $_GET['ac_debug'] ? $ac_tos_response : $ac_status_response;\n\t\tif ( empty( $response ) ) {\n\t\t\t$response = 'No response from API :(';\n\t\t} else {\n\t\t\t$response = print_r( $response, 1 );\n\t\t}\n\n\t\t$tos = $this->get_option( 'tos' ) ?\n\t\t\t'<span style=\"color:green;\">Yes</span>' :\n\t\t\t'<span style=\"color:red;\">No</span>';\n\t\t$status = $this->get_option( 'wordads_approved' ) ?\n\t\t\t'<span style=\"color:green;\">Yes</span>' :\n\t\t\t'<span style=\"color:red;\">No</span>';\n\t\t$house = $this->get_option( 'wordads_house' ) ? 'Yes' : 'No';\n\n\t\t$type = $this->get_option( 'tos' ) && $this->get_option( 'wordads_approved' ) ?\n\t\t\t'updated' :\n\t\t\t'error';\n\n\t\techo <<<HTML\n\t\t<div class=\"notice $type is-dismissible\">\n\t\t\t<p>TOS: $tos | Status: $status | House: $house</p>\n\t\t\t<pre>$response</pre>\n\t\t</div>\nHTML;\n\t}",
"private function parseResponse($response){\n if($response['status'] == true) {\n $parsedResponse = new SimpleXMLElement($response['httpResponse']);\n if(isset($parsedResponse->error)){\n $this->setFailedReason((string)$parsedResponse->error->error_msg);\n return false; \n }else {\n $arrayResponse = array();\n \n if(isset($parsedResponse->transaction))\n $elements = $parsedResponse->transaction->children();\n else\n $elements = $parsedResponse->children();\n \n foreach($elements as $tag => $tagValue){\n $arrayResponse[$tag] = $tagValue->__toString();\n }\n \n return $arrayResponse;\n }\n }else {\n //server timeout error\n $this->setFailedReason('RESPONSE_TIMEOUT');\n return false;\n } \n }",
"public function getResponseData();",
"public function getResponseAsString(): string;",
"public function retrieveTotalReport()\n {\n return $this->start()->uri(\"/api/report/totals\")\n ->get()\n ->go();\n }",
"public function parse()\n {\n $Version = $this->getVer();\n $LanguageMap_en = $this->languagemap(\"en\");\n\n $RankedDivision = $this->json(\"RankedDivision\");\n\n // (optional) start a progress bar\n $IconArray = [];\n $LoadingIconArray = [];\n //get evolutions array\n\n // loop through data\n $Output[] = \"<tabber>\\n\"; \n foreach ($RankedDivision as $id => $Rank) {\n switch ($id) {\n case '1':\n $Division = $LanguageMap_en[$Rank[1]['Name']];\n break;\n case '2':\n $Division = $LanguageMap_en[$Rank[4]['Name']];\n break;\n case '3':\n $Division = $LanguageMap_en[$Rank[8]['Name']];\n break;\n case '4':\n $Division = $LanguageMap_en[$Rank[13]['Name']];\n break;\n case '5':\n $Division = $LanguageMap_en[$Rank[18]['Name']];\n break;\n case '6':\n $Division = $LanguageMap_en[$Rank[23]['Name']];\n break;\n }\n $Output[] = \"$Division=\\n\"; \n $Table = [];\n $Table[] = \"{| class=\\\"wikitable\\\"\";\n $Table[] = \"!Class!!Rank Up Points!!Protect Points!!Profile Border!!Trophy\";\n $Table[] = \"|-\";\n foreach($Rank as $Subdivision){\n $LoadingIcon = $Subdivision[\"NameLoadingIcon\"];\n $LoadingIconArray[] = $LoadingIcon;\n $Class = \"\";\n if (!empty($LanguageMap_en[$Subdivision['StageNameSP']])) {\n $Class = $LanguageMap_en[$Subdivision['StageNameSP']];\n }\n $FullName = $LanguageMap_en[$Subdivision['StageName']];\n $MaxPerformancePoints = $Subdivision['ActivePointLimit'];\n $PerformancePointsProtect = $Subdivision['ActivePointRankedDivisionProtect'];\n $MedalIcon = $Subdivision['SeasonAwardIcon'];\n $IconArray[] = $MedalIcon;\n $string =\"{{Superimpose2\";\n $string .=\" | base = RankBGShield.png\";\n $string .=\" | base_width = 250px\";\n $string .=\" | base_style = float: right\";\n $string .=\" | base_alt =\";\n $string .=\" | base_caption = \";\n $string .=\" | base_link = \";\n $string .=\" | float = $MedalIcon.png\";\n $string .=\" | float_width = 180px\";\n $string .=\" | float_alt = \";\n $string .=\" | float_caption = \";\n $string .=\" | link = \";\n $string .=\" | t = \";\n $string .=\" | x = 33\";\n $string .=\" | y = 30\";\n $string .=\" }}\";\n $Table[] = \"|$Class||$MaxPerformancePoints||$PerformancePointsProtect||[[File:$LoadingIcon.png|link=]]||$string\";\n $Table[] = \"|-\";\n }\n $Table[] = \"|}\";\n $Output[] = implode(\"\\n\",$Table);\n $Output[] = \"|-|\\n\"; \n }\n $Output[] = \"</tabber>\\n\"; \n if (!empty($IconArray)) {\n $this->copyImages($IconArray,\"RankedDivision\");\n }\n if (!empty($LoadingIconArray)) {\n $this->copySprites($LoadingIconArray,\"RankedDivision\");\n }\n // (optional) finish progress bar\n $this->saveExtra(\"Output\\RankedDivision.txt\",implode(\"\\n\\n\",$Output));\n\n // save\n $this->io->text('Saving data ...');\n }",
"public function parse_response($resp)\n {\n if ($resp['data']==null)\n {\n return ['error'=>404, 'message'=>'Data from youtube not found'];\n }\n else\n {\n return ['error'=>0, 'data'=>$resp['data']];\n }\n }",
"public function parse()\r\n\t{\r\n\t\tif(is_string($this->_raw)) {\r\n\t\t\t$response = self::toArray($this->_format, $this->_raw);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$response = $this->_raw;\r\n\t\t}\r\n\r\n\t\tif(!empty($response['error_code'])) {\r\n\t\t\tthrow new MediaMonks_Service_Hyves_Response_Exception($response['error_message'], $response['error_code']);\r\n\t\t}\r\n\t\t\r\n\t\tif(null == $this->_method && !empty($response['method'])) {\r\n\t\t\t$this->_method = $response['method'];\r\n\t\t\tunset($response['method']);\r\n\t\t}\r\n\t\t\r\n\t\t$this->_info = $response['info'];\r\n\t\tunset($response['info']);\r\n\t\t\r\n\t\t$this->_body = $response;\r\n\t\t\r\n\t\t// pagination\r\n\t\tif(!empty($this->_info['totalresults'])) {\r\n\t\t\t$this->_paginated = true;\r\n\t\t}\r\n\t\t\r\n\t\t$this->_parsed = true;\r\n\t\treturn $this;\r\n\t}",
"public function testDataResponse()\n {\n $driverPassesEndpoint = new DriverPassesEndpoint(getenv('MRP_API_KEY'));\n $data = $driverPassesEndpoint->setClassId(1000)\n ->setScheduleId(5508)\n ->setDataOrder('nameAsc')\n ->setDriverId(1023)\n ->setEndDate('8/21/2016')\n ->setStartDate('8/21/2015')\n ->getRequest();\n\n $this->assertNotEmpty($data);\n $this->assertTrue(is_object($data));\n $this->assertEquals(1, $data->RequestValid);\n }"
] | [
"0.6470378",
"0.6275145",
"0.614879",
"0.60590196",
"0.6034134",
"0.60013944",
"0.5928123",
"0.57500464",
"0.571757",
"0.57096326",
"0.5696998",
"0.5694603",
"0.5638693",
"0.5629724",
"0.5629113",
"0.5538491",
"0.54651314",
"0.54286915",
"0.5427912",
"0.54136884",
"0.5408688",
"0.5379738",
"0.5361511",
"0.53568494",
"0.5327924",
"0.5327924",
"0.5325492",
"0.5325152",
"0.5325152",
"0.5321509",
"0.5318206",
"0.53061014",
"0.52927566",
"0.52927566",
"0.5290396",
"0.52872926",
"0.52691215",
"0.5266154",
"0.5259499",
"0.5257533",
"0.5249773",
"0.5249447",
"0.52272004",
"0.52184457",
"0.52130514",
"0.5211753",
"0.5209286",
"0.5196678",
"0.51924235",
"0.51833797",
"0.51772106",
"0.5149477",
"0.5147905",
"0.5146588",
"0.514515",
"0.51402426",
"0.51388395",
"0.5131264",
"0.5130565",
"0.51249933",
"0.512187",
"0.51199216",
"0.5109542",
"0.51037836",
"0.509465",
"0.5091655",
"0.50843585",
"0.50802577",
"0.5065048",
"0.50543106",
"0.50539976",
"0.50507945",
"0.5048682",
"0.5047757",
"0.50463367",
"0.5045485",
"0.5045485",
"0.5045485",
"0.5045485",
"0.5045485",
"0.5045485",
"0.5045485",
"0.5045485",
"0.5045485",
"0.5045485",
"0.5045485",
"0.50429296",
"0.50418043",
"0.5040516",
"0.50316155",
"0.50195205",
"0.5012182",
"0.49981308",
"0.4983766",
"0.49823028",
"0.49728164",
"0.49646693",
"0.4961282",
"0.49608588",
"0.49588794",
"0.4955927"
] | 0.0 | -1 |
Creates an instance of the controller. CourseManagerController constructor. | public function __construct(){
$this->middleware('auth');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionCreate()\n {\n $model = new Course();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect('index');\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function __construct() {\n\t\t$config = ['config_coaching', 'config_course'];\n\t\t$models = ['courses_model', 'lessons_model', 'tests_model'];\n\t\t$this->common_model->autoload_resources($config, $models);\n\n\t\t// Toolbar buttons\n\t if ($this->uri->segment (4)) {\n \t$coaching_id = $this->uri->segment (4);\n\t } else {\n\t \t$coaching_id = $this->session->userdata ('coaching_id');\n\t }\n\n\t $this->coaching_id = $coaching_id;\n \n\t if ($this->coaching_model->is_coaching_setup () == false) {\n\t \t$this->message->set ('Your account information is incomplete. You should complete your account information before using this module', 'warning', true);\n\t \tredirect ('coaching/settings/setup_coaching_account');\n\t }\n\n $this->toolbar_buttons['add_new'] = ['<i class=\"iconsminds-add\"></i> New Course' => 'coaching/courses/create/'.$coaching_id];\n $this->toolbar_buttons['actions'] = [\n '<i class=\"simple-icon-list\"></i> All Courses'=>'coaching/courses/index/'.$coaching_id,\n ];\n\t}",
"public function actionCreate() {\n $model = new Course();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}",
"protected function createController()\n {\n $this->createClass('controller');\n }",
"public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }",
"public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }",
"public function __construct(Course $entity)\n {\n parent::__construct($entity);\n\n $this->crud = 'beneficiaries.courses';\n\n $this->middleware(function ($request, $next) {\n $this->id = $request->course;\n $beneficiary = Beneficiary::where('id', $request->beneficiary)->with('courses.teacher')->first();\n\n if ( !is_null($beneficiary) ) {\n $request->request->add(['data' => [\n 'title' => __('app.titles.beneficiaries'),\n 'subtitle' => __('app.titles.beneficiary.courses_admin', ['name' => $beneficiary->full_name]),\n 'tools' => [\n 'create' => false,\n 'reload' => false,\n 'export' => true,\n 'to_return' => true\n ],\n 'table' => [\n 'check' => false,\n 'fields' => ['code', 'name', 'teacher', 'progress'],\n 'active' => false,\n 'actions' => false,\n ],\n 'form' => [],\n ]]);\n $request->request->add(['beneficiary_id' => $beneficiary->id]);\n $this->model = $beneficiary->courses->sortByDesc('created_at');\n\n return $next($request);\n }\n\n return abort(404);\n });\n }",
"protected function initializeController() {}",
"public function __construct()\n {\n $this->authorizeResource(Course::class, 'course');\n }",
"protected function create(){\n \t$courseCategories = CourseCategory::getCourseCategoriesForAdmin();\n\t\t$courseSubCategories = [];\n\t\t$course= new CourseCourse;\n\t\treturn view('courseCourse.create', compact('courseCategories','courseSubCategories','course'));\n }",
"function __construct()\n {\n parent::__construct(); \n // load model\n $this->load->model(array('Mcourse'));\n }",
"public function create()\n\t{\n\t\tif (!User::isAdmin()) {\n\t\t\t\treturn Redirect::to('dashboard');\n\t\t}\n\n\t\t$data['pagetitle'] = \"Create new Course.\";\n return Response::view('courses.create', $data)->header('Cache-Control', 'no-store, no-cache, must-revalidate');\n\t}",
"public function create()\n\t{\n\t\t$course = new Course;\n\n\t\treturn view('courses.create', compact('course'));\n\t}",
"public function actionCourses()\n\t{\n\t\t//echo \"In Courses\";\n\t\tif (!isset($_REQUEST['username'])){\n\t\t\t$_REQUEST['username'] = Yii::app()->user->name;\n\t\t}\n\t\t//if (!Yii::app()->user->checkAccess('admin')){\n\t\t//\t$this->model=User::model()->findByPk(Yii::app()->user->name);\n\t\t//} else {\n\t\t\t$this->model = DrcUser::loadModel();\n\t\t\t//}\n\t\t//$title = \"Title\";\n\t\t//$contentTitle = \"Courses: title\";\n\t\t$title = \"({$this->model->username}) {$this->model->first_name} {$this->model->last_name}\";\n\t\t$contentTitle = \"Courses: {$this->model->term->description}\";\n\t\tif (!Yii::app()->user->checkAccess('admin') && !Yii::app()->user->checkAccess('staff')){\n\t\t\t$title = $this->model->term->description;\n\t\t\t$contentTitle = \"Courses\";\n\t\t}\n\t\t$this->renderView(array(\n\t\t\t'title' => $title,\n\t\t\t'contentView' => '../course/_list',\n\t\t\t'contentTitle' => $contentTitle,\n\t\t\t'menuView' => 'base.views.layouts._termMenu',\n\t\t\t'menuRoute' => 'drcUser/courses',\n\t\t\t'titleNavRight' => '<a href=\"' . $this->createUrl('drcUser/update', array('term_code'=> $this->model->term_code, 'username'=>$this->model->username)) . '\"><i class=\"icon-plus\"></i> User Profile</a>',\n\t\t));\n\t}",
"protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}",
"public function create()\n {\n return view('Backend.Institute.TrainingCentre.Courses.create');\n }",
"public function create()\n {\n return view(\"guardian.pages.courses.create\");\n }",
"public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }",
"public function __construct () {\n\t\tparent::__construct();\n\t\t\n \t$this->setId(new phpkit_id_URNInetId('urn:inet:middlebury.edu:id:implementations/apc_course'));\n \t$this->setDisplayName('APC Caching Course Manager');\n \t$this->setDescription('This is a CourseManager implementation that provides read-only, unauthenticated, access to course information stored in an underlying course manager.');\n\t}",
"protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }",
"public function create()\n {\n return View::make('CreateCourse');\n }",
"public function create()\n\t{\n\t\t$this->authorize('create', Course::class);\n\n\t\t$categories = Category::all();\n\t\t$expirations = Expiry::all();\n\t\t$vatrates = VatRate::all();\n\t\treturn view('course.create', [\n\t\t\t'categories' => $categories,\n\t\t\t'expirations' => $expirations,\n\t\t\t'vatrates' => $vatrates\n\t\t]);\n\t}",
"public function create()\n {\n return view('admin.courses.create');\n }",
"public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}",
"private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}",
"public function __construct()\n {\n// $this->repo = new CourseRepository;\n }",
"public function create()\n {\n $courseTypes = CourseType::all();\n\n $data = [\n 'active' => getAdminActiveMenu('courses/create'),\n 'courseTypes' => $courseTypes\n ];\n\n return view('admin.courses.create')->with($data);\n }",
"public function create()\n {\n //\n return view(\"course.create\");\n }",
"public function create()\n\t{\n\t\treturn View::make('admin.courses.create');\n\t}",
"public function create()\n {\n $course = new Course();\n\n return view('courses.create', compact('course'));\n }",
"public function __construct(AdminController $controller)\n {\n $this->controller = $controller;\n }",
"public function create()\n {\n return view('auth.course.create');\n }",
"public function create()\n {\n return view('admin.courses.create');\n }",
"public function create()\n {\n return view('admin.courses.create');\n }",
"public function create()\n {\n return view('admin.course.create');\n }",
"public function create()\n {\n return view('admin.course.create');\n }",
"public function create()\n {\n return view('course.createCourse');\n }",
"function AssignCourse()\n\t{\t$this->resource = new AdminCourseResource($_GET[\"id\"]);\n\t\tif ($this->resource->id)\n\t\t{\t$this->course = new AdminCourse($this->resource->details[\"cid\"]);\n\t\t} else\n\t\t{\t$this->course = new AdminCourse($_GET[\"cid\"]);\n\t\t}\n\t}",
"public function create()\n {\n //\n // $this->authorize('create', Course::class);\n // return view('course.create');\n }",
"public function __construct()\n {\n $this->dataController = new DataController;\n }",
"function Controller()\n\n {\n\n //$this->objConMgr = new ConnectionMgr();\n\n }",
"public function __construct(Course $course)\n {\n $this->course = $course;\n }",
"public function __construct(Course $course)\n {\n $this->course = $course;\n }",
"public function __construct()\n {\n // echo \"application 호출 성공\";\n // application 의 가장 중요한 역활은 url routing 입니다.\n // url을 받으면 다음과 같은 방식으로 URL을 분석하여\n // 배엘에 저장을 하게 됩니다.\n\n $url = \"\";\n\n // 1. url이 있는지 확인 합니다.\n if (isset($_GET['url'])) {\n $url = rtrim($_GET['url'],'/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n }\n\n // 2. URL을 분석합니다.\n $params = explode('/', $url);\n $counts = count($params);\n\n $param['menu'] = (!isset($params[0]) || $params[0] == '') ? \"home\" : $params[0];\n $param['action'] = (!isset($params[1]) || $params[1] == '') ? \"index\" : $params[1];\n $param['catagory'] = (!isset($params[2]) || $params[2] == '') ? \"story\" : $params[2];\n $param['contentNo'] = (!isset($params[3]) || $params[3] == '') ? 1 : $params[3];\n $param['pageNo'] = (!isset($params[4]) || $params[4] == '') ? 1 : $params[4];\n\n // 3. 해당 URL을 기준으로 controller를 호출합니다.\n $controllerName = '\\application\\controllers\\\\'.$param['menu'].'controller';\n new $controllerName($param['action'], $param['catagory'], $param['contentNo'], $param['pageNo']);\n //new \\application\\controllers\\BoardController($param['action'], $param['catagory'], $param['contentNo'], $param['pageNo']);\n }",
"public function actionIndex() {\n $searchModel = new CourseSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function create()\n {\n return view('backend.course.create');\n }",
"public function __construct() {\n // filter controller, action and params\n $url = filter_input(INPUT_GET, 'url', FILTER_SANITIZE_URL); // $_GET['url']\n $params = explode('/', trim($url, '/'));\n\n // store first and seccond params, removing them from params list\n $controller_name = ucfirst(array_shift($params)); // uppercase classname\n $action_name = array_shift($params);\n\n require_once APP . 'config.php';\n\n // default controller and action\n if (empty($controller_name)) {\n $controller_name = AppConfig::DEFAULT_CONTROLLER;\n }\n if (empty($action_name)) {\n $action_name = AppConfig::DEFAULT_ACTION;\n }\n\n // load requested controller\n if (file_exists(APP . \"Controller/$controller_name.php\")) {\n require CORE . \"Controller.php\";\n require CORE . \"Model.php\";\n require APP . \"Controller/$controller_name.php\";\n $controller = new $controller_name();\n\n // verify if action is valid\n if (method_exists($controller, $action_name)) {\n call_user_func_array(array($controller, $action_name), $params);\n $controller->render(\"$controller_name/$action_name\"); // skipped if already rendered\n } else {\n // action not found\n $this->notFound();\n }\n } else {\n // controller not found\n $this->notFound();\n }\n }",
"public function __construct() {\r\n\t\t\r\n\t\tSession::init();\n\t\tif (!Session::get('local'))\n\t\t\tSession::set('local', DEFAULT_LANGUAGE);\r\n\t\t\r\n\t\t$this->getUrl();\r\n\t\t\r\n\t\t//No controller is specified.\r\n\t\tif (empty($this->url[0])) {\r\n\t\t\t$this->loadDefaultController();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$this->loadCurrentController();\r\n\t\t$this->callControllerMethod();\r\n\r\n\t}",
"function __construct(Controller $controller)\n {\n $this->con = $controller;\n }",
"public function initialize()\n\t{\n\t // attributes\n\t\t$this->setName('course');\n\t\t$this->setPhpName('Course');\n\t\t$this->setClassname('Course');\n\t\t$this->setPackage('dokeos');\n\t\t$this->setUseIdGenerator(false);\n\t\t// columns\n\t\t$this->addPrimaryKey('CODE', 'Code', 'VARCHAR', true, 40, null);\n\t\t$this->addColumn('DIRECTORY', 'Directory', 'VARCHAR', false, 40, null);\n\t\t$this->addColumn('DB_NAME', 'DbName', 'VARCHAR', false, 40, null);\n\t\t$this->addColumn('COURSE_LANGUAGE', 'CourseLanguage', 'VARCHAR', false, 20, null);\n\t\t$this->addColumn('TITLE', 'Title', 'VARCHAR', false, 250, null);\n\t\t$this->addColumn('DESCRIPTION', 'Description', 'LONGVARCHAR', false, null, null);\n\t\t$this->addColumn('CATEGORY_CODE', 'CategoryCode', 'VARCHAR', false, 40, null);\n\t\t$this->addColumn('VISIBILITY', 'Visibility', 'TINYINT', false, 4, 0);\n\t\t$this->addColumn('SHOW_SCORE', 'ShowScore', 'INTEGER', true, 11, 1);\n\t\t$this->addColumn('TUTOR_NAME', 'TutorName', 'VARCHAR', false, 200, null);\n\t\t$this->addColumn('VISUAL_CODE', 'VisualCode', 'VARCHAR', false, 40, null);\n\t\t$this->addColumn('DEPARTMENT_NAME', 'DepartmentName', 'VARCHAR', false, 30, null);\n\t\t$this->addColumn('DEPARTMENT_URL', 'DepartmentUrl', 'VARCHAR', false, 180, null);\n\t\t$this->addColumn('DISK_QUOTA', 'DiskQuota', 'INTEGER', false, 10, null);\n\t\t$this->addColumn('LAST_VISIT', 'LastVisit', 'TIMESTAMP', false, null, null);\n\t\t$this->addColumn('LAST_EDIT', 'LastEdit', 'TIMESTAMP', false, null, null);\n\t\t$this->addColumn('CREATION_DATE', 'CreationDate', 'TIMESTAMP', false, null, null);\n\t\t$this->addColumn('EXPIRATION_DATE', 'ExpirationDate', 'TIMESTAMP', false, null, null);\n\t\t$this->addColumn('TARGET_COURSE_CODE', 'TargetCourseCode', 'VARCHAR', false, 40, null);\n\t\t$this->addColumn('SUBSCRIBE', 'Subscribe', 'TINYINT', true, 4, 1);\n\t\t$this->addColumn('UNSUBSCRIBE', 'Unsubscribe', 'TINYINT', true, 4, 1);\n\t\t$this->addColumn('REGISTRATION_CODE', 'RegistrationCode', 'VARCHAR', true, 255, '');\n\t\t// validators\n\t}",
"public function create()\n {\n return view('imports.courses.create');\n }",
"public function create()\n {\n return view('courses.create');\n }",
"public function create()\n {\n return view('courses.create');\n }",
"public function create()\n {\n return view('courses.create');\n }",
"public function create()\n\t{\n\n\t\t$areas = Area::getAreas();\n\t\treturn view('courses.create', compact('areas'));\n\t}",
"function __construct() {\n $this->model = new Students();\n $this->view = new StudentsView();\n }",
"public function __construct()\n {\n $this->controller = new DHTController();\n }",
"public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }",
"public function create()\n {\n return view('course.create');\n }",
"function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}",
"public function manageCourses ()\n {\n // Get the list of courses\n $courses = Course::all();\n \n // Get the list of departments\n $departments = Department::all();\n\n return view($this->courseManagementView, ['courses' => $courses,'departments' => $departments, 'count' => 0]);\n }",
"public function create()\n {\n $categories = Category::all();\n return view('admin.courses.create', compact('categories'));\n }",
"public function create()\n {\n $courses = Courses::all();\n return view('courses.create')->with('courses', $courses);\n }",
"public function createController( ezcMvcRequest $request );",
"public function index(Request $request)\n {\n //\n return view('course.courseManager');\n }",
"public static function create() {\n if(self::get_user_logged_in()) {\n Redirect::to('/player', array('message' => 'Olet jo kirjautunut sisään.'));\n } else {\n $courses = Course::all();\n View::make('player/new.html', array('courses' => $courses));\n }\n }",
"public function create()\n {\n return view('admins.admin.all-course.create');\n }",
"public function __construct()\n {\n if (!isLoggedIn())\n {\n redirect('users/login');\n }\n\n // Check for admin\n if (!$_SESSION['admin'] > 0)\n {\n redirect('pages');\n }\n\n // instantiate category\n $this->categoryModel = $this->model('Category');\n }",
"public function actionCreate()\n\t{\n\t\t$model=new Student;\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['Student']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Student'];\n\t\t\tif($model->save(false)){\n\t\t\t\t$studentCourse = new StudentCourse;\n\t\t\t\t$studentCourse->STUDENT_ID = $model->ID;\n\t\t\t\t$studentCourse->COURSE_ID = $_POST['StudentCourse']['COURSE_ID'];\n\t\t\t\t$studentCourse->STATUS = 1;\n\t\t\t\t$studentCourse->save(false);\n\t\t\t\t$this->redirect(array('admin'));\n\t\t\t}\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function store()\n\t{\n return Course::create(Request::all());\n\t}",
"public function __construct()\n {\n $url = $this->getUrl();\n // Look in controllers folder for first value and ucwords(); will capitalise first letter \n if (isset($url[0]) && file_exists('../app/controllers/' . ucwords($url[0]) . '.php')) {\n $this->currentController = ucwords($url[0]); // Setting the current controllers name to the name capitilised first letter\n unset($url[0]); \n }\n\n // Require the controller\n require_once '../app/controllers/' . $this->currentController . '.php';\n // Taking the current controller and instantiating the controller class \n $this->currentController = new $this->currentController;\n // This is checking for the second part of the URL\n if (isset($url[1])) {\n if (method_exists($this->currentController, $url[1])) { // Checking the seond part of the url which is the corresponding method from the controller class\n $this->currentMethod = $url[1];\n unset($url[1]);\n }\n }\n\n // Get params, if no params, keep it empty\n $this->params = $url ? array_values($url) : []; \n\n // Call a callback with array of params\n call_user_func_array([$this->currentController, $this->currentMethod], $this->params);\n }",
"public function index()\n\t{\n\t\t$this->load->view('courses');\n\t}",
"protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}",
"public function __construct(Cd_Controller_Abstract $controller)\r\n {\r\n $this->_controller = $controller;\r\n $this->_init();\r\n }",
"public function create()\n {\n $cls = ClassModel::all();\n $cor = Course::all();\n return view(\"{$this->viewPath}.create\", [\n 'title' => trans('main.add') . ' ' . trans('main.courses_details'),\n 'cls' => $cls,\n 'cor' => $cor,\n ]);\n }",
"public function __construct() {\n $this->twitterController = new TwitterController;\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t$this->load->model('mdl_menuitem', 'menuitem');\n\n\t\tlog_message('debug', \"Class Name Controller Initialized\");\n\t}",
"public function run()\n {\n $this->checkAuthorization(Manager::context(), 'ManagePersonalCourses');\n\n $this->set_parameter(\n CourseTypeCourseListRenderer::PARAM_SELECTED_COURSE_TYPE,\n Request::get(CourseTypeCourseListRenderer::PARAM_SELECTED_COURSE_TYPE));\n\n \\Chamilo\\Application\\Weblcms\\CourseType\\Storage\\DataManager::fix_course_tab_user_orders_for_user(\n $this->get_user_id());\n DataManager::fix_course_type_user_category_rel_course_for_user($this->get_user_id());\n\n // $this->buttonToolbarRenderer = $this->getButtonToolbarRenderer();\n $component_action = Request::get(self::PARAM_COMPONENT_ACTION);\n $this->set_parameter(self::PARAM_COMPONENT_ACTION, $component_action);\n\n switch ($component_action)\n {\n case 'add' :\n return $this->add_course_user_category();\n break;\n case 'move' :\n return $this->move_course_list();\n break;\n case 'movecat' :\n return $this->move_category_list();\n break;\n case 'assign' :\n return $this->assign_course_category();\n break;\n case 'edit' :\n return $this->edit_course_user_category();\n break;\n case 'delete' :\n $this->delete_course_type_user_category();\n break;\n case 'view' :\n return $this->show_course_list();\n break;\n case 'move_course_type_up' :\n $this->move_course_type(- 1);\n break;\n case 'move_course_type_down' :\n $this->move_course_type(1);\n break;\n default :\n return $this->show_course_list();\n }\n }",
"function __construct() {\n\t //llamo al contructor de Controller.php\n\t parent::__construct();\n\n\t //instancio el modelo\n\t $this->Lenguajes = new Lenguajes();\n\t \n\n\t}",
"public function __construct()\n {\n Configure::checkTokenKey();\n $this->Discord = new Discord(Configure::read('Discord'));\n\n //Initialize the ModuleManager.\n $modulesPriorities = [];\n if (Configure::check('Modules.priority')) {\n $modulesPriorities = Configure::read('Modules.priority');\n }\n\n $this->ModuleManager = new ModuleManager($modulesPriorities);\n }",
"public function getCNAMS()\n {\n return Controllers\\CNAMController::getInstance();\n }",
"public function CadastroController($controller, $action, $urlparams)\n {\n //Inicializa os parâmetros da SuperClasse\n parent::ControllerBase($controller, $action, $urlparams);\n //Envia o Controller para a action solicitada\n $this->$action();\n }",
"public function create()\n {\n return view('Addcourse');\n }",
"public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}",
"function Controller()\n\t{\t\t\n\t\t$this->method = \"showView\";\n\t\tif (array_key_exists(\"method\", $_REQUEST))\n\t\t\t$this->method = $_REQUEST[\"method\"];\n\t\t\t\t\n\t\t$this->icfTemplating = new IcfTemplating();\n\t\t$this->tpl =& $this->icfTemplating->getTpl();\n\t\t$this->text =& $this->icfTemplating->getText();\t\t\n\t\t$this->controllerMessageArray = array();\n\t\t$this->pageTitle = \"\";\n\t\t$this->dateFormat = DateFormatFactory::getDateFormat();\n\t\t$this->controllerData =& $this->newControllerData();\n\t}",
"public function add_course_view(){\n\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/add_course';\n\t\t$mainData = array(\n\t\t\t'pagetitle'=> 'Add course',\n\t\t\t'course_list'=> $this->setting_model->Get_All('course'),\n\t\t);\n\t\t$footerData = null;\n\n\t\t$this->template($headerData, $sidebarData, $page, $mainData, $footerData);\n\t}",
"public function __construct()\n {\n $this->middleware('auth');\n\n $this->CalendarController = new CalendarController();\n\n }",
"function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }",
"public function course()\n\t{ \n//echo \"<pre>\";print_r($_POST);die;\t\n\t\t$data=$_POST;\n\t\t//$data['action']='get_module';\n\t\t//$data['action']='delete_module';\n\t\t//$data['action']='course';\n\t\t//$data['action']='delete_lession';\n\t\t$action='';\n\t\tif(isset($data['action'])){\n\t\t\t$action=$data['action'];\n\t\t}\n\t\tswitch ($action) {\n\t\tcase 'course':\n\t\t\t$this->add_update_course($data);\n\t\t\tbreak;\n\t\tcase 'delete_module':\n\t\t\t$this->delete_course($data);\n\t\t\tbreak;\n\t\tcase 'delete_lession':\n\t\t\t$this->delete_lession($data);\n\t\t\tbreak;\n\t\tcase 'get_module':\n\t\t\t$this->getMOduleDetailsByModuleId($data);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$result['msg']='Bad request!';\n\t\t\t$returnData['response']=$result;\n\t\t\tdie(json_encode($returnData));\n\t\t}\n\t\t\n\t}",
"public function create()\n {\n $courses = Course::latest()->get();\n return view ('backend.instructors.create', compact('courses'));\n }",
"public function getController( );",
"public function __construct() {\r\n\t\tparent::__construct($this->controllerName);\t\r\n\t\t$this->load->model('todo_model');\r\n\r\n\t\t$this->data = array(\r\n\t\t\t'title' => 'Orpheus.todo',\r\n\t\t\t'loadedControllers' => Registry::getLoadedLibs()\r\n\t\t\t);\r\n\t\t\r\n\t\t\r\n\t\t//$this->index();\r\n\t\t\r\n\t}",
"public function __construct()\n\t{ \t\t\n\t\t$this->common = new CommonController();\n\t}",
"public function __construct()\n\t{ \t\t\n\t\t$this->common = new CommonController();\n\t}",
"protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }",
"protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }",
"public function courseAction(){\n\t\t\n\t\t$action = $this->input->post(\"action\");\n\t\tswitch($action){\n\t\t\tcase \"add\":\n\t\t\t\t#===========================================================================================================\n\t\t\t\t$this->form_validation->set_error_delimiters('', '');\n\t\t\t\t$this->form_validation->set_rules(\"title\", \"Course Title\", \"trim|required\");\n\t\t\t\t$this->form_validation->set_rules(\"departmentID\", \"Department\", \"trim|required\");\n\t\t\t\t$this->form_validation->set_rules(\"description\", \"Description\", \"trim|required\");\n\t\t\t\t$this->form_validation->set_rules(\"duration\", \"Duration In Hrs.\", \"trim|required|numeric|greater_than[14]\");\n\t\t\t\t$this->form_validation->set_rules(\"maxDays\", \"Max Days\", \"trim|required|numeric\");\n\t\t\t\tif($this->form_validation->run() == FALSE){\n\t\t\t\t\t\n\t\t\t\t\techo json_encode( array(\n\t\t\t\t\t\t'status' => false,\n\t\t\t\t\t\t'message' => \"<p class='text-danger'>\".implode('!</br>',explode('.', validation_errors())).\"</p>\"\n\t\t\t\t\t));\n\t\t\t\t\treturn;\n\t\t\t\t}else{\n\t\t\t\t\t$duration = decimalToTime($this->input->post(\"duration\"));\n\t\t\t\t\t$inputs = array(\n\t\t\t\t\t\t'title' => $this->input->post(\"title\"),\n\t\t\t\t\t\t'departmentID' => $this->input->post(\"departmentID\"),\n\t\t\t\t\t\t'description' => $this->input->post(\"description\"),\n\t\t\t\t\t\t'duration' => $duration,\n\t\t\t\t\t\t'maxDays' => $this->input->post(\"maxDays\")\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\tif($this->course->add($inputs)){\n\t\t\t\t\t\techo json_encode( array(\n\t\t\t\t\t\t\t'status' => true,\n\t\t\t\t\t\t\t'message' => \"New Course Added Successfully!\"\n\t\t\t\t\t\t));\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo json_encode( array(\n\t\t\t\t\t\t\t'status' => false,\n\t\t\t\t\t\t\t'message' => \"Unable to save\"\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\tbreak;\n\t\t\tcase \"get\":\n\t\t\t\t#===========================================================================================================\n\t\t\t\t$this->form_validation->set_error_delimiters('', '');\n\t\t\t\t$this->form_validation->set_rules(\"courseID\", \"Course ID\", \"trim|required\");\n\t\t\t\t\n\t\t\t\tif($this->form_validation->run() == FALSE){\n\t\t\t\t\techo json_encode( array(\n\t\t\t\t\t\t'status' => false,\n\t\t\t\t\t\t'message' => \"<p class='text-danger'>\".implode('!</br>',explode('.', validation_errors())).\"</p>\"\n\t\t\t\t\t));\n\t\t\t\t\treturn;\n\t\t\t\t}else{\n\t\t\t\t\t$id = $this->input->post(\"courseID\");\n\t\t\t\t\t$data['courseInfo'] = $this->course->get($id);\n\t\t\t\t\tif(!empty($data['courseInfo'])){\n\t\t\t\t\t\t$data['courseInfo']->duration = timeToDecimal($data['courseInfo']->duration);\n\t\t\t\t\t}\n\t\t\t\t\t$data['departments'] = $this->department->getAll();\n\t\t\t\t\tif($data){\n\t\t\t\t\t\techo json_encode( array(\n\t\t\t\t\t\t\t'status' => true,\n\t\t\t\t\t\t\t'data' => $data\n\t\t\t\t\t\t));\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo json_encode( array(\n\t\t\t\t\t\t\t'status' => false,\n\t\t\t\t\t\t\t'message' => \"Unable to Load!\"\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\tbreak;\n\t\t\tcase \"update\":\n\t\t\t\t#======================================================================================\n\t\t\t\t$this->form_validation->set_error_delimiters('', '');\n\t\t\t\t$this->form_validation->set_rules(\"title\", \"Course Title\", \"trim|required\");\n\t\t\t\t$this->form_validation->set_rules(\"departmentID\", \"Department\", \"trim|required\");\n\t\t\t\t$this->form_validation->set_rules(\"description\", \"Description\", \"trim|required\");\n\t\t\t\t$this->form_validation->set_rules(\"duration\", \"Duration In Hrs.\", \"trim|required|numeric|greater_than[14]\");\n\t\t\t\t$this->form_validation->set_rules(\"maxDays\", \"Max Days\", \"trim|required|numeric|greater_than[29]\");\n\t\t\t\tif($this->form_validation->run() == FALSE){\n\t\t\t\t\t\n\t\t\t\t\techo json_encode( array(\n\t\t\t\t\t\t'status' => false,\n\t\t\t\t\t\t'message' => \"<p class='text-danger'>\".implode('!</br>',explode('.', validation_errors())).\"</p>\"\n\t\t\t\t\t));\n\t\t\t\t\treturn;\n\t\t\t\t}else{\n\t\t\t\t\t$duration = decimalToTime($this->input->post(\"duration\"));\n\t\t\t\t\t$courseID = $this->input->post(\"courseID\");\n\t\t\t\t\t$inputs = array(\n\t\t\t\t\t\t'title' => $this->input->post(\"title\"),\n\t\t\t\t\t\t'departmentID' => $this->input->post(\"departmentID\"),\n\t\t\t\t\t\t'description' => $this->input->post(\"description\"),\n\t\t\t\t\t\t'duration' => $duration,\n\t\t\t\t\t\t'maxDays' => $this->input->post(\"maxDays\")\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\tif($this->course->update($courseID, $inputs)){\n\t\t\t\t\t\techo json_encode( array(\n\t\t\t\t\t\t\t'status' => true,\n\t\t\t\t\t\t\t'message' => \"Course Updated Successfully!\"\n\t\t\t\t\t\t));\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo json_encode( array(\n\t\t\t\t\t\t\t'status' => false,\n\t\t\t\t\t\t\t'message' => \"Unable to update!\"\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#=======================================================================================\n\t\t\tbreak;\n\t\t\tcase \"delete\": \n\t\t\t\t$courseID = $this->input->post(\"courseID\");\n\t\t\t\t\n\t\t\t\tif($this->course->delete($courseID)){\n\t\t\t\t\t\techo json_encode( array(\n\t\t\t\t\t\t\t'status' => true,\n\t\t\t\t\t\t\t'message' => \"Course Deleted Successfully!\"\n\t\t\t\t\t\t));\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo json_encode( array(\n\t\t\t\t\t\t\t'status' => false,\n\t\t\t\t\t\t\t'message' => \"Unable to delete\"\n\t\t\t\t\t\t));\n\t\t\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t}\n\t}",
"public function newAction(Request $request)\n {\n $course = new Courses();\n $form = $this->createForm('Kay\\Bundle\\PlatformBundle\\Form\\CoursesType', $course);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($course);\n $em->flush();\n\n return $this->redirectToRoute('courses_show', array('id' => $course->getId()));\n }\n\n return $this->render('KayAdminBundle:Courses:new.html.twig', array(\n 'course' => $course,\n 'form' => $form->createView(),\n ));\n }",
"public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }",
"public function actionIndex()\n {\n\t\t\n /* $searchModel = new CourseSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]); */\n }"
] | [
"0.6302638",
"0.6292586",
"0.6287242",
"0.60198975",
"0.60021704",
"0.5892466",
"0.5881345",
"0.58796245",
"0.58694077",
"0.5862162",
"0.58082306",
"0.5801968",
"0.579866",
"0.57746667",
"0.57746315",
"0.576572",
"0.576316",
"0.5742071",
"0.5738256",
"0.5734746",
"0.56930524",
"0.5686394",
"0.5682401",
"0.5667612",
"0.56676",
"0.5663504",
"0.5657426",
"0.5649135",
"0.5643893",
"0.56435305",
"0.56334114",
"0.56064576",
"0.5583849",
"0.5578764",
"0.5578764",
"0.55758286",
"0.55758286",
"0.55684096",
"0.55584556",
"0.5550853",
"0.5531914",
"0.55241907",
"0.5523616",
"0.5523616",
"0.5520209",
"0.55168337",
"0.55102926",
"0.5489632",
"0.54827124",
"0.5480682",
"0.5472136",
"0.54566044",
"0.544867",
"0.544867",
"0.544867",
"0.5447747",
"0.5446021",
"0.54455876",
"0.5423323",
"0.54107106",
"0.54102135",
"0.5398226",
"0.5383414",
"0.53776777",
"0.53736126",
"0.53695744",
"0.53610206",
"0.535298",
"0.53520256",
"0.5349463",
"0.5349451",
"0.53489846",
"0.53460664",
"0.53420216",
"0.533473",
"0.5334109",
"0.53196216",
"0.53165",
"0.53124017",
"0.5309298",
"0.530318",
"0.52989614",
"0.5296226",
"0.529216",
"0.5289055",
"0.52832925",
"0.52813494",
"0.5278418",
"0.52759725",
"0.52748615",
"0.52598614",
"0.5257294",
"0.52473205",
"0.5240648",
"0.5240648",
"0.5232955",
"0.52309686",
"0.52201337",
"0.52162105",
"0.52121264",
"0.52112645"
] | 0.0 | -1 |
Method that associates the index view with it's associated models. | public function index() {
// Get all courses the user is currently registered in
$user = User::find(Auth::user()->id);
$registered_courses = $user->courses()->get();
return view('coursemanager.index', ['registered_courses' => $registered_courses, 'user' => $user,]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function index() {\r\n $models = TodoItemModel::findAll();\r\n require $this->views_folder . 'index.php';\r\n }",
"public function index()\n {\n return view(\"{$this->viewsPath}.index\", ['models' => Directory::paginate(25)]);\n }",
"public function getModelsForIndex()\n {\n $models = [];\n $all_models = $this->getAllModels();\n\n foreach ($all_models as $model) {\n //parse model\n $pieces = explode('.', $model);\n if (count($pieces) != 2) {\n throw new Exception('Parse error in AppModelList');\n }\n //check form match\n $app_model = $pieces[1];\n $link = $this->convertModelToLink($app_model);\n\n // add to actions\n $models[$app_model]['GET'] = [\n [\n 'action' => 'index',\n 'description' => 'List & filter all ' . $app_model . ' resources.',\n 'route' => '/' . env('EASY_API_BASE_URL', 'easy-api') . '/' . $link\n ],\n [\n 'action' => 'show',\n 'description' => 'Show the ' . $app_model . ' that has the matching {id} from the route.',\n 'route' => '/' . env('EASY_API_BASE_URL', 'easy-api') . '/' . $link . '/{id}'\n ]\n ];\n }\n return $models;\n }",
"public function indexModel(){\n $this->model('auditor/indexModel');\n \n $this->model->load(); \n }",
"public function index()\n {\n return $this->make('index')->with('accounts', $this->accounts->all());\n }",
"public function index()\n\t{\n\t\treturn View::make('objects.index', array('objects' => Object::all()));\n\t}",
"public function index(): object\n {\n if (!Bouncer::can('index', $this->model)) {\n abort(403);\n }\n $entity = new $this->model;\n $data = (new Presenter($entity, $this->searchableColumns))->withFilters()->getData();\n return $this->view($this->baseView . '.index', compact(['entity', 'data']));\n }",
"public function getIndex(){\n\t\t#talk to the model\n\t\t#receive from the model\n\t\t#compile or process data from the model if needed \n\t\t#pass this data to the correct view\n\t\t$categories=Category::orderBy('created_at')->limit(3)->get();\n\t\t$posts=Post::orderBy('created_at','desc')->limit(6)->get();\n\t\treturn view('pages.welcome')->withPosts($posts)->withCategories($categories);\n\t}",
"public function admin_index() {\r\n\t\t$this->data = $this->{$this->modelClass}->find('all');\r\n }",
"public function index()\n {\n return view('joins.index');\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function indexModel(){\n }",
"public function indexAction() {\n\t\t// recebendo posts do método get posts\n\t\t$posts = $this->model->getPosts ();\n\t\t\n\t\t// criando variável de view (posts) os posts recebidos\n\t\t$this->view->posts = $posts;\n\t}",
"function index(){\r\n \r\n $all = $this->model->selectAll();\r\n $this->data('all', $all);\r\n $this->loadView();\r\n }",
"public function getIndex()\n {\n // add stuff here\n }",
"public function index()\n\t{\n\t\t$this->loadViews(\"index\");\n\t}",
"public function index()\n {\n // get all titles\n $titles = Title::select('*')->orderby('title')->with('mybooks')->get();\n\n // load the view and pass the titles\n return View::make('titles.index')\n ->with('titles', $titles);\n }",
"protected function index(){\n $viewmodel = new AdminModel();\n $this->returnView(array('admins'=>$viewmodel->index()),true);\n }",
"public function index()\n {\n return view('index')\n ->with('autos', Auto::all());\n }",
"public function getIndex()\n\t{\n\t\tLog::info('asfasfds');\n\t\treturn View::make('home')->with('entries', Entry::all());\n\t}",
"public function getIndex(){\n\n\t\treturn View::make('tax.view')\n\t\t\t->with('taxes', Tax::all());\n\t}",
"public function index()\n {\n// $model = new Airport_Model();\n\n //$rows = $this->Airport_model->as_array()\n//\t\t\t\t\t\t\t\t\t->find_all();\n// $this->setVar('rows', $rows);\n\n $data['rows'] = $this->model->findall();\n\t\techo view('Bobk\\airports\\Views\\orig_index', $data);\n//\t\techo view('orig_index', $data); // don't work\n }",
"public function index()\n\t{\n\t\t$data['result']=NULL;\n\t\t$data['show']=NULL;\n\t\t$this->setIndex($data);\n\t}",
"public function index()\n {\n //if no type cache then add indexType\n if(!Cache::has('indexType')){\n $type = $this->getGoodsByType(Type::with('childrenType')->get());\n Cache::put('indexType',$type,$this->expiresAt);\n }\n //if no lb cache then add\n if(!Cache::has('indexLb')){\n $lb = Ad::where('position_id','1')->where('enable','1')->get();\n Cache::put('indexLb',$lb,$this->expiresAt);\n }\n //if no nav cache then add\n if(!Cache::has('indexNav')){\n $nav = Ad::where('position_id','3')->where('enable','1')->get();\n Cache::put('indexNav',$nav,$this->expiresAt);\n }\n $type = Cache::get('indexType');\n $lb = Cache::get('indexLb');\n $nav = Cache::get('indexNav');\n\n return view('home.index',compact('type','lb','nav'));\n }",
"public function index() {\r\r\n $this->render('index', array('model' => $this->model));\r\r\n }",
"public function getIndex(){\n\t\t//to pull posts from our database\n\t\t$posts = Post::orderBy('created_at','desc')->limit(4)->get();\n\n\t\t//return the view with posts variable\n\t\treturn view('pages.welcome')->withPosts($posts);\n\t\t//process for what we do in controllers include\n\t\t//process variable data or params\n\t\t//talk to the model\n\t\t//receive data back from the model\n\t\t//compile or process data from the model if neede\n\t\t//pass the data to the correct view\n\t\t//you can use . instead of slash and it willl work aswell\n\t}",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function index()\n {\n return app(Index::class)($this);\n\n }",
"public function getIndex() {\n\t\t#talk to the model\n\t\t#receive from the model\n\t\t#compile or process data from model\n\t\t#pass that data to needed view\n\t\t$posts = Post::orderBy('created_at', 'desc')->limit(4)->get();\n\t\treturn view('pages.welcome')->withPosts($posts);\n\t}",
"public function index()\n {\n $models = Collection::make($this->repository->getAll([], true));\n\n $this->layout->content = View::make('translations.admin.index')\n ->withModels($models);\n }",
"public function index()\n {\n return $this->make('index');\n }",
"public function getIndex()\n {\n $data = [\n 'Limit' => 4,\n 'SortField' => 'id',\n 'SortOrder' => 'desc',\n ];\n $items = [];\n\n // ************ Get movies ************\n $movies = $this->run(function () use ($data) {\n return $this->action('Service\\Movie\\Index')->run($data);\n }, true);\n\n if ($movies['Status'] == 1) {\n // Add movies to all items list\n $items = array_merge($items, array_map(function ($movie) {\n // Add `category` key to each movie\n return array_merge($movie, ['category' => 'movies']);\n }, $movies['Movies']));\n }\n\n // ************ Get books ************\n $books = $this->run(function () use ($data) {\n return $this->action('Service\\Book\\Index')->run($data);\n }, true);\n\n if ($books['Status'] == 1) {\n // Add books to all items list\n $items = array_merge($items, array_map(function ($book) {\n // Add `category` key to each book\n return array_merge($book, ['category' => 'books']);\n }, $books['Books']));\n }\n\n // ************ Get music ************\n $music = $this->run(function () use ($data) {\n return $this->action('Service\\Music\\Index')->run($data);\n }, true);\n\n if ($music['Status'] == 1) {\n // Add music to all items list\n $items = array_merge($items, array_map(function ($music) {\n // Add `category` key to each music item\n return array_merge($music, ['category' => 'music']);\n }, $music['Music']));\n }\n\n // shuffle($items);\n $this->app->render('index.php', [\n 'title' => gettext('Home'),\n 'items' => $items,\n ]);\n }",
"public function indexAction()\n {\n $this->view->employees = Employees::find();\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index() {\n\t\tSearch::index($this->table)->insert(\n\t\t\t$this['slug'],\n\t\t\t[\n\t\t\t\t'title'\t\t=> $this['title'],\n\t\t\t\t'text'\t\t=> $this['text'],\n\t\t\t\t'category'\t=> $this->category->name,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'_type'\t\t=> $this->table,\n\t\t\t]\n\t\t);\n\t}",
"public function index()\n {\n return view('posts.index',['posts'=>Post::all()])\n ->with('categories',Category::all())\n ->with('tags',Tag::all());\n\n }",
"public function index()\n {\n $this->data['model'] = MailTracking::orderBy('Mtr_CreatedOn', 'desc')->paginate(10);\n\n return parent::index();\n }",
"public function index()\n\t{\n\t\treturn View::make('frontend.books.index')\n\t\t\t\t\t->with('books', Book::all());\n\t}",
"public function index()\n\t{\n\t\t$entities = DB::table('entities')->orderBy('id')->get();\n\t\t$branches = DB::table('branches')->get();\n\n\t\treturn View::make('entities.index')\n\t\t->with('title','entities')\n\t\t->with('entities', $entities)\n\t\t->with('branches', $branches)\n\t\t->with('active', 'entities');\n\t}",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"public function index()\n {\n $eloquent = eloquent::all();\n return view('eloquent.index', compact('eloquent'));\n }",
"public function index()\n {\n return view('admin.pages.truck-model.index', [\n \"truckModelCategories\" => TruckModelCategory::with('truckBrandCategory')->paginate(10)\n ]);\n }",
"public function index()\n {\n return view('associates.index')->with('associates', Associate::withTrashed()->Paginate(10));\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function index()\n {\n return view('admin.works.index')\n ->withWorks(Work::all());\n }",
"public function index()\n {\n $models= Carmodal::latest()->paginate(10);\n return view('models.index',compact('models'));\n }",
"public function index()\n {\n return $this->model->all();\n }",
"public function index()\n {\n $car_models = CarModel::with(['car'])->get();\n return view('car-models.index', compact('car_models'));\n }",
"public function index()\n {\n return $this->collection(Matakuliah::all(), new MatakuliahTransformer);\n }",
"public function index() {\n Init::view('index');\n }",
"function do_index() {\n $this->vars['title'] = \"Fotos\";\n \n $sql = 'SELECT COUNT(*) FROM photos';\n $count = $this->photo->count($sql);\n \n $page = $this->paginate(PHOTO_PAGE_SIZE, $count, '/photo/index');\n \n $sql = 'SELECT p.created as p_created, p.id AS p_id, u.id AS u_id, t.title AS topic, t.*, u.*, p.* '\n . 'FROM photos p ' \n . 'LEFT JOIN users u ON p.von = u.id '\n . 'LEFT JOIN topics t ON p.topic_id = t.id '\n . 'ORDER BY p.created DESC LIMIT ' . (($page-1)*PHOTO_PAGE_SIZE) . ',' . PHOTO_PAGE_SIZE;\n\n $this->vars['photos'] = $this->photo->query($sql);\n $this->render();\n }",
"public function index()\n {\n return $this->model->getAll();\n }",
"public function index()\n {\n //\n $results = Result::orderBy('id', 'asc')->get();\n\n // load the view and pass the employees\n return $results;\n }",
"public function index()\n {\n return Model::all();\n }",
"public function index()\n {\n $consults = Consult::all();\n // load the view and pass the nerds\n return View::make('consult.index', array('consults' => $consults));\n }",
"public function index() {\n $this->template->attach($this->resours);\n $this->template->draw('index/index', true);\n }",
"public function index(){\n return $this->model->all();\n }",
"public function index(){\r\n $this->display(index);\r\n }",
"public function indexAction(): void\n {\n \n $ana=new Ana();\n \n $getAllRecords=$ana->getAllRecords();\n \n \n \n $this->view->form = new AnaForm();\n $this->view->records=$getAllRecords->toArray();\n \n \n \n }",
"public function index() {\n\t\treturn view('person.index', ['people' => Person::all()]);\n\t}",
"function index(){\n $alumnos=$this->model->get();\n $this->view->alumnos=$alumnos;\n $this->view->render('alumno/index');\n }",
"public function indexAction()\n {\n $controllers = array();\n\n FOREACH($this->dbCtrl->fetchAllOrderByModuleController() AS $row) {\n $controllers[] = new Admin_Model_DbRow_Controller($row);\n }\n\n $this->view->controllers = $controllers;\n }",
"public function index()\n\t{\n\t\t // get all the documents\n $documents = Document::all();\n\n // load the view and pass the documents\n return View::make('logicViews.documents.index')->with('documents', $documents);\n\t}",
"public function index() {\n $data['manufacturers'] = Manufacturer::getManufacturers();\n return view('models.models')->with($data);\n }",
"public function indexAction()\n {\n return new ViewModel(array(\n \t'albums' => $this->getEntityManager()->getRepository('Album\\Entity\\Album')->findAll()\n \t)\n );\n }",
"public function indexAction()\n {\n // TODO Auto-generated indexAction() default action\n return new ViewModel();\n }",
"public function index()\n\t{\n\t\t$books = BookRepository::all();\n\t\t$tags = Tag::all();\n\t\treturn View::make('books.index', array('books'=>$books, 'tags'=>$tags));\n\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n\t{\n\t\t//get all accessories\n\t\t$accessories = $this->Accessories->all();\n\t\t//get all categories\n\t\t$categories = $this->Categories->all();\n\t\t//inject model into controller\n\t\t$this->data['accessories'] = $accessories;\n\t\t//inject model into controller\n\t\t$this->data['categories'] = $categories;\n\t\t$this->data['pagebody'] = 'catalogue';\n\t\t$this->data['pagetitle'] = 'Catalog Page';\n\t\t$this->render();\n\t}",
"public function index()\n\t{\n\t\t$data = array();\n\t\t$model_data\t\t\t=\tarray();\n\t\t\n\t\t$model_data['model_list']\t=\t$this->model_model->get_all_models();\n\n $data['navigation'] = $this->load->view('template/navigation','',TRUE);\n $data['content'] = $this->load->view('pages/model/model',$model_data,TRUE);\n $data['footer'] = $this->load->view('template/footer','',TRUE);\n\t\t$this->load->view('template/main_template',$data);\n\t}",
"public function index() {\n $this->view->render('index/index', null, null);\n }",
"public function index()\n {\n $dayCounts = app('phpredis')->incr('tindexDayCounts#'.date('Ymd'));\n $totalCounts = app('phpredis')->incr('tindexTotalCounts');\n $travelList = \\App\\Models\\Travel\\Travel::getList();\n if ($travelList) {\n foreach ($travelList as $key=>$val) {\n $travelList[$key]['tagName'] = '';\n $travelList[$key]['content'] = mb_substr($val['content'], 0, 70, 'utf-8').'..';\n\n if (isset(config('local')['travel_tag'][$val['tag']])) {\n $travelList[$key]['tagName'] = config('local')['travel_tag'][$val['tag']];\n }\n\n $travelList[$key]['indexImage'] = config('local')['website'].$val['index_image'];\n\n $travelList[$key]['utime'] = \\App\\Models\\Common\\Date::getDateToString($val['utime']);\n\n $travelList[$key]['travelLink'] = config('local')['website'].'travel/detail/'.$val['id'];\n }\n }\n $this->result['navName'] = config('local')['nav']['travel'];\n $this->result['sidebar'] = ['now' =>date('Y-m-d H:i:s', strtotime('-1 days')), 'dayCounts'=>$dayCounts, 'totalCounts' => $totalCounts];\n $this->result['data'] = ['travelList' => $travelList];\n $this->result['myview'] = 'index.travel.index';\n return view('index.index', $this->result);\n\n }",
"public function index()\n {\n $items = $this->model->orderBy('created_at', 'desc')->get();\n\n return view('admin.'.$this->resourceName.'.index', compact('items'));\n }",
"public function index(){\n return view('index.index.index');\n }",
"public function index() {\n return $this->handleNotFound(function () {\n $list = [];\n\n foreach ($this->researchService->findAll($this->userId) as $research) {\n $list[] = $this->service->findAll($this->userId, $research->getResearchIndex());\n }\n\n return $list;\n });\n }",
"function index() {\n $this->renderView(\"index\");\n }",
"public function index()\n {\n return view('post.index') -> with('posts' , post::all());\n }",
"public function all()\n {\n if (!$this->isLogged()) exit;\n $this->oUtil->getModel('Todo');\n $this->oModel = new \\TestProject\\Model\\Todo;\n\n $this->oUtil->oTodos = $this->oModel->getAll();\n\n $this->oUtil->getView('index');\n }",
"public function indexAction()\n {\n $view = $this->init();\n $view->setTemplate('el-finder/index/index.phtml');\n return $view;\n }",
"public function index()\n {\n return view('admin.book.index',[\n 'books'=>Book::all()\n ] );\n }",
"public function indexAction() {\n\t\treturn new ViewModel();\n\t}",
"protected function createView()\n {\n return new IndexView();\n }",
"public function getIndex() {\n\t\t$clients = DataClient::get();\n\t\tforeach ($clients as $client) {\n\n\t\t\t$client->client_id = $client->id;\n\t\t\t$client->save();\n\t\t}\n\t}",
"public function index()\n {\n $models = $this->repository->all();\n\n return view('combinations::public.index')\n ->with(compact('models'));\n }",
"public function index(){\n\n \t\t$compact = array();\n \t\t$compact['title']=$this->modName;\n \t\t$compact['models']=$this->model->where('parent_id',null)->orderBy('position')->get();\n \n \t\treturn view($this->viewPr.'index',['compact'=>$compact]);\n \t}",
"public function index()\n {\n //\n $rows = DB::table('objects')\n ->join('brands', 'brands.id', '=', 'objects.brands_id')\n ->join('types', 'types.id', '=', 'objects.types_id')\n ->select('objects.*', 'brands.brand_name', 'types.type')\n ->get();\n\n return view('backend.objects.index', ['rows' => $rows]);\n }",
"public function index()\n\t{\n\t\t$products = \\App\\Models\\Product::all();\n\n\t\treturn view('model-views.index')->with(array('modelName' => 'products', 'models' => $products, 'modelDetails' => 'products.details'));\n\t}",
"public function index()\n\t{\n $items = Item::paginate();\n\n return view ('admin.common.index',['name'=>'items','set'=>$items]);\n\n\n\t}",
"public function index(){\n\t\t$this->view->render($this,'index');\n\t}",
"public function get_index()\n\t{\n\t\t$tags = Tag::paginate(30);\n\t\t$table = TagPresenter::table($tags);\n\t\t$data = array(\n\t\t\t'eloquent' => $tags,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('diskus::title.tags.list'));\n\t\t\n\t\treturn View::make('diskus::api.tags.index', $data);\n\t}",
"public function index()\n {\n $table = $this->Attachments;\n $contain = [];\n $entities = $table->find()->contain($contain);\n $this->set('attachments', $entities);\n $this->set('_serialize', 'attachments');\n }",
"public function getIndex() {\n \t// Grab all of the posts from the DB\n \t$posts = Post::paginate(10);\n\n \t// Return the Index View\n \treturn view('blog.index')->withPosts($posts);\n }",
"public function Index()\n\t{\n\t\t$this->views->SetTitle('Index Controller');\n\t\t$this->views->AddView('index/index.tpl.php', array(),'primary');\n\t}",
"public function index()\n {\n $posts = Post::all();\n\n // load the view and pass the nerds\n return View::make('post.index')\n ->with('posts', $posts);\n }",
"public function index()\n {\n return view('admin.employees.index', [\n 'employees' => Employee::paginate(10),\n 'companies' => Company::get()\n ]);\n }",
"public function index()\n\t{\n\t\t$items = ItemMaster::orderBy('id', 'DESC')->paginate(10);\n\t\treturn View::make('item_masters.index', compact('items'));\n\t}",
"public function index()\n {\n $this->view->newsList = $this->model->newsList();\n $this->view->render('index/index'); \n }",
"public function index()\n {\n // create a variable and store all the workers\n $workers = Worker::all();\n // return a view and pass in the above variable\n return view('workers.index')->withWorkers($workers);\n }",
"public function get_index()\n\t{\n\t\treturn View::make('subjectSections.manage')\n\t\t\t->with('subjectSections', SubjectSection::all());\n\t}"
] | [
"0.67881787",
"0.67038596",
"0.66886634",
"0.6631034",
"0.6577521",
"0.6549912",
"0.6539073",
"0.6527041",
"0.6479324",
"0.6475667",
"0.64737016",
"0.6383167",
"0.63614315",
"0.634962",
"0.63484526",
"0.6344065",
"0.6309397",
"0.6300804",
"0.62844956",
"0.62632316",
"0.6246886",
"0.6245837",
"0.6238362",
"0.6218648",
"0.62174886",
"0.62078446",
"0.6195487",
"0.61939555",
"0.6163965",
"0.6156573",
"0.6148509",
"0.61474013",
"0.61467844",
"0.6138716",
"0.6136053",
"0.6134025",
"0.6100032",
"0.6097233",
"0.6094348",
"0.6089991",
"0.6088298",
"0.6084732",
"0.60827893",
"0.6081142",
"0.6080306",
"0.6070956",
"0.60703593",
"0.60673285",
"0.60646796",
"0.6063529",
"0.6061985",
"0.6054214",
"0.6046179",
"0.60457724",
"0.60450244",
"0.60447043",
"0.6033806",
"0.6028657",
"0.60258806",
"0.60236233",
"0.60223126",
"0.6017519",
"0.6012786",
"0.60116965",
"0.6005894",
"0.60056674",
"0.60043037",
"0.6003534",
"0.6003534",
"0.6003534",
"0.59997594",
"0.59918106",
"0.5991247",
"0.5983822",
"0.5980424",
"0.59800863",
"0.59798115",
"0.59743905",
"0.59692085",
"0.59624755",
"0.5961827",
"0.596159",
"0.59612757",
"0.59594095",
"0.5958745",
"0.59559137",
"0.5951624",
"0.59488535",
"0.5948272",
"0.5948167",
"0.59415984",
"0.59386766",
"0.5933656",
"0.5930565",
"0.5930429",
"0.59250915",
"0.59231645",
"0.59186924",
"0.5916732",
"0.5916059",
"0.5912438"
] | 0.0 | -1 |
Associates the search view with it's associated models. | public function search(Request $request){
// Get all courses the user is currently registered in
$user = User::find(Auth::user()->id);
$registered_courses = $user->courses()->get();
// validate the user input
$this->validate($request, ['search_input' => 'required',]);
$input = $request->input("search_input");
$courses = array();
// find the courses associated with the user input
$courses_by_name = Course::where('class', 'ilike', '%'.$input.'%')->get();
$courses_by_title = Course::where('title', 'ilike', '%'.$input.'%')->get();
// courses information by course name
foreach($courses_by_name as $cbn){
if(!in_array($cbn, $courses)){
if($registered_courses->where('title', $cbn->title)->count() === 0){
$item = array();
$item['id'] = $cbn->id;
$item['class'] = $cbn->class;
$item['section'] = $cbn->section;
$item['title'] = $cbn->title;
$item['teacher'] = "";
$courses[] = $item;
}
}
}
// courses information by course title
foreach($courses_by_title as $cbt){
if(!in_array($cbt, $courses)){
if($registered_courses->where('title', $cbt->title)->count() === 0){
$item = array();
$item['id'] = $cbt->id;
$item['class'] = $cbt->class;
$item['section'] = $cbt->section;
$item['title'] = $cbt->title;
$item['teacher'] = "";
$courses[] = $item;
}
}
}
// courses information by course teacher's name
$allCourses = Course::all();
foreach ($allCourses as $aCourse){
$found = $aCourse->teachers()
->where('name','ilike', "%$input%")
->get();
if(count($found) > 0 && !in_array($aCourse, $courses)){
if($registered_courses->where('title', $aCourse->title)->count() === 0) {
$item = array();
$item['id'] = $aCourse->id;
$item['class'] = $aCourse->class;
$item['section'] = $aCourse->section;
$item['title'] = $aCourse->title;
$item['teacher'] = $found[0]->name;
$courses[] = $item;
}
}
}
$paginated_courses = $this->constructPagination($courses);
return view('coursemanager.index', ['registered_courses' => $registered_courses, 'courses' => $paginated_courses,
'user' => $user,]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function registerSearch(array $models): self\n {\n static::$options['search'] = array_merge($models, static::$options['search'] ?? []);\n\n return $this;\n }",
"public function search() {\n include 'views/search-form.php';\n }",
"public function searchList() {\n include 'views/search-list.php';\n }",
"public static function bootSearchTrait()\n {\n self::saved(\n function ($model) {\n App::offsetGet('search')->update($model);\n }\n );\n\n self::deleting(\n function ($model) {\n App::offsetGet('search')->delete($model);\n }\n );\n }",
"public function set_data() {\n\t\tif (!empty($_GET)) {\n\t\t\tif ('search' === $this->_getKey) {\n\t\t\t\t$this->_getKey = array_keys($_GET);\n\t\t\t\t$this->searchModel->set_search_query(($this->searchModel->searchable)\n\t\t\t\t\t->registerModel(Modules::class, 'module_name')\n\t\t\t\t\t->registerModel(Multiplatforms::class, 'name')\n\t\t\t\t\t->registerModel(Log::class, 'method')\n\t\t\t\t\t->perform($_GET[$this->_getKey[0]])\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$this->searchModel->result();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this;\n\t}",
"public function searchAction()\n {\n $cleanTypes = $this->_getTypesList();\n $this->view->documentTypes = $cleanTypes;\n }",
"public function prepareSearch() {\n $this->User->unbindModel(array(\n 'hasOne' => array(\n 'UserInfo'\n ),\n 'hasMany' => array(\n 'ClipQuestion',\n 'Notification',\n 'QuestionComment',\n 'Question',\n 'Reply',\n 'ReplyComment',\n 'ReplyRequest',\n 'UserTag',\n 'Vote',\n 'Follow',\n 'Follower'\n )\n ));\n $this->QuestionComment = ClassRegistry::init('QuestionComment');\n $this->QuestionPvCount = ClassRegistry::init('QuestionPvCount');\n $this->ClipQuestion = ClassRegistry::init('ClipQuestion');\n $this->QuestionTag = ClassRegistry::init('QuestionTag');\n $this->ReplyRequest = ClassRegistry::init('ReplyRequest');\n $this->QuestionComment->unbindModel(array(\n 'belongsTo' => array(\n 'Question'\n )\n ));\n $this->QuestionPvCount->unbindModel(array(\n 'belongsTo' => array(\n 'Question'\n )\n ));\n $this->ClipQuestion->unbindModel(array(\n 'belongsTo' => array(\n 'Question'\n )\n ));\n $this->QuestionTag->unbindModel(array(\n 'belongsTo' => array(\n 'Question'\n )\n ));\n $this->Reply->unbindModel(array(\n 'belongsTo' => array(\n 'Question'\n )\n ));\n $this->ReplyRequest->unbindModel(array(\n 'belongsTo' => array(\n 'Question'\n )\n ));\n $this->Vote->unbindModel(array(\n 'belongsTo' => array(\n 'Question'\n )\n ));\n/*\n $this->User->cacheQueries = true;\n $this->QuestionComment->cacheQueries = true;\n $this->QuestionPvCount->cacheQueries = true;\n $this->ClipQuestion->cacheQueries = true;\n $this->QuestionTag->cacheQueries = true;\n $this->Reply->cacheQueries = true;\n $this->ReplyRequest->cacheQueries = true;\n $this->Vote->cacheQueries = true;\n*/\n\n $this->recursive = 2;\n $this->cacheQueries = true;\n/*\n $this->unbindModel(array(\n 'hasMany' => array(\n 'ReplyRequest'\n )\n ));\n*/\n }",
"public function searchAction() {\n parent::searchAction();\n }",
"public function __invoke()\n {\n return view('search');\n }",
"public function searchAction() {\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$this->view->cols = $model->info('cols');\n\t\t$this->view->model = $this->_getParam('model');\n\t\t$this->view->config = Marcel_Backoffice_Config::getInstance()->getConfig();\n\t\t\n\t\tif ($this->_request->isPost()) {\n\t\t\t$fields = array();\n\t\t\t$func \t= array();\n\t\t\t$query \t= array();\n\t\t\tforeach ($_POST['query'] as $key => $q) {\n\t\t\t\tif (isset($_POST['fields'][$key]) && !empty($_POST['fields'][$key])) {\n\t\t\t\t\t$fields[$key] = $_POST['fields'][$key];\n\t\t\t\t\t$func[$key] \t= $_POST['func'][$key];\n\t\t\t\t\t$query[$key] \t= $_POST['query'][$key];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$data = array('fields' => $fields, 'func' => $func, 'query' => $query);\n\t\t\t$data = serialize($data);\n\t\t\t$this->_helper->redirector('list', null, null, array('model' => $modelName, 'data' => $data));\n\t\t}\n\t}",
"public function searchResults()\n {\n\n // Validate form\n $this->errorMsgs();\n\n $searchTerm = $this->request->has('searchTerm') ? $this->request->searchTerm : '';\n $searchResults = $this->companyInfo();\n\n $favoritesList = Auth::user()->favorites()->orderBy('company_name')->get();\n\n return view('pages.search')->with([\n 'favoritesList' => $favoritesList,\n 'searchResults' => $searchResults,\n 'searchTerm' => $searchTerm\n ]);\n\n }",
"function view_search()\n {\n $this->load->view('view_head');\n $this->load->view('view_main');\n \n $search_terms = $this->input->post('q');\n \n \n if ($search_terms)\n {\n $this->load->model('model_search');\n $results = $this->model_search->search($search_terms);\n }\n\n $this->load->view('view_search', array(\n 'search_terms' => $search_terms,\n 'results' => @$results\n ));\t\n $this->load->view('view_footer');\n }",
"public function search()\n {\n //\n return view('searchForm.search');\n }",
"protected function getNewSearchModel()\n {\n $searchModelName = $this->getSearchModelName();\n return new $searchModelName;\n }",
"function searchAction() {\n\t\t$this->getModel()->setPage($this->getPageFromRequest());\n\t\t$this->getInputManager()->setLookupGlobals(utilityInputManager::LOOKUPGLOBALS_GET);\n\t\t$inData = $this->getInputManager()->doFilter();\n\t\t$this->addInputToModel($inData, $this->getModel());\n\t\t$oView = new userView($this);\n\t\t$oView->showSearchLeaderboard();\n\t}",
"public function search()\r\n {\r\n return view('search');\r\n }",
"protected function addSearchConfigs()\n {\n\n $this['textQueryBuilder'] = function () {\n return new TextQueryBuilder();\n };\n\n $this['searchManager'] = function ($c) {\n return new SearchManager($c['databaseAdapter'], $c['queue'], $c['request'], array(\n $c['textQueryBuilder']\n ));\n };\n\n }",
"public function search() {\n if (!Request::get('s')) {\n return view('home.layout');\n }\n\n SearchHistory::record_user_search(\n Request::get('s'),\n Auth::user() ? Auth::user()->id : -1\n );\n\n return view('search.layout', [\n 'results' => $this->get_search_results(\n Request::get('s')\n )\n ]);\n }",
"public function search($model, $request)\n {\n $search = filter_var($request->get('search'), FILTER_SANITIZE_STRING);\n\n // Get optional filters\n // FILTER: GEOLOCATION\n if($request->input('location')) {\n $location = filter_var($request->get('location'), FILTER_SANITIZE_STRING);\n }\n if($request->input('geo_lat')) {\n $geo_lat = filter_var($request->get('geo_lat'), FILTER_SANITIZE_STRING);\n $geo_lng = filter_var($request->get('geo_lng'), FILTER_SANITIZE_STRING);\n }\n\n /**\n * Get current page number for location manual Pagination\n */\n $page = $request->get('page') ? $request->get('page') : 1;\n\n\n // Location first, since it's a special query\n if(isset($geo_lat) && isset($geo_lng)) {\n \n $location_data = Posts::location($geo_lat, $geo_lng, $search, 25, 100); \n\n // Hard and dirty search function through collection\n // since search with location method doesn't work still\n if($search !== '') {\n $location_data = $location_data->filter(function ($item) use ($search) {\n return stripos($item->name, $search) !== false;\n });\n }\n\n // Paginate results because location method can't\n $paginate = new Paginate;\n return $paginate->paginate($location_data, 15, $page, [\n 'path' => '/search/'\n ]);\n\n } \n // Section selection handler (brands/shops/prods/strains)\n elseif($search)\n {\n return $model->where('name', 'like', \"%$search%\");\n }\n\n }",
"public function search()\n {\n return view('blog::blog.search');\n }",
"public function actionSearch() {\n $postSearch = new Search;\n if (isset($_POST['Search'])) {\n $postSearch->attributes = $_POST['Search'];\n $keyWord = $postSearch->keyWord;\n $criteria = new CDbCriteria;\n $criteria->distinct = true;\n if (strlen($keyWord) > 0) {\n $searchCondition = '';\n if ($postSearch->searchByName) {\n $searchCondition = 'd.title like :keyWord';\n }\n if ($postSearch->searchByContent) {\n if ($searchCondition == '') {\n $searchCondition = 'd.content like :keyWord';\n } else {\n $searchCondition = ' OR d.content like :keyWord';\n }\n }\n if (!$postSearch->searchByName && !$postSearch->searchByContent) {\n $searchCondition = 'd.title like :keyWord OR d.content like :keyWord';\n }\n if ($searchCondition != '') {\n $searchCondition = ' AND (' . $searchCondition . ')';\n }\n $criteria->join = ' INNER JOIN post_detail d ON t.id=d.post_id ' . $searchCondition;\n $criteria->params = array(':keyWord' => '%' . $keyWord . '%');\n }\n $dataProvider = new CActiveDataProvider('Post', array(\n 'criteria' => $criteria,\n 'pagination' => array(\n 'pageSize' => 15,\n ),\n ));\n $postSearch = new Search;\n $this->render('list', array(\n 'postSearch' => $postSearch,\n 'dataProvider' => $dataProvider,\n ));\n }\n }",
"public function searchAction()\n {\n $page = $this->params()->fromQuery('page', 1);\n $filter = $this->params()->fromQuery('s', '');\n\n // Filter posts by type\n $query = $this->entityManager->getRepository(Post::class)->findPostsBySearchQuery($filter);\n\n $adapter = new DoctrineAdapter(new ORMPaginator($query, false));\n $paginator = new Paginator($adapter);\n $paginator->setDefaultItemCountPerPage(15);\n $paginator->setCurrentPageNumber($page);\n\n /* Change layout */\n $this->layout()->setTemplate('layout/layout-front');\n\n /* Latest 3 posts */\n $latestPosts = $this->entityManager->getRepository(Post::class)->findLatestPosts(2);\n\n /* Countries List */\n $countries = $this->entityManager->getRepository(Post::class)->getCountries();\n\n /* Cuisine Types list */\n $types = $this->entityManager->getRepository(Post::class)->getCuisineTypes();\n\n // Render the view template.\n return new ViewModel([\n 'posts' => $paginator,\n 'postManager' => $this->postManager,\n 'countries' => $countries,\n 'types' => $types,\n 'latestPosts' => $latestPosts\n ]);\n }",
"public function index()\n\t\t{\n\t\t\t$this->load->view('search_view');\n\t\t}",
"public function indexAction()\n {\n $viewModel = new ViewModel();\n if ($this->getRequest()->isPost()) {\n $searchTerm = $this->params()->fromPost('searchTerm');\n $searchViewModel = $this->forward()\n ->dispatch(self::CONTROLLER_NAME, ['action' => 'search', 'searchTerm' => $searchTerm]);\n $viewModel->addChild($searchViewModel, 'searchResult');\n }\n return $viewModel;\n }",
"public function searchAction() {\n $search = $this->getParam('search');\n\n\n $queryBuilder = new Application_Util_QueryBuilder($this->getLogger());\n\n $queryBuilderInput = array(\n 'searchtype' => 'simple',\n 'start' => '0',\n 'rows' => '10',\n 'sortOrder' => 'desc',\n 'sortField'=> 'score',\n 'docId' => null,\n 'query' => $search,\n 'author' => '',\n 'modifier' => 'contains_all',\n 'title' => '',\n 'titlemodifier' => 'contains_all',\n 'persons' => '',\n 'personsmodifier' => 'contains_all',\n 'referee' => '',\n 'refereemodifier' => 'contains_all',\n 'abstract' => '',\n 'abstractmodifier' => 'contains_all',\n 'fulltext' => '',\n 'fulltextmodifier' => 'contains_all',\n 'year' => '',\n 'yearmodifier' => 'contains_all',\n 'author_facetfq' => '',\n 'languagefq' => '',\n 'yearfq' => '',\n 'doctypefq' => '',\n 'has_fulltextfq' => '',\n 'belongs_to_bibliographyfq' => '',\n 'subjectfq' => '',\n 'institutefq' => ''\n );\n\n\n $query = $queryBuilder->createSearchQuery($queryBuilderInput, $this->getLogger());\n\n $result = array();\n\n $searcher = new Opus_SolrSearch_Searcher();\n try {\n $result = $searcher->search($query);\n }\n catch (Opus_SolrSearch_Exception $ex) {\n var_dump($ex);\n }\n\n $matches = $result->getReturnedMatches();\n\n $this->view->total = $result->getAllMatchesCount();\n $this->view->matches = $matches;\n }",
"public function init() {\n\t\tparent::init();\n\n\t\t// use the search layout\n\t\t$this->setLayout('search');\n\n\t\t// load models\n\t\t$this->Search = new Search();\n\t\t$this->Location = new Location();\n\t\t$this->Category = new Category();\n\t\t$this->Ats_Job = new Ats_Job();\n\n // ajax context switching\n $this->_helper->ajaxContext()\n ->addActionContext('job', 'json')\n ->addActionContext('category', 'json')\n ->addActionContext('location', 'json')\n ->initContext();\n\t}",
"public function getSearch()\n {\n //load form\n $results=[];\n return view('search',['results'=>$results]);\n }",
"public function admin_search() {\n $url['action'] = 'index';\n \n // build a URL will all the search elements in it\n // the resulting URL will be\n // example.com/cake/posts/index/Search.keywords:mykeyword/Search.tag_id:3\n foreach ($this->data as $k=>$v){\n foreach ($v as $kk=>$vv){\n $url[$k.'.'.$kk]=$vv;\n }\n }\n \n // redirect the user to the url\n $this->redirect($url, null, true);\n }",
"public function search(Request $request)\n {\n // Retrieving models\n $site_infos = SiteInfo::first();\n $google_analytic = GoogleAnalytic::first();\n $breadcrumb = Breadcrumbs::first();\n $color_picker = ColorPicker::first();\n $social_media = Social::all();\n\n // Search\n $search = $request->get('search');\n\n $blogs = Blog::join(\"categories\",'categories.id', '=', 'blogs.category_id')\n ->where('categories.status',1)\n ->where('title', 'like', '%'.$search.'%')\n ->orderBy('blogs.id', 'desc')\n ->get();\n\n $other_sections = OtherSection::all();\n\n // For Section Enable/Disable\n foreach ($other_sections as $other_section) {\n $section_arr[$other_section->section] = $other_section->status;\n }\n\n return view('frontend.blog-page.search-index', compact ('site_infos', 'google_analytic', 'social_media',\n 'breadcrumb', 'color_picker', 'blogs', 'section_arr'));\n }",
"public function userSearch()\n {\n $query = $this->input->post('query');\n $data['results'] = $this->admin_m->search($query);\n $data['query'] = $query;\n $data['content'] = 'admin/searchResults';\n $this->load->view('components/template', $data);\n }",
"public function search()\n {\n $data['resultList'] = $this->ReviewModel->searchForReview($this->input->post('searchtxt'));\n $data['body'] = 'results';\n $this->load->view('template', $data);\n }",
"public function actionSearch()\n {\n $this->render(\"Search\");\n }",
"public function setSearchFieldsModel(\n\t\t\tModel_Table_SearchFields $searchFields) {\n\t\t$this->_searchFieldsModel = $searchFields;\n\t}",
"function fluid_edge_get_search() {\n fluid_edge_load_search_template();\n }",
"public function search(){\n //includes google maps script for place autocomplete and to get experiences\n \t$this->set('jsIncludes',array('http://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&language=fr&libraries=places','places_autocomplete','get_experiences','logo_fly','jquery.dropdown','cookies'));\n \n //sets motives, schools and departments by alphbetical order\n $this->__set_motives_schools_and_departments();\n }",
"public function search()\n\t{\n\t\t$keyword = $this->input->get('keyword');\n\t\t$data['books'] = $this->search_model->search($keyword);\n\t\t$data['keyword'] = $keyword;\n\t\t$this->load->view('search', $data);\n\t}",
"public function __construct(){\n parent::__construct();\n $this->load->model('M_search', 'ms');\n }",
"public function index()\n {\n $doctors = Doctor::all();\n $patients = Patient::all();\n \n return view('search.search',compact('doctors', 'patients'));\n }",
"public function getSearch(){\n\n return view('Recipes.search');\n }",
"public function searchAction()\n {\n $search = $this->createSearchObject();\n $result = $search->searchWord($this->view->word);\n $this->view->assign($result);\n\n if (Model_Query::$debug) {\n $this->view->actionTrace = [\n 'action' => sprintf('%s::searchWord()', get_class($search)),\n 'result' => $result,\n ];\n\n $this->view->queryTrace = Model_Query::$trace;\n }\n\n }",
"public function search()\n {\n\n if (Session::has('errors')) {\n $searchResults = null;\n $searchTerm = null;\n } else {\n $searchTerm = Input::old('searchTerm');\n $searchResults = $this->companyInfo();\n }\n\n $favoritesList = Auth::user()->favorites()->orderBy('company_name')->get();\n\n return view('pages.search')->with([\n 'favoritesList' => $favoritesList,\n 'searchTerm' => $searchTerm,\n 'searchResults' => $searchResults\n ]);\n\n }",
"public function actionSearch()\n\t{\n\t\t$model = new Image;\n\t\t$this->render('search', array('model'=>$model));\n\t}",
"public function search()\n\t{\n\n\t\t$searchQuery = $this->input->get('query');\n\n\t\t$data['sectionName'] = 'Search Result for ' . ucwords($searchQuery);\n\n\t\t//GET PARENT CATEGORY TITLE\n\t\t$data['categories'] = $this->category->getParentCategory();\n\t\t$data['searchQuery'] = $searchQuery;\n\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('templates/navbar', $data);\n\t\t$this->load->view('pages/home/search-result', $data);\n\t\t$this->load->view('pages/home/autoload-search');\n\t\t$this->load->view('templates/footer', $data);\n\t}",
"public function searchAction()\n\t{\n\t\t$userSession = new Container('fo_user');\n\t\t$this->layout('frontend');\n\t\t$request \t\t= $this->getRequest();\n\t\t$message\t\t= '';\n\t\t$errorMessage\t= '';\n\t\t\n\t\t//\tDestroy listing Session Vars\n\t\t$listingSession = new Container('fo_listing');\n\t\t$sessionArray\t= array();\n\t\tforeach($listingSession->getIterator() as $key => $value) {\n\t\t\t$sessionArray[]\t= $key;\n\t\t}\n\t\tforeach($sessionArray as $key => $value) {\n\t\t\t$listingSession->offsetUnset($value);\n\t\t}\n\t\t\n\t\tif ($request->isPost()) {\n\t\t\t$formData\t= $request->getPost();\n\t\t\tif(isset($formData['search']) && $formData['search'] != '')\n\t\t\t\t$listingSession->keyword\t= $formData['search'];\n\t\t\telse\n\t\t\t\t$listingSession->keyword\t= '';\n\t\t\t\n\t\t}\n\t\t\n\t\treturn new ViewModel(array(\n\t\t\t'userObject'\t=> $userSession->userSession,\n\t\t\t'message'\t\t=> $message,\n\t\t\t'errorMessage'\t=> $errorMessage,\n\t\t\t'action'\t\t=> $this->params('action'),\n\t\t\t'controller'\t=> $this->params('controller'),\n\t\t));\n }",
"public function action_search() {\n\t\t$productIds = explode('/', $this->request->param('id'));\n\t\t\n\t\t$products = ORM::factory('product')->where('product_id', 'in', $productIds)->find_all();\n\t\t\n\t\t$view = View::factory('product/search');\n\t\t$view->set('products', $products);\n\t\t$this->template->set('content', $view);\n\t}",
"public function actionSearch()\n {\n $search=new SiteSearchForm;\n\n if(isset($_POST['SiteSearchForm']))\n {\n $search->attributes=$_POST['SiteSearchForm'];\n $_GET['searchString']=$search->keyword;\n }\n else\n $search->keyword=$_GET['searchString'];\n\n if($search->validate())\n {\n\n $criteria=new CDbCriteria;\n $criteria->condition='status='.Post::STATUS_PUBLISHED.' AND t.publishTime<'.time();// MFM 1.1 migration Post to t.publishTime\n $criteria->order='createTime DESC';\n\n $criteria->condition.=' AND contentshort LIKE :keyword';\n $criteria->params=array(':keyword'=>'%'.CHtml::encode($search->keyword).'%');\n\n $postCount=Post::model()->count($criteria);\n $pages=new CPagination($postCount);\n $pages->pageSize=Yii::app()->params['postsPerPage'];\n $pages->applyLimit($criteria);\n\n $posts=Post::model()->findAll($criteria);\n }\n\n $this->pageTitle=Yii::t('lan','Search Results').' \"'.CHtml::encode($_GET['searchString']).'\"';\n $this->render('search',array(\n 'posts'=>($posts)?$posts:array(),\n 'pages'=>$pages,\n 'search'=>$search,\n ));\n }",
"public function search(Request $request)\n {\n $searchResults = (new Search())\n ->registerModel(Listing::class, 'name')\n ->perform($request->input('query'));\n\n return view('search', compact('searchResults'));\n }",
"public function store(Request $request)\n {\n $searchterm = $request->input('search');\n\n $searchResults = (new Search())->registerModel(User::class, 'name', 'primary_category', 'secondary_category', 'tertiary_category')->perform($searchterm);\n\n // dd($searchResults['attributes']);\n\n $message = 'Searched for';\n $user = Auth::User();\n $body = 'You ' .$message. ' ' . '\"'. $searchterm.'\"'. ' ' . 'Successfully';\n $title = 'Search Notification';\n $user->notify(new GeneralNotification($user, $body, $title));\n\n return view('dashboard.search', compact('searchterm', 'searchResults'));\n }",
"public function search()\n {\n $vereinRepository = new VereinRepository();\n $searchTerm = $_GET['searchTerm'];\n $view = new View('verein_index');\n $view->heading = 'Suchbegriff: '. $searchTerm;\n $view->title = 'Vereine';\n $view->vereine = $vereinRepository->search($searchTerm);\n\n $view->display();\n }",
"public function advanced_search_view() {\n\n $this->load->view('advanced_search');\n\n }",
"private function instantiate_search_page() {\n // Build the search_types_fields and search_types_label arrays out of post_types_defs\n $search_types_fields = array();\n $search_types_label = array();\n foreach ( $this->post_type_defs as $post_type ) {\n $search_types_fields[ $post_type[ 'slug' ] ] = $post_type[ 'fields' ];\n $search_types_label[ $post_type[ 'slug' ] ] = $post_type[ 'plural_name' ];\n }\n $this->search_page = new HRHS_Search( array(\n // Using the default slug and title for now\n 'search_types_fields' => $search_types_fields,\n 'search_types_label' => $search_types_label\n ) );\n }",
"public function index()\n {\n $input = ['services'=>[]];\n $categories = Category::with('services')->get();\n $suppliers = [];\n $types = Type::all();\n\n return view('search', compact('categories', 'input', 'suppliers', 'types'));\n }",
"public function show(Search $search)\n {\n //\n }",
"public function show(Search $search)\n {\n //\n }",
"public function show(Search $search)\n {\n //\n }",
"function setSearch(&$search)\n {\n $this->_search = $search;\n }",
"public function actionSearch()\n {\n }",
"public function search(Request $request): View\n {\n $activities = $this->activityRepository->getSearch($request->get('term')); \n return view('activities.index', compact('activities'));\n }",
"public function index()\n\t{\n $search_text = Input::has('search-text')? Input::get('search-text') : \"\";\n return $this->makeView('search.all', array('search_text' => $search_text))->render();\n\t}",
"public function setSearchTypesModel(\n\t\t\tModel_Table_SearchTypes $searchTypes) {\n\t\t$this->_searchTypesModel = $searchTypes;\n\t}",
"public function search() {\n$blogposts = BlogPost::search($_POST['search']);\n require_once('views/blogs/search.php');\n}",
"abstract protected function getSearchModelName(): string;",
"function voyage_mikado_get_search() {\n\n\t\tif(voyage_mikado_active_widget(false, false, 'mkd_search_opener')) {\n\n\t\t\t$search_type = voyage_mikado_options()->getOptionValue('search_type');\n\n\t\t\tvoyage_mikado_load_search_template();\n\n\t\t}\n\t}",
"public function getSearch(){\n\t\t$this->layout->content = View::make('search')->with('teetimes', Teetime::orderBy('date')->get());\n\t}",
"public function search(SearchRequest $request): View\n {\n if ($request->has('word')) {\n return view('pages.search', [\n 'result' => Item::getByTitleOrTypeName($request->word),\n 'word' => $request->word,\n ]);\n }\n return view('pages.search');\n }",
"public function showSearch()\n\t{\n\t\t$languages = WordLanguage::all();\n\t\t$types = WordType::all();\n\n\t\treturn view('search.index', compact('languages', 'types'));\n\t}",
"public function search(Request $request)\n {\n $query = $request->input('search');\n // Returns an array of articles that have the query string located somewhere within\n // our articles titles. Paginates them so we can break up lots of search results.\n $contacts = DB::table('contacts')->where('name', 'LIKE', '%' . $query . '%')->paginate(200);\n $contactsName=Contact::lists('name','id')->all();\n return view('admin.fields.search', ['contacts' => $contacts ,'contactsName' => $contactsName]);\n // returns a view and passes the view the list of articles and the original query.\n }",
"public function makeSearch() \n {\n $this->setSelect($this->qb);\n $this->setAssociations($this->qb);\n $this->setWhere($this->qb);\n $this->setOrderBy($this->qb);\n $this->setLimit($this->qb);\n\n return $this;\n }",
"public function searchForm()\n {\n $dimensionsOptions = $this->GoogleApi->getDimensionsOptions();\n $operatorOptions = $this->GoogleApi->getOperatorOptions();\n $this->set(\n compact(\n 'dimensionsOptions',\n 'operatorOptions'\n )\n );\n }",
"public function index()\n {\n return view('search');\n }",
"public function autocomplete_search() {\n\tif (!empty($this->request->query['term'])) {\n\t $model = Inflector::camelize(Inflector::singularize($this->request->params['controller']));\n\t $my_models = $this->$model->find('all', array(\n\t\t 'conditions' => array($model . '.name LIKE' => $this->request->query['term'] . '%'),\n\t\t 'limit' => 10,\n\t\t 'contain' => false,\n\t\t\t ));\n\t $json_array = array();\n\t foreach ($my_models as $my_model) {\n\t\t$json_array[] = $my_model[$model];\n\t }\n\t $json_str = json_encode($json_array);\n\t $this->autoRender = false;\n\t return $json_str;\n\t}\n }",
"public function __construct()\n {\n $this->config = config('fullsearch');\n\n $this->results = collect([]);\n\n $this->models = collect($this->config['models']);\n }",
"public function action_all()\n\t{\n $param = $this->request->param('param');\n $this->template->content = View::factory('search/searchallview');\n $this->template->content->search = $param;\n $this->template->header->search = $param;\n \n \n if(empty($param))\n {\n $photos['photos'] = '';\n $photos['count'] = '';\n $users['users'] = '';\n $users['count'] = '';\n }\n else\n {\n $photos = $this->search_photos($param, 0, 16);\n $users = $this->search_users($param, 0); \n\n $now = date(\"Y-m-d H:i:s\");\n \n //SAVE SEARCH TERM\n Model_Search::save_term($param, $now);\n }\n \n $this->template->content->photos = $photos['photos'];\n $this->template->content->count_photos = $photos['count'];\n $this->template->content->users = $users['users'];\n $this->template->content->count_users = $users['count'];\n\n \n \n\t}",
"public function searchResult()\n {\n //\n return view('searchForm.searchResult');\n }",
"public function onSearch()\n {\n // get the search form data\n $data = $this->form->getData();\n \n if ($this->formFilters)\n {\n foreach ($this->formFilters as $filterKey => $formFilter)\n {\n $operator = isset($this->operators[$filterKey]) ? $this->operators[$filterKey] : 'like';\n $filterField = isset($this->filterFields[$filterKey]) ? $this->filterFields[$filterKey] : $formFilter;\n $filterFunction = isset($this->filterTransformers[$filterKey]) ? $this->filterTransformers[$filterKey] : null;\n \n // check if the user has filled the form\n if (isset($data->{$formFilter}) AND $data->{$formFilter})\n {\n // $this->filterTransformers\n if ($filterFunction)\n {\n $fieldData = $filterFunction($data->{$formFilter});\n }\n else\n {\n $fieldData = $data->{$formFilter};\n }\n \n // creates a filter using what the user has typed\n if (stristr($operator, 'like'))\n {\n $filter = new TFilter($filterField, $operator, \"%{$fieldData}%\");\n }\n else\n {\n $filter = new TFilter($filterField, $operator, $fieldData);\n }\n \n // stores the filter in the session\n TSession::setValue($this->activeRecord.'_filter', $filter); // BC compatibility\n TSession::setValue($this->activeRecord.'_filter_'.$formFilter, $filter);\n TSession::setValue($this->activeRecord.'_'.$formFilter, $data->{$formFilter});\n }\n else\n {\n TSession::setValue($this->activeRecord.'_filter', NULL); // BC compatibility\n TSession::setValue($this->activeRecord.'_filter_'.$formFilter, NULL);\n TSession::setValue($this->activeRecord.'_'.$formFilter, '');\n }\n }\n }\n \n TSession::setValue($this->activeRecord.'_filter_data', $data);\n TSession::setValue(get_class($this).'_filter_data', $data);\n \n // fill the form with data again\n $this->form->setData($data);\n \n $param=array();\n $param['offset'] =0;\n $param['first_page']=1;\n $this->onReload($param);\n }",
"public function actionIndex($modelName = null) {\n if ($modelName) {\n $dataProvider = Business::loads($modelName, false, isset($_GET[$modelName]) ? array('compares' => $_GET[$modelName]) : array());\n $modelClass = new $modelName('search');\n if (isset($_GET[$modelName])) {\n $modelClass->attributes = $_GET[$modelName];\n }\n $renderFunction = isset($_GET['partial']) ?\n (intval($_GET['partial']) > 0 ? 'renderPartial' : 'render') : 'render';\n\n $this->$renderFunction('manage', array(\n 'modelName' => $modelName,\n 'modelClass' => $modelClass,\n 'dataProvider' => $dataProvider\n ));\n } else {\n $this->render('index');\n }\n }",
"public function search(SearchRequest $request)\n {\n $search = $request->search;\n $posts = $this->postRepository->search($this->nbrPages, $search)->appends(compact('search'));\n $info = __('Posts found with search: ') . '<strong>' . $search . '</strong>';\n\n return view('front.index', compact('posts', 'info'));\n }",
"public function index()\n\t{\n\t\treturn view('search');\n\t}",
"public function search(Request $request)\n {\n $search = $request->search;\n $published_product = DB::table('product')\n ->orwhere('manufacturer_id','like','%'.$search.'%')\n ->orwhere('product_description','like','%'.$search.'%')\n ->orwhere('product_price','like','%'.$search.'%')\n ->orderBy('product_id', 'desc')->get();\n $published_product_all = DB::table('product')\n ->orwhere('product_model','like','%'.$search.'%')\n ->orwhere('product_description','like','%'.$search.'%')\n ->orwhere('product_price','like','%'.$search.'%')\n ->orderBy('product_id', 'desc')->get();\n $home = view('front_End.pages.home')->with('published_product',$published_product)->with('published_product_all', $published_product_all);\n return view('front_End/master')->with('main_content', $home);\n \n }",
"public function search(Request $request){\n $constraints = [\n 'title' => $request['name']\n ];\n $types = $this->doSearchingQuery($constraints);\n\n return view('admin/type/index', ['type' => $types, 'searchingVals' => $constraints]);\n }",
"public function populateModels()\n {\n }",
"public function create()\n {\n return view('search.create');\n }",
"public function setModel($model)\n {\n $this->model = $model;\n $this->query['index'] = $this->model->getIndex();\n }",
"public function doSearch() {\n\t\t$data['posts'] = $this->Messages_model->searchMessages($this->input->get('query'));\n\t\t$this->load->view('view_viewmessages',$data);\n\t}",
"public function search() {\n\t\t$this->ApiClass = ClassRegistry::init('ApiGenerator.ApiClass');\n\t\t$conditions = array();\n\t\tif (isset($this->params['url']['query'])) {\n\t\t\t$query = $this->params['url']['query'];\n\t\t\t$conditions = array('ApiClass.search_index LIKE' => '%' . $query . '%');\n\t\t}\n\t\t$this->paginate['fields'] = array('DISTINCT ApiClass.name', 'ApiClass.search_index');\n\t\t$this->paginate['order'] = 'ApiClass.name ASC';\n\t\t$results = $this->paginate($this->ApiClass, $conditions);\n\t\t$classIndex = $this->ApiClass->getClassIndex();\n\t\t$this->helpers[] = 'Text';\n\t\t$this->set(compact('results', 'classIndex'));\n\t}",
"public function search(Request $request)\n {\n $this->validate($request, [\n 'title' => 'max:255',\n 'published' => 'in:true,false',\n 'date_from' => 'date',\n 'date_to' => 'date'\n ]);\n\n $results = Item::customSearch(\n $request->input('title'),\n $request->input('published'),\n $request->input('date_from'),\n $request->input('date_to')\n );\n\n return view('item.search', [\n 'results' => $results\n ]);\n }",
"public function action_search()\n\t{\n\t\tglobal $txt, $context;\n\n\t\t// What can we search for?\n\t\t$subActions = array(\n\t\t\t'internal' => array($this, 'action_search_internal', 'permission' => 'admin_forum'),\n\t\t\t'online' => array($this, 'action_search_doc', 'permission' => 'admin_forum'),\n\t\t\t'member' => array($this, 'action_search_member', 'permission' => 'admin_forum'),\n\t\t);\n\n\t\t// Set the subaction\n\t\t$action = new Action('admin_search');\n\t\t$subAction = $action->initialize($subActions, 'internal');\n\n\t\t// Keep track of what the admin wants in terms of advanced or not\n\t\tif (empty($context['admin_preferences']['sb']) || $context['admin_preferences']['sb'] != $subAction)\n\t\t{\n\t\t\t$context['admin_preferences']['sb'] = $subAction;\n\n\t\t\t// Update the preferences.\n\t\t\trequire_once(SUBSDIR . '/Admin.subs.php');\n\t\t\tupdateAdminPreferences();\n\t\t}\n\n\t\t// Setup for the template\n\t\t$context['search_type'] = $subAction;\n\t\t$context['search_term'] = $this->_req->getPost('search_term', 'trim|\\\\ElkArte\\\\Util::htmlspecialchars[ENT_QUOTES]');\n\t\t$context['sub_template'] = 'admin_search_results';\n\t\t$context['page_title'] = $txt['admin_search_results'];\n\n\t\t// You did remember to enter something to search for, otherwise its easy\n\t\tif ($context['search_term'] === '')\n\t\t{\n\t\t\t$context['search_results'] = array();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$action->dispatch($subAction);\n\t\t}\n\t}",
"public function actionHome() {\n $model = new AdvSearchForm;\n $review = new MakesReview;\n $results = '';\n\n if (isset($_POST['AdvSearchForm'])) {\n $query = '';\n\n // $model->attributes not working for some reason?\n $model->text = $_POST['AdvSearchForm']['text'];\n $model->textType = $_POST['AdvSearchForm']['textType'];\n $model->status = $_POST['AdvSearchForm']['status'];\n $model->creditBearing = $_POST['AdvSearchForm']['creditBearing'];\n $model->communityPartners = $_POST['AdvSearchForm']['communityPartners'];\n $model->issueAreas = $_POST['AdvSearchForm']['issueAreas'];\n\n $words = explode(' ', trim($model->text));\n\n if ($model->validate()) {\n\n // Get criteria from textbox and dropdown\n if (isset($model->text) && !empty($model->text) &&\n isset($model->textType) && !empty($model->textType)) {\n\n foreach ($words as $word) {\n // If they specify a name, we need to check first and last names\n switch ($model->textType) {\n case 'creatorName':\n $query .= '(user.first_name LIKE \"%' . $word . '%\" OR user.last_name LIKE \"%' . $word . '%\") AND ';\n break;\n case 'id':\n $query .= '(id=' . $word . ') OR ';\n break;\n }\n }\n } // end text\n // Searching by status\n if (isset($model->status) && !empty($model->status)) {\n if (substr($query, -4) == ' OR ') {\n $query = substr($query, 0, -5) . ' AND ';\n }\n $query .= '(';\n foreach ($model->status as $status) {\n $query .= 'status=' . $status . ' OR ';\n }\n $query = substr($query, 0, -4) . ') AND '; // strip extra 'OR'\n } // end searching by status\n // By community partner\n if (isset($model->communityPartners) && !empty($model->communityPartners)) {\n if (substr($query, -4) == ' OR ') {\n $query = substr($query, 0, -5) . ' AND ';\n }\n $query .= '(';\n\n foreach ($model->communityPartners as $cpID) {\n $query .= 'community_partner_fk=' . $cpID . ' OR ';\n }\n $query = substr($query, 0, -4) . ') AND ';\n }\n\n // By issue areas\n if (isset($model->issueAreas) && !empty($model->issueAreas)) {\n if (substr($query, -4) == ' OR ') {\n $query = substr($query, 0, -5) . ' AND ';\n }\n $query .= '(';\n\n foreach ($model->issueAreas as $area) {\n $query .= 'issues.issue_type_fk=' . $area . ' OR ';\n }\n $query = substr($query, 0, -4) . ') AND ';\n }\n\n\n if (!empty($query)) {\n\n // Remove extra AND/OR\n if (substr($query, -5) == ' AND ') {\n $query = substr($query, 0, -5);\n } elseif (substr($query, -4 == ' OR ')) {\n $query = substr($query, 0, -4);\n }\n\n var_dump($query);\n // Grab all the projects, along with the users and community_partners where the words apply\n $results = Project::model()->with('user', 'communityPartner', 'issues')->findAll(array(\n 'condition' => $query, // Return anything that matches the $query, like SELECT $query FROM..\n 'params' => array(':word' => '%' . $word . '%'))); // Bind our '$word' to the :word param (prevents SQL injection)\n }\n\n if (!empty($results)) {\n $this->render('results', array('results' => $results));\n } else {\n $this->render('home', array('model' => $model, 'results' => $results, 'review' => $review));\n }\n }\n }\n\n $this->render('home', array('model' => $model, 'review' => $review));\n }",
"public function search()\n {\n // General for all pages\n $GeneralWebmasterSections = WebmasterSection::where('status', '=', '1')->orderby('row_no', 'asc')->get();\n // General END\n $search_word = \"\";\n $active_tab = 0;\n return view('backEnd.search', compact(\"GeneralWebmasterSections\", \"search_word\", \"active_tab\"));\n }",
"public function googleSearch()\n {\n $search = new \\Hoor\\Search\\Google(get_search_query(), $this->getIndex());\n $this->data['search'] = $search;\n $this->data['results'] = $search->results;\n }",
"function search( $args )\n {\n\t\t//Load the browse_result subview to present search results\n\t\t$subview = array('browse_result');\n $this->view->add('subviews',$subview);\n\t\t\n\t\t//Set the term $searching as the users search parameters if set\n\t\tif(isset($_GET['item-search'])){\n\t\t\t$searching = $_GET['item-search'];\n\t\t\t\n\t\t\t// set the page_title for a search\n\t\t\t$this->view->add('page_title','Searching the Garage for : '. \n\t\t\t $_GET['item-search']);\n\t\t}else{\n\t\t\t$searching = null;\n\t\t}\n\t\t\n\t\t//If the user doesn't input anything, notify the view\n\t\tif($searching=='' || $searching==null || trim($searching)==''){\n\t\t\t$result=null;\n\t\t\t$this->view->add('result',$result);\n\t\t\t\n\t\t}else{\n\t\t\t// Add it to the view to display the users search terms back \n\t\t\t// to them\n\t\t\t$this->view->add('searching',$searching);\n\t\t\t\n\t\t\t\n /* ====================== \n * Get the listings model \n */\n $model = $this->app->model('listings');\n\t\t\t\t\t\n\t\t\t\n // get from settings, 10 as default\n $limit = $this->settings->get('per_page');\n $limit = ( $limit != null ) ? $limit : 10;\n\t\t\t// find if user has decided on some number already\n\t\t\tif( isset( $_SESSION['listings_per_page'] )){\n\t\t\t\t$limit = (int)$_SESSION['listings_per_page'];\n\t\t\t}\n\t\t\t\n\t\t\t// get the page number\n\t\t\t$page = 0;\n\t\t\t// convert to integer\n\t\t\tif( $args['page'] != null && is_numeric($args['page']) ){\n\t\t\t\t$page = ((int) $args['page'])-1;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//Produce the result of the search given the searching terms\n\t\t\t$result = $model->limit($limit)->page($page)->\n\t\t\t get_search( $searching );\n\t\t\t\n\t\t\t$count = $model->count_search($searching);\n\t\t\t// set up counts\n\t\t\t$paginate = array(\n\t\t\t\t'page_count' => ((int)ceil($count/$limit)),\n\t\t\t\t'this_page' => $page+1\n\t\t\t);\n\t\t\t\n\t\t\t// add page count\n\t\t\t$this->view->add('paginate',$paginate);\n\t\t\t\n\t\t\t// add teh page action to the view\n\t\t\t$this->view->add('page_action',\n\t\t\t\t$this->app->form_path('browse/search') );\n\t\t\t\n\t\t\t// add action extra\n\t\t\tif( isset($_GET['item-search']) ){\n\t\t\t\t$this->view->add('action_extra','?item-search='.\n\t\t\t\t\t$_GET['item-search']);\n\t\t\t}\n\t\t\t\n\t\t\t// add the result to the view\n\t\t\t$this->view->add('listing_results', $result);\n }\n\t\t\n }",
"function showSearchResult() {\t\t\t\t\t\n\t\t$this->setWhereArray();\n\t\t\n\t\tif(empty($_GET['order'])) {\n\t\t\t$order = \"size\";\n\t\t} else {\n\t\t\t$order = $_GET['order'];\n\t\t}\n\t\t\n\t\tif(empty($_GET['pageLimit'])) {\n\t\t\t$pl = 5;\n\t\t} else {\n\t\t\t$pl = $_GET['pageLimit'];\n\t\t}\n\t\t\n\t\tif(empty($_GET['page'])) {\n\t\t\t$currentPage = 0;\n\t\t\t$currentFinds = 1;\n\t\t} else {\n\t\t\t$currentPage = $_GET['page'];\n\t\t\t$currentFinds = (($currentPage - 1) * $pl) + 1;\n\t\t}\n\t\t\n\t\t$advsAll = \\App\\SearchModel::where($this->whereArray);\n\t\t$all = $advsAll->count();\n\t\t$advs=$advsAll->orderBy('Highlighted','desc')->orderBy($order,'desc')->paginate($pl);\n\t\t\n\t\t$currentFindsMax = $this->getCurrentMaxPage($all, $pl, $currentPage);\n\t\t\n\t\treturn view('search',['in'=>$advs, 'order'=>$order, 'pageLimit'=>$pl, 'finds'=>$all, 'cf'=>$currentFinds, 'cfm'=>$currentFindsMax, 'linkArray' => $this->linkArray]);\n\t}",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\n\t\t$criteria->compare('type_key',$this->type_key,true);\n\n\t\t$criteria->compare('type_name',$this->type_name,true);\n\n\t\t$criteria->compare('model',$this->model,true);\n\n\t\t$criteria->compare('status',$this->status,true);\n\t\t\n\t\t$criteria->compare('seo_title',$this->seo_title,true);\n\t\t\n\t\t$criteria->compare('seo_keywords',$this->seo_keywords,true);\n\t\t\n\t\t$criteria->compare('seo_description',$this->seo_description,true);\n\n\t\treturn new CActiveDataProvider('ModelType', array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n {\n $terms = \\Input::get('terms');\n\n if (Request::ajax()) {\n return Response::json($this->providerRepo->search($terms, 'ajax'));\n } else {\n $results = $this->providerRepo->search($terms);\n\n foreach ($results as $provider) {\n $this->providerFormat->formatData($provider);\n }\n\n return View::make('provider/search', compact('results', 'terms'));\n }\n }",
"public function actionSearch()\r\n\t{\r\n\t\r\n\t\t$this->layout='//layouts/column3';\r\n\t\t$tutorials =array();\r\n\t\t$courses= array();\r\n\t\t$search_string =(isset($_GET['search_string']))? $_GET['search_string'] : '' ;\r\n\t\t//$model=new ContactForm;\r\n\t\t//if(isset($_POST['search_string']) && strlen(trim($_POST['search_string'])) > 2 )\r\n\t//\t{\r\n\t\t\r\n\t\t\t$search_string = $_GET['search_string'];\r\n\t\t\t\r\n\t\t\t$words = explode(' ', $search_string);\r\n\t\t\t\t\r\n\t\t\t$result_set = Keyword::model()->findByPk(trim($search_string));\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$q = new CDbCriteria();\r\n\t\t\t$q->distinct=TRUE;\r\n\t\t\t$q->select='TUTORIAL_ID';\r\n\t\t\t\r\n\t\t foreach ($words as $word)\t\t\t\t\r\n\t\t \t\tif (strlen(trim($word)) > 2)\r\n\t\t\t\t\t$q->addSearchCondition('WORD', $word,true, 'OR');\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$tutorials = KeywordTutorial::model()->findAll( $q );\r\n\t\t\t\r\n\t\t\t\r\n\r\n\t\t\t\r\n\t//\t}else {\r\n\t\t\t\r\n\t\t\t//$this->render('search',array('model'=>null, 'kTutorials'=>new arr, 'courses'=>array(), 'search_string'=>(isset($_POST['search_string']))) ? $_POST['search_string'] : null);\r\n\t//\t}\r\n\t\t\r\n\t\t$this->promotionItems = SalePromotion::model()->findAllByAttributes(\r\n\t\t\t\tarray(),\r\n\t\t\t\t$condition = 'END_DATE >= :today AND START_DATE <= :today',\r\n\t\t\t\t$params = array(\r\n\t\t\t\t\t\t':today' => date('Y-m-d', time()),\r\n\t\t\t\t)\r\n\t\t);\r\n\t\t\r\n\t\t$this->render('search',array( 'kTutorials'=>$tutorials,'courses'=>$courses, 'search_string'=>$search_string));\r\n\t}",
"public function searchResult()\r\n {\r\n // Setting the page title\r\n $this->set(\"title_for_layout\",\"Search Results\");\r\n \r\n // Getting all the categories\r\n $categoryList = $this->Category->getCategoryList();\r\n \r\n // Passing the categories list to views\r\n $this->set('categoryList', $categoryList);\r\n \r\n // initialising the variable\r\n $whereCondition = '';\r\n $search_keyword = '';\r\n // if any search keyword then setting into variable.\r\n if (isset($this->data['Product']['keywords']) && !empty($this->data['Product']['keywords']))\r\n {\r\n $search_keyword = $this->data['Product']['keywords'];\r\n \r\n if(!empty($whereCondition))\r\n {\r\n $whereCondition .= \" AND \";\r\n }\r\n \r\n $whereCondition .= \" (Product.product_name LIKE '%\".$search_keyword.\"%') OR (Product.product_desc LIKE '%\".$search_keyword.\"%') \";\r\n }\r\n \r\n $conditions[] = $whereCondition;\r\n \r\n // Getting the products and categories list agianst search criteria\r\n $productList = $this->Product->getSearchResults($conditions);\r\n \r\n // Passing for first product images by default.\r\n $this->set('productList', $productList);\r\n \r\n // Passing the search keywords to views\r\n $this->set('search_keyword', $search_keyword);\r\n \r\n }",
"public function search()\n {\n $cats = Category::where('status',1)->get();\n $item = request()->input('search');\n $posts = Post::where('status', 1)->where('title', 'like', \"%$item%\")->orWhere('text', 'like', \"%$item%\")->get();\n return View('main.search', compact('cats', 'posts'));\n }",
"public function search(Request $request)\n {\n // the search function for getting a title based on query\n $key = trim($request->get('q'));\n $titles = Title::query()\n ->where('title', 'like', \"%{$key}%\")\n ->orderBy('created_at', 'desc')\n ->get(); //paginate(10)->onBothSides(1);\n\n\n //get the recent 5 titles\n $recent_titles = Title::query()\n ->orderBy('created_at', 'desc')\n ->take(5)\n ->get();\n\n return view('search', [\n 'key' => $key,\n 'titles' => $titles,\n 'recent_titles' => $recent_titles\n ]);\n }",
"public function searchQueryDataProvider() {}",
"public function createCorrespondingBookModelForSearch() {\n\t\t$searchModel = new Book('search');\n\t\t$searchModel->unsetAttributes();\n\t\t\n\t\t$searchInput = $this->searchInput;\n\t\t\n\t\tif ($searchInput==\"Suggestions\") {\n\t\t\t$searchModel->title = null;\n\t\t} else {\n\t\t\t$searchModel->title = $searchInput;\n\t\t}\n\t\treturn $searchModel;\n\t}",
"public function search(){\r\n\t\t//Test if the POST parameters exist. If they don't present the user with the\r\n\t\t//search controls/form\r\n\t\tif(!isset($_POST[\"search\"])){\r\n\t\t\t$this->template->display('search.html.php');\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//Get the recipe from the database\r\n\t\t$recipes = Recipe::search($_POST[\"search\"]);\r\n\t\t//If successful and the count is equal to one (as desired)\r\n\t\t//set the recipe object in the template to be displayed\r\n\t\t$this->template->recipes = $recipes;\r\n\t\r\n\t\t$this->template->display('results.html.php');\r\n\t}"
] | [
"0.62551945",
"0.62336403",
"0.60424507",
"0.602734",
"0.59295076",
"0.59258235",
"0.5893097",
"0.58594817",
"0.58351016",
"0.583279",
"0.5811594",
"0.5805097",
"0.57590914",
"0.56940675",
"0.56747675",
"0.5674385",
"0.5658238",
"0.5656741",
"0.5629124",
"0.56226504",
"0.5590096",
"0.55850476",
"0.558241",
"0.55702853",
"0.5561462",
"0.5554831",
"0.5554033",
"0.5541776",
"0.5534064",
"0.5531198",
"0.5530863",
"0.5522554",
"0.5517162",
"0.5509354",
"0.5500393",
"0.5496206",
"0.5496172",
"0.54850096",
"0.5483505",
"0.5477774",
"0.5450914",
"0.54495925",
"0.5443596",
"0.5439964",
"0.5429174",
"0.5424001",
"0.54184633",
"0.54024315",
"0.53996307",
"0.5398734",
"0.5393555",
"0.53916675",
"0.53906476",
"0.53906476",
"0.53906476",
"0.5381863",
"0.5373727",
"0.53728235",
"0.5370904",
"0.5362926",
"0.53617966",
"0.5361428",
"0.5355174",
"0.53499407",
"0.53489864",
"0.5345107",
"0.5344419",
"0.5337734",
"0.5330687",
"0.53298914",
"0.5327447",
"0.53241295",
"0.5322049",
"0.53214943",
"0.53171456",
"0.5315766",
"0.5307527",
"0.5302464",
"0.53005654",
"0.5299555",
"0.5292364",
"0.52852875",
"0.5281323",
"0.5275899",
"0.52689236",
"0.52593625",
"0.52590984",
"0.52517223",
"0.52471936",
"0.5246781",
"0.5242745",
"0.5237939",
"0.523792",
"0.52350897",
"0.5234319",
"0.5232126",
"0.5222284",
"0.52172613",
"0.5217207",
"0.5215949",
"0.5209973"
] | 0.0 | -1 |
Associate the delete view with it's model | public function drop(Course $course){
$this->authorize('drop', $course);
$registered_course = CourseUser::select('id')
->where('user_id', Auth::user()->id)
->where('course_id', $course->id);
$registered_course->delete();
return redirect('/coursemanager');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($model);",
"function delete()\n\t{\n\t\t$model = $this->getModel();\n\t\t$viewType\t= JFactory::getDocument()->getType();\n\t\t$view = $this->getView($this->view_item, $viewType);\n\t\t$view->setLayout('confirmdelete');\n\t\tif (!JError::isError($model)) {\n\t\t\t$view->setModel($model, true);\n\t\t}\n\t\t//used to load in the confirm form fields\n\t\t$view->setModel($this->getModel('list'));\n\t\t$view->display();\n\t}",
"public function delete(){\n\t $this->model->clear()->filter(array('preview_master_id' => WaxUrl::get(\"id\")))->delete();\n\t parent::delete();\n\t}",
"public function deleting($model)\n\t{\n\t}",
"public function deleteAction() {\n parent::deleteAction();\n }",
"public function delete(Identifiable $model);",
"public function deleteAction()\n {\n if ($this->isConfirmedItem($this->_('Delete %s'))) {\n $model = $this->getModel();\n $deleted = $model->delete();\n\n $this->addMessage(sprintf($this->_('%2$u %1$s deleted'), $this->getTopic($deleted), $deleted), 'success');\n $this->_reroute(array('action' => 'index'), true);\n }\n }",
"public function onRelationManageDelete()\n {\n $this->beforeAjax();\n\n /*\n * Multiple (has many, belongs to many)\n */\n if ($this->viewMode == 'multi') {\n if (($checkedIds = post('checked')) && is_array($checkedIds)) {\n foreach ($checkedIds as $relationId) {\n if (!$obj = $this->relationModel->find($relationId)) {\n continue;\n }\n\n $obj->delete();\n }\n }\n }\n /*\n * Single (belongs to, has one)\n */\n elseif ($this->viewMode == 'single') {\n $relatedModel = $this->viewModel;\n if ($relatedModel->exists) {\n $relatedModel->delete();\n }\n\n $this->viewWidget->setFormValues([]);\n $this->viewModel = $this->relationModel;\n }\n\n return $this->relationRefresh();\n }",
"protected function deleteAction()\n {\n }",
"public function delete()\n\t{\n\t\tJSession::checkToken() or JSession::checkToken('get') or jexit(JText::_('JINVALID_TOKEN'));\n\t\t$this->_result = $result = parent::delete();\n\t\t$model = $this->getModel();\n\n\t\t//Define the redirections\n\t\tswitch ($this->getLayout() . '.' . $this->getTask())\n\t\t{\n\t\t\tcase 'default.delete':\n\t\t\t\t$this->applyRedirection($result, array(\n\t\t\t\t\t'stay',\n\t\t\t\t\t'com_papiersdefamilles.reservations.default'\n\t\t\t\t), array(\n\t\t\t\t\t'cid[]' => null\n\t\t\t\t));\n\t\t\t\tbreak;\n\n\t\t\tcase 'modal.delete':\n\t\t\t\t$this->applyRedirection($result, array(\n\t\t\t\t\t'stay',\n\t\t\t\t\t'com_papiersdefamilles.reservations.default'\n\t\t\t\t), array(\n\t\t\t\t\t'cid[]' => null\n\t\t\t\t));\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$this->applyRedirection($result, array(\n\t\t\t\t\t'stay',\n\t\t\t\t\t'com_papiersdefamilles.reservations.default'\n\t\t\t\t));\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public function actionDelete() {}",
"public function actionDelete() {}",
"public function delete()\n {\n Contest::destroy($this->modelId);\n $this->modalConfirmDeleteVisible = false;\n $this->resetPage();\n }",
"public function deleteAction() {\n \n }",
"public function actionDelete()\n {\n if (!$this->isAdmin()) {\n $this->getApp()->action403();\n }\n\n $request = $this->getApp()->getRequest();\n $id = $request->paramsNamed()->get('id');\n $model = $this->findModel($id);\n if (!$model) {\n $this->getApp()->action404();\n }\n\n $model->delete();\n\n return $this->back();\n }",
"public function deleteAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif ($item) {\n\t\t\t$item->delete();\n\t\t}\n\t\t$this->_helper->redirector('list', null, null, array('model' => $modelName));\n\t}",
"public function delete(Model $model);",
"public function delete(Model $model);",
"public function delete(Model $parent);",
"public function deleteAction()\n {\n $this->deleteParameters = $this->deleteParameters + $this->_deleteExtraParameters;\n\n parent::deleteAction();\n }",
"public function deleteAction()\n {\n \n }",
"public function deleteAction()\n {\n }",
"public function actionDelete()\n {\n $id = Yii::$app->request->post('id');\n $this->findModel($id)->delete();\n }",
"protected function _postDelete() {}",
"protected function _postDelete() {}",
"public function deleteAction() {\n\t\t\t$this->_forward('index');\n\t\t}",
"protected function performDeleteOnModel()\n {\n $this->performCascadeDelete();\n parent::performDeleteOnModel();\n }",
"protected function performDeleteOnModel()\n {\n $this->getApi()->{'delete'.ucfirst($this->getEntity())}(\n $this->{$this->primaryKey},\n array_merge(...array_values($this->getGlobalScopes()))\n );\n\n $this->exists = false;\n }",
"public function deleteAction() {\n\t\t$this->_notImplemented();\n\t}",
"public function actionDelete()\r\n {\r\n $this->_userAutehntication();\r\n\r\n switch($_GET['model'])\r\n {\r\n /* Load the respective model */\r\n case 'posts': \r\n $model = Post::model()->findByPk($_GET['id']); \r\n break; \r\n default: \r\n $this->_sendResponse(501, sprintf('Error: Mode <b>delete</b> is not implemented for model <b>%s</b>',$_GET['model']) );\r\n exit; \r\n }\r\n /* Find the model */\r\n if(is_null($model)) {\r\n // Error : model not found\r\n $this->_sendResponse(400, sprintf(\"Error: Didn't find any model <b>%s</b> with ID <b>%s</b>.\",$_GET['model'], $_GET['id']) );\r\n }\r\n\r\n /* Delete the model */\r\n $response = $model->delete();\r\n if($response>0)\r\n $this->_sendResponse(200, sprintf(\"Model <b>%s</b> with ID <b>%s</b> has been deleted.\",$_GET['model'], $_GET['id']) );\r\n else\r\n $this->_sendResponse(500, sprintf(\"Error: Couldn't delete model <b>%s</b> with ID <b>%s</b>.\",$_GET['model'], $_GET['id']) );\r\n }",
"public function deletedModel(Model &$model)\n {\n }",
"public function actionDelete()\n\t{\n\t parent::actionDelete();\n\t\t$model=$this->loadModel($_POST['id']);\n\t\t $model->delete();\n\t\techo CJSON::encode(array(\n 'status'=>'success',\n 'div'=>'Data deleted'\n\t\t\t\t));\n Yii::app()->end();\n\t}",
"protected function performDeleteOnModel()\n {\n $this->newQuery()->delete($this->fileName);\n }",
"function call_delete() {\n parent::call_delete();\n }",
"protected function afterDelete()\n\t{\n\t\tparent::afterDelete();\n\t\tComment::model()->deleteAll( 'howto_id=' . $this->id );\n\t\tBookmark::model()->deleteAll( 'howto_id=' . $this->id );\n\t\tHowtoCategory::model()->deleteAll( 'howto_id=' . $this->id );\n \t\tSlide::model()->deleteAll( 'howto_id=' . $this->id );\n\t\tStep::model()->deleteAll( 'howto_id=' . $this->id );\n\t\tHowtoTag::model()->deleteAll( 'howto_id=' . $this->id );\n\t}",
"function delete($id) {\n // Pull the CO Person ID, we'll need it for the redirect\n $model = $this->modelClass;\n $coPersonId = $this->$model->field('co_person_id', array($this->modelClass.'.id' => $id));\n \n $this->setViewVars(null, $coPersonId);\n \n parent::delete($id);\n }",
"public function delete() {\n $this->remove_content();\n\n parent::delete();\n }",
"public function delete(Model $model)\n {\n }",
"public function undeleteAction(){\n\t}",
"public function action_delete()\n {\n\t $this->template = View::forge('template-admin');\n\n $post = Input::post();\n $entry = Model_Event::find_by_pk($post[\"id\"]);\n\t\tif ($entry){\n\t\t\tif(!$entry->delete()){\n\t\t\t\t$data[\"events\"] = Model_Event::find_all();\n\t\t\t\t$this->template->title = \"イベント一覧\";\n\t\t\t\t$this->template->content = View::forge('event/index', $data);\n\t\t\t}\n\t\t}\n\t\t$data[\"events\"] = Model_Event::find_all();\n\t\t$this->template->title = \"イベント一覧\";\n\t\t$this->template->content = View::forge('event/index', $data);\n }",
"public function delete(){\n\t\t\t\n\t\t/* set method */\n\t\t$this->request_method = 'delete';\n\t\t\t\t\n\t\t/* check for id */\n\t\tif( ! $this->id) {\n\t\t\t$this->set_error( 14, 'No model id in request, cant delete' );\n\t\t\treturn;\t\t\t\n\t\t}\n\t\t\n\t\t/* parse the data from backbone */\n\t\t$this->parse_model_request();\n\n\n\t\tif($this->get_errors())\n\t\t\treturn;\n\t\t\t\t\t\n\t\t/* access the parsed post data from request */\n\t\t$item_data = $this->parsed_model_request;\t\t\n\t\t \t\t\t \t\n\t\t/* delete from database */\n\t\tswitch( $this->properties->modelclass ) {\n\t\t\n\t\t\t/* posts */\n\t\t\tcase('post'):\n\t\t\tcase('attachment'):\n\t\t\t\t$post = $item_data['post'];\n\t\t\t\t\n\t\t\t\t/* privileg check */\n\t\t\t\tif( $this->properties->access == \"loggedin\" && ! current_user_can('delete_post', $this->id)) { \n\t\t\t\t\t$this->set_error( 15, 'no user privileges to delete the item on server' );\n\t\t\t\t\treturn;\n\t\t\t\t}\t\n\t\t\t\t$result = wp_delete_post($this->id);\n\t\t\t\t\n\t\t\t\t/* error checking while delete */\n\t\t\t\tif( ! $result) {\n\t\t\t\t\t$this->set_error( 16, 'deleting the item failed on the server' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* success, the id of the deleted post was returned */\n\t\t\t\t$deleted_id = $result->ID;\n\t\t\t\t\n\t\t\t\t/* setup a clean response */\n\t\t\t\t$this->parse_model_response($deleted_id);\t\n\t\t\tbreak;\n\t\t\t\n\t\t\t/* comment */\n\t\t\tcase('comment'):\n\t\t\t\t$comment = $item_data['comment'];\n\t\t\t\t/* @TODO better permission handling */\n\t\t\t\t\t$comment_in_db = get_comment( $this->id );\n\t\t\t\t\t$comment_author = $comment_in_db->user_id;\n\t\t\t\tif ( $this->properties->access == \"loggedin\" && $comment_author != $this->current_user->ID ) {\n\t\t\t\t\t$this->set_error( 17, 'This comment can only be deleted by the comment author :' . $comment_author );\n\t\t\t\t\treturn;\t\n\t\t\t\t}\n\t\t\t\t$result = wp_delete_comment($this->id);\n\t\t\t\t\n\t\t\t\t/* true is returned on success delete */\n\t\t\t\tif( ! $result) {\n\t\t\t\t\t$this->set_error( 17, 'deleting the comment failed on the server' );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t/* setup a clean response */\t\n\t\t\t\t$this->parse_model_response($result);\t\n\t\t\tbreak;\n\t\t\tcase('user'):\n\t\t\t//@TODO\n\t\t\tbreak;\n\t\t\tcase('idone'):\n\t\t\t\t$new_id = $this->id;\n\t\t\t\t$this->_action_custom_package_data( $new_id, $item_data);\t\t\t\t\t\n\t\t\t\t$this->parse_model_response($new_id);\t\t\t\n\t\t\tbreak;\n\t\t}\t\n do_action('bb-wp-api_after_upd', $updated_id, $this->properties, $this );\n\n\t}",
"public function delete(){\n $this->update(['deleted_by', Auth::user()->id]);\n return parent::delete();\n }",
"public function delete() { // Page::destroy($this->pages()->select('id')->get());\n $this->pages()->detach();\n parent::delete();\n }",
"public function deleted(Request $model)\n {\n $models = [\n 'engagement',\n 'address',\n ];\n\n foreach($models as $relation){\n $model->$relation()->delete();\n }\n }",
"public function actionDelete($order_id, $item_id, $shipping_id)\n{\n$this->findModel($order_id, $item_id, $shipping_id)->delete();\n\nreturn $this->redirect(['index']);\n}",
"public function delete() {\n\t\tif (!$this->_loaded) {\n\t\t\tthrow new Kohana_Exception('Cannot delete :model model because it is not loaded.', array(':model' => $this->_object_name));\n\t\t}\n\t\t\n\t\tif ($this->_call_behaviors('trigger_before_delete') & ORM_Behavior::CHAIN_RETURN) {\n\t\t\treturn $this;\n\t\t}\t\t\n\t\t\n\t\t$return = parent::delete();\n\t\t\n\t\t$this->_call_behaviors('trigger_after_delete');\n\t\t\t\n\t\treturn $return;\n\t}",
"public function actionDelete()\n {\n if ($post = Template::validateDeleteForm()) {\n $id = $post['id'];\n $this->findModel($id)->delete();\n }\n return $this->redirect(['index']);\n }",
"function delete() {\n\t\n\t\t$this->getMapper()->delete($this);\n\t\t\n\t}",
"public abstract function deleteModel(\\MPF\\Db\\Model $model);",
"public function deleteAction()\r\n\t{\r\n\t\t// check if we know what should be deleted\r\n\t\tif ($id = $this->getRequest()->getParam('faq_id')) {\r\n\t\t\ttry {\r\n\t\t\t\t\r\n\t\t\t\t// init model and delete\r\n\t\t\t\t$model = Mage::getModel('flagbit_faq/faq');\r\n\t\t\t\t$model->load($id);\r\n\t\t\t\t$model->delete();\r\n\t\t\t\t\r\n\t\t\t\t// display success message\r\n\t\t\t\tMage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('cms')->__('FAQ Entry was successfully deleted'));\r\n\t\t\t\t\r\n\t\t\t\t// go to grid\r\n\t\t\t\t$this->_redirect('*/*/');\r\n\t\t\t\treturn;\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\tcatch (Exception $e) {\r\n\t\t\t\t\r\n\t\t\t\t// display error message\r\n\t\t\t\tMage::getSingleton('adminhtml/session')->addError($e->getMessage());\r\n\t\t\t\t\r\n\t\t\t\t// go back to edit form\r\n\t\t\t\t$this->_redirect('*/*/edit', array (\r\n\t\t\t\t\t\t'faq_id' => $id ));\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// display error message\r\n\t\tMage::getSingleton('adminhtml/session')->addError(Mage::helper('cms')->__('Unable to find a FAQ entry to delete'));\r\n\t\t\r\n\t\t// go to grid\r\n\t\t$this->_redirect('*/*/');\r\n\t}",
"public function deleteAction() {\n\t\t// if($post->delete()) {\n\t\t// \tSession::message([\"Post <strong>$post->name</strong> deleted!\" , \"success\"]);\n\t\t// \tredirect_to('/posts/index');\n\t\t// } else {\n\t\t// \tSession::message([\"Error saving! \" . $error->get_errors() , \"success\"]);\n\t\t// }\n\t}",
"public function deleteDocument() {\n\n // should get instance of model and run delete-function\n\n // softdeletes-column is found inside database table\n\n return redirect('/home');\n }",
"public function actionDelete()\n {\n extract(Yii::$app->request->post());\n $this->findModel($list, $item)->delete();\n }",
"public function actionDelete()\n {\n return $this->findModel(Yii::$app->request->post('id'))->delete(false);\n }",
"private function actionListDelete() {\n $put_vars = $this->actionListPutConvert();\n $this->loadModel($put_vars['id'])->delete();\n }",
"protected function afterDelete()\r\n {\r\n }",
"public function actionDelete($id)\n { \n\t\t$model = $this->findModel($id); \n $model->isdel = 1;\n $model->save();\n //$model->delete(); //this will true delete\n \n return $this->redirect(['index']);\n }",
"public function delete()\n {\n if($this->contactable!=null)\n {\n $this->contactable->delete(); \n }else\n {\n parent::delete(); \n } \n }",
"public function handle($model, View $view)\n {\n if (is_array($model)) {\n Deed::whereIn('id', $model)\n ->update(['deleted_by' => auth()->user()->id]);\n Deed::destroy($model);\n } else {\n $model->update(['deleted_by' => auth()->user()->id]);\n $model->delete();\n }\n $this->view->emit('deedDeleted');\n $this->view->dispatchBrowserEvent('alert-emit', [\n 'alert' => 'success',\n 'message' => 'Acte(s) supprimé(s)!'\n ]);\n }",
"function removeads() //\n\t{\n\t\tif ($model = $this->getModel('editads'))\n\t\t{\n\t\t\t//Push the model into the view (as default)\n\t\t\t//Second parameter indicates that it is the default model for the view\n\t\t\t$model->removeads();\n\t\t}\n\t}",
"public function actionDelete()\n {\n if(isset($_POST['id'])){\n $id = $_POST['id'];\n $this->findModel($id)->delete();\n echo \"success\";\n }\n }",
"public function actionDelete() {\n// print_r($_POST);\n Comment::model()->findByPk($_POST['id'])->delete();\n echo CJSON::encode(array(\"data\" => 'berhasil'));\n// $this->loadModel($_POST['id'])->delete();\n // if AJAX request (triggered by deletion via dashboard grid view), we should not redirect the browser\n// if (!isset($_GET['ajax']))\n// $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('dashboard'));\n }",
"public function destroyAction() {\n $model = new Application_Model_Compromisso();\n //mando para a model o id de quem sera excluido\n $model->delete($this->_getParam('id'));\n //redireciono\n $this->_redirect('compromisso/index');\n }",
"public function delete()\n {\n $post['id'] = $this->request->getParameter('id'); // récupérer le paramètre de l'ID\n $this->post->deletePost($post['id']);\n $this->redirect(\"admin\", \"chapters\"); // une fois le post supprimé, je redirige vers la vue chapters\n }",
"public function deleteAction() : object\n {\n $page = $this->di->get(\"page\");\n $form = new DeleteForm($this->di);\n $form->check();\n\n $page->add(\"questions/crud/delete\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Delete an item\",\n ]);\n }",
"protected function afterDelete()\n {\n }",
"protected function delete() {\n\t}",
"public function delete()\n {\n try {\n parent::delete(null, $this->data['id']);\n } catch (Exception $e) {\n die('ERROR');\n }\n }",
"public function action_delete() {\n $elect_id = $this->request->query('elect_id');\n $res = Model::factory('Elect')->delete($elect_id);\n if(!$res) exit('error action_delete');\n $this->redirect('/'); \n }",
"protected function afterDelete()\n {\n parent::afterDelete();\n self::extraAfterDelete($this);\n \n\t\t\t\n\t\t//Implements to delete The Term Relation Ship\t\t\n }",
"public function deleteAction() {\n $post_data = $request = $this->getRequest()->getPost();\n\n $mapper = new Application_Model_DistractionMapper();\n $anzDeletedRows = $mapper->delete($post_data['id']);\n\n $this->view->success = ($anzDeletedRows > 0);\n }",
"public function deleteAction() {\n\t\tif(!isset($this->params['cancel'])) {\n\n\t\t\t// XXX: Maybe do some hook call validation here?\n\n\t\t\t// auto call the hooks for this module/action\n\t\t\tAPI::callHooks(self::$module, $this->action, 'controller', $this);\n\n\t\t\t// delete an entry\n\t\t\t$host = $this->_model->delete();\n\t\t}\n\t\tAPI::redirect(API::printUrl($this->_redirect));\n\t}",
"public function deleting()\n {\n # code...\n }",
"public function actionDelete()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t\n\t\t\n\t\t$this->checkUser();\n\t\t$this->checkActivation();\n\t//\t$model = new Estate;\n\t\t\n\t\tif($model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$model=Estate::model()->findbyPk($_GET['id']);\n\t\t\tif($model===null)\n\t\t\t\tthrow new CHttpException(404, Yii::t('app', 'The requested page does not exist.'));\n\t\t}\n\t\t\n\t\tEstateImage::deleteAllImages($model->id);\t\n\t\t@unlink(dirname(Yii::app()->request->scriptFile).$model->tour);\n\t\t@unlink(dirname(Yii::app()->request->scriptFile).$model->image);\n\t\t\n\t\t$model->delete();\n\t\t\n\t\t\n\t\tModeratorLogHelper::AddToLog('deleted-estate-'.$model->id,'Удален объект #'.$model->id.' '.$model->title,null,$model->user_id);\n\t\t$this->redirect('/cabinet/index');\n\t\t\n\t}",
"public function postDeleteconfirm(Request $request)\n {\n if( ! $request->ajax()) response()->json('error', 400);\n\n $id = $request->input('id');\n $model = $this->repo->showById($id);\n\n if ( ! $model)\n {\n $message = pick_trans('exception.not_found', ['id' => $id]);\n\n return message()->json(404, $message);\n }\n\n $result['title'] = Transformer::title($model);\n $result['subject'] = pick_trans('confirm_deleted');\n\n return message()->json(200, '', $result);\n }",
"public function delete() {\n\t\t$this->deleted = true;\n\t}",
"public function doDeleteAction()\n {\n $chapId = Zend_Auth::getInstance()->getIdentity()->id; \n //get id of the menu to be deleted from the view\n $chapMenuId = trim($this->_request->id);\n $menuDeleteModel = new Pbo_Model_WlMenuItems();\n //pass the chap ID and the menu id of the menu to be deleted to the model\n $menuDeleteModel->deleteMenu($chapId, $chapMenuId);\n\n //message when the menu is deleted\n $this->_helper->flashMessenger->addMessage('Menu item successfully deleted.');\n\n \n $this->_redirect( '/menu' );\n\n }",
"public function delete() {\r\n\t\t$this->getMapper()->delete($this);\r\n\t}",
"public function postDelete($model) {\r\n\r\n\t\t// Declare the rules for the form validation\r\n $rules = array(\r\n 'id' => 'required|integer'\r\n );\r\n\r\n // Validate the inputs\r\n $validator = Validator::make(Input::All(), $rules);\r\n\r\n // Check if the form validates with success\r\n if ($validator->passes())\r\n {\r\n $id = $model->id;\r\n $model->delete();\r\n\r\n $file_path = public_path().'/uploads/'.$model->filename;\r\n $file_ok = true;\r\n if(File::exists($file_path))\r\n {\r\n $file_ok = false;\r\n File::delete($file_path);\r\n if(!File::exists($file_path)){\r\n $file_ok = true;\r\n }\r\n }\r\n\r\n // Was the blog post deleted?\r\n $Model = $this->modelName;\r\n $model = $Model::find($id);\r\n if(empty($model) && $file_ok)\r\n {\r\n // Redirect to the blog posts management page\r\n return Response::json([\r\n \t'success'\t=> 'success',\r\n \t'reload'\t=> true\r\n ]);\r\n }\r\n }\r\n // There was a problem deleting the blog post\r\n return Response::json([\r\n \t'error'\t=> 'error',\r\n \t'reload'\t=> false\r\n\t\t]);\r\n }",
"public function actionDelete($id) {\n\t\t$model = $this->loadModel($id);\n\t\t$model->is_deleted = 1;\n\t\t$model->save();\n\t\t\n\t\t$this->redirect(array(\"/\".$model->type));\n\t}",
"public function actionDelete($id){\n if(Yii::app()->request->isPostRequest)\n {\n $model = $this->loadModel($id);\n $model->induction_flag=1;\n\t\t\t$model->save(false);\n\t\t}\n }",
"public function deleteAction()\n {\n $request = $this->getRequest();\n if($request->isPost()){\n $id = $this->params()->fromPost('id');\n $combo = $this->modelCombo->findOneBy(array('id'=>$id));\n $combo->setIsdelete(1);\n $this->modelCombo->edit($combo);\n //$this->model->delete(array('id'=>$id));\n echo 1;\n }\n die;\n\n }",
"public function onRelationManageRemove()\n {\n $this->beforeAjax();\n\n $recordId = post('record_id');\n $sessionKey = $this->deferredBinding ? $this->relationGetSessionKey() : null;\n $relatedModel = $this->relationModel;\n\n /*\n * Remove\n */\n if ($this->viewMode == 'multi') {\n\n $checkedIds = $recordId ? [$recordId] : post('checked');\n\n if (is_array($checkedIds)) {\n $foreignKeyName = $relatedModel->getKeyName();\n\n $models = $relatedModel->whereIn($foreignKeyName, $checkedIds)->get();\n foreach ($models as $model) {\n $this->relationObject->remove($model, $sessionKey);\n }\n }\n }\n /*\n * Unlink\n */\n elseif ($this->viewMode == 'single') {\n if ($this->relationType == 'belongsTo') {\n $this->relationObject->dissociate();\n $this->relationObject->getParent()->save();\n }\n elseif ($this->relationType == 'hasOne' || $this->relationType == 'morphOne') {\n if ($obj = $relatedModel->find($recordId)) {\n $this->relationObject->remove($obj, $sessionKey);\n }\n elseif ($this->viewModel->exists) {\n $this->relationObject->remove($this->viewModel, $sessionKey);\n }\n }\n\n $this->viewWidget->setFormValues([]);\n }\n\n return $this->relationRefresh();\n }",
"public function action_Delete()\n\t{\n\t\t// load item\n\t\t$item = ORM::factory('Ticket', $this->request->param('id'));\n\n\t\tif ( ! $item->loaded())\n\t\t\t$this->not_found('Could not find ticket to delete. Already deleted maybe?');\n\n\t\t$item->deleted_at = date('Y-m-d H:i:s');\n\t\t$item->save();\n\n\t\tHTTP::redirect('Ticket');\n\t}",
"public abstract function delete($model, $useTransaction);",
"public function delete()\n {\n $this->_validateModifiable();\n\n $this->_getDataSource()->delete($this);\n }",
"public function delete() {\n return $this->getActionByName('Delete');\n }",
"public function actionDelete() {\n\t\tif (isset($_POST) && $_POST['isAjaxRequest'] == 1) {\n\t\t\t$response = array('status' => '1');\n\t\t\t$model = $this->loadModel($_POST['id']);\n\t\t\t$model->is_deleted = 1;\n\t\t\tif ($model->save()) {\n\t\t\t\techo CJSON::encode($response);\n\t\t\t} else {\n\t\t\t\t$response = array('status' => '0', 'error' => $model->getErrors());\n\t\t\t\techo CJSON::encode($response);\n\t\t\t}\n\t\t}\n\t}",
"protected function _delete()\r\n {\r\n parent::_delete();\r\n }",
"public function deleteAction()\n {\n $entity = \\Zend_Registry::get('doctrine')->getEntityManager()->getRepository('\\ZF\\Entities\\News');\n $relation = \\Zend_Registry::get('doctrine')->getEntityManager()->getRepository('\\ZF\\Entities\\NewsTagRel');\n return parent::delete($entity, $relation);\n }",
"public function actionDelete()\n {\n $id = Yii::$app->request->post('id');\n try {\n $this->findModel($id)->delete();\n } catch (StaleObjectException $e) {\n } catch (NotFoundHttpException $e) {\n } catch (\\Throwable $e) {\n }\n\n return $this->redirect(['index']);\n }",
"public function afterDelete() {\n $this->deleteMeta();\n parent::afterDelete();\n }",
"public function deletereview()\n\n {\n $id = Input::get('id');\n Review::find(Input::get('id'))->delete();\n\n Vote::where('review_id',$id)->delete();\n\n return \"Your Review is successfully deleted\"; \n }",
"public function deleted(MActivityRule $model)\n\t{\n\t}",
"public function deleteAction() {\n\n //GET POST SUBJECT\n $post = Engine_Api::_()->core()->getSubject('sitereview_post');\n\n //GET LISTING SUBJECT\n $sitereview = $post->getParent('sitereview_listing');\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\n if (!$sitereview->isOwner($viewer) && !$post->isOwner($viewer)) {\n return $this->_helper->requireAuth->forward();\n }\n\n //AUTHORIZATION CHECK\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, null, \"view_listtype_$sitereview->listingtype_id\")->isValid())\n return;\n\n //MAKE FORM\n $this->view->form = $form = new Sitereview_Form_Post_Delete();\n\n //CHECK METHOD\n if (!$this->getRequest()->isPost()) {\n return;\n }\n\n //FORM VALIDATION\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n\n //PROCESS\n $table = Engine_Api::_()->getDbTable('posts', 'sitereview');\n $db = $table->getAdapter();\n $db->beginTransaction();\n $topic_id = $post->topic_id;\n try {\n $post->delete();\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n //GET TOPIC\n $topic = Engine_Api::_()->getItem('sitereview_topic', $topic_id);\n\n $href = ( null == $topic ? $sitereview->getHref() : $topic->getHref() );\n return $this->_forwardCustom('success', 'utility', 'core', array(\n 'closeSmoothbox' => true,\n 'parentRedirect' => $href,\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Post deleted.')),\n ));\n }",
"public function getModalDelete($id = null)\n {\n $error = '';\n $model = '';\n $confirm_route = route('personas.delete',['id'=>$id]);\n return View('admin.layouts/modal_confirmation', compact('error','model', 'confirm_route'));\n\n }",
"public function deleteAction()\n {\n $id=$this->_request->getParam(\"id\");\n if(!empty($id)){\n // Get object from Requests model\n $request_model=new Application_Model_Requests();\n // Calling delete function to delete request by id\n $request_model->deleteRequest($id);\n }\n // Redirct to list Request\n $this->redirect(\"Requests/list\");\n }",
"protected function _postDelete()\n\t{\n\t}",
"public function actionDelete($id) {\n $model_main = $this->findModel($id);\n $storage = $this->getProcessModel();\n $relatedModels = $storage->getRelatedModels($model_main);\n foreach ($relatedModels as $key => $model) {\n $model->del_status = '1';\n $model->save(false);\n }\n return $this->redirect(['index']);\n }",
"public function forceDeleted($model)\n {\n $this->deleted($model);\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }"
] | [
"0.70211107",
"0.6999425",
"0.6959485",
"0.68420583",
"0.6825577",
"0.6812416",
"0.6792511",
"0.67657197",
"0.6751041",
"0.67259204",
"0.67145157",
"0.67145157",
"0.6711377",
"0.67090327",
"0.66716653",
"0.6587199",
"0.6546981",
"0.6546981",
"0.6535852",
"0.65297794",
"0.6511107",
"0.65091676",
"0.6481217",
"0.6455864",
"0.64553607",
"0.6437339",
"0.6406813",
"0.6404991",
"0.63050014",
"0.62925303",
"0.6281369",
"0.627561",
"0.6270084",
"0.62678635",
"0.62380314",
"0.6231218",
"0.6230104",
"0.6221457",
"0.6211969",
"0.61911345",
"0.6181611",
"0.61814785",
"0.6175455",
"0.6167114",
"0.61655986",
"0.6145726",
"0.61446494",
"0.613774",
"0.6122707",
"0.61207634",
"0.6118405",
"0.6114294",
"0.61062366",
"0.6097882",
"0.6087758",
"0.60784775",
"0.6064787",
"0.6064008",
"0.60590893",
"0.605487",
"0.60540915",
"0.60376686",
"0.6035825",
"0.60290855",
"0.6024461",
"0.6023161",
"0.6019659",
"0.6018298",
"0.60149664",
"0.6009358",
"0.60091305",
"0.6002183",
"0.5995521",
"0.598863",
"0.59847",
"0.59805244",
"0.59747845",
"0.5974302",
"0.5961459",
"0.59609985",
"0.59555763",
"0.59492266",
"0.5947049",
"0.59401476",
"0.593926",
"0.593844",
"0.59355855",
"0.59323776",
"0.5923323",
"0.5918049",
"0.59155875",
"0.5914789",
"0.5908058",
"0.59027475",
"0.5900933",
"0.58974546",
"0.58973634",
"0.58948165",
"0.588979",
"0.588704",
"0.5886953"
] | 0.0 | -1 |
Associate the add view with it's model | public function add(Course $course){
$enrollment_course = CourseUser::firstOrCreate([
'user_id' => Auth::user()->id,
'course_id' => $course->id,
]);
return redirect('/coursemanager');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addAction() {\n\t\t$this->_forward('edit', null, null, array('id' => 0, 'model' => $this->_getParam('model')));\n\t}",
"public function addAction() {\n\t\t$this->assign('models', $this->models);\n\t\t$this->assign('types', $this->types);\n\t}",
"public function actionAdd() {\n $this->setView('edit');\n }",
"function addModel(){\n\t\n\t}",
"public function add()\n {\n //renderView('add');\n }",
"public function add() {\r\n\t\t$model = $this->getModel('languages');\r\n\t\t$model->add();\r\n\t\t\r\n\t\t$this->view = $this->getView(\"languages\");\r\n\t\t$this->view->setModel($model, true);\r\n\t\t$this->view->display();\r\n\t}",
"protected function add(){\n\t\tif(!isset($_SESSION['is_logged_in'])){\n\t\t\theader('Location: '.ROOT_URL. 'pages/1');\n\t\t}\n\t\t$viewmodel = new ShareModel();\n\n\t\t$this->returnView($viewmodel->add(), true);\n\t}",
"public function addAction()\n {\n $manager = $this->getDI()->get('core_category_manager');\n $this->view->form = $manager->getForm();\n }",
"public function addAction()\n {\n $form = $this->getForm('create');\n $entity = new Entity\\CourtClosing();\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n $view = new ViewModel();\n $view->form = $form;\n\n return $view;\n }",
"public function add(){\n $this->edit();\n }",
"public function addAction()\n {\n// $m = $this->baseView('view',['lside','passportAdmin'],['lside'=>['list' => $this->names,'base' => ''],'cont' => ['fsd']]);\n// $p = $cr->render($m,[]);\n $p = $this->add($this->model);\n return $this->baseView('view',['admin/lside','passport/admin/add'],['lside'=>['list' => $this->names,'base' => ''],'cont' => $p]);\n }",
"public function add() {\r\n $this->api->loadView('contact-form',\r\n array(\r\n 'row' => $this->model\r\n ));\r\n }",
"public function add()\n\t{\n\t\t$this->template('crud/add');\t\n\t}",
"public function addAction()\n {\n $isSubmitted = $this->params()->fromPost('submitted', \n null);\n $model = new \\Application\\Model\\BlogPost();\n if($isSubmitted){\n $date = $this->params()->fromPost(\"date\");\n $date = new \\DateTime($date);\n $date = $date->format('Y-m-d');\n //add a new blog entry\n $model ->setBody($this->params()->fromPost('body'))\n ->setCreatedBy(\"Alana Thomas\")\n ->setDate($date)\n ->setTitle($this->params()->fromPost('title'))\n ->setTags($this->params()->fromPost('tags'));\n $model = $this->getServiceLocator()->get(\"Application\\Service\\BlogPost\")->insert($model);\n //redirect the user here\n return $this->redirect()->toRoute('blog-post');\n }\n $view = $this->acceptableViewModelSelector($this->acceptCriteria);\n $view->setVariables(array(\n 'model' => $model\n ));\n return $view;\n }",
"public function actionAdd() {\n $id = isset($_GET['id']) ? $_GET['id'] : '';\n if ($id) {\n $model = ArticlesModel::model()->findByPk($id);\n } else {\n $model = new ArticlesModel;\n }\n if (isset($_POST['ArticlesModel'])) {\n $model->attributes = $_POST['ArticlesModel'];\n\n if ($model->validate()) {\n $model->save();\n if ($id) {\n $this->redirect(array('articles/add'));\n } else {\n $this->refresh();\n }\n }\n }\n\n $criteria = new CDbCriteria(array(\n 'condition' => '',\n 'order' => 'id DESC',\n ));\n $dataProvider = new CActiveDataProvider('ArticlesModel', array(\n 'pagination' => array(\n 'pageSize' => 40,\n ),\n 'criteria' => $criteria,\n ));\n\n $this->render('admin/add', array('model' => $model, 'dataProvider' => $dataProvider));\n }",
"public function add()\n\t{\n\t\t$fake_id = $this->_get_id_cur();\n\t\t$form = array();\n\t\t$form['view'] = 'form';\n\t\t$form['validation']['params'] = $this->_get_params();\n\t\t$form['submit'] = function()use ($fake_id)\n\t\t{\n\t\t\t$data = $this->_get_inputs();\n\t\t\t$data['sort_order'] = $this->_model()->get_total() + 1;\n\t\t\t$id = 0;\n\t\t\t$this->_model()->create($data,$id);\n\t\t\t// Cap nhat lai table_id table file\n\t\t\tmodel('file')->update_table_id_of_mod($this->_get_mod(), $fake_id, $id);\n\t\t\tfake_id_del($this->_get_mod());\n\n\t\t\tset_message(lang('notice_add_success'));\n\t\t\t\n\t\t\treturn admin_url($this->_get_mod());\n\t\t};\n\t\t$form['form'] = function() use ($fake_id)\n\t\t{\n\t\t\t$this->_create_view_data($fake_id);\n\n\t\t\t$this->_display('form');\n\t\t};\n\t\t$this->_form($form);\n\t}",
"public function add_record()\n {\n $data['main_content'] = $this->type.'/'.$this->viewname.'/add';\n\t $this->load->view($this->type.'/assets/template',$data);\n }",
"public function addView()\n {\n $translate = $this->getTranslate('MoldAddView');\n $this->setParam('translate', $translate);\n\n $moldModel = new moldModel();\n $patternSizeList = $moldModel->getPatternSizeList();\n $this->setParam('patternSizeList', $patternSizeList);\n\n $statusList = $moldModel->getStatusList();\n $this->setParam('statusList', $statusList);\n\n $codeModel = new codeModel();\n $moldRefSpecs = $codeModel->getRefSpecsPossible('V1');\n $this->setParam('refSpecs', $moldRefSpecs);\n\n // traduction des statuts\n $translateStatusList = $this->getTranslate('Status_List');\n $this->setParam('translateStatusList', $translateStatusList);\n\n $locationTypeList = $moldModel->getLocationTypeList();\n $this->setParam('locationTypeList', $locationTypeList);\n\n // traduction des localisations\n $translateLocationTypeList = $this->getTranslate('Location_List');\n $this->setParam('translateLocationTypeList', $translateLocationTypeList);\n\n\n // Récupération de la liste des données avec leurs descriptions\n $dataModel = new dataModel();\n\n $dataList = $dataModel->getDataList('Mold_App');\n $this->setParam('dataList', $dataList);\n\n $dataCategoryList = $dataModel->getDataCategoryListUser('Mold_App');\n $this->setParam('dataCategoryList', $dataCategoryList);\n\n // traduction des données et des catégories\n $translateData = $this->getTranslate('Data_List');\n $this->setParam('translateData', $translateData);\n $translateDataCategory = $this->getTranslate('Data_Category_List');\n $this->setParam('translateDataCategory', $translateDataCategory);\n\n\n $this->setParam('titlePage', $this->getVerifyTranslate($translate, 'pageTitle'));\n $this->setView('moldAdd');\n $this->setApp('Mold_App');\n\n\n // Vérification des droits utilisateurs\n if (frontController::haveRight('add', 'Mold_App'))\n $this->showView();\n else\n header('Location: /mold');\n }",
"public function add(){\n $article = ArticleFormValidation::getData();\n $add = null;\n \n if(!is_null($article)){\n $add = $this->model->add($article);\n }\n if($add){\n $msg = \"Article successfully added\";\n }else{\n $err = \"Error adding article\";\n }\n include 'views/article-form.php';\n }",
"public function actionAdd()\n\t{\n\t\t$this->render('add');\n\t}",
"public function actionCreate()\n {\n $this->setModelByConditions();\n\n if (Yii::$app->request->isPost &&\n $this->model->load(Yii::$app->request->post()) &&\n $this->setAdditionAttributes() &&\n $this->model->save()) {\n\n if ($this->viewCreated) {\n $redirectParams = [\n $this->urlPrefix.'view',\n 'id' => $this->model->getId(),\n ];\n } else {\n $redirectParams = [\n $this->urlPrefix.'index',\n ];\n }\n\n return $this->redirect($redirectParams);\n }\n\n return $this->render('create',\n ArrayHelper::merge(\n [\n 'model' => $this->model,\n ],\n $this->getAdditionFields()\n )\n );\n }",
"public function add() {\n\n $this->set('add', true);\n\n if($this->request->is('post')){\n\n $result = $this->Task->save($this->request->data);\n if($result){\n $this->_setFlash('Task added successfully.', 'success');\n $this->redirect('/tasks');\n }\n else {\n $valError = $this->Task->validationErrorsAsString();\n $this->_setFlash(\"Unable to save this task. ${valError}\");\n }\n }\n\n $this->render('add-edit');\n }",
"public function getAdd()\n\t{\n\t $form = \\FormBuilder::create($this->form, [\n 'method' => 'POST',\n 'model' => $this->getModelInstance(),\n 'url' => ($this->url_prefix.'/add')\n ]);\n return view($this->tpl_prefix.'add',array('catalog'=>$this), compact('form'));\n\t}",
"public function add(){\n\t\t\t\n\t\t\trequire_once('views/category/add.php');\n\t\t}",
"public function actionAdd(){\r\n \r\n }",
"public function add()\n {\n // if we have POST data to create a new customer entry. If button 'submit_add_customer' in view customers/index has clicked\n if (isset($_POST['submit_add_vendedor'])) {\n // Instance new Model (Customers)\n $Vendedor = new VendedoresModel();\n // do add() in model/Customer.php\n $Vendedor->add($_POST['nome'], $_POST['email']);\n\t // where to go after Customer has been added\n\t header('location: ' . URL . 'vendedores/index');\t\n }\n\n // load views. within the views we can echo out $customer easily\n\t\t$view = new VendedoresView();\n\t\t$view->add('vendedores','add');\n }",
"public function addView()\n {\n return view('admin.modules.target.target_add');\n }",
"public function add() {\n\t\t$user_id = $this->UserAuth->getUserId();\n\t\t\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->request->data[\"Contact\"][\"user_id\"] = $user_id;\n\t\t\t$this->Contact->saveAssociated($this->request->data, array(\"deep\" => true));\n\t\t}\n\t\t\n\t\t$this->render('form');\n\t}",
"public function add()\n {\n $data = [\n 'property' => [\n 'template' => 'extracurricular_add',\n 'title' => 'Tambah Ekstrakurikuler',\n 'menu' => $this->menu->read(),\n ],\n 'data' => [],\n ];\n\n $this->load->view('template', $data);\n }",
"public function addView()\n {\n $translate = $this->getTranslate('CodeAddView');\n $this->setParam('translate', $translate);\n\n $codeModel = new codeModel();\n\n $statusList = $codeModel->getStatusList();\n $this->setParam('statusList', $statusList);\n\n $moldRefSpecs = $codeModel->getRefSpecsPossible('R1');\n $this->setParam('refSpecs', $moldRefSpecs);\n\n // traduction des statuts\n $translateStatusList = $this->getTranslate('Status_List');\n $this->setParam('translateStatusList', $translateStatusList);\n\n\n // Récupération de la liste des données avec leurs descriptions\n $dataModel = new dataModel();\n\n $dataList = $dataModel->getDataList('Code_App');\n $this->setParam('dataList', $dataList);\n\n $dataCategoryList = $dataModel->getDataCategoryListUser('Code_App');\n $this->setParam('dataCategoryList', $dataCategoryList);\n\n // traduction des données et des catégories\n $translateData = $this->getTranslate('Data_List');\n $this->setParam('translateData', $translateData);\n $translateDataCategory = $this->getTranslate('Data_Category_List');\n $this->setParam('translateDataCategory', $translateDataCategory);\n\n\n $this->setParam('titlePage', $this->getVerifyTranslate($translate, 'pageTitle'));\n $this->setView('codeAdd');\n $this->setApp('Code_App');\n\n\n // Vérification des droits utilisateurs\n if (frontController::haveRight('add', 'Code_App'))\n $this->showView();\n else\n header('Location: /code');\n }",
"public function addAction()\n {\n $this->templatelang->load($this->_controller.'.'.$this->_action);\n\n // Rendering view page\n $this->_view();\n }",
"protected function instantAdd() {\r\n\t\t$this->redirect(array('action' => 'edit', 'id' => $this->{$this->modelClass}->bsAdd()));\r\n }",
"public function xadd() {\n\t\t$args = $this->getAllArguments ();\n\t\tif ($args ['view'] == 'forms') {\n\t\t\t$this->_redirect ( '_newForm' );\n\t\t} elseif ($args ['view'] == 'fields') {\n\t\t\t$this->_redirect ( '_newField' );\n\t\t} elseif ($args ['view'] == 'actions') {\n\t\t\t$this->_redirect ( '_newAction' );\n\t\t} else {\n\t\t\tparent::xadd ();\n\t\t}\n\t}",
"public function add(){\r\n\t\t//$this->auth->set_access('add');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//call save method\r\n\t\t$this->save();\r\n\t}",
"public function add() {\n\t\t\tif (!$GLOBALS['sizzle']->apps['backend']->models['backend']->authenticate()) {\n \t\t\t$GLOBALS['sizzle']->utils->redirect('/backend/login', '<strong>Error:</strong> Please login to continue.');\n\t\t\t}\n\t\t\t// Authorize w/ backend app.\n\t\t\tif (!$GLOBALS['sizzle']->apps['backend']->models['backend']->authorize('blog', 'add')) {\n \t\t\t$GLOBALS['sizzle']->utils->redirect('/backend', '<strong>Error:</strong> Insufficient user access.');\n\t\t\t}\n\t\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST') {\n \t\t\t// Handle form submit.\n\t\t\t\treturn $this->models['blog']->add();\n\t\t\t} else {\n \t\t\t// Load view.\n \t\t\treturn $this->_loadView(dirname(__FILE__) .'/views/add.tpl');\n\t\t\t}\n\t\t}",
"public function create()\n {\n $data = array();\n $data['formObj'] = $this->modelObj;\n $data['page_title'] = \"Add \".$this->module;\n $data['action_url'] = $this->moduleRouteText.\".store\";\n $data['action_params'] = 0;\n $data['buttonText'] = \"Save\";\n $data[\"method\"] = \"POST\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function create()\n {\n //\n return view(\"Admin.Abs.add\");\n }",
"function add() \n {\n // on the action being rendered\n $this->viewData['navigationPath'] = $this->getNavigationPath('users');\n \n // Render the action with template\n $this->renderWithTemplate('users/add', 'AdminPageBaseTemplate');\n }",
"public function addAction()\n {\n\n // check if data sent\n if ($data = $this->getRequest()->getPost()) {\n\n // filter input data\n $data = $this->_filterPostData($data);\n\n // init model and set data\n /* @var $model Ab_Adverboard_Model_Adverboard */\n $model = Mage::getModel('ab_adverboard/adverboard');\n\n //remove image from data array\n if (isset($data['image'])) {\n unset($data['image']);\n }\n\n // validate input data\n $model->validate();\n\n // add data to model object\n $model->addData($data);\n\n // get core session object\n $session = Mage::getSingleton('core/session');\n\n try {\n /* @var $imageHelper Ab_Adverboard_Helper_Image */\n $imageHelper = Mage::helper('ab_adverboard/image');\n\n //upload new image\n $imageFile = $imageHelper->uploadImage('image');\n if ($imageFile) {\n if ($model->getImage()) {\n $imageHelper->removeImage($model->getImage());\n }\n $model->setImage($imageFile);\n }\n\n // add data to model object from $_SERVER variable\n $model->setAuthor_ip($_SERVER['REMOTE_ADDR']);\n $model->setAuthor_browser($_SERVER['HTTP_USER_AGENT']);\n $model->setAuthor_country($_SERVER['GEOIP_COUNTRY_CODE'] ? $_SERVER['GEOIP_COUNTRY_CODE'] : null);\n\n // save the data\n $model->save();\n\n //display success message\n $session->addSuccess(\n Mage::helper('ab_adverboard')->__('The advert item has been saved.')\n );\n\n } catch (Mage_Core_Exception $e) {\n // catch exception and add error to session\n $session->addError($e->getMessage());\n } catch (Exception $e) {\n // catch exception and add exception to session\n $session->addException($e,\n Mage::helper('ab_adverboard')->__('An error occurred while saving the advert item.')\n );\n }\n\n // redirect to list page\n $this->_redirectReferer();\n }\n\n }",
"function add()\n\t{\n\t\t// hien thi form them san pham\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/add');\n\t}",
"public function add(){\n\t\t\t$formAction = \"index.php?area=backend&controller=news&action=do_add\";\n\t\t\t//xuat du lieu ra view qua ham renderHTML\n\t\t\t$this->renderHTML(\"views/backend/add_edit_news.php\",array(\"formAction\"=>$formAction));\n\t\t}",
"public function addAction()\n {\n $form = new PostForm('create', $this->em);\n $tags = $this->tagService->findAllTags();\n\n if ( $this->getRequest()->isPost() ) {\n\n $data = $this->params()->fromPost();\n\n $form->setData($data);\n if( $form->isValid() ) {\n\n $this->postService->addPost($data, $tags);\n return $this->redirect()->toRoute('posts', ['action'=>'index']);\n }\n }\n\n return new ViewModel(['form' => $form, 'tags' => $tags]);\n }",
"public function getAdd()\n {\n return view('admin.posts.add');\n }",
"public function addItem(){\r\n //角色或者权限名会在实例化这个model的时候load给该model\r\n $auth = \\Yii::$app->authManager;\r\n //如果添加的是角色\r\n if($this->type == self::T_ROLE){\r\n $item = $auth->createRole($this->name);\r\n $item->description = $this->description?:'创建['.$this->name.']角色';\r\n }else{\r\n $item = $auth->createPermission($this->name);\r\n $item->description = $this->description?:'创建['.$this->name.']权限';\r\n\r\n }\r\n return $auth->add($item);\r\n }",
"public function onRelationManageAdd()\n {\n $this->beforeAjax();\n\n $recordId = post('record_id');\n $sessionKey = $this->deferredBinding ? $this->relationGetSessionKey() : null;\n\n /*\n * Add\n */\n if ($this->viewMode == 'multi') {\n\n $checkedIds = $recordId ? [$recordId] : post('checked');\n\n if (is_array($checkedIds)) {\n /*\n * Remove existing relations from the array\n */\n $existingIds = $this->findExistingRelationIds($checkedIds);\n $checkedIds = array_diff($checkedIds, $existingIds);\n $foreignKeyName = $this->relationModel->getKeyName();\n\n $models = $this->relationModel->whereIn($foreignKeyName, $checkedIds)->get();\n foreach ($models as $model) {\n $this->relationObject->add($model, $sessionKey);\n }\n }\n\n }\n /*\n * Link\n */\n elseif ($this->viewMode == 'single') {\n if ($recordId && ($model = $this->relationModel->find($recordId))) {\n\n $this->relationObject->add($model, $sessionKey);\n $this->viewWidget->setFormValues($model->attributes);\n\n /*\n * Belongs to relations won't save when using add() so\n * it should occur if the conditions are right.\n */\n if (!$this->deferredBinding && $this->relationType == 'belongsTo') {\n $parentModel = $this->relationObject->getParent();\n if ($parentModel->exists) {\n $parentModel->save();\n }\n }\n\n }\n }\n\n return $this->relationRefresh();\n }",
"public function add() {\n $this->layout = 'ajax';\n if ($this->request->is('post')) {\n $this->Tratamiento->create();\n if ($this->Tratamiento->save($this->request->data)) {\n $this->Session->setFlash('Se Registro correctamente', 'msgbueno');\n $this->redirect(array('action' => 'index'));\n } else {\n $this->Session->setFlash('No se pudo registrar!!', 'msgerror');\n }\n }\n $penfigo_tipo = $this->Penfigo->find('list', array('fields' => 'nombre'));\n $this->set(compact('penfigo_tipo'));\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create()\n {\n return view('add');\n }",
"public function create()\n {\n return view('add');\n }",
"public function create()\n {\n return view('add');\n }",
"public function create()\n {\n return view('add');\n }",
"protected function add(){\n // als er geen gebruiker is ingelogd, check session.. daarna maak session message\n if(!isset($_SESSION['isLoggedIn'])){\n $_SESSION['message'] = \"<div class=\\\"alert alert-dismissible alert-danger\\\">\n <button type=\\\"button\\\" class=\\\"close\\\" data-dismiss=\\\"alert\\\"></button>\n <strong>U moet ingelogd zijn om deze pagina te bezoeken! </strong>\";\n header('Location: '. ROOT_PATH . 'todos/all');\n }\n $viewmodel = new TodoModel();\n $this->returnView($viewmodel->add(),true);\n }",
"public function add(){\n\t\tif(is_null($this->session->userdata('user')))\n\t\t\tredirect('/login', 'refresh');\n\n\t\t$this->load->view('header');\n\t\t$this->load->view('lead/add');\n\t\t$this->load->view('footer');\n\n\t}",
"public function addAction(){\n\t\t$this->assign('roots', $this->roots);\n\t\t$this->assign('parents', $this->parents);\n\t}",
"public function showAddPage(){\n return view('add');\n }",
"public function addEmployee()\n {\n return view('empmodel');\n }",
"public function add_eloquent(){\n return view('gampanganfolder.add');\n }",
"protected function onModelCreated()\n {\n if ($this->addLeaf != null) {\n $this->addLeaf->setName(\"Add\");\n $this->model->addLeaf = $this->addLeaf;\n }\n\n // Hook up the event handler that returns a selection item for a given model.\n $this->model->getItemForModelEvent->attachHandler(function(Model $model){\n return $this->makeItemForValue($model->getUniqueIdentifier());\n });\n\n parent::onModelCreated();\n }",
"public function create()\n {\n return view('/add');\n \n }",
"public function addView()\n {\n $nbViews = $this->getData('nb_views') + 1;\n $this->save(array(\n 'nb_views' => $nbViews,\n ));\n\n return $this;\n }",
"public function add()\n {\n $this->view->state = $this->request->has('id') ? 'Edit Row' : 'Add Row';\n return $this->view('add');\n }",
"public function addAction()\n {\n\n $this->view->headTitle()->prepend('Add Product');\n\n $this->_helper->viewRenderer->setRender('form');\n\n $request = $this->getRequest();\n\n $form = new Application_Form_Product();\n \n if ($request->isPost()) {\n if ($form->isValid($request->getPost())) {\n\n $this->loadModel('product');\n $this->modelProduct->insert($form->getValues());\n\n $this->view->success = true;\n $this->view->productName = $form->getValues()['name'];\n $this->view->actionPerformed = 'added';\n $form->reset();\n }\n }\n \n $this->view->form = $form;\n }",
"public function addAction() {\t\t\n\t\t$arUser = $this->authenticate();\n\t\tif( !$this->_request->isPost()) {\n\t\t\t$this->view->channel_id = $this->_getParam('channel_id');\n\t\t\t$this->view->formAction = $this->getRequest()->getBaseUrl().'/item/add';\n\t\t} else {\n\t\t\t$channelID = (int)$this->_getParam('channel_id');\n\t\t\t$item = new Items();\t\t\t\n\t\t\t$item->addItem($channelID, $this->_getParam('title'), $arUser['id']);\n\t\t\t$this->_helper->redirector->goto('add', 'item', null, array('channel_id'=>$channelID));\n\t\t}\t\t\n\t}",
"public function add(){\n\n\t $data = array(\n\t \t 'laptops' =>$this->Laptop_model->getLaptops() ,\n\n\t \t );\n\n\t $this->load->view('layouts/header');\n\t\t$this->load->view('layouts/aside');\n\t\t$this->load->view('admin/prestamos/add',$data); // se envia a la vista admin/laptops/add\n\t\t$this->load->view('layouts/footer');\n}",
"public function add()\n {\n if (Auth::guest()){\n return redirect()->back();\n }\n\n return view('add');\n }",
"public function addView()\n {\n return $this->render('Add');\n }",
"function addNew()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n else\n {\n $this->load->model('country_model');\n $data = array();\n $this->global['pageTitle'] = 'Touba : Add New Country';\n\n $this->loadViews(\"admin/country/addNew\", $this->global, $data, NULL);\n }\n }",
"public function add() {\r\n if(isset($this->data) && isset($this->data['Product'])) {\r\n $product = $this->Product->save($this->data);\r\n $this->set('response', array('Products' => $this->Product->findByProductid($product['Product']['ProductID'])));\r\n $this->Links['self'] = Router::url(array('controller' => $this->name, 'action' => 'view', $product['Product']['ProductID']), true);\r\n } else {\r\n $this->Links['self'] = Router::url(array('controller' => $this->name, 'action' => 'index'), true);\r\n }\r\n }",
"public function getAdd()\n {\n \treturn view(\"admin.user.add\");\n }",
"public function create()\n {\n return view(self::$folder . 'add')->withTitle(self::$mainTitle)->with('link', self::$link);\n }",
"public function add() \r\n\t{\r\n\t\t$data['header']['title'] = 'Add a new country';\r\n\t\t$data['footer']['scripts']['homescript.js'] = 'home';\r\n\t\t$data['view_name'] = 'country/country_add_view';\r\n\t\t$data['view_data'] = '';\r\n\t\t$this->load->view('country/page_view', $data);\r\n\t}",
"public function add() {\n\t\n\t\t# Make sure user is logged in if they want to use anything in this controller\n\t\tif(!$this->user) {\n\t\t\tRouter::redirect(\"/index/unauthorized\");\n\t\t}\n\t\t\n\t\t# Setup view\n\t\t$this->template->content = View::instance('v_teachers_add');\n\n\t\t$this->template->title = \"Add Teacher\";\n\n\t\t$client_files_head = array(\"/css/teachers_add.css\");\n\t\t$this->template->client_files_head = Utils::load_client_files($client_files_head);\n\n\t\t#$client_files_body = array(\"/js/ElementValidation.js\", \"/js/shout_out_utils.js\");\n\t\t#$this->template->client_files_body = Utils::load_client_files($client_files_body);\n\n\t\t# Render template\n\t\techo $this->template;\n\t\t\n\t}",
"function add()\n {\n if($this->checkAccess('permission.add') == 1)\n {\n $this->loadAccessRestricted();\n }\n else\n {\n $this->load->model('permission_model');\n \n $this->global['pageTitle'] = 'School : Add New Permission';\n\n $this->loadViews(\"permission/add\", $this->global, NULL, NULL);\n }\n }",
"public function add($model)\n {\n return $this->taskResourceModel->save($model);\n }",
"public function add()\n\t{\t\n\t\t//Carrega o Model Categorias\t\t\t\n\t\t$this->load->model('CategoriasModel', 'Categorias');\n\t\n\t\t$data['categorias'] = $this->Categorias->getCategorias();\t\n\n\t\t// Editando texto do titulo do header\n\t\t$data['pagecfg']['Title'] = \"Adicionar Pessoa\";\t\t\n\n\t\t// Alterando o Estado da View Para Adicionar Pessoa\n\t\t$data['pagecfg']['viewState'] = \"Adicionar Pessoa\";\n\t\t$data['pagecfg']['btnState'] = \"Adicionar\";\n\t\t$data['pagecfg']['inputState'] = \"enable\";\n\t\t$data['pagecfg']['actionState'] = \"/ListarPessoas/salvar\";\n\t\t\n\t\t//Carrega a View\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('PessoaView', $data);\n\t\t$this->load->view('templates/footer', $data);\n\t}",
"public function add() {\n\n $this->viewBuilder()->layout('admin');\n $doctor = $this->Admins->newEntity();\n if ($this->request->is('post')) {\n// if(!empty($this->request->data['allpermissions']))\n// {\n// $this->request->data['permissions'] = implode(',',$this->request->data['allpermissions']);\n// }\n $doctors = $this->Admins->patchEntity($doctor, $this->request->data);\n \n $this->request->data['created'] = gmdate(\"Y-m-d h:i:s\");\n $this->request->data['modified'] = gmdate(\"Y-m-d h:i:s\"); \n \n if ($this->Admins->save($doctors)) {\n $this->Flash->success(__('The Admin has been saved.'));\n //pr($this->request->data); pr($doctors); exit;\n return $this->redirect(['action' => 'index']);\n } else {\n $this->Flash->error(__('The Admin could not be saved. Please, try again.'));\n }\n } else {\n $this->request->data['first_name'] = '';\n $this->request->data['last_name'] = '';\n $this->request->data['phone'] = '';\n $this->request->data['username'] = '';\n $this->request->data['email'] = '';\n }\n //$this->loadModel('AdminMenus');\n //$menus = $this->AdminMenus->find()->all();\n $this->set(compact('doctor','menus'));\n $this->set('_serialize', ['doctor']);\n }",
"public function add()\n { \n return view('admin.control.add_career',[\n 'jobs'=> Career::all(),\n 'categories'=>Category::all(),\n 'contents'=>Content::all(),\n ]);\n }",
"public function addAction() {\n\t\t$form = new Default_Form_UserGroup ();\n\t\t$userGroup = new Default_Model_UserGroup ();\n\t\t$userGroupMapper = new Default_Model_Mapper_UserGroup ();\n\t\t$this->_save ( $form, self::$ADD_MODE );\n\t\tunset($form->getElement('modules')->required);\n\t\t$this->view->form = $form;\n\t\t$this->render ( \"add-edit\" );\n\t}",
"public function addAction()\r\n {\r\n $form = $this->getEditItemForm();\r\n $response = $this->getResponse();\r\n $content = $this->renderViewModel('dots-nav-block/item-add', array('form' => $form));\r\n $response->setContent($content);\r\n return $response;\r\n }",
"function add($request){\r\n return $this->view();\r\n }",
"function addads() \n\t{\n\t\t$view = $this->getView('ads');\n\t\t// Get/Create the model\n\t\tif ($model = $this->getModel('addads'))\n\t\t{\n\t\t\t//Push the model into the view (as default)\n\t\t\t//Second parameter indicates that it is the default model for the view\n\t\t\t$view->setModel($model, true);\n\t\t}\n\t\t$view->setLayout('adslayout');\n\t\t$view->ads();\n\t}",
"public function add()\n {\n // récupérer les catégories pour l'affichage du <select>\n $categoryList = Category::findAll();\n // récupérer les types de produits pour l'affichage du <select>\n $typeList = Type::findAll();\n // récupérer les marques pour l'affichage du <select>\n $brandList = Brand::findAll();\n\n // compact est l'inverse d'extract, on s'en sert pour générer un array à partir de variables :\n // on fournit les noms (attention, sous forme de string) des variables à ajouter à l'array \n // les clés de ces valeurs seront les noms des variables\n $viewVars = compact('categoryList', 'typeList', 'brandList');\n $this->show('product/add', $viewVars);\n // équivaut à :\n // $this->show('product/add', [\n // 'categoryList' => $categoryList,\n // 'typeList' => $typeList,\n // 'brandList' => $brandList\n // ]);\n }",
"public function add(){\n\n $this->set('add', true);\n\n if($this->request->is('post')){\n $this->request->data['CalendarEntry']['user_id'] = $this->Auth->User('id');\n if($this->CalendarEntry->save($this->request->data)){\n $this->_setFlash('Calendar entry added', 'success');\n return $this->redirect('/calendar');\n }\n else {\n $this->_setFlash($this->CalendarEntry->validationErrorsAsString());\n }\n }\n\n $this->render('add-edit');\n }",
"protected function addShowForm() \n {\n return view('dashboard.article.add');\n }",
"public function p_add() {\n\t\t\n\t\t$_POST['user_id'] = $this->user->user_id;\n\t\t$_POST['created'] = Time::now();\n\t\t$_POST['modified'] = Time::now();\n\t\t\n\t\tDB::instance(DB_NAME)->insert('posts',$_POST);\n\t\t\n\t\t//$view = new View('v_posts_p_add');\n\t\t\n\t\t//$view->created = Time::display(Time::now());\n\t\t\n\t\techo $view;\n\t\t\t\t\t\t\n\t\t\t\t\n\t}",
"public function addAction()\n {\n $form = new AlbumForm();\n \n // define o hydrato para o formulario\n $form->setHydrator(new DoctrineObject($this->getEntityManager(), 'Album\\Entity\\Album'));\n \n // altera um atributo do formulario\n $form->get('submit')->setAttribute('label', 'Add');\n \n // recupera requisicao\n $request = $this->getRequest();\n \n // verifica se a requisicao eh um post\n if ($request->isPost()) {\n \t\n // instancia uma entidade album\n \t$album = new Album();\n \n // garante o objeto seja preenchido com valores validos\n $form->bind($album);\n\t\t\t\n // preenche o formulario com valores enviados via post\n $form->setData($request->getPost());\n \n // verifica se os valores enviados para o formulario sao validos\n if ($form->isValid()) {\n \t\n \t// prepara a persistencia do objeto\n \t$this->getEntityManager()->persist($album);\n \n \t// executa instrucao previamente preparada\n \t$this->getEntityManager()->flush();\n \n // redireciona para a lista de albuns\n return $this->redirect()->toRoute('album');\n }\n }\n \t\t\n // retorna variaveis para a visao\n return new ViewModel(array('form' => $form));\n }",
"function addNew()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n else\n {\n $this->load->model('user_model');\n $data['roles'] = $this->user_model->getUserRoles();\n \n $this->global['pageTitle'] = 'Garuda Informatics : Add New User';\n\n $this->loadViews($this->view.\"addNew\", $this->global, $data, NULL);\n }\n }",
"public function add()\n {\n return view('admin.authors.new');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function getAdd()\n {\n return view(\"Policy::add-edit\");\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function addModel()\n {\n $marks =Mark::all(); \n return view('admins.models.add-model')->with('marks',$marks);\n }",
"public function add_data()\n {\n $this->load->helper('url');\n $this->load->view('add_data_view');\n }",
"public function add()\n\t{\n\t\treturn view('pages.add');\n\t}",
"public function add(Model $model) {\n $this->models[get_class($model)] = $model;\n }",
"public function add(){\n return view('survey::survey-add');\n\n }",
"public function admin_add() {\r\n if(isset($this->data[$this->modelClass])) {\r\n\t\t\t$this->_message($this->{$this->modelClass}->bsSave($this->data, 'add'));\r\n }\r\n\t\t$this->render('admin_edit');\r\n }",
"public function add()\n\t{\n\n\t\t$this->data['_pageview'] = $this->data[\"_directory\"] . \"edit\";\n\t\t$this->data['option'] \t\t= \"add\";\n\n\t\treturn view($this->constants[\"ADMINCMS_TEMPLATE_VIEW\"], $this->data);\n\t}",
"public function addAction()\n {\n // Instantiate AppointmentForm and set the label on submit button to \"Add\"\n $form = new AppointmentForm();\n $form->get('submit')->setValue('Add');\n // get the request and fetch data from the form\n $request = $this->getRequest();\n // if request->ispost() is true ,it indicates form is submitted successfully\n if ($request->isPost()) {\n $appointment = new Appointment();\n // set the form's input filter from appointment instance\n $form->setInputFilter($appointment->getInputFilter());\n $form->setData($request->getPost());\n\n // if form form data is valid ,get data from form and call saveAppointment() to save the data into database\n if ($form->isValid()) {\n $appointment->exchangeArray($form->getData());\n $this->getAppointmentTable()->saveAppointment($appointment);\n\n // Redirect to list of appointments\n return $this->redirect()->toRoute('appointment');\n }\n }\n // return variables to assign to view i.e. form object\n return array('form' => $form);\n \n }",
"public function addAction(){\n\t\t\t$emp = new Empresa();\n\t\t\t//cargamos el objeto mediantes los metodos setters\n\t\t\t$emp->id = '0';\n\t\t\t$emp->nombre_empresa = $this->getPostParam(\"nombre_empresa\");\n\t\t\t$emp->nit = $this->getPostParam(\"nit\");\n\t\t\t$emp->direccion = $this->getPostParam(\"direccion\");\n\t\t\t$emp->logo = $this->getPostParam(\"imagen\");\n\t\t\t$emp->regimen_id = $this->getPostParam(\"regimen_id\");\n\t\t\t\t\t\t\t\t\n\t\t\tif($emp->save()){\n\t\t\t\tFlash::success(\"Se insertó correctamente el registro\");\n\t\t\t\tprint(\"<script>document.location.replace(\".core::getInstancePath().\"'empresa/mostrar/$emp->id');</script>\");\n\t\t\t}else{\n\t\t\t\tFlash::error(\"Error: No se pudo insertar registro\");\t\n\t\t\t}\n\t\t\t\t\t\n\t }",
"public function add()\n {\n $category = new stdClass();\n $category->category_id = null;\n $category->name = null;\n $data = [\n 'page' => 'add',\n 'row' => $category\n ];\n $this->template->load('template', 'product/category/category_add', $data);\n }"
] | [
"0.7556822",
"0.73531175",
"0.7182557",
"0.7129833",
"0.71013665",
"0.6950921",
"0.6937012",
"0.69356656",
"0.6930241",
"0.69080174",
"0.6854818",
"0.68203175",
"0.6762654",
"0.67387354",
"0.67163604",
"0.67098045",
"0.66922534",
"0.6672057",
"0.6666116",
"0.66621256",
"0.66610724",
"0.6647219",
"0.6639601",
"0.66123456",
"0.6606437",
"0.6601254",
"0.6589572",
"0.6581318",
"0.6578844",
"0.6574342",
"0.6549291",
"0.6495522",
"0.6477979",
"0.6473559",
"0.64725924",
"0.64687204",
"0.644833",
"0.64430517",
"0.6433234",
"0.64224464",
"0.6401856",
"0.6371212",
"0.63690543",
"0.6360175",
"0.6360076",
"0.6347393",
"0.63342404",
"0.6332356",
"0.6332356",
"0.6332356",
"0.6332356",
"0.6315834",
"0.63026637",
"0.63022316",
"0.62988085",
"0.6296178",
"0.6292861",
"0.62844723",
"0.62804437",
"0.62803274",
"0.62802535",
"0.627847",
"0.6265966",
"0.62472993",
"0.6245682",
"0.62412107",
"0.62405205",
"0.623779",
"0.62374693",
"0.62306947",
"0.62300676",
"0.6219914",
"0.6217925",
"0.6214897",
"0.6213092",
"0.62087417",
"0.6204476",
"0.61983824",
"0.6185515",
"0.61784637",
"0.6175456",
"0.61710227",
"0.6167543",
"0.6165692",
"0.61647946",
"0.6162684",
"0.6161571",
"0.61600816",
"0.61591536",
"0.6142517",
"0.6135171",
"0.6134753",
"0.61330247",
"0.6132652",
"0.61323714",
"0.6131641",
"0.613103",
"0.6126142",
"0.6124876",
"0.61201435",
"0.61188906"
] | 0.0 | -1 |
Creates Pagination for a given data array and with a number of records per page to display Solution based on | private function constructPagination($dataArr){
$currentPage = LengthAwarePaginator::resolveCurrentPage();
$col = new Collection($dataArr);
$perPage = 10;
$entries = new LengthAwarePaginator($col->forPage($currentPage, $perPage), $col->count(), $perPage, $currentPage);
$entries->setPath(LengthAwarePaginator::resolveCurrentPath());
return $entries;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function buildPagination() {}",
"protected function buildPagination() {}",
"abstract public function preparePagination();",
"function pager($current_page, $records_per_page, $pages_per_pageList, $dataQuery, $countQuery){\n $obj->record = array(); // beinhaltet ein Arrray des objects mit Daten worüber dann zugegriffen wird.\n $obj->current_page = $current_page; // Startet mit 0!\n $obj->total_cur_page = 0; // shows how many records belong to current page\n $obj->records_per_page = 0;\n $obj->total_records = 0;\n $obj->total_pages = 0;\n $obj->preceding = false; // Ist true wenn es eine Seite vor der angezeigten gibt.\n $obj->subsequent = false; // Ist true wenn es eine Seite nach der angezeigten gibt.\n $obj->pages_per_pageList = 10; //$pages_per_pageList;\n $result=mysql_query($countQuery, $this->CONNECTION);\n $obj->total_records = mysql_num_rows($result);\n if($obj->total_records>0){\n $obj->record = $this->select($dataQuery);\n $obj->total_cur_page = sizeof($obj->record);\n $obj->records_per_page = $records_per_page;\n $obj->total_pages = ceil($obj->total_records/$records_per_page);\n $obj->offset_page = $obj->pages_per_pageList*floor($obj->current_page/$obj->pages_per_pageList);\n $obj->total_pages_in_pageList = $obj->total_pages-($obj->offset_page+$obj->pages_per_pageList);\n $obj->last_page_in_pageList = $obj->offset_page+$obj->pages_per_pageList;\n if($obj->last_page_in_pageList>$obj->total_pages) $obj->last_page_in_pageList=$obj->total_pages;\n if($obj->offset_page>0) $obj->pageList_preceding=true;\n else $obj->pageList_preceding=false;\n if($obj->last_page_in_pageList<$obj->total_pages) $obj->pageList_subsequent=true;\n else $obj->pageList_subsequent=false;\n if($obj->current_page>1) $obj->preceding=true;\n if($obj->current_page<$obj->total_pages) $obj->subsequent=true;\n }\n return $obj;\n }",
"protected function pagination(array $data)\n {\n $data['pageMin'] = $data['currentPage'] - SURROUND_COUNT;\n $data['pageMin'] = $data['pageMin'] > 0 ? $data['pageMin'] : 1;\n\n $data['pageMax'] = $data['currentPage'] + SURROUND_COUNT;\n $data['pageMax'] =\n $data['pageMax'] < $data['lastPage']\n ? $data['pageMax']\n : $data['lastPage'];\n\n $data['uri'] =\n BASE_URL .\n Functions::getStringBetween(\n rtrim($_SERVER['REQUEST_URI'], '/'),\n BASE_PATH,\n '/page',\n );\n\n $this->smarty->assign('paging', $data);\n $this->smarty->assign(\n 'pager',\n $this->smarty->fetch('Templates/pagination.tpl'),\n );\n }",
"function paginate() {\n\t\t$all_rs = $this->db->query($this->sql );\n\t\t$this->total_rows = $all_rs->num_rows;\n\t\t\n\t\t//Return FALSE if no rows found\n\t\tif ($this->total_rows == 0) {\n\t\t\tif ($this->debug)\n\t\t\t\techo \"Query returned zero rows.\";\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t//Max number of pages\n\t\t$this->max_pages = ceil($this->total_rows / $this->rows_per_page );\n\t\tif ($this->links_per_page > $this->max_pages) {\n\t\t\t$this->links_per_page = $this->max_pages;\n\t\t}\n\t\t\n\t\t//Check the page value just in case someone is trying to input an aribitrary value\n\t\tif ($this->page > $this->max_pages || $this->page <= 0) {\n\t\t\t$this->page = 1;\n\t\t}\n\t\t\n\t\t//Calculate Offset\n\t\t$this->offset = $this->rows_per_page * ($this->page - 1);\n\t\t\n\t\t//Fetch the required result set\n\t\t$rs = $this->db->query($this->sql . \" LIMIT {$this->offset}, {$this->rows_per_page}\" );\n\t\t$this->data = $rs->rows;\n\t}",
"public function getPaginationDataSource();",
"public function findPaginate(array $data): array\n {\n }",
"function pagination(){}",
"private function generatePages()\n {\n $all_pages = self::getPages($this->records, $this->recordsInPage);\n $total = 0;\n $start = 1;\n while ($total < $all_pages) {\n $shift = $this->getShift();\n $paging_start = $total < $this->getLeftShift() ? true : false;\n $paging_end = $total >= ($all_pages - $this->getRightShift()) ? true : false;\n\n if ($this->currentPage == $start) {\n $this->appendData(sprintf('<li class=\"active\"><span>%d</span></li>', $start));\n }\n elseif ($paging_start|| $paging_end) {\n $this->appendData(sprintf('<li><a href=\"%s%d\">%d</a></li>', $this->url, $start, $start));\n }\n elseif (($this->currentPage == $start - $shift) || ($this->currentPage == $start + $shift)) {\n $this->appendData('<li><span>...</span></li>');\n }\n $total++;\n $start++;\n }\n }",
"function paginator($data = [], $row_counts, $items_per_page = 10, $current_page = 1){\n\n\t$paginationCtrls = '';\n\n\t$last_page = ceil($row_counts/$items_per_page);\n\t$last_page = ($last_page < 1) ? 1 : $last_page;\n\n\t$current_page = preg_replace('/[^0-9]/', '', $current_page);\n\tif ( $current_page < 1 ) {\n\t\t$current_page = 1;\n\t}elseif ( $current_page > $last_page ) {\n\t\t$current_page = $last_page;\n\t}\n\t$limit_from = ($current_page - 1) * $items_per_page;\n\t$limit_to = $items_per_page;\n\n\t$result = array_slice($data, $limit_from, $limit_to);\n\n\t// Start first if\n\tif ( $last_page != 1 )\n\t{\n\t\t// Start second if\n\t\tif ( $current_page > 1 )\n\t\t{\n\t\t\t$previous = $current_page -1;\n\t\t\t$paginationCtrls .= '<a href=\"'. $_SERVER['PHP_SELF']. '?page='. $previous .'\">Previous</a> ';\n\n\t\t\tfor($i=$current_page-4; $i < $current_page; $i++){\n\t\t\t\n\t\t\t\tif( $i > 0 ){\n\t\t\t\t\t$paginationCtrls .= '<a href=\"'. $_SERVER['PHP_SELF'] .'?page=' .$i. '\">'.$i.'</a> ';\n\t\t\t\t}\n\t\t\t}\n\t\t} // End second if\n\n\t\t$paginationCtrls .= ''.$current_page. ' ';\n\n\t\t\n\t\tfor($i=$current_page+1; $i <= $last_page ; $i++){\n\t\t\t$paginationCtrls .= '<a href=\"'. $_SERVER['PHP_SELF'] .'?page=' .$i. '\">'.$i.'</a> ';\n\t\t\t\n\t\t\tif( $i >= $current_page+4 ){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\n\n\n\t\tif( $current_page != $last_page ){\n\n\t\t\t$next = $current_page + 1;\n\t\t\t$paginationCtrls .= ' <a href=\"'. $_SERVER['PHP_SELF'] .'?page=' .$next. '\">Next</a> ';\n\t\t}\n\t}\n\t// End first if\n\n\t// dd( ['last page => '.$last_page, 'current page => '.$current_page, 'limit => '.$limit_from] );\n\n\treturn ['result' => $result, 'links' => $paginationCtrls];\n}",
"function paginate_list($obj, $data, $query_code, $variable_array=array(), $rows_per_page=NUM_OF_ROWS_PER_PAGE)\n{\n\t#determine the page to show\n\tif(!empty($data['p'])){\n\t\t$data['current_list_page'] = $data['p'];\n\t} else {\n\t\t#If it is an array of results\n\t\tif(is_array($query_code))\n\t\t{\n\t\t\t$obj->session->set_userdata('search_total_results', count($query_code));\n\t\t}\n\t\t#If it is a real query\n\t\telse\n\t\t{\n\t\t\tif(empty($variable_array['limittext']))\n\t\t\t{\n\t\t\t\t$variable_array['limittext'] = '';\n\t\t\t}\n\t\t\t\n\t\t\t#echo $obj->Query_reader->get_query_by_code($query_code, $variable_array );\n\t\t\t#exit($query_code);\n\t\t\t$list_result = $obj->db->query($obj->Query_reader->get_query_by_code($query_code, $variable_array ));\n\t\t\t$obj->session->set_userdata('search_total_results', $list_result->num_rows());\n\t\t}\n\t\t\n\t\t$data['current_list_page'] = 1;\n\t}\n\t\n\t$data['rows_per_page'] = $rows_per_page;\n\t$start = ($data['current_list_page']-1)*$rows_per_page;\n\t\n\t#If it is an array of results\n\tif(is_array($query_code))\n\t{\n\t\t$data['page_list'] = array_slice($query_code, $start, $rows_per_page);\n\t}\n\telse\n\t{\n\t\t$limittxt = \" LIMIT \".$start.\" , \".$rows_per_page;\n\t\t$list_result = $obj->db->query($obj->Query_reader->get_query_by_code($query_code, array_merge($variable_array, array('limittext'=>$limittxt)) ));\n\t\t$data['page_list'] = $list_result->result_array();\n\t}\n\t\n\treturn $data;\n}",
"static function init($data){\n \n $pages = ceil($data['count_all'] / $data['limit']);\n \n $res = \"\";\n \n for($i = 1; $i <= $pages; $i++){\n \n if($i == $data['current_page'] ){ \n $res .= \"<b>$i</b>\";\n }\n else{\n $res .= \"<a href='\".$data['url'].\"&page=$i'>$i</a>\";\n }\n \n }\n \n \n return $res;\n \n \n \n \n }",
"public function generatePagination()\n {\n $this->buffer = [];\n\n if ($this->currentPage != 1) {\n $this->generateLeftButton($this->currentPage);\n } else {\n $this->generateLeftButton($this->currentPage, true);\n }\n\n $this->generatePages();\n\n if ($this->currentPage != self::getPages($this->records, $this->recordsInPage)) {\n $this->generateRightButton($this->currentPage);\n } else {\n $this->generateLeftButton($this->currentPage, true);\n }\n }",
"private function _pagination()\n {\n\n if (Request::has('pq_curpage') && Request::has('pq_rpp')) {\n $columnsTemp = $this->_columnsRaw;\n $pq_curPage = Request::input('pq_curpage');\n $pq_rPP = Request::input('pq_rpp');\n $queryTemp = new \\stdClass();\n $queryTemp = $this->_getQueryStatement();\n $queryTemp->columns = null;\n\n // Verifica si existe algun filtro para aplicarlo al COUNT y determinar cuantos registros hay en la consulta\n if (property_exists($this->_filterTable, 'query')) {\n $queryTemp->whereRaw($this->_filterTable->query, $this->_filterTable->param);\n }\n\n $totalRecordQuery = $queryTemp->count();\n $this->_query->columns = $columnsTemp;\n\n $skip = ($pq_rPP * ($pq_curPage - 1));\n\n if ($skip >= $totalRecordQuery) {\n $pq_curPage = ceil($totalRecordQuery / $pq_rPP);\n $skip = ($pq_rPP * ($pq_curPage - 1));\n }\n\n // Make limit to query\n $this->_query->offset($skip)\n ->limit($pq_rPP);\n\n $this->_paginationLimit = [\n 'totalRecords' => $totalRecordQuery,\n 'curPage' => $pq_curPage,\n ];\n }\n }",
"private function paging(array $input)\n\t{\n \n $actualPage = $input['actualPage'];\n $allRecords = $this->getCountItems(array());\n\n $recordsPerPage = $this->paging['recordsPerPage'];\n \n $pages = $allRecords / $recordsPerPage;\n\n if (($count - ($_pages * $this->records_per_page)) > 0){\n $_pages++;\n }\n \n $_pages = ceil($_pages);\n for ($i = 0; $i < $_pages; $i++){\n $page['cislo'] = $i + 1;\n $pages[] = $page;\n\n }\n\n if ($actualPage > 1){\n $prev = $actualPage - 1;\n }\n\n if ($actualPage < $pages){\n $next = $actualPage + 1;\n }\n\n $from = ($actualPage - 1) * $recordsPerPage;\n $to = (($actualPage - 1) * $recordsPerPage) + $recordsPerPage;\n\n\n\n return array(\n 'page' => $actualPage,\n 'prev' => $prev,\n 'next' => $next,\n 'from' => $from,\n 'to' => $to,\n 'perPage' => $recordsPerPage,\n );\n\t}",
"function buildPagination($pageData) {\r\n $currentPage = $pageData['current_page'];\r\n $total = $pageData['total'];\r\n $perPage = $pageData['showing'];\r\n $term = $pageData['term'];\r\n \r\n $previous = '<a class=\"previous\" href=\"/' . $term . '/page:' . ($currentPage - 1) . '\">Previous</a> ';\r\n $next = ' <a class=\"next\" href=\"/' . $term . '/page:' . ($currentPage + 1) . '\">Next</a>';\r\n\r\n\t\tif ($perPage == 0) {\r\n\t\t\t$perPage = Configure::read('Flickr.settings.photos_per_page') - 1;\r\n\t\t}\r\n\r\n $middle = '<span>Page <strong>' . $currentPage . '</strong> of ' . ceil($total / $perPage) . '</span>';\r\n if ($currentPage == 1) {\r\n return '<div class=\"page-list\">' . $middle . $next . '</div>'; \r\n } \r\n elseif ($currentPage == $total) {\r\n return '<div class=\"page-list\">' . $previous . $middle . '</div>';\r\n }\r\n\r\n return '<div class=\"page-list\">' . $previous . $middle . $next . '</div>'; \r\n }",
"public function getPaginate ($p_rowsPerPage, $p_currentPage);",
"function paging_1($sql,$vary=\"record\",$width=\"575\",$course)\n{\n\n global $limit,$offset,$currenttotal,$showed,$last,$align,$CFG;\n if(!empty ($_REQUEST['offset']))\n $offset=$_REQUEST['offset'];\n else $offset=0;\n $showed=$offset+$limit;\n $last=$offset-$limit;\n $result=get_records_sql($sql);\n\n $currenttotal=count($result);\n $pages=$currenttotal%$limit;\n if($pages==0)\n\t$pages=$currenttotal/$limit;\n else\n {\n\t$pages=$currenttotal/$limit;\n\t$pages=(int)$pages+1;\n }\n for($i=1;$i<=$pages;$i++)\n {\n\t$pageoff=($i-1)*$limit;\n\tif($showed==($i*$limit))\n\tbreak;\n }\n\t\t\t\n if($currenttotal>1)$vary.=\"s\";\n if($currenttotal>0)\n\techo @$display;\n if($CFG->dbtype==\"mysql\")\n {\n $sql.=\" Limit \".$offset.\",$limit \";\n }\n else if($CFG->dbtype==\"mssql_n\" )\n {\n $uplimit=$offset+$limit;\n $sql.=\" WHERE Row between \".($offset+1).\" and \".$uplimit;\n\n }\n\n return $sql;\n\n}",
"protected function buildPagination()\n {\n $this->calculateDisplayRange();\n $pages = [];\n for ($i = $this->displayRangeStart; $i <= $this->displayRangeEnd; $i++) {\n $pages[] = [\n 'number' => $i,\n 'offset' => ($i - 1) * $this->itemsPerPage,\n 'isCurrent' => $i === $this->currentPage\n ];\n }\n $pagination = [\n 'linkConfiguration' => $this->linkConfiguration,\n 'pages' => $pages,\n 'current' => $this->currentPage,\n 'numberOfPages' => $this->numberOfPages,\n 'lastPageOffset' => ($this->numberOfPages - 1) * $this->itemsPerPage,\n 'displayRangeStart' => $this->displayRangeStart,\n 'displayRangeEnd' => $this->displayRangeEnd,\n 'hasLessPages' => $this->displayRangeStart > 2,\n 'hasMorePages' => $this->displayRangeEnd + 1 < $this->numberOfPages\n ];\n if ($this->currentPage < $this->numberOfPages) {\n $pagination['nextPage'] = $this->currentPage + 1;\n $pagination['nextPageOffset'] = $this->currentPage * $this->itemsPerPage;\n }\n if ($this->currentPage > 1) {\n $pagination['previousPage'] = $this->currentPage - 1;\n $pagination['previousPageOffset'] = ($this->currentPage - 2) * $this->itemsPerPage;\n }\n return $pagination;\n }",
"public function buildPagination($data)\n\t{\n\t\t$pagination = is_array($data) ? $data : $data->toArray();\n\t\tunset($pagination['data']);\n\n\t\treturn $pagination;\n\t}",
"public function createPages() {\n $pageCount = $this->getPageCount();\n $currentPageNumber = $this->getCurrentPage();\n\n $structure = new XGrid_Plugin_Pagination_Structure();\n $structure->setPageCount($pageCount);\n $structure->setItemCountPerPage($this->getItemCountPerPage());\n $structure->setFirst(1);\n $structure->setCurrent($currentPageNumber);\n $structure->setLast($pageCount);\n\n // Previous and next\n if ($currentPageNumber - 1 > 0) {\n $structure->setPrevious($currentPageNumber - 1);\n }\n \n if ($currentPageNumber + 1 <= $pageCount) {\n $structure->setNext($currentPageNumber + 1);\n }\n\n // Pages in range\n $scrollingStyle = $this->getScrollingStyle();\n $structure->setPagesInRange($scrollingStyle->getPages($this));\n $structure->setFirstPageInRange(min($structure->getPagesInRange()));\n $structure->setLastPageInRange(max($structure->getPagesInRange()));\n \n $this->_structure = $structure; \n }",
"public static function pagination()\n {\n $limit = (int) self::set(\"limit\");\n $offset = (int) self::set(\"offset\");\n\n $limit = Validator::intType()->notEmpty()->positive()->validate($limit)? $limit: false;\n $offset = Validator::intType()->notEmpty()->positive()->validate($offset)? $offset: 0;\n\n $pagination = \"\";\n $pagination .= $limit? \" LIMIT {$limit}\": null;\n $pagination .= ($limit && $offset)? \" OFFSET {$offset}\": null;\n\n return (object) [\n \"limit\" => $limit,\n \"offset\" => $offset,\n \"query\" => $pagination\n ];\n }",
"function newPaging($data) {\n $batas = $data['setPage'];\n $halaman = $data['halaman'];\n if (empty($halaman)) {\n $posisi = 0;\n $halaman = 1;\n } else {\n $posisi = ($halaman - 1) * $batas;\n }\n\n //Langkah 2: Sesuaikan perintah SQL\n $tampil = \"SELECT * FROM anggota LIMIT $posisi,$batas\";\n //print_r($tampil);\n $hasil = mysql_query($tampil);\n\n $no = $posisi + 1;\n while ($r = mysql_fetch_array($hasil)) {\n echo \"<tr><td>$no</td><td>$r[nama]</td><td>$r[alamat]</td></tr>\";\n $no++;\n }\n echo \"</table><br>\";\n\n //Langkah 3: Hitung total data dan halaman \n $tampil2 = mysql_query(\"SELECT * FROM anggota\");\n $jmldata = mysql_num_rows($tampil2);\n $jmlhal = ceil($jmldata / $batas);\n\n echo \"<div class=paging>\";\n // Link ke halaman sebelumnya (previous)\n if ($halaman > 1) {\n $prev = $halaman - 1;\n echo \"<span class=prevnext><a href=$_SERVER[PHP_SELF]?halaman=$prev>« Prev</a></span> \";\n } else {\n echo \"<span class=disabled>« Prev</span> \";\n }\n\n // Tampilkan link halaman 1,2,3 ...\n for ($i = 1; $i <= $jmlhal; $i++)\n if ($i != $halaman) {\n if (isset($_GET['setPage'])) {\n $setPage = $_GET['setPage'];\n echo \" <a href=$_SERVER[PHP_SELF]?halaman=$i&setPage=$setPage>$i</a> \";\n } else {\n echo \" <a href=$_SERVER[PHP_SELF]?halaman=$i>$i</a> \";\n }\n } else {\n echo \" <span class=current>$i</span> \";\n }\n\n // Link kehalaman berikutnya (Next)\n if ($halaman < $jmlhal) {\n $next = $halaman + 1;\n echo \"<span class=prevnext><a href=$_SERVER[PHP_SELF]?halaman=$next>Next »</a></span>\";\n } else {\n echo \"<span class=disabled>Next »</span>\";\n }\n echo \"</div>\";\n}",
"public function generatePagenation($resultData, $current_page, $result_number, $size = 5, $max_show_page = null)\n {\n $max_show_page = isset($max_show_page) ? $max_show_page : 11;\n $all_pages = intval(ceil($result_number / $size));\n $current_page = intval(isset($current_page) ? $current_page : 1);\n $current_page = min(max(1, $current_page), $all_pages);\n\n $current_range_start = $current_page - round($max_show_page /2);\n $current_range_end = $current_range_start + $max_show_page;\n\n if ($current_range_start < 1) $current_range_end = $max_show_page;\n if ($current_range_end > $all_pages) $current_range_start = $all_pages - $max_show_page;\n\n $current_range_start = max(1, $current_range_start);\n $current_range_end = min($all_pages, $current_range_end);\n\n if (is_object($resultData))\n {\n $resultData->all_pages = $all_pages;\n $resultData->current_range_start = $current_range_start;\n $resultData->current_range_end = $current_range_end;\n $resultData->current_page = $current_page;\n } else {\n $resultData['all_pages'] = $all_pages;\n $resultData['current_range_start'] = $current_range_start;\n $resultData['current_range_end'] = $current_range_end;\n $resultData['current_page'] = $current_page;\n }\n\n return $resultData;\n }",
"private function createLengthAwarePaginator()\n {\n $this->pagination = true;\n\n $this->_paginate_current = $this->data->currentPage();\n\n $this->_paginate_total = $this->data->lastPage();\n\n $this->data = $this->data->all();\n\n $this->normalize();\n }",
"function paging($tablename, $where, $orderby, $url, $PageNo, $PageSize, $Pagenumber, $ModePaging) {\n if ($PageNo == \"\") {\n $StartRow = 0;\n $PageNo = 1;\n }\n else {\n $StartRow = ($PageNo - 1) * $PageSize;\n }\n if ($PageSize < 1 || $PageSize > 1000) {\n $PageSize = 15;\n }\n if ($PageNo % $Pagenumber == 0) {\n $CounterStart = $PageNo - ($Pagenumber - 1);\n }\n else {\n $CounterStart = $PageNo - ($PageNo % $Pagenumber) + 1;\n }\n $CounterEnd = $CounterStart + $Pagenumber;\n $sql = \"SELECT COUNT(id) FROM \" . $tablename . \" where \" . $where;\n $result_c = $this->doSQL($sql);\n $row = mysql_fetch_array($result_c);\n $RecordCount = $row[0];\n $result = $this->getDynamic($tablename, $where, $orderby . \" LIMIT \" . $StartRow . \",\" . $PageSize);\n if ($RecordCount % $PageSize == 0)\n $MaxPage = $RecordCount / $PageSize;\n else\n $MaxPage = ceil($RecordCount / $PageSize);\n $gotopage = \"\";\n switch ($ModePaging) {\n case \"Full\" :\n $gotopage = '<div class=\"paging_meneame\">';\n if ($MaxPage > 1) {\n if ($PageNo != 1) {\n $PrevStart = $PageNo - 1;\n $gotopage .= ' <a href=\"' . $url . '&PageNo=1\" tile=\"First page\"> « </a>';\n $gotopage .= ' <a href=\"' . $url . '&PageNo=' . $PrevStart . '\" title=\"Previous page\"> ‹ </a>';\n }\n else {\n $gotopage .= ' <span class=\"paging_disabled\"> « </span>';\n $gotopage .= ' <span class=\"paging_disabled\"> ‹ </span>';\n }\n $c = 0;\n for ($c = $CounterStart; $c < $CounterEnd;++$c) {\n if ($c <= $MaxPage)\n if ($c == $PageNo)\n $gotopage .= '<span class=\"paging_current\"> ' . $c . ' </span>';\n else\n $gotopage .= ' <a href=\"' . $url . '&PageNo=' . $c . '\" title=\"Page ' . $c . '\"> ' . $c . ' </a>';\n }\n if ($PageNo < $MaxPage) {\n $NextPage = $PageNo + 1;\n $gotopage .= ' <a href=\"' . $url . '&PageNo=' . $NextPage . '\" title=\"Next page\"> › </a>';\n }\n else {\n $gotopage .= ' <span class=\"paging_disabled\"> › </span>';\n }\n if ($PageNo < $MaxPage)\n $gotopage .= ' <a href=\"' . $url . '&PageNo=' . $MaxPage . '\" title=\"Last page\"> » </a>';\n else\n $gotopage .= ' <span class=\"paging_disabled\"> » </span>';\n }\n $gotopage .= ' </div>';\n break;\n }\n $arr[0] = $result;\n $arr[1] = $gotopage;\n $arr[2] = $tablename;\n return $arr;\n }",
"public function pagination_numbers_set(){\n\t\t\t$this->pages_show_array = array();\n\t\t\t$this->pages_show_array['middle'] = array();\n\t\t\t$this->pages_show_array['prev'] = null;\n\t\t\t$this->pages_show_array['next'] = null;\n\t\t\t$this->pages_show_array['first'] = null;\n\t\t\t$this->pages_show_array['last'] = null;\n\n\t\t\t\n\t\t\tfor ($i=0; $i < sizeof($this->pages_array) ;$i++){\n\n\t\t\t\t//first iteration\n\t\t\t\tif ($i == 0){\n\t\t\t\t\t//prev\n\t\t\t\t\tif ($this->current_page <= 1){\n\t\t\t\t\t\t$this->pages_show_array['prev'] = null;\n\t\t\t\t\t}\n\t\t\t\t\telse if ($this->current_page >= $this->total_pages){\n\t\t\t\t\t\t$this->pages_show_array['prev'] = $this->total_pages - 1;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->pages_show_array['prev'] = $this->current_page - 1;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($this->current_page > $this->pages_to_show){\n\t\t\t\t\t\t$this->pages_show_array['first'] = \"1 ...\";\n\t\t\t\t\t}\n\n\n\t\t\t\t\tarray_push($this->pages_show_array['middle'], $this->pages_array[$i]);\n\n\n\t\t\t\t}\n\n\t\t\t\t//last iteration\n\t\t\t\telse if ($i == sizeof($this->pages_array)-1){\n\n\t\t\t\t\tif ($this->current_page < $this->total_pages - $this->pages_to_show){\n\t\t\t\t\t\t$this->pages_show_array['last'] = \"...\" . $this->total_pages;\n\t\t\t\t\t}\n\n\n\t\t\t\t\t//next\n\t\t\t\t\tif ($this->current_page >= $this->total_pages){\n\t\t\t\t\t\t$this->pages_show_array['next'] = null;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->pages_show_array['next'] = $this->current_page + 1;\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t//middle iterations\n\t\t\t\telse {\n\t\t\t\t\tarray_push($this->pages_show_array['middle'], $this->pages_array[$i]);\n\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\t\n\n\t\t\t\tif (empty($this->pages_show_array['next'])){\n\t\t\t\t\t$this->pages_show_array['next'] = null;\n\t\t\t\t}\n\t\t\t\n\n\t\t}",
"public function do_paging()\n {\n }",
"protected function populateData($param, $data)\n\t{\n\t\t$total = $data instanceof TList ? $data->getCount() : count($data);\n\t\t$pageSize = $this->getPageSize();\n\t\tif($total < 1)\n\t\t{\n\t\t\t$param->setData($data);\n\t\t\t$this->_prevPageList = null;\n\t\t\t$this->_nextPageList = null;\n\t\t\treturn;\n\t\t}\n\n\t\tif($param->getNewPageIndex() < 1)\n\t\t{\n\t\t\t$this->_prevPageList = null;\n\t\t\tif($total <= $pageSize)\n\t\t\t{\n\t\t\t\t$param->setData($data);\n\t\t\t\t$this->_nextPageList = null;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$param->setData(array_slice($data, 0, $pageSize));\n\t\t\t\t$this->_nextPageList = array_slice($data, $pageSize-1,$total);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($total <= $pageSize)\n\t\t\t{\n\t\t\t\t$this->_prevPageList = array_slice($data, 0, $total);\n\t\t\t\t$param->setData(array());\n\t\t\t\t$this->_nextPageList = null;\n\t\t\t}\n\t\t\telse if($total <= $pageSize*2)\n\t\t\t{\n\t\t\t\t$this->_prevPageList = array_slice($data, 0, $pageSize);\n\t\t\t\t$param->setData(array_slice($data, $pageSize, $total));\n\t\t\t\t$this->_nextPageList = null;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->_prevPageList = array_slice($data, 0, $pageSize);\n\t\t\t\t$param->setData(array_slice($data, $pageSize, $pageSize));\n\t\t\t\t$this->_nextPageList = array_slice($data, $pageSize*2, $total-$pageSize*2);\n\t\t\t}\n\t\t}\n\t}",
"function Pagination() \n { \n $this->current_page = 1; \n $this->mid_range = 7; \n $this->items_per_page = (!empty($_GET['ipp'])) ? $_GET['ipp']:$this->default_ipp; \n }",
"public function getRows($input = array(), $data = array())\n\t{\n\t\t\n\n\t\t// Handle any conditions for working with dynamic queries\n\t\t\n\n\t\t// Handle \"Order By\", $input['sidx'] is sort column, $input['sord'] is \"asc\" or \"desc\"\n\t\t\t\t\n\t\n\t\t// Build \"Count\" query\t$input['page'] is current page num, $input['perPage'] is limit\t\n\t\t\n\t\t\n\t\t// Build Main query\n\t\t\n\t\t\n\t\t\n\t\t//******************************************************************************\n\t\t// from\n\t\t$query = DB::table('tad_schools AS schools');\n\t\t$count_query = DB::table('tad_schools AS schools');\n\t\t\n\t\t// sd\n\t\t$query->leftJoin('tad_sd AS sd','sd.id','=','schools.sd_id');\n\t\t\t\t\t\t\n\t\t// cities\n\t\t$query->leftJoin('tad_cities AS cities', function($join)\n\t\t\t\t {\n\t\t\t\t\t\t$join->on('cities.id','=','schools.city_id');\n\t\t\t\t\t});\n\t\t\n\t\t// counties\n\t\t$query->leftJoin('tad_counties AS counties','counties.id','=','schools.county_id');\n\t\t\n\t\t// dept\n\t\t$query->leftJoin('tad_dept AS dept', function($join) \n\t\t\t\t\t{\n\t\t\t\t\t\t$join->on('dept.school_id','=','schools.id');\n\t\t\t\t\t\t$join->on('dept.type_id','=',DB::raw('?'));\n\t\t\t \t})\n\t\t\t ->setBindings(array_merge($query->getBindings(),array(\"4\")));\n\t\t\t\t\t\t\t\t\n\t\t// dept people\n\t\t$query->leftJoin('tad_dept_people AS dept_people', function($join) \n\t\t\t\t\t{\n\t\t\t\t\t\t$join->on('dept_people.dept_id','=','dept.id');\n\t\t\t\t\t\t$join->on('dept_people.personnel_type_id','=',DB::raw('?'));\n\t\t\t \t})\n\t\t\t ->setBindings(array_merge($query->getBindings(),array(\"4\")));\n\t\t\t\t\t\t\t\n\t\t// people\n\t\t$query = $query->leftJoin('tad_people AS people','people.id','=','dept_people.person_id');\n\t\t\n\t\t// school\n\t\t$query->where('schools.active','1');\n\t\tif(!empty($this->grid_settings['params']['cty']))\n\t\t{\n\t\t\t$query->where('schools.city_id',$this->grid_settings['params']['cty']);\n\t\t\t$count_query->where('schools.city_id',$this->grid_settings['params']['cty']);\n\t\t}\n\t\t\t\t\n\t\t// select\n\t\t$query = $query->select( 'schools.id AS schools__id',\n\t\t\t\t\t\t\t\t 'schools.apname AS schools__apname',\n\t\t\t\t\t\t\t\t 'sd.name AS sd__name',\n\t\t\t\t\t\t\t\t 'people.id AS people__id',\n\t\t\t\t\t\t\t\t 'people.first_name AS people__first_name',\n\t\t\t\t\t\t\t\t 'people.middle_name AS people__middle_name',\n\t\t\t\t\t\t\t\t 'people.last_name AS people__last_name',\n\t\t\t\t\t\t\t\t 'people.preferred_name AS people__preferred_name',\n\t\t\t\t\t\t\t\t 'cities.name AS cities__name',\n\t\t\t\t\t\t\t\t 'counties.name AS counties__name',\n\t\t\t\t\t\t\t\t 'schools.phone AS schools__phone',\n\t\t\t\t\t\t\t\t 'schools.fax AS schools__fax',\n\t\t\t\t\t\t\t\t 'schools.url AS schools__url',\n\t\t\t\t\t\t\t\t 'schools.active AS schools__active'\n\t\t\t\t\t\t\t\t);\n\t\t\n\t\t\t\t\t\t\t\t\n\t\t// Run queries\n\t\t$this->grid_settings['count'] = $count_query->count();\n\t\t$offset = EasyInput::compute_offset($this->grid_settings['page'], $this->grid_settings['count'], $this->grid_settings['per_page']);\t\t\n\t\t\n\t\t$rows = $query->skip($offset)\n\t\t\t\t\t ->take($this->grid_settings['per_page'])\n\t\t\t\t\t ->get();\t\t\t\n\t\t\n\t\t\n\t\t// ******************************************************************\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t//Set count and rows properties and return object\n\t\t$rowsObj \t = new stdClass;\n\t\t$rowObj->count = $result_from_count_query;\n\t\t$rowObj->rows = $result_from_main_query;\n\t\t\t\t\t\n\t\treturn $rowsObj;\n\t}",
"function paging($tablename, $fieldlist, $where = '', $orderby = '', $groupby = '', $records=15, $pages=9)\n\t{\n\t\t$converter = new encryption();\n\t\t$dbfunctions = new dbfunctions();\n\t\tif($pages%2==0)\n\t\t\t$pages++;\n\t\t/*\n\t\tThe pages should be odd not even\n\t\t*/\n\t\t$sql = $dbfunctions->GenerateSelectQuery($tablename, $fieldlist, $where, $orderby, $groupby);\n\t\t$dbfunctions->SimpleSelectQuery($sql);\n\t\t$total = $dbfunctions->getNumRows();\n\t\t$page_no = (int) isset($_GET[\"page_no\"])?$converter->decode($_GET[\"page_no\"]):1;\n\t\t/*\n\t\tChecking the current page\n\t\tIf there is no current page then the default is 1\n\t\t*/\n\t\t$limit = ($page_no-1)*$records;\n\t\t$sql = $dbfunctions->GenerateSelectQuery($tablename, $fieldlist, $where, $orderby, $groupby, \" limit $limit,$records\");\n\t\t/*\n\t\tThe starting limit of the query\n\t\t*/\n\t\t$first=1;\n\t\t$previous=$page_no>1?$page_no-1:1;\n\t\t$next=$page_no+1;\n\t\t$last=ceil($total/$records);\n\t\tif($next>$last)\n\t\t\t$next=$last;\n\t\t/*\n\t\tThe first, previous, next and last page numbers have been calculated\n\t\t*/\n\t\t$start=$page_no;\n\t\t$end=$start+$pages-1;\n\t\tif($end>$last)\n\t\t\t$end=$last;\n\t\t/*\n\t\tThe starting and ending page numbers for the paging\n\t\t*/\n\t\tif(($end-$start+1)<$pages)\n\t\t{\n\t\t\t$start-=$pages-($end-$start+1);\n\t\t\tif($start<1)\n\t\t\t\t$start=1;\n\t\t}\n\t\tif(($end-$start+1)==$pages)\n\t\t{\n\t\t\t$start=$page_no-floor($pages/2);\n\t\t\t$end=$page_no+floor($pages/2);\n\t\t\twhile($start<$first)\n\t\t\t{\n\t\t\t\t$start++;\n\t\t\t\t$end++;\n\t\t\t}\n\t\t\twhile($end>$last)\n\t\t\t{\n\t\t\t\t$start--;\n\t\t\t\t$end--;\n\t\t\t}\n\t\t}\n\t\t/*\n\t\tThe above two IF statements are kinda optional\n\t\tThese IF statements bring the current page in center\n\t\t*/\n\t\t$this->sql=$sql;\n\t\t$this->records=$records;\n\t\t$this->pages=$pages;\n\t\t$this->page_no=$page_no;\n\t\t$this->total=$total;\n\t\t$this->limit=$limit;\n\t\t$this->first=$first;\n\t\t$this->previous=$previous;\n\t\t$this->next=$next;\n\t\t$this->last=$last;\n\t\t$this->start=$start;\n\t\t$this->end=$end;\n\t}",
"function pagination($query, $per_page, $page, $url){\n\t\tglobal $con;\n\t\t$query = \"SELECT COUNT(*) as `num` FROM {$query}\";\n\t\t$row = mysqli_fetch_array(mysqli_query($con, $query));\n\t\t$total = $row['num'];\n\t\t$adjacents = \"2\"; \n\t\t \n\t\t$prevlabel = \"‹ Prev\";\n\t\t$nextlabel = \"Next ›\";\n\t\t$lastlabel = \"Last ››\";\n\t\t \n\t\t$page = ($page == 0 ? 1 : $page); \n\t\t$start = ($page - 1) * $per_page; \n\t\t \n\t\t$prev = $page - 1; \n\t\t$next = $page + 1;\n\t\t \n\t\t$lastpage = ceil($total/$per_page);\n\t\t \n\t\t$lpm1 = $lastpage - 1; // //last page minus 1\n\t\t \n\t\t$pagination = \"\";\n\t\tif($lastpage > 1){ \n\t\t\t$pagination .= \"<ul class='pagination'>\";\n\t\t\t$pagination .= \"<li class='page_info'>Page {$page} of {$lastpage}</li>\";\n\t\t\t\t \n\t\t\t\tif ($page > 1) $pagination.= \"<li><a href='{$url}page={$prev}'>{$prevlabel}</a></li>\";\n\t\t\t\t \n\t\t\tif ($lastpage < 7 + ($adjacents * 2)){ \n\t\t\t\tfor ($counter = 1; $counter <= $lastpage; $counter++){\n\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t\t$pagination.= \"<li><a class='current'>{$counter}</a></li>\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$counter}'>{$counter}</a></li>\"; \n\t\t\t\t}\n\t\t\t \n\t\t\t} elseif($lastpage > 5 + ($adjacents * 2)){\n\t\t\t\t \n\t\t\t\tif($page < 1 + ($adjacents * 2)) {\n\t\t\t\t\t \n\t\t\t\t\tfor ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++){\n\t\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t\t\t$pagination.= \"<li><a class='current'>{$counter}</a></li>\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$counter}'>{$counter}</a></li>\"; \n\t\t\t\t\t}\n\t\t\t\t\t$pagination.= \"<li>...</li>\";\n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$lpm1}'>{$lpm1}</a></li>\";\n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$lastpage}'>{$lastpage}</a></li>\"; \n\t\t\t\t\t\t \n\t\t\t\t} elseif($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2)) {\n\t\t\t\t\t \n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page=1'>1</a></li>\";\n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page=2'>2</a></li>\";\n\t\t\t\t\t$pagination.= \"<li>...</li>\";\n\t\t\t\t\tfor ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++) {\n\t\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t\t\t$pagination.= \"<li><a class='current'>{$counter}</a></li>\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$counter}'>{$counter}</a></li>\"; \n\t\t\t\t\t}\n\t\t\t\t\t$pagination.= \"<li>..</li>\";\n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$lpm1}'>{$lpm1}</a></li>\";\n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$lastpage}'>{$lastpage}</a></li>\"; \n\t\t\t\t\t \n\t\t\t\t} else {\n\t\t\t\t\t \n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page=1'>1</a></li>\";\n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page=2'>2</a></li>\";\n\t\t\t\t\t$pagination.= \"<li>..</li>\";\n\t\t\t\t\tfor ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++) {\n\t\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t\t\t$pagination.= \"<li><a class='current'>{$counter}</a></li>\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$counter}'>{$counter}</a></li>\"; \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t \n\t\t\t\tif ($page < $counter - 1) {\n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page={$next}'>{$nextlabel}</a></li>\";\n\t\t\t\t\t$pagination.= \"<li><a href='{$url}page=$lastpage'>{$lastlabel}</a></li>\";\n\t\t\t\t}\n\t\t\t \n\t\t\t$pagination.= \"</ul>\"; \n\t\t}\n\t\t \n\t\treturn $pagination;\n\t}",
"function createPaging($table,$cond=\"\",$id=\"\") {\n\n\t\tglobal $db, $start, $num, $pageFrom, $pageNum, $query, $field;\n\n\t\tif (strlen($cond)) $condString= \"WHERE \".$cond;\n\n\t\t$strSQL\t\t= \"SELECT * from $table $condString \";\n\t\t$result\t\t= $db->Execute($strSQL);\n\t\tif (!$result) print $db->ErrorMsg();\n\t\t$totalData\t= $result->RecordCount();\n\n\t\t$totalPage\t= ceil($totalData/$num);\n\t\t$sisa\t\t= $totalPage - $pageFrom;\n\n\t\tif ( $sisa < $pageNum ) $pageTo = $pageFrom + $sisa; else $pageTo = $pageFrom + $pageNum;\n\n\t\tif ( ($pageFrom - $pageNum) < 0 ) $pageBefore = 0; else $pageBefore = $pageFrom - $pageNum;\n\t\tif ( ($pageFrom + $pageNum) > ($totalPage - $pageNum) ) $pageNext = $totalPage - $pageNum; else $pageNext = $pageFrom + $pageNum;\n\t\tif ( $pageNext < 0 ) $pageNext = 0;\n\n\t\tif ( ($totalPage-$pageNum)<0 ) $pageLast = 0; else $pageLast = $totalPage-$pageNum;\n\n\t\tfor ($i=$pageFrom; $i<$pageTo; ++$i) {\n\t\t\t$page_i = $i + 1;\n\t\t\t$next_i = $i * $num;\n\t\t\tif ($next_i == $start) {\n\t\t\t\t$page .= \" <a href=$PHP_SELF?act=list&start=$next_i&num=$num&pageFrom=$pageFrom&pageNum=$pageNum&id=$id&query=\".rawurlencode($query).\"&field=$field><b>$page_i</b></a> \";\n\t\t\t} else {\n\t\t\t\t$page .= \" <a href=$PHP_SELF?act=list&start=$next_i&num=$num&pageFrom=$pageFrom&pageNum=$pageNum&id=$id&query=\".rawurlencode($query).\"&field=$field>$page_i</a> \";\n\t\t\t}\n\t\t}\n\n\t\t$final =\t\"<a \t\thref=$PHP_SELF?act=list&start=0&num=$num&pageFrom=0&pageNum=$pageNum&id=$id&query=\".rawurlencode($query).\"&field=$field>awal</a>\".\n\t\t\" | <a href=$PHP_SELF?act=list&start=\".($pageBefore*$num).\"&num=$num&pageFrom=$pageBefore&pageNum=$pageNum&id=$id&query=\".rawurlencode($query).\"&field=$field><<</a> \".\n\t\t$page.\n\t\t\" <a href=$PHP_SELF?act=list&start=\".($pageNext*$num).\"&num=$num&pageFrom=$pageNext&pageNum=$pageNum&id=$id&query=\".rawurlencode($query).\"&field=$field>>></a> | \".\n\t\t\"<a href=$PHP_SELF?act=list&start=\".(($totalPage-1)*$num).\"&num=$num&pageFrom=\".$pageLast.\"&pageNum=$pageNum&id=$id&query=\".rawurlencode($query).\"&field=$field>akhir</a>\";\n\n\t\treturn $final;\n\t}",
"public function paginate()\n {\n }",
"abstract protected function createPages($count = 10): array;",
"function getPaging() {\n\t\t//if the total number of rows great than page size\n\t\tif($this->totalRows > $this->pageSize) {\n\t\t\tprint '<div class=\"paging\">';\n\t\t\tprint '<ul>';\n\t\t\tprint $this->first() . $this->prev() . $this->pageList() . $this->next() . $this->end();\n\t\t\tprint '</ul>';\n\t\t\tprint '</div>';\n\t\t}\n }",
"public function paging() {\n\t\t$pages = ceil($this->count('all') / $this->_page_length);\n\t\t$response = array('pages' => $pages, 'page' => $this->_on_page,'length' => $this->_page_length,'items' => $this->count('all'));\n\t\treturn (object) $response;\t\t\n\t}",
"public function query_paging($array){\n\n\t\tif ($array['get_where'] == \"true\") {\n\t\t\t$get_all = $this->db->get_where($array['nama_table'],$array['data_array']);\t\t\n\t\t}\t\t\n\t\telse{\n\t\t\t$get_all = $this->db->get($array['nama_table']);\t\t\n\t\t}\n\t\t$num = $get_all->num_rows();\n\t\t$start = $this->uri->segment($array['uri_segment']);\n\n\t\t$this->db->limit($array['perpage'],$start);\n\t\t$this->db->order_by($array['order_by'], $array['sort']);\n\t\tif ($array['get_where'] == \"true\") {\n\t\t\t$query = $this->db->get_where($array['nama_table'], $array['data_array']);\n\t\t}\n\t\telse{\n\t\t\t$query = $this->db->get($array['nama_table']);\t\n\t\t}\n\t\t$result['query'] = $query->result_array();\n\n\t\t$result['links'] = $this->get_paging($num,$array['perpage'],$array['site_url']);\n\t\treturn $result;\n\t}",
"function getPagelist($sql = '', $fields = array(), $mod = array())\n{\n $count = count(db(sql));\n $totalNum = ceil($count / PAGE_NUM);\n $path = $request_url['path'];\n\n $page = (isset($_GET['page']) && $_GET['page'] != '') ? $_GET['page'];\n// 组装limit语句\n $limit = 'LIMIT' . ($page - 1) * PAGE_NUM . ',' . PAGE_NUM;\n $datas = db($sql, $limit);\n $html = getTable($datas, $fields, $mod);\n $start = ($page - PAGE_OFFSET) > 0 ? $page - PAGE_OFFSET : 1;//获取左侧位置的偏移\n $end = ($page + PAGE_OFFSET) < $totalNum ? $page + PAGE_OFFSET : $totalNum;\n $html .= '<div class=\"page\">';\n if ($page > 1) {\n $html .= '<a href=\"' . $path . '?page=' . ($page - 1) . '\">上一页</a>';\n $html .= '<a href=\"' . $path . '?page=1\">首页</a>';\n }\n for($i = $start;$i<=$end;$i++)\n {\n $class = ($i==$page)?'class=\"on\"':'';\n $html .='<a href =\"'.$path.'?page='.$i.'\"'.$class.'>'.$i.'</a>';\n\n\n }\n if ($page < $totalNum) {\n ;\n $html .= '<a href=\"' . $path . '?page='.$totalNum.'\">尾页</a>';\n $html .= '<a href=\"' . $path . '?page='.($page+1).'\">下一页</a>';\n }\n $html .='共'.$totalNum.'页';\n $html .='</div>';\n return $html;\n}",
"function displayPagingReportGrid()\r\n {\r\n\t $InfoArray = $this->InfoArray();\r\n\t \r\n\t // echo \"<pre>\"; print_r($InfoArray);\r\n \t\r\n\t\tif($InfoArray[\"TOTAL_RESULTS\"] <= RECORD_PER_PAGE)\r\n\t\t\treturn null;\r\n\t /* Everything below here are just examples! */\r\n\t\r\n\t /* Print our some info like \"Displaying page 1 of 49\" */\r\n\t $paging = \"<table class='paging' width='100%'><tr><td align='left'>Displaying page \" . $InfoArray[\"CURRENT_PAGE\"] . \" of \" . $InfoArray[\"TOTAL_PAGES\"] . \"</td>\";\r\n\t \r\n\t\t$paging .= \"<td align='center'>\";\r\n\t /* Print our first link */\r\n\t if($InfoArray[\"CURRENT_PAGE\"]!= 1) {\r\n\t\t $paging .= \"<a href=\\\"javascript:ajaxReportPaging('',1);\\\"><<</a> \";\r\n\t } else {\r\n\t\t $paging .= \"<< \";\r\n\t }\r\n\t\r\n\t /* Print out our prev link */\r\n\t if($InfoArray[\"PREV_PAGE\"]) {\r\n\t\t $paging .= \"<a href=javascript:ajaxReportPaging('',\" . $InfoArray[\"PREV_PAGE\"] . \")>Previous</a> | \";\r\n\t } else {\r\n\t\t $paging .= \"Previous | \";\r\n\t }\r\n\t\r\n\t /* Example of how to print our number links! */\r\n\t for($i=0; $i<count($InfoArray[\"PAGE_NUMBERS\"]); $i++) {\r\n\t\t if($InfoArray[\"CURRENT_PAGE\"] == $InfoArray[\"PAGE_NUMBERS\"][$i]) {\r\n\t\t\t $paging .= \"<strong>\".$InfoArray[\"PAGE_NUMBERS\"][$i] . \"</strong> | \";\r\n\t\t } else {\r\n\t\t\t $paging .= \"<a href=javascript:ajaxReportPaging('',\" . $InfoArray[\"PAGE_NUMBERS\"][$i] . \")>\" . $InfoArray[\"PAGE_NUMBERS\"][$i] . \"</a> | \";\r\n\t\t }\r\n\t }\r\n\t\r\n\t /* Print out our next link */\r\n\t if($InfoArray[\"NEXT_PAGE\"]) {\r\n\t\t $paging .= \" <a href=javascript:ajaxReportPaging('',\" . $InfoArray[\"NEXT_PAGE\"] . \")>Next</a>\";\r\n\t } else {\r\n\t\t $paging .= \" Next\";\r\n\t }\r\n\t\r\n\t /* Print our last link */\r\n\t if($InfoArray[\"CURRENT_PAGE\"]!= $InfoArray[\"TOTAL_PAGES\"]) {\r\n\t\t $paging .= \" <a href=javascript:ajaxReportPaging('',\" . $InfoArray[\"TOTAL_PAGES\"] . \")>>></a>\";\r\n\t } else {\r\n\t\t $paging .= \" >>\";\r\n\t }\r\n\t \r\n\t $InfoArray[\"START_OFFSET\"] = ($InfoArray[\"START_OFFSET\"] == 0) ? 1 : $InfoArray[\"START_OFFSET\"];\r\n\t\t\r\n\t $paging .= \"</td><td align='right'>Displaying results \" . $InfoArray[\"START_OFFSET\"] . \" - \" . $InfoArray[\"END_OFFSET\"] . \" of \" . $InfoArray[\"TOTAL_RESULTS\"] . \"</td></tr></table>\";\r\n\t \r\n\t return $paging;\r\n\t}",
"public function page($pagination_link, $values,$other_url){\n $total_values = count($values);\n $pageno = (int)(isset($_GET[$pagination_link])) ? $_GET[$pagination_link] : $pageno = 1;\n $counts = ceil($total_values/$this->limit);\n $param1 = ($pageno - 1) * $this->limit;\n $this->data = array_slice($values, $param1,$this->limit); \n \n \n if ($pageno > $this->total_pages) {\n $pageno = $this->total_pages;\n } elseif ($pageno < 1) {\n $pageno = 1;\n }\n if ($pageno > 1) {\n $prevpage = $pageno -1;\n $this->firstBack = array($this->functions->base_url_without_other_route().\"/$other_url/1\", \n $this->functions->base_url_without_other_route().\"/$other_url/$prevpage\");\n // $this->functions->base_url_without_other_route()./1\n // $this->firstBack = \"<div class='first-back'><a href='blog/\".basename($_SERVER['PHP_SELF'], '.php').\"/1'>\n // <i class='fa fa-arrow-circle-o-left' aria-hidden='true'></i> First\n // </a> \n // <a href='blog/\".basename($_SERVER['PHP_SELF'], '.php').\"/$prevpage'>\n // <i class='fa fa-arrow-circle-o-left' aria-hidden='true'></i> \n // prev\n // </a></div>\";\n }\n\n // $this->where = \"<div class='page-count'>(Page $pageno of $this->total_pages)</div>\";\n $this->where = \"page $pageno of $this->total_pages\";\n if ($pageno < $this->total_pages) {\n $nextpage = $pageno + 1;\n $this->nextLast = array($this->functions->base_url_without_other_route().\"/$other_url/$nextpage\",\n $this->functions->base_url_without_other_route().\"/$other_url/$this->total_pages\");\n // $this->nextLast = \"blog/\".basename($_SERVER['PHP_SELF'], '.php').\"/$nextpage'>Next \n // <i class='fa fa-arrow-circle-o-right' aria-hidden='true'></i></a> \n // <a href='blog/\".basename($_SERVER['PHP_SELF'], '.php').\"/$this->total_pages'>Last \n // <i class='fa fa-arrow-circle-o-right' aria-hidden='true'></i>\n // </a></div>\";\n }\n\n return $pageno;\n }",
"public function paginate(): array\n {\n $this->fetchRecords();\n $this->fetchTotalRecordCount();\n $this->setHeaders();\n\n return [\n 'data' => $this->data,\n 'total_records' => $this->totalRecords,\n 'current_page' => $this->parameters->getCurrentPage(),\n 'items_per_page' => $this->parameters->getResultsPerPage(),\n 'last_page' => ceil($this->totalRecords / $this->parameters->getResultsPerPage()),\n 'headers' => $this->headers,\n ];\n }",
"public function setPaginationDataSource($postInfos);",
"function set_pagination(){\n\t\tif ($this->rpp>0)\n\t\t{\n\t\t\t$compensation= ($this->num_rowset % $this->rpp)>0 ? 1 : 0;\n\t\t\t$num_pages = (int)($this->num_rowset / $this->rpp) + $compensation;\n\t\t} else {\n\t\t\t$compensation = 0;\n\t\t\t$num_pages = 1;\n\t\t}\n\n\t\tif ($num_pages>1){\n\t\t\t$this->tpl->add(\"pagination\", \"SHOW\", \"TRUE\");\n\n\t\t\tfor ($i=0; $i<$num_pages; $i++){\n\t\t\t\t$this->tpl->add(\"page\", array(\n\t\t\t\t\t\"CLASS\"\t=> \"\",\n\t\t\t\t\t\"VALUE\"\t=> \"\",\n\t\t\t\t));\n\t\t\t\t$this->tpl->parse(\"page\", true);\n\t\t\t}\n\t\t}\n/*\n\t\t\t<patTemplate:tmpl name=\"pagination\" type=\"simplecondition\" requiredvars=\"SHOW\">\n\t\t\t<div class=\"pagination\">\n\t\t\t\t<ul>\t\n\t\t\t\t\t<patTemplate:tmpl name=\"prev_page\" type=\"simplecondition\" requiredvars=\"SHOW\">\n\t\t\t\t\t<li class=\"disablepage\"><a href=\"javascript: return false;\">« Предишна</a></li>\n\t\t\t\t\t</patTemplate:tmpl>\n\t\t\t\t\t<patTemplate:tmpl name=\"page\">\n\t\t\t\t\t<li {CLASS}>{VALUE}</li>\n\t\t\t\t\t</patTemplate:tmpl>\n<!--\n\t\t\t\t\t<li class=\"currentpage\">1</li>\n\t\t\t\t\t<li><a href=\"?page=1&sort=date&type=desc\">2</a></li>\n\t\t\t\t\t<li><a href=\"?page=2&sort=date&type=desc\">3</a></li>\n//-->\n\t\t\t\t\t<patTemplate:tmpl name=\"next_page\" type=\"simplecondition\" requiredvars=\"SHOW\">\n\t\t\t\t\t<li><a href=\"?page=1&sort=date&type=desc\">Следваща »</a></li>\n\t\t\t\t\t</patTemplate:tmpl>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t</patTemplate:tmpl>\n*/\n\t}",
"public static function create_pagination(array $data, int $perPage)\n {\n return new Paginator($data, $perPage);\n }",
"function getPagedStatement($sql,$page,$items_per_page);",
"function Paging(){\n\tif(isset($_GET['page']))\t$page=$_GET['page'];\n\telse $page=5;\n\n\t$onePage=2;\n\t$allPage=ceil($num_row/$onePage);\n\n\tif($page < 1 && $page > $allPage)\texit;\n\n\t$oneSection=2;\n\t$currentSection=ceil($page/$oneSection);\n\t$allSection=ceil($allPage/$oneSection);\n\n\t$firstPage=($currentSection * $oneSection) - ($oneSection - 1);\n\n\tif($currentSection == $allSection)\t$lastPage=$allPage;\n\telse \t$lastPage=$currentSection * $oneSection;\n\n\t$prevPage=(($currentSection-1) * $oneSection);\n\t$nextPage=(($currentSection+1) * $oneSection)-($oneSection-1);\n\n\t$paging='<ul>';\n\n\tif($page != 1)\t\t\t\t\t\t$paging .='<li><a href=\"./Board_list.php?page=1\">First</a></li>';\n\tif($currentSection != 1)\t\t\t\t$paging .='<li><a href=\"./Board_list.php?page='.$prevPage.'\">Prev</a></li>';\n\n\tfor($i=$firstPage;$i<=$lastPage;$i++){\n\t\tif($i==$page)\t\t\t\t\t$paging.='<li>'.$i.'</li>';\n\t\telse \t\t\t\t\t\t\t$paging.='<li><a href=\"./Board_list.php?page='.$i.'\">'.$i.'</a></li>';\n\t}\n\n\tif($currentSection != $allSection)\t$paging.='<li><a href=\"./Board_list.php?page='.$nextPage.'\">Next</a></li>';\n\tif($page!=$allPage)\t\t\t\t\t$paging.='<li><a href=\"./Board_list.php?page='.$allPage.'\">End</a></li>';\n\t\n\t$paging.='</ul>';\n\n\t$currentLimit=($onePage * $page)-$onePage;\n\t$sqlLimit='limit '.$currentLimit.','.$onePage;\n\t\n\t$sql=\"select * from board \".$sqlLimit;\n\t$result=$con->query($sql);\n\techo $sql;\n}",
"public function testCreatePaginatedList(): void\n {\n // given\n $page = 1;\n $dataSetSize = 3;\n $expectedResultSize = 3;\n\n $counter = 0;\n while ($counter < $dataSetSize) {\n $category = new Category();\n $category->setName('Test Category #'.$counter);\n $this->categoryService->save($category);\n\n ++$counter;\n }\n\n // when\n $result = $this->categoryService->createPaginatedList($page);\n\n // then\n $this->assertEquals($expectedResultSize, $result->count());\n }",
"protected function pagination($currentPage, $data, $postPerPage = 4)\n {\n $pagination = null;\n //total number of records\n $countData = count($data);\n\n //total pages\n $totalPages = ceil( $countData / $postPerPage );\n\n if($currentPage <= $totalPages && $currentPage>0)\n {\n $firstIndex = $postPerPage * ($currentPage-1);\n $lastIndex = $currentPage == $totalPages\n ? $countData - 1\n : $currentPage * $postPerPage -1;\n $isNotFirst = ($currentPage != 1);\n $isNotLast = ($currentPage != $totalPages);\n\n $pagination = [\n 'currentPage' => $currentPage,\n 'totalPages' => $totalPages,\n 'firstIndex' => $firstIndex,\n 'lastIndex' => $lastIndex,\n 'isNotFirst' => $isNotFirst,\n 'isNotLast' => $isNotLast\n ];\n }\n return $pagination;\n }",
"function pagination($sql_pagination,$num_results_per_page){\n\tglobal $paginate, $result, $pageQuery;\t\n\t$targetpage = htmlspecialchars($_SERVER['PHP_SELF'] );\n\t$qs =\t'';\n\tif (!empty($_SERVER['QUERY_STRING'])) {\n\t\t$parts = explode(\"&\", $_SERVER['QUERY_STRING']);\n\t\t$newParts = array();\n\t\tforeach ($parts as $val) {\n\t\t\tif (stristr($val, 'page') == false) {\n\t\t\t\tarray_push($newParts, $val);\n\t\t\t}\n\t\t}\n\t\tif (count($newParts) != 0) {\n\t\t\t$qs = \"&\".implode(\"&\", $newParts);\n\t\t} \n\t}\n\t\n\t$limit = $num_results_per_page; \n\t$query = $sql_pagination;\n\t$total_pages = mysql_query($query);\n\t$counts\t\t=\tmysql_num_rows($total_pages);\t\n\t$total_pages = $counts;\n\t$lastpage = ceil($total_pages/$limit);\t\t\n\t$LastPagem1 = $lastpage - 1;\t\n\t$stages = 2;\n\t$page = mysql_real_escape_string($_GET['page']);\n\tif($page){\n\t\t$start = ($page - 1) * $limit; \n\t}else{\n\t\t$start = 0;\t\n\t\t}\n\t\n // Get page data\n\t$pageQuery = $query.\" limit $start,$limit\";\n\t//$result = mysql_query($pageQuery);\n\t\n\t// Initial page num setup\n\tif ($page == 0){$page = 1;}\n\t$prev = $page - 1;\t\n\t$next = $page + 1;\t\t\t\t\t\t\t\n\t\n\t\n\t$paginate = '';\n\tif($lastpage > 1)\n\t{\t\n\t\t$paginate .= \"<div class='paginate'>\";\n\t\t// Previous\n\t\tif ($page > 1){\n\t\t\t$paginate.= \"<a href='$targetpage?page=$prev$qs'>previous</a>\";\n\t\t}else{\n\t\t\t$paginate.= \"<span class='disabled'>previous</span>\";\t}\n\t\t\n\t\t// Pages\t\n\t\tif ($lastpage < 7 + ($stages * 2))\t// Not enough pages to breaking it up\n\t\t{\t\n\t\t\tfor ($counter = $lastpage; $counter >= 1; $counter--)\n\t\t\t{\n\t\t\t\tif ($counter == $page){\n\t\t\t\t\t$paginate.= \"<span class='current'>$counter</span>\";\n\t\t\t\t}else{\n\t\t\t\t\t$paginate.= \"<a href='$targetpage?page=$counter$qs'>$counter</a>\";}\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\telseif($lastpage > 5 + ($stages * 2))\t// Enough pages to hide a few?\n\t\t{\n\t\t\t// Beginning only hide later pages\n\t\t\tif($page < 1 + ($stages * 2))\t\t\n\t\t\t{\n\t\t\t\t$paginate.= \"<a href='$targetpage?page=$lastpage$qs'>$lastpage</a>\";\n\t\t\t\t$paginate.= \"<a href='$targetpage?page=$LastPagem1$qs'>$LastPagem1</a>\";\n\t\t\t\t$paginate.= \"...\";\n\t\t\t\tfor ($counter = 4 + ($stages * 2); $counter >= 1; $counter--)\n\t\t\t\t{\n\t\t\t\t\tif ($counter == $page){\n\t\t\t\t\t\t$paginate.= \"<span class='current'>$counter</span>\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$paginate.= \"<a href='$targetpage?page=$counter$qs'>$counter</a>\";}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t// Middle hide some front and some back\n\t\t\telseif($lastpage - ($stages * 2) > $page && $page > ($stages * 2))\n\t\t\t{\n\t\t\t\t$paginate.= \"<a href='$targetpage?page=$lastpage$qs'>$lastpage</a>\";\n\t\t\t\t$paginate.= \"<a href='$targetpage?page=$LastPagem1$qs'>$LastPagem1</a>\";\n\t\t\t\t$paginate.= \"...\";\n\t\t\t\tfor ($counter =$page + $stages; $counter <= $page - $stages; $counter--)\n\t\t\t\t{\n\t\t\t\t\tif ($counter == $page){\n\t\t\t\t\t\t$paginate.= \"<span class='current'>$counter</span>\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$paginate.= \"<a href='$targetpage?page=$counter$qs'>$counter</a>\";}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t$paginate.= \"...\";\t\n\t\t\t\t$paginate.= \"<a href='$targetpage?page=2$qs'>2</a>\";\n\t\t\t\t$paginate.= \"<a href='$targetpage?page=1$qs'>1</a>\";\n\t\t\t\t\n\t\t\t}\n\t\t\t// End only hide early pages\n\t\t\telse\n\t\t\t{\n\t\t\t\t\n\t\t\t\tfor ($counter =$lastpage; $counter >= $lastpage - (2 + ($stages * 2)) ; $counter--)\n\t\t\t\t{\n\t\t\t\t\tif ($counter == $page){\n\t\t\t\t\t\t$paginate.= \"<span class='current'>$counter</span>\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$paginate.= \"<a href='$targetpage?page=$counter$qs'>$counter</a>\";}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$paginate.= \"...\";\n\t\t\t\t$paginate.= \"<a href='$targetpage?page=2$qs'>2</a>\";\n\t\t\t\t$paginate.= \"<a href='$targetpage?page=1$qs'>1</a>\";\n\t\t\t}\n\t\t}\n\t\t\t\t\t\n\t\t\t\t// Next\n\t\tif ($page < $counter - 1){ \n\t\t\t$paginate.= \"<a href='$targetpage?page=$next$qs'>next</a>\";\n\t\t}else{\n\t\t\t$paginate.= \"<span class='disabled'>next</span>\";\n\t\t\t}\n\t\t\t\n\t\t$paginate.= \"</div>\";\t\t\n\t\n\t\n}\n //echo $total_pages.'Results';\n // pagination\n $paginate;\n}",
"function build_pagelinks($data)\n\t{\n\t\t$data['leave_out'] = isset($data['leave_out']) ? $data['leave_out'] : '';\n\t\t$data['no_dropdown'] = isset($data['no_dropdown']) ? intval( $data['no_dropdown'] ) : 0;\n\t\t$data['USE_ST']\t\t = isset($data['USE_ST'])\t? $data['USE_ST']\t : '';\n\t\t$work = array( 'pages' => 0, 'page_span' => '', 'st_dots' => '', 'end_dots' => '' );\n\t\t\n\t\t$section = !$data['leave_out'] ? 2 : $data['leave_out']; // Number of pages to show per section( either side of current), IE: 1 ... 4 5 [6] 7 8 ... 10\n\t\t\n\t\t$use_st = !$data['USE_ST'] ? 'st' : $data['USE_ST'];\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get the number of pages\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $data['TOTAL_POSS'] > 0 )\n\t\t{\n\t\t\t$work['pages'] = ceil( $data['TOTAL_POSS'] / $data['PER_PAGE'] );\n\t\t}\n\t\t\n\t\t$work['pages'] = $work['pages'] ? $work['pages'] : 1;\n\t\t\n\t\t//-----------------------------------------\n\t\t// Set up\n\t\t//-----------------------------------------\n\t\t\n\t\t$work['total_page'] = $work['pages'];\n\t\t$work['current_page'] = $data['CUR_ST_VAL'] > 0 ? ($data['CUR_ST_VAL'] / $data['PER_PAGE']) + 1 : 1;\n\t\t\n\t\t//-----------------------------------------\n\t\t// Next / Previous page linkie poos\n\t\t//-----------------------------------------\n\t\t\n\t\t$previous_link = \"\";\n\t\t$next_link = \"\";\n\t\t\n\t\tif ( $work['current_page'] > 1 )\n\t\t{\n\t\t\t$start = $data['CUR_ST_VAL'] - $data['PER_PAGE'];\n\t\t\t$previous_link = $this->compiled_templates['skin_global']->pagination_previous_link(\"{$data['BASE_URL']}&$use_st=$start\");\n\t\t}\n\t\t\n\t\tif ( $work['current_page'] < $work['pages'] )\n\t\t{\n\t\t\t$start = $data['CUR_ST_VAL'] + $data['PER_PAGE'];\n\t\t\t$next_link = $this->compiled_templates['skin_global']->pagination_next_link(\"{$data['BASE_URL']}&$use_st=$start\");\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Loppy loo\n\t\t//-----------------------------------------\n\t\t\n\t\tif ($work['pages'] > 1)\n\t\t{\n\t\t\t$work['first_page'] = $this->compiled_templates['skin_global']->pagination_make_jump($work['pages'], $data['no_dropdown']);\n\t\t\t\n\t\t\tif ( 1 < ($work['current_page'] - $section))\n\t\t\t{\n\t\t\t\t$work['st_dots'] = $this->compiled_templates['skin_global']->pagination_start_dots($data['BASE_URL']);\n\t\t\t}\n\t\t\t\n\t\t\tfor( $i = 0, $j= $work['pages'] - 1; $i <= $j; ++$i )\n\t\t\t{\n\t\t\t\t$RealNo = $i * $data['PER_PAGE'];\n\t\t\t\t$PageNo = $i+1;\n\t\t\t\t\n\t\t\t\tif ($RealNo == $data['CUR_ST_VAL'])\n\t\t\t\t{\n\t\t\t\t\t$work['page_span'] .= $this->compiled_templates['skin_global']->pagination_current_page( ceil( $PageNo ) );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif ($PageNo < ($work['current_page'] - $section))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Instead of just looping as many times as necessary doing nothing to get to the next appropriate number, let's just skip there now\n\t\t\t\t\t\t$i = $work['current_page'] - $section - 2;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// If the next page is out of our section range, add some dotty dots!\n\t\t\t\t\t\n\t\t\t\t\tif ($PageNo > ($work['current_page'] + $section))\n\t\t\t\t\t{\n\t\t\t\t\t\t$work['end_dots'] = $this->compiled_templates['skin_global']->pagination_end_dots(\"{$data['BASE_URL']}&$use_st=\".($work['pages']-1) * $data['PER_PAGE']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$work['page_span'] .= $this->compiled_templates['skin_global']->pagination_page_link(\"{$data['BASE_URL']}&$use_st={$RealNo}\", ceil( $PageNo ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$work['return'] = $this->compiled_templates['skin_global']->pagination_compile($work['first_page'],$previous_link,$work['st_dots'],$work['page_span'],$work['end_dots'],$next_link,$data['TOTAL_POSS'],$data['PER_PAGE'], $data['BASE_URL'], $data['no_dropdown'], $use_st);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$work['return'] = $data['L_SINGLE'];\n\t\t}\n\t\n\t\treturn $work['return'];\n\t}",
"function _getPages(& $result, $maxpages = 20) \n {\n $pageParameter = $this->_http_parameters['page'];\n $pageNumber = $result->pageNumber;\n\n $numrows = $result->results;\n if ($numrows == 0) {\n return null;\n }\n $queryString = $result->getInfo('queryString');\n $from = $result->resultsPerPage * ($pageNumber -1);\n $limit = $result->resultsPerPage;\n // Total number of pages\n $pages = (int) ceil($numrows / $limit);\n $data['numpages'] = $pages;\n // first & last page\n $data['firstpage'] = 1;\n $data['lastpage'] = $pages;\n // Build pages array\n $data['pages'] = array ();\n $pageUrl = $_SERVER['PHP_SELF'].'?'.$queryString;\n $pageUrl = str_replace('&'.$pageParameter.'='.$pageNumber, '', $pageUrl);\n $data['firstpageurl'] = $pageUrl.'&'.$pageParameter.'='.\"1\";\n $data['lastpageurl'] = $pageUrl.'&'.$pageParameter.'='.$pages;\n $data['current'] = 0;\n for ($i = 1; $i <= $pages; $i ++) {\n $url = $pageUrl.'&'.$pageParameter.'='. ($i);\n $offset = $limit * ($i -1);\n $data['pages'][$i] = $url;\n // $from must point to one page\n if ($from == $offset) {\n // The current page we are\n $data['current'] = $i;\n }\n }\n // Limit number of pages (Google like display)\n if ($maxpages) {\n $radio = floor($maxpages / 2);\n $minpage = $data['current'] - $radio;\n if ($minpage < 1) {\n $minpage = 1;\n }\n $maxpage = $data['current'] + $radio -1;\n if ($maxpage > $data['numpages']) {\n $maxpage = $data['numpages'];\n }\n foreach (range($minpage, $maxpage) as $page) {\n $tmp[$page] = $data['pages'][$page];\n }\n $data['pages'] = $tmp;\n $data['maxpages'] = $maxpages;\n } else {\n $data['maxpages'] = null;\n }\n // Prev link\n $prev = $from - $limit;\n if ($prev >= 0) {\n $pageUrl = '';\n $pageUrl = $_SERVER['PHP_SELF'].'?'.$queryString;\n if (strpos($pageUrl, ''.$pageParameter.'='.$pageNumber)) {\n $pageUrl = str_replace(\n ''.$pageParameter.'='.$pageNumber, \n ''.$pageParameter.'='. ($pageNumber -1), \n $pageUrl);\n } else {\n $pageUrl .= '&'.$pageParameter.'='. ($pageNumber -1);\n }\n $data['prev'] = $pageUrl;\n } else {\n $data['prev'] = null;\n }\n // Next link\n $next = $from + $limit;\n if ($next < $numrows) {\n $pageUrl = '';\n $pageUrl = $_SERVER['PHP_SELF'].'?'.$queryString;\n if (strpos($pageUrl, ''.$pageParameter.'='.$pageNumber)) {\n $pageUrl = str_replace(\n ''.$pageParameter.'='.$pageNumber, \n ''.$pageParameter.'='. ($pageNumber +1), \n $pageUrl);\n } else {\n $pageUrl .= '&'.$pageParameter.'='. ($pageNumber +1);\n }\n $data['next'] = $pageUrl;\n } else {\n $data['next'] = null;\n }\n // Results remaining in next page & Last row to fetch\n if ($data['current'] == $pages) {\n $data['remain'] = 0;\n $data['to'] = $numrows;\n } else {\n if ($data['current'] == ($pages -1)) {\n $data['remain'] = $numrows - ($limit * ($pages -1));\n } else {\n $data['remain'] = $limit;\n }\n $data['to'] = $data['current'] * $limit;\n }\n $data['numrows'] = $numrows;\n $data['from'] = $from +1;\n $data['limit'] = $limit;\n return $data;\n }",
"private function paginate()\n\t{\n\t\tif ($this->_listModel) {\n\t\t\t$this->_listModel->loadNextPage();\n\t\t}\n\t}",
"public function createPagination($data, $countPage, $path)\n {\n $this->currentPage = LengthAwarePaginator::resolveCurrentPage();\n $this->collection = new Collection($data);\n\n $this->perPage = $countPage;\n $this->currentPageSearchResults = $this->collection->slice(($this->currentPage - 1) * $this->perPage,\n $this->perPage)->all();\n $this->paginatedSearchResults = new LengthAwarePaginator($this->currentPageSearchResults,\n count($this->collection), $this->perPage);\n $this->paginatedSearchResults->setPath($path);\n\n return $this->paginatedSearchResults;\n }",
"public function getPaginated();",
"private function getNumPages() {\n //display all in one page\n if (($this->limit < 1) || ($this->limit > $this->itemscount)) {\n $this->numpages = 1;\n } else {\n //Calculate rest numbers from dividing operation so we can add one\n //more page for this items\n $restItemsNum = $this->itemscount % $this->limit;\n //if rest items > 0 then add one more page else just divide items\n //by limit\n $restItemsNum > 0 ? $this->numpages = intval($this->itemscount / $this->limit) + 1 : $this->numpages = intval($this->itemscount / $this->limit);\n }\n }",
"function pagination($start,$limit,$targetpage,$tbl_name){\n\n\t// How many adjacent pages should be shown on each side?\n\t$adjacents = 3;\n\t\n\t/* \n\t First get total number of rows in data table. \n\t If you have a WHERE clause in your query, make sure you mirror it here.\n\t*/\n\t$query = \"SELECT * FROM $tbl_name\";\n\t$total_pages = mysql_num_rows(mysql_query($query));\n\t\n\t/* Setup vars for query. */\n\t//$targetpage = \"index.php\"; \t//your file name (the name of this file)\n\t//$limit = 5; \t\t\t\t\t\t\t\t//how many items to show per page\n $page = !empty($_GET['page']) ? $_GET['page'] : 1;\n\t$start = !empty($_GET['page']) ? $_GET['page'] : 1;\n\n\t/* Get data. */\n\t//$sql = \"SELECT column_name FROM $tbl_name LIMIT $start, $limit\";\n\t//$result = mysql_query($sql);\n\t\n\t/* Setup page vars for display. */\n\tif ($page == 0) $page = 1;\t\t\t\t\t//if no page var is given, default to 1.\n\t$prev = $page - 1;\t\t\t\t\t\t\t//previous page is page - 1\n\t$next = $page + 1;\t\t\t\t\t\t\t//next page is page + 1\n\t$lastpage = ceil($total_pages/$limit);\t\t//lastpage is = total pages / items per page, rounded up.\n\t$lpm1 = $lastpage - 1;\t\t\t\t\t\t//last page minus 1\n\t\n\t/* \n\t\tNow we apply our rules and draw the pagination object. \n\t\tWe're actually saving the code to a variable in case we want to draw it more than once.\n\t*/\n\t$pagination = \"\";\n\tif($lastpage > 1)\n\t{\t\n\t\t$pagination .= \"<div class=\\\"pagination\\\">\";\n\t\t//previous button\n\t\tif ($page > 1) \n\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$prev\\\">Previous</a>\";\n\t\telse\n\t\t\t$pagination.= \"<span class=\\\"disabled\\\"></span>\";\t\n\t\t\n\t\t//pages\t\n\t\tif ($lastpage < 7 + ($adjacents * 2))\t//not enough pages to bother breaking it up\n\t\t{\t\n\t\t\tfor ($counter = 1; $counter <= $lastpage; $counter++)\n\t\t\t{\n\t\t\t\tif ($counter == $page)\n\t\t\t\t\t$pagination.= \"<span class=\\\"current\\\">$counter</span>\";\n\t\t\t\telse\n\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$counter\\\">$counter</a>\";\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\telseif($lastpage > 5 + ($adjacents * 2))\t//enough pages to hide some\n\t\t{\n\t\t\t//close to beginning; only hide later pages\n\t\t\tif($page < 1 + ($adjacents * 2))\t\t\n\t\t\t{\n\t\t\t\tfor ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++)\n\t\t\t\t{\n\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t\t$pagination.= \"<span class=\\\"current\\\">$counter</span>\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$counter\\\">$counter</a>\";\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$pagination.= \"...\";\n\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$lpm1\\\">$lpm1</a>\";\n\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$lastpage\\\">$lastpage</a>\";\t\t\n\t\t\t}\n\t\t\t//in middle; hide some front and some back\n\t\t\telseif($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2))\n\t\t\t{\n\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=1\\\">1</a>\";\n\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=2\\\">2</a>\";\n\t\t\t\t$pagination.= \"...\";\n\t\t\t\tfor ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++)\n\t\t\t\t{\n\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t\t$pagination.= \"<span class=\\\"current\\\">$counter</span>\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$counter\\\">$counter</a>\";\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$pagination.= \"...\";\n\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$lpm1\\\">$lpm1</a>\";\n\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$lastpage\\\">$lastpage</a>\";\t\t\n\t\t\t}\n\t\t\t//close to end; only hide early pages\n\t\t\telse\n\t\t\t{\n\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=1\\\">1</a>\";\n\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=2\\\">2</a>\";\n\t\t\t\t$pagination.= \"...\";\n\t\t\t\tfor ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++)\n\t\t\t\t{\n\t\t\t\t\tif ($counter == $page)\n\t\t\t\t\t\t$pagination.= \"<span class=\\\"current\\\">$counter</span>\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$pagination.= \"<a href=\\\"$targetpage?page=$counter\\\">$counter</a>\";\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//next button\n\t\tif ($page < $counter - 1) \n\t\t $pagination.= \"<a href=\\\"$targetpage?page=$next\\\">next </a>\";\n\t\telse\n\t\t\t$pagination.= \"<span class=\\\"disabled\\\"></span>\";\n\t\t$pagination.= \"</div>\\n\";\n \n\t}\n \n return $pagination;\n \n}",
"function displayPaging()\r\n {\r\n\t $InfoArray = $this->InfoArray();\r\n \r\n\t /* Everything below here are just examples! */\r\n\t\r\n\t /* Print our some info like \"Displaying page 1 of 49\" */\r\n\t echo \"Displaying page \" . $InfoArray[\"CURRENT_PAGE\"] . \" of \" . $InfoArray[\"TOTAL_PAGES\"] . \"<BR>\";\r\n\t echo \"Displaying results \" . $InfoArray[\"START_OFFSET\"] . \" - \" . $InfoArray[\"END_OFFSET\"] . \" of \" . $InfoArray[\"TOTAL_RESULTS\"] . \"<BR>\";\r\n\t\r\n\t /* Print our first link */\r\n\t if($InfoArray[\"CURRENT_PAGE\"]!= 1) {\r\n\t\t echo \"<a href='?page=1'><<</a> \";\r\n\t } else {\r\n\t\t echo \"<< \";\r\n\t }\r\n\t\r\n\t /* Print out our prev link */\r\n\t if($InfoArray[\"PREV_PAGE\"]) {\r\n\t\t echo \"<a href='?page=\" . $InfoArray[\"PREV_PAGE\"] . \"'>Previous</a> | \";\r\n\t } else {\r\n\t\t echo \"Previous | \";\r\n\t }\r\n\t\r\n\t /* Example of how to print our number links! */\r\n\t for($i=0; $i<count($InfoArray[\"PAGE_NUMBERS\"]); $i++) {\r\n\t\t if($InfoArray[\"CURRENT_PAGE\"] == $InfoArray[\"PAGE_NUMBERS\"][$i]) {\r\n\t\t\t echo $InfoArray[\"PAGE_NUMBERS\"][$i] . \" | \";\r\n\t\t } else {\r\n\t\t\t echo \"<a href='?page=\" . $InfoArray[\"PAGE_NUMBERS\"][$i] . \"'>\" . $InfoArray[\"PAGE_NUMBERS\"][$i] . \"</a> | \";\r\n\t\t }\r\n\t }\r\n\t\r\n\t /* Print out our next link */\r\n\t if($InfoArray[\"NEXT_PAGE\"]) {\r\n\t\t echo \" <a href='?page=\" . $InfoArray[\"NEXT_PAGE\"] . \"'>Next</a>\";\r\n\t } else {\r\n\t\t echo \" Next\";\r\n\t }\r\n\t\r\n\t /* Print our last link */\r\n\t if($InfoArray[\"CURRENT_PAGE\"]!= $InfoArray[\"TOTAL_PAGES\"]) {\r\n\t\t echo \" <a href='?page=\" . $InfoArray[\"TOTAL_PAGES\"] . \"'>>></a>\";\r\n\t } else {\r\n\t\t echo \" >>\";\r\n\t }\r\n\t}",
"public function getPager(TransformerData $data): LinkObject\n {\n $linkObj = $this->specification->getLinkObject();\n\n if (!empty($data->getArguments()->getPage()->getSize())) {\n $linkObj->self = $data->getApiUrl(false);\n\n//----------------------------------------------------------------------------------------------------------------------\n $sorts = $data->getArguments()->getSorts()->get();\n $sort = !empty($sorts)\n ? '&sort='\n : '';\n\n foreach ($sorts as $s) {\n $dir = $s->dir === Sort::DESC\n ? '-'\n : '';\n $sort .= $dir . $s->column . ',';\n }\n\n $sort = trim($sort, ',');\n//----------------------------------------------------------------------------------------------------------------------\n $filters = $data->getArguments()->getFilters();\n $filter = '';\n\n foreach ($filters as $key => $value) {\n if (empty($value)) {\n continue;\n }\n\n $filter .= '&filter[' . $key . ']=' . $value;\n }\n\n $filter = trim($filter, '&');\n//----------------------------------------------------------------------------------------------------------------------\n $pageSize = $data->getArguments()->getPage()->getSize();\n $currentPageNumber = $data->getArguments()->getPage()->getPage();\n\n $prev = (($currentPageNumber - 1) <= 0)\n ? 1\n : ($currentPageNumber - 1);\n\n $maxPage = ceil($data->getDataCount() / $pageSize);\n $next = ($currentPageNumber + 1) > $maxPage\n ? $currentPageNumber\n : ($currentPageNumber + 1);\n//----------------------------------------------------------------------------------------------------------------------\n $query = rtrim(implode('&', [$sort, $filter]), '&');\n\n $linkObj->first = $data->getApiUrl(false) . '?page[number]=1&page[size]=' . $pageSize . $query;\n $linkObj->last = $data->getApiUrl(false) . '?page[number]=' . $maxPage . '&page[size]=' . $pageSize . $query;\n $linkObj->prev = $data->getApiUrl(false) . '?page[number]=' . $prev . '&page[size]=' . $pageSize . $query;\n $linkObj->next = $data->getApiUrl(false) . '?page[number]=' . $next . '&page[size]=' . $pageSize . $query;\n }\n\n return $linkObj;\n }",
"function results_launcher($title, $page, $category_id, $max, $max_rows, $type, $max_page_links = 5, $start_name = 'start')\n{\n if ($max < 1) {\n $max = 1;\n }\n\n require_javascript('pagination');\n\n $out = new Tempcode();\n\n if ($max < $max_rows) { // If they don't all fit on one page\n $part = new Tempcode();\n $num_pages = ($max == 0) ? 0 : min(intval(ceil(floatval($max_rows) / floatval($max))), $max_page_links);\n for ($x = 0; $x < $num_pages; $x++) {\n $cat_url = build_url(array('page' => $page, 'type' => $type, $start_name => ($x == 0) ? null : ($x * $max), 'id' => $category_id), get_module_zone($page));\n $part->attach(do_template('RESULTS_LAUNCHER_PAGE_NUMBER_LINK', array('_GUID' => 'd19c001f3ecff62105f803d541f7d945', 'TITLE' => $title, 'URL' => $cat_url, 'P' => strval($x + 1))));\n }\n\n $num_pages = intval(ceil(floatval($max_rows) / floatval($max)));\n if ($num_pages > $max_page_links) {\n $url_stub = build_url(array('page' => $page, 'type' => $type, 'id' => $category_id), '_SELF');\n $part->attach(do_template('RESULTS_LAUNCHER_CONTINUE', array('_GUID' => '0a55d3c1274618c16bd6d8d2cf36676c', 'TITLE' => $title, 'MAX' => strval($max), 'NUM_PAGES' => integer_format($num_pages), 'URL_STUB' => $url_stub)));\n }\n\n $out->attach(do_template('RESULTS_LAUNCHER_WRAP', array('_GUID' => 'c1c01ee07c456832e7e66a03f26c2288', 'PART' => $part)));\n }\n\n return $out;\n}",
"function get_page_data($conditions_array=array(),$rows_per_page=10,$start=0)\n\t{\n\t\t$rows=array();\n\t\t$this->db->order_by('page_position');\n\t\t$result=$this->db->get_where('red_diy_pages',$conditions_array,$rows_per_page,$start);\n\t\tforeach($result->result_array() as $row)\n\t\t{\n\t\t\t$rows[]=$row;\n\t\t}\n\t\treturn $rows;\n\t}",
"protected function constructPagination($int_nb_tr_total)\n {\n $int_nb_page=ceil($int_nb_tr_total/$this->int_nb_ligne_page);\n \n //- traitement de pages \n $int_max=0;\n for($i=0;$i<$int_nb_page-1;$i++)\n {\n $int_libelle_page=$i+1;\n $int_min=$i*$this->int_nb_ligne_page;\n $int_max=$int_min+$this->int_nb_ligne_page-1;\n $obj_font=new font($int_libelle_page);\n $obj_font->addData('min',$int_min);\n $obj_font->addData('max',$int_max);\n $obj_font->setOnclick(\"table_with_search.getInstance($(this)).paginate($(this));\");\n $obj_font->setStyle('cursor:pointer;');\n $obj_font->setClass('table_with_search__page');\n $arra_font[]=' '.$obj_font->htmlValue();\n }\n \n //- traitement de la dernière page\n $int_min=($int_nb_page-1)*$this->int_nb_ligne_page;\n $int_max=$int_nb_tr_total;\n $int_libelle_page=$int_nb_page;\n $obj_font=new font($int_libelle_page);\n $obj_font->addData('min',$int_min);\n $obj_font->addData('max',$int_max);\n $obj_font->setOnclick(\"table_with_search.getInstance($(this)).paginate($(this));\");\n $obj_font->setStyle('cursor:pointer;');\n $obj_font->setClass('table_with_search__page');\n $arra_font[]=' '.$obj_font->htmlValue();\n \n $obj_tr=new tr();\n $obj_td=$obj_tr->addTd($arra_font);\n $obj_td->setColspan(count($this->arra_column_name));\n $obj_td->setAlign('center');\n $obj_td->setClass('contenu table_with_search__constructPagination');\n \n return $obj_tr;\n }",
"function datatable(){\n \n $page = $_POST['page']; // get the requested page\n\t\t$limit = $_POST['rows']; // get how many rows we want to have into the grid\n\t\t$sidx = $_POST['sidx']; // get index row - i.e. user click to sort\n\t\t$sord = $_POST['sord']; // get the direction\n\t\tif(!$sidx) $sidx =1;\n\n\t\t$fields_arrayPackage = array(\n\t\t\t'j.radiographer_first_id','j.radiographer_first_name','u.first_name','j.radiographer_first_createOn as createOn','u1.first_name as firstname','j.radiographer_first_updateOn as updateOn'\n\t\t);\n\t\t$join_arrayPackage = array(\n\t\t\t'users AS u' => 'u.id = j.radiographer_first_createBy',\n\t\t\t'users AS u1' => 'u1.id = j.radiographer_first_updateBy',\n\t\t);\n\t\t$where_arrayPackage = array('j.radiographer_first_show_status' =>'1');\n\t\t$orderPackage = $sidx.' '. $sord;\n\n\t\t$count = $this->mcommon->join_records_counts($fields_arrayPackage, 'jr_radiographer_first as j', $join_arrayPackage, $where_arrayPackage, '', $orderPackage);\n\n\t\tif( $count >0 ) {\n\t\t\t$total_pages = ceil($count/$limit);\n\t\t} else {\n\t\t\t$total_pages = 0;\n\t\t}\n\t\tif ($page > $total_pages) $page=$total_pages;\n\t\t$start = $limit*$page - $limit; // do not put $limit*($page - 1)\n\n\t\t$responce->page = $page;\n\t\t$responce->total = $total_pages;\n\t\t$responce->records = $count;\n\t\t$dataTable_Details = $this->mcommon->join_records_all($fields_arrayPackage, 'jr_radiographer_first as j', $join_arrayPackage, $where_arrayPackage, '', $orderPackage,'object');\n\n\t\tif (isset($dataTable_Details) && !empty($dataTable_Details)) {\n\t\t\t$i=0;\n\t foreach ($dataTable_Details->result() as $dataDetail) {\n\t \t$responce->rows[$i]['id'] = $dataDetail->radiographer_first_id;\n\t \t//$responce->rows[$i]['cell']= array($dataDetail->ndtContractor_id);\n\t \t$responce->rows[$i]['cell']['edit_radiographer_first_id'] = get_buttons_new_only_Edit($dataDetail->radiographer_first_id,'master/Radiographer1/');\n\t \t$responce->rows[$i]['cell']['delete_radiographer_first_id'] = get_buttons_new_only_Delete($dataDetail->radiographer_first_id,'master/Radiographer1/');\n\t \t$responce->rows[$i]['cell']['radiographer_first_name'] = $dataDetail->radiographer_first_name;\n\t \t$responce->rows[$i]['cell']['first_name'] = $dataDetail->first_name;\n\t \t$responce->rows[$i]['cell']['createOn'] = get_date_timeformat($dataDetail->createOn);\n\t \t$responce->rows[$i]['cell']['firstname'] = $dataDetail->firstname;\n\t \t$responce->rows[$i]['cell']['updateOn'] = get_date_timeformat($dataDetail->updateOn);\n\t \t\t$i++;\n\t }\n\t //$responce->userData['page'] = $responce->page;\n\t //$responce->userData['totalPages'] = $responce->total;\n\t $responce->userData->totalrecords = $responce->records;\n\t } \n\t\techo json_encode($responce);\n }",
"function createPaging($query,$resultPerPage) \r\n {\r\n\t\t\r\n $this->query = $query;\r\n $this->resultPerPage= $resultPerPage;\r\n\t\r\n $this->fullresult = mysql_query($this->query);\r\n $this->totalresult = mysql_num_rows($this->fullresult);\r\n $this->pages = $this->findPages($this->totalresult,$this->resultPerPage);\r\n if(isset($_GET['page']) && $_GET['page']>0) {\r\n $this->openPage = $_GET['page'];\r\n if($this->openPage > $this->pages) { \r\n $this->openPage = 1;\r\n }\r\n $start = $this->openPage*$this->resultPerPage-$this->resultPerPage;\r\n $end = $this->resultPerPage;\r\n $this->query.= \" LIMIT $start,$end\";\r\n }\r\n elseif($_GET['page']>$this->pages) {\r\n $start = $this->pages;\r\n $end = $this->resultPerPage;\r\n $this->query.= \" LIMIT $start,$end\";\r\n }\r\n else {\r\n $this->openPage = 1;\r\n $this->query .= \" LIMIT 0,$this->resultPerPage\";\r\n }\r\n $this->resultpage = mysql_query($this->query);\r\n\t\t\r\n }",
"function pagenation($offset) {\r\n\r\n $this->offset = NULL;\r\n $this->arrayText = NULL;\r\n $this->pages = NULL;\r\n $this->offset = $offset;\r\n if ($this->countRecord) {\r\n $this->pages = intval($this->countRecord / $this->limit);\r\n }\r\n if ($this->countRecord % $this->limit) {\r\n $this->pages++;\r\n }\r\n $countRecordArray = count($this->arrayVariable);\r\n $offsetloop = 0;\r\n for ($loop_page = 1; $loop_page <= $this->pages; $loop_page++) {\r\n $string=\" <li><a href=\\\"javascript:void(0)\\\" \";\r\n if ($countRecordArray >= 1) {\r\n \r\n for ($k = 0; $k < $countRecordArray; $k++) {\r\n\r\n if ($this->arrayVariable[$k] == \"offset\") {\r\n $this->arrayVariableValue[$k] = $offsetloop;\r\n $ajaxOffset = $this->arrayVariableValue[$k];\r\n }\r\n $this->arrayText = $this->arrayVariable[$k] . \"=\" . $this->arrayVariableValue[$k] . \"&\" . $this->arrayText;\r\n }\r\n } else {\r\n $string.=\"Do play play la I know you want to hack it ?\";\r\n }\r\n $string.=$this->arrayText;\r\n $string.=\" onClick=\\\"ajaxQuery('\".basename($_SERVER['PHP_SELF']).\"','not',\".$ajaxOffset.\", '\".$this->arrayText.\"')\\\">\" . $loop_page . \"</a></li>\";\r\n $offsetloop = $offsetloop + $this->limit;\r\n }\r\n return $string;\r\n }",
"function createPagingCustom($table,$cond=\"\",$nik=\"\") {\n\n\t\tglobal $db, $start, $num, $pageFrom, $pageNum, $query, $field;\n\n\t\tif (strlen($cond)) $condString= \"WHERE \".$cond;\n\n\t\t$strSQL\t\t= \"SELECT * from $table $condString \";\n\t\t$result\t\t= $db->Execute($strSQL);\n\t\tif (!$result) print $db->ErrorMsg();\n\t\t$totalData\t= $result->RecordCount();\n\n\t\t$totalPage\t= ceil($totalData/$num);\n\t\t$sisa\t\t= $totalPage - $pageFrom;\n\n\t\tif ( $sisa < $pageNum ) $pageTo = $pageFrom + $sisa; else $pageTo = $pageFrom + $pageNum;\n\n\t\tif ( ($pageFrom - $pageNum) < 0 ) $pageBefore = 0; else $pageBefore = $pageFrom - $pageNum;\n\t\tif ( ($pageFrom + $pageNum) > ($totalPage - $pageNum) ) $pageNext = $totalPage - $pageNum; else $pageNext = $pageFrom + $pageNum;\n\t\tif ( $pageNext < 0 ) $pageNext = 0;\n\n\t\tif ( ($totalPage-$pageNum)<0 ) $pageLast = 0; else $pageLast = $totalPage-$pageNum;\n\n\t\tfor ($i=$pageFrom; $i<$pageTo; ++$i) {\n\t\t\t$page_i = $i + 1;\n\t\t\t$next_i = $i * $num;\n\t\t\tif ($next_i == $start) {\n\t\t\t\t$page .= \" <a href=$PHP_SELF?act=list&start=$next_i&num=$num&pageFrom=$pageFrom&pageNum=$pageNum&nik=$nik&query[]=\".rawurlencode($query).\"&field[]=$field><b>$page_i</b></a> \";\n\t\t\t} else {\n\t\t\t\t$page .= \" <a href=$PHP_SELF?act=list&start=$next_i&num=$num&pageFrom=$pageFrom&pageNum=$pageNum&nik=$nik&query[]=\".rawurlencode($query).\"&field[]=$field>$page_i</a> \";\n\t\t\t}\n\t\t}\n\n\t\t$final =\t\"<a \t\thref=$PHP_SELF?act=list&start=0&num=$num&pageFrom=0&pageNum=$pageNum&nik=$nik&query[]=\".rawurlencode($query).\"&field[]=$field>awal</a>\".\n\t\t\" | <a href=$PHP_SELF?act=list&start=\".($pageBefore*$num).\"&num=$num&pageFrom=$pageBefore&pageNum=$pageNum&nik=$nik&query[]=\".rawurlencode($query).\"&field[]=$field><<</a> \".\n\t\t$page.\n\t\t\" <a href=$PHP_SELF?act=list&start=\".($pageNext*$num).\"&num=$num&pageFrom=$pageNext&pageNum=$pageNum&nik=$nik&query[]=\".rawurlencode($query).\"&field[]=$field>>></a> | \".\n\t\t\"<a href=$PHP_SELF?act=list&start=\".(($totalPage-1)*$num).\"&num=$num&pageFrom=\".$pageLast.\"&pageNum=$pageNum&nik=$nik&query[]=\".rawurlencode($query).\"&field[]=$field>akhir</a>\";\n\n\t\treturn $final;\n\t}",
"function paginator($params, $count) {\n $limit = $params->getLimit();\n if ($count > $limit && $count!=0){\n $page = $params->getPage(); \n $controllerName = strtolower(Zend_Controller_Front::getInstance()->getRequest()->getControllerName()); \n $pagination = ($page != 1)?'<span><a href=\"\"onclick=\"Grid.page('.($page-1).'); return false\"><<</a></span>':''; \n if ($page > 10){ \n $pagination .= '<a href=\"\" onclick=\"Grid.page(1); return false;\">1</a>';\n $pagination .= '<span>...</span>';\n }\n $pageSpliter = ($page - 5 >= 1 ? $page - 4 : 1);\n for ($i = $pageSpliter; ($count + $limit) / ($i*$limit) > 1 && $i < $pageSpliter + 10; $i++) {\n $pagination .= '<a href=\"\" onclick=\"Grid.page('.$i.'); return false;\" class=\"'. ($page == $i ? \"active\":\"\") .'\">'.$i.'</a>';\n } \n $lastPage = floor(($count + $limit -1) / $limit);\n if ($page < $lastPage - 10){\n $pagination .= '<span>...</span>'; \n $pagination .= '<a href=\"\" onclick=\"Grid.page('. $lastPage .'); return false;\">'.$lastPage .'</a>';\n }\n $pagination .= ($page < ($count/$limit))?'<span><a href=\"\"onclick=\"Grid.page('.($page+1).'); return false\">>></a></span>':''; \n echo '<div class=\"pagination\">'; \n echo $pagination; \n echo '</div>';\n } \n }",
"public function get_suggested_notes_on_deals_paged($start_offset,$num_to_fetch,&$data_arr,&$data_count){\n global $g_mc;\n $q = \"select r.suggestion,r.id as note_id,r.deal_id,t.company_id,value_in_billion,date_of_deal,deal_cat_name,deal_subcat1_name,deal_subcat2_name,c.name as deal_company_name,m.f_name,m.l_name,m.designation,w.name as work_company from \".TP.\"transaction_note_suggestions as r left join \".TP.\"transaction as t on(r.deal_id=t.id) left join \".TP.\"company as c on(t.company_id=c.company_id) left join \".TP.\"member as m on(r.reported_by=m.mem_id) left join \".TP.\"company as w on(m.company_id=w.company_id) order by t.id desc limit \".$start_offset.\",\".$num_to_fetch;\n $res = mysql_query($q);\n if(!$res){\n return false;\n }\n //////////////////\n $data_count = mysql_num_rows($res);\n if(0==$data_count){\n return true;\n }\n /////////////////\n for($i=0;$i<$data_count;$i++){\n $data_arr[$i] = mysql_fetch_assoc($res);\n $data_arr[$i]['deal_company_name'] = $g_mc->db_to_view($data_arr[$i]['deal_company_name']);\n $data_arr[$i]['suggestion'] = nl2br($g_mc->db_to_view($data_arr[$i]['suggestion']));\n $data_arr[$i]['f_name'] = $g_mc->db_to_view($data_arr[$i]['f_name']);\n $data_arr[$i]['l_name'] = $g_mc->db_to_view($data_arr[$i]['l_name']);\n $data_arr[$i]['work_company'] = $g_mc->db_to_view($data_arr[$i]['work_company']);\n }\n return true;\n }",
"public function get_deal_suggestion_paged($start_offset,$num_to_fetch,&$data_arr,&$data_count){\n global $g_mc;\n \n $q = \"select id,deal_company_name,value_in_million,date_announced,date_closed,deal_cat_name,deal_subcat1_name,deal_subcat2_name,date_suggested,m.f_name,m.l_name,m.designation,w.name as work_company from \".TP.\"transaction_suggestions as s left join \".TP.\"member as m on(s.suggested_by=m.mem_id) left join \".TP.\"company as w on(m.company_id=w.company_id) where deal_id='0' order by date_suggested desc limit \".$start_offset.\",\".$num_to_fetch;\n $res = mysql_query($q);\n if(!$res){\n return false;\n }\n $data_count = mysql_num_rows($res);\n if(0 == $data_count){\n return true;\n }\n ////////////////////////////////////////\n for($i=0;$i<$data_count;$i++){\n $data_arr[$i] = mysql_fetch_assoc($res);\n $data_arr[$i]['deal_company_name'] = $g_mc->db_to_view($data_arr[$i]['deal_company_name']);\n }\n return true;\n }",
"function AdvancedPagination($total, $current, $last) {\n $pages = [];\n if ($current < 1) {\n $current = 1;\n } elseif ($current > $last) {\n $current = $last;\n }\n $pages['current'] = $current;\n $pages['previous'] = ($current == 1) ? $current : $current - 1;\n $pages['next'] = ($current == $last) ? $last : $current + 1;\n $pages['last'] = $last;\n $pages['pages'] = [];\n $show = 5; # Number of page links to show\n #\n # At the beginning\n #\n if ($current == 1) {\n if ($pages['next'] == $current) {\n return $pages; # if one page only\n }\n for ($i = 0; $i < $show; $i++) {\n if ($i == $last) {\n break;\n }\n array_push($pages['pages'], $i + 1);\n }\n return $pages;\n }\n #\n # At the end\n #\n if ($current == $last) {\n $start = $last - $show;\n if ($start < 1) {\n $start = 0;\n }\n for ($i = $start; $i < $last; $i++) {\n array_push($pages['pages'], $i + 1);\n }\n return $pages;\n }\n #\n # In the middle\n #\n $start = $current - $show;\n if (($total > 5) && ($current > 3)) $start = $current - 3;\n if (($last - $current) < 2) $start = $current - 4;\n if ($start < 1) $start = 0;\n for ($i = $start; $i < $current; $i++) {\n array_push($pages['pages'], $i + 1);\n }\n for ($i = ($current + 1); $i < ($current + $show); $i++) {\n if ($i == ($last + 1)) {\n break;\n }\n array_push($pages['pages'], $i);\n }\n return $pages;\n}",
"public function genPageNums()\n\t{\n\t\t$pageLinks = array();\t\n\t\n\t\tfor($i=1; $i<=$this->numofpages; $i++)\n\t\t{\n\t\t\t$page = $i;\n\t\t\t$item = $this->itemTpl;\t\t\t\n\t\t\tif($this->page == $i)\n\t\t\t{\n\t\t\t\t$styleclass = 'page_current';\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$styleclass = 'page';\n\t\t\t}\n\t\t\t$item = str_replace(array('{pageclass}','{pagelink}', '{pagetext}'),\n\t\t\t\t\t\t\t\tarray($styleclass, $this->prepend.$page.$this->append, $i),\n\t\t\t\t\t\t\t\t$item);\t\n\t\t\t$pageLinks[$i] = $item;\n\t\t}\t\n\t\n\t\tif(($this->totalrows % $this->limit) != 0)\n\t\t{\n\t\t\t$this->numofpages++;\n\t\t\t$page = $i;\n\t\t\t$item = $this->itemTpl;\t\t\t\n\t\t\tif($this->page == $i)\n\t\t\t{\n\t\t\t\t$styleclass = 'page_current';\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$styleclass = 'page';\n\t\t\t}\n\t\t\t$item = str_replace(array('{pageclass}','{pagelink}', '{pagetext}'),\n\t\t\t\t\t\t\t\tarray($styleclass, $this->prepend.$page.$this->append, $i),\n\t\t\t\t\t\t\t\t$item);\t\t\t\t\t\n\t\t\t$pageLinks[$i] = $item;\n\t\t}\n\t\tksort($pageLinks);\n\t\t$this->pagination['nums'] = $pageLinks;\n\t}",
"function paging($condtion='1')\r\n {\r\n /*\r\n $url = '';\r\n \t if(isset($_GET[\"brand\"])){\r\n \t \t$value = trim($_GET['brand']);\r\n \t \tif($value != \"\"){\r\n\t \t \t$condtion = sprintf(\"brand='%s'\",$value);\r\n\t \t \t$url = '&brand='.$value;\r\n \t \t}\r\n \t }\r\n \t \r\n \t if(isset($_GET[\"module\"])){\r\n \t \t$value = trim($_GET['module']);\r\n \t \tif($value != \"\"){\r\n\t \t \t$module = sprintf(\"series='%s'\",$value);\r\n\t \t \t$condtion = $condtion.' and '.$module;\r\n\t \t \t$url = $url.'&module='.$value;\r\n \t \t}\r\n \t }\r\n \t \r\n \t if(isset($_GET[\"part\"])){\r\n \t \t$value = trim($_GET['part']);\r\n \t \tif($value != \"\"){ \t \t\r\n\t \t \t$part = sprintf(\"module='%s'\",$value);\r\n\t \t \t$condtion = $condtion.' and '.$part;\r\n\t \t \t$url = $url.'&part='.$value;\r\n \t \t}\r\n \t }\r\n \t \r\n \t if(isset($_GET[\"key\"])){\r\n \t \t$value = trim($_GET[\"key\"]);\r\n \t \tif($value != \"\"){\r\n\t \t \t$condtion = $this->key_query($value,$url);\r\n\t \t \techo \"++++++++++\".$condtion;\r\n\t \t \t//$url = $url.'&part='.$value; \t \t\r\n \t \t}\r\n \t }\r\n \t */\r\n // get current page index\r\n $page = 1;\r\n \t if(isset($_GET[\"page\"])){\r\n \t \t$page = $_GET['page'];\r\n \t }\r\n \t \r\n \t // set paging parameters\r\n $number = 6; \r\n $total = $this->total;\r\n $url = $this->pget;\r\n $condtion = $this->cond;\r\n //$total = $this->getTotal($condtion);\r\n \r\n $url = '?page={page}'.$url; \r\n $pager = new Paging($total,$number,$page,$url);\r\n \t \r\n \t // get publish records\r\n\t $db = GLOBALDB();\r\n $sql = \"SELECT * FROM publish WHERE \".$condtion.\" order by id desc LIMIT \".$pager->limit.\",\".$pager->size;\r\n $result = $db->query($sql); \r\n $this->display($result);\r\n \r\n // show paging bar\r\n //echo $sql;\r\n\t $pager->show();\r\n }",
"function page($num = 1)\n {\n // retrieve all data from history table per sorting\n $source = $this->factory->sortAll($this->sort);\n $records = array(); // start with an empty extract\n\n // use a foreach loop, because the record indices may not be sequential\n $index = 0; // where are we in the tasks list\n $count = 0; // how many items have we added to the extract\n $start = ($num - 1) * $this->itemsPerPage;\n \n foreach($source as $record) {\n if ($index++ >= $start) {\n $records[] = $record;\n $count++;\n }\n if ($count >= $this->itemsPerPage) break;\n }\n \n $this->data['pagination'] = $this->pagenav($num);\n $this->showPage($records);\n }",
"public function getPerPage();",
"public function paginateLatestQueries($page = 1, $perPage = 15);",
"function &getData($from, $limit, $numrows, $maxpages = false)\n {\n if (empty($numrows) || ($numrows < 0)) {\n return null;\n }\n $from = (empty($from)) ? 0 : $from;\n\n if ($limit <= 0) {\n return PEAR::raiseError (null, 'wrong \"limit\" param', null,\n null, null, 'DB_Error', true);\n }\n\n // Total number of pages\n $pages = ceil($numrows/$limit);\n $data['numpages'] = $pages;\n\n // first & last page\n $data['firstpage'] = 1;\n $data['lastpage'] = $pages;\n\n // Build pages array\n $data['pages'] = array();\n for ($i=1; $i <= $pages; $i++) {\n $offset = $limit * ($i-1);\n $data['pages'][$i] = $offset;\n // $from must point to one page\n if ($from == $offset) {\n // The current page we are\n $data['current'] = $i;\n }\n }\n if (!isset($data['current'])) {\n return PEAR::raiseError (null, 'wrong \"from\" param', null,\n null, null, 'DB_Error', true);\n }\n\n // Limit number of pages (goole algoritm)\n if ($maxpages) {\n $radio = floor($maxpages/2);\n $minpage = $data['current'] - $radio;\n if ($minpage < 1) {\n $minpage = 1;\n }\n $maxpage = $data['current'] + $radio - 1;\n if ($maxpage > $data['numpages']) {\n $maxpage = $data['numpages'];\n }\n foreach (range($minpage, $maxpage) as $page) {\n $tmp[$page] = $data['pages'][$page];\n }\n $data['pages'] = $tmp;\n $data['maxpages'] = $maxpages;\n } else {\n $data['maxpages'] = null;\n }\n\n // Prev link\n $prev = $from - $limit;\n $data['prev'] = ($prev >= 0) ? $prev : null;\n\n // Next link\n $next = $from + $limit;\n $data['next'] = ($next < $numrows) ? $next : null;\n\n // Results remaining in next page & Last row to fetch\n if ($data['current'] == $pages) {\n $data['remain'] = 0;\n $data['to'] = $numrows;\n } else {\n if ($data['current'] == ($pages - 1)) {\n $data['remain'] = $numrows - ($limit*($pages-1));\n } else {\n $data['remain'] = $limit;\n }\n $data['to'] = $data['current'] * $limit;\n }\n $data['numrows'] = $numrows;\n $data['from'] = $from + 1;\n $data['limit'] = $limit;\n\n return $data;\n }",
"private function pagedata_preprocessor()\r\n {/*{{{*/\r\n $items_st = $this->items_ordered_struct;\r\n // the number of items per page\r\n $this->pagedata['limit'] = isset(self::$preferences->item->itemsperpage) \r\n ? self::$preferences->item->itemsperpage : 10;\r\n if(self::$is_admin_panel)\r\n $this->pagedata['limit'] = isset(self::$preferences->item->bitemsperpage) \r\n ? self::$preferences->item->bitemsperpage : 10;\r\n $this->pagedata['viewpage'] = isset(self::$preferences->item->page) \r\n ? self::$preferences->item->page : '';\r\n // How many adjacent pages should be shown on each side\r\n $this->pagedata['adjacents'] = 3;\r\n // last page\r\n $this->pagedata['lastpage'] = (int)(ceil(count($items_st) / $this->pagedata['limit']));\r\n // handle get\r\n if(isset(self::$input['page']) && self::$input['page'] <= 0)\r\n self::$input['page'] = 1;\r\n elseif(isset(self::$input['page']) && self::$input['page'] > $this->pagedata['lastpage'])\r\n self::$input['page'] = $this->pagedata['lastpage'];\r\n\t $this->pagedata['page'] = !empty(self::$input['page']) ? (int)self::$input['page'] : 1;\r\n // first page to display\r\n $this->pagedata['start'] = !empty($this->pagedata['page']) \r\n ? (($this->pagedata['page'] - 1) * $this->pagedata['limit']) : 0;\r\n // next page\r\n $this->pagedata['next'] = $this->pagedata['page'] + 1;\r\n\r\n // just for counting of rows\r\n $act_row = $this->pagedata['start'];\r\n $index = $this->pagedata['start'] + $this->pagedata['limit'];\r\n\r\n // active item keys\r\n\t\t$this->pagedata['itemkeys'] = array();\r\n while(isset($items_st[$act_row]) && $act_row < $index)\r\n {\r\n $this->pagedata['itemkeys'][] = $act_row;\r\n $act_row++;\r\n }\r\n\r\n // initialize jquery id\r\n $this->pagedata['jid'] = '';\r\n if(isset(self::$input['delete']))\r\n $this->pagedata['jid'] = safe_slash_html_input(self::$input['delete']);\r\n elseif(isset(self::$input['promo']))\r\n $this->pagedata['jid'] = safe_slash_html_input(self::$input['promo']);\r\n elseif(isset(self::$input['visible']))\r\n $this->pagedata['jid'] = safe_slash_html_input(self::$input['visible']);\r\n \r\n // Setup page vars to display.\r\n\t $this->pagedata['prev'] = $this->pagedata['page'] - 1;\r\n\t //$this->pagedata['next'] = $this->pagedata['page'] + 1;\r\n $this->pagedata['lpm1'] = $this->pagedata['lastpage'] - 1;\r\n\r\n // try to fix our url inside admin, remove redundant 'page' param\r\n // todo: search engine friendly URL \r\n $this->pagedata['pageurl'] = self::$properties['paths']['siteurl'].return_page_slug().'/?page=';\r\n if(self::$is_admin_panel)\r\n if(strpos(curPageURL(),'&page=')!==false)\r\n $this->pagedata['pageurl'] = reparse_url(parse_url(curPageURL()));\r\n else\r\n $this->pagedata['pageurl'] = curPageURL().'&cat='.ImCategory::$current_category.'&page=';\r\n\r\n }",
"function _buildDataObject()\n\t{\n\t\t// Initialize variables\n\t\t$data = new stdClass();\n\n\t\t$data->all\t= new JPaginationObject(JText::_('View All'));\n\t\tif (!$this->_viewall) {\n\t\t\t$data->all->base\t= '0';\n\t\t\t$data->all->link\t= JRoute::_(\"&limitstart=\");\n\t\t}\n\n\t\t// Set the start and previous data objects\n\t\t$data->start\t= new JPaginationObject(JText::_('Start'));\n\t\t$data->previous\t= new JPaginationObject(JText::_('Prev'));\n\n\t\tif ($this->get('pages.current') > 1)\n\t\t{\n\t\t\t$page = ($this->get('pages.current') -2) * $this->limit;\n\n\t\t\t$page = $page == 0 ? '' : $page; //set the empty for removal from route\n\n\t\t\t$data->start->base\t= '0';\n\t\t\t$data->start->link\t= JRoute::_(\"&limitstart=\");\n\t\t\t$data->previous->base\t= $page;\n\t\t\t$data->previous->link\t= JRoute::_(\"&limitstart=\".$page);\n\t\t}\n\n\t\t// Set the next and end data objects\n\t\t$data->next\t= new JPaginationObject(JText::_('Next'));\n\t\t$data->end\t= new JPaginationObject(JText::_('End'));\n\n\t\tif ($this->get('pages.current') < $this->get('pages.total'))\n\t\t{\n\t\t\t$next = $this->get('pages.current') * $this->limit;\n\t\t\t$end = ($this->get('pages.total') -1) * $this->limit;\n\n\t\t\t$data->next->base\t= $next;\n\t\t\t$data->next->link\t= JRoute::_(\"&limitstart=\".$next);\n\t\t\t$data->end->base\t= $end;\n\t\t\t$data->end->link\t= JRoute::_(\"&limitstart=\".$end);\n\t\t}\n\n\t\t$data->pages = array();\n\t\t$stop = $this->get('pages.stop');\n\t\tfor ($i = $this->get('pages.start'); $i <= $stop; $i ++)\n\t\t{\n\t\t\t$offset = ($i -1) * $this->limit;\n\n\t\t\t$offset = $offset == 0 ? '' : $offset; //set the empty for removal from route\n\n\t\t\t$data->pages[$i] = new JPaginationObject($i);\n\t\t\tif ($i != $this->get('pages.current') || $this->_viewall)\n\t\t\t{\n\t\t\t\t$data->pages[$i]->base\t= $offset;\n\t\t\t\t$data->pages[$i]->link\t= JRoute::_(\"&limitstart=\".$offset);\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}",
"public function search(){\n\t\t$data = array();\n\t\t$pageIndex = $_POST['pageIndex'];\n\n\t\t$dataProcess = new DataProcess($_POST['ticketNumber'],\n\t\t\t$_POST['passengerName'],\n\t\t\t$_POST['rloc'],\n\t\t\t$_POST['fromDate'],\n\t\t\t$_POST['toDate'],\n\t\t\t$_POST['systemName']);\n\n\t\t$query = Document::query();\n\t\t$dataProcess->getQuery($query);\n\t\t$totalRecord = $query->count();\n\t\t$totalPage = ceil($totalRecord/$this->recordPerPage);\n\t\t$pageIndex = $pageIndex - 1; \n\t\t$model = $query->orderBy('dateString', 'asc')->orderBy('documents_id', 'asc')->skip($pageIndex * $this->recordPerPage)->take($this->recordPerPage)->get();\n\t\t//$model = $query->orderBy('dateString', 'asc')->orderBy('paxName', 'asc')->skip(1)->take(2)->get();\n\n\t\t$index = 0;\n\t\t/* If model only has one record, check if it's the first or last record within the same systemName to determine which prev/next button to enable or disable\n\t\t * If more than one model, next-record/prev-record button will be enabled\n\t\t */\n\t\tif(sizeof($model) == 1){\n\t\t\t$systemName = $model[0]->systemName; //Gets the systemName\n\n\t\t\tif(($dataProcess->getNewFromDate() != null) && ($dataProcess->getNewToDate() != null)){\n\t\t\t\t// If\n\t\t\t\t$getAllModel = Document::whereBetween('dateString', array($dataProcess->getNewFromDate(), $dataProcess->getNewToDate()))->where('systemName', '=', $systemName)->orderBy('documents_id', 'asc')->get();\n\t\t\t}else{\n\t\t\t\t//Getting all the same system number and stores the tickets in an array to find the max ticketNumber\n\t\t\t\t$getAllModel = Document::where('systemName', '=', $systemName)->orderBy('documents_id', 'asc')->get();\n\t\t\t}\n\n\t\t\t// $index variable to store the location of the current ticketNumber\n\t\t\t// Using this variable to locate the next ticketNumber in row\n\t\t\t$index = 0;\n\t\t\t$allIndex = [];\n\t\t\tif(sizeof($getAllModel) > 0){\n\t\t\t\tforeach($getAllModel as $key => $value){\n\t\t\t\t\tif(($value->ticketNumber) == $dataProcess->getTicketNumber()){\n\t\t\t\t\t\t$index = $key;\n\t\t\t\t\t}\n\t\t\t\t\t$allIndex[] = $key;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$maxIndex = max($allIndex); //Check the max index\n\t\t\t$minIndex = min($allIndex); //Check the min index usually 0\n\n\t\t\tif($minIndex == $maxIndex){\n\t\t\t\t$data[$index]['disable-both'] = 'disable-both';\n\t\t\t}else if($index == $maxIndex){\n\t\t\t\t$data[$index]['disable-next'] = 'disable-next';\n\t\t\t}else if($index == $minIndex){\n\t\t\t\t$data[$index]['disable-prev'] = 'disable-prev';\n\t\t\t}\n\n\t\t\t$data[$index]['content'] = $model[0]['fileContent'];\n\t\t\t$data[$index]['dateOfFile'] = $model[0]['dateOfFile'];\n\t\t\t$data[$index]['paxName'] = $model[0]['paxName'];\n\t\t\t$data[$index]['airlineName'] = $model[0]['airlineName'];\n\t\t\t$data[$index]['systemName'] = $model[0]['systemName'];\n\t\t\t$data[$index]['ticketNumber'] = $model[0]['ticketNumber'];\n\n\t\t\t$comments = array();\n\t\t\t$notes = Note::where('ticketNumber','=',$model[0]['ticketNumber'])->get();\n\t\t\tforeach ($notes as $key => $value) {\n\t\t\t\t$comments[$key]['time'] = $value->created_at->toDateTimeString();\n\t\t\t\t$comments[$key]['content'] = $value->note;\n\t\t\t}\n\t\t\t$data[$index]['comments'] = $comments;\n\t\t\tif( sizeof($comments) > 0){\n\t\t\t\t$data[$index]['hasComment'] = \"<span class='has-comment'>*R*</span>\";\n\t\t\t}else{\n\t\t\t\t$data[$index]['hasComment'] = \"\";\n\t\t\t}\n\t\t\tif(!$_POST['ticketNumber']){\n\t\t\t\t$data[$index]['disable-both'] = 'disable-both';\n\t\t\t}\n\t\t}else if(sizeof($model)>1){\n\t\t\tforeach ($model as $key => $value) {\n\t\t\t\t$data[$index]['content'] = $value->fileContent;\n\t\t\t\t$data[$index]['dateOfFile'] = $value->dateOfFile;\n\t\t\t\t$data[$index]['paxName'] = $value->paxName;\n\t\t\t\t$data[$index]['airlineName'] = $value->airlineName;\n\t\t\t\t$data[$index]['systemName'] = $value->systemName;\n\t\t\t\t\n\t\t\t\t$comments = array();\n\t\t\t\t$notes = Note::where('ticketNumber','=',$value->ticketNumber)->get();\n\t\t\t\tforeach ($notes as $key => $value) {\n\t\t\t\t\t$comments[$key]['time'] = $value->created_at->toDateTimeString();\n\t\t\t\t\t$comments[$key]['content'] = $value->note;\n\t\t\t\t}\n\t\t\t\t$data[$index]['comments'] = $comments;\n\t\t\t\tif( sizeof($comments) > 0){\n\t\t\t\t\t$data[$index]['hasComment'] = \"<span class='has-comment'>*R*</span>\";\n\t\t\t\t}else{\n\t\t\t\t\t$data[$index]['hasComment'] = \"\";\n\t\t\t\t}\n\t\t\t\t$index++;\n\t\t\t}\n\t\t\t\n\t\t\t$data[0]['totalPage'] = $totalPage;\n\t\t\t$data[0]['totalRecord'] = $totalRecord;\n\t\t\t\n\t\t\t//$document = $model[0]->getAttributes();\n\t\t\t//$data['content'] = $document['fileContent']; \t\n\t\t}else{\n\t\t\t$data['error'] = \"Sorry, the document doesn't exist or hasn't been updated. Please click the 'Update' Button and try again.\";\n\t\t}\n\n\t\techo json_encode($data);\n\t}",
"public static function mk_paginator(int $total, int $page = 0, int $perpage = 24) {\n if ($total > 0 && $perpage > 0) {\n $pages = ceil($total / $perpage);\n if ($pages > 1) {\n $items = [];\n $index = [];\n for ($i = 0; $i < 3; $i++) {\n if ($i < $pages) {\n $value = $i + 1;\n $key = \"P{$i}\";\n if (!array_key_exists($key, $index)) {\n $item = ['key' => $key, 'page' => (int) $i, 'value' => (int) $value, 'current' => ($page === $i)];\n $index[$key] = $item;\n $items[] = $item;\n }\n }\n }\n for ($i = $page - 2; $i < $page + 3; $i++) {\n if ($i >= 0 && $i < $pages) {\n $value = $i + 1;\n $key = \"P{$i}\";\n if (!array_key_exists($key, $index)) {\n $item = ['key' => $key, 'page' => (int) $i, 'value' => (int) $value, 'current' => ($page === $i)];\n $index[$key] = $item;\n $items[] = $item;\n }\n }\n }\n for ($i = $pages - 3; $i < $pages; $i++) {\n if ($i >= 0 && $i < $pages) {\n $value = $i + 1;\n $key = \"P{$i}\";\n if (!array_key_exists($key, $index)) {\n $item = ['key' => $key, 'page' => (int) $i, 'value' => (int) $value, 'current' => ($page === $i),];\n $index[$key] = $item;\n $items[] = $item;\n }\n }\n }\n $last_item_page = null;\n $des_items = [];\n\n foreach ($items as $item) {\n if ($last_item_page !== null && (($last_item_page + 1) !== $item['page'])) {\n $des_items[] = null;\n }\n $des_items[] = $item;\n $last_item_page = (int) $item['page'];\n }\n return $des_items;\n }\n }\n return false;\n }",
"function buildNavigation($pageNum_Recordset1,$totalPages_Recordset1,$prev_Recordset1,$next_Recordset1,$separator=\" | \",$max_links=10, $show_page=true)\n{\n GLOBAL $maxRows_rs_forn,$totalRows_rs_forn;\n\t$pagesArray = \"\"; $firstArray = \"\"; $lastArray = \"\";\n\tif($max_links<2)$max_links=2;\n\tif($pageNum_Recordset1<=$totalPages_Recordset1 && $pageNum_Recordset1>=0)\n\t{\n\t\tif ($pageNum_Recordset1 > ceil($max_links/2))\n\t\t{\n\t\t\t$fgp = $pageNum_Recordset1 - ceil($max_links/2) > 0 ? $pageNum_Recordset1 - ceil($max_links/2) : 1;\n\t\t\t$egp = $pageNum_Recordset1 + ceil($max_links/2);\n\t\t\tif ($egp >= $totalPages_Recordset1)\n\t\t\t{\n\t\t\t\t$egp = $totalPages_Recordset1+1;\n\t\t\t\t$fgp = $totalPages_Recordset1 - ($max_links-1) > 0 ? $totalPages_Recordset1 - ($max_links-1) : 1;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$fgp = 0;\n\t\t\t$egp = $totalPages_Recordset1 >= $max_links ? $max_links : $totalPages_Recordset1+1;\n\t\t}\n\t\tif($totalPages_Recordset1 >= 1) {\n\t\t\t#\t------------------------\n\t\t\t#\tSearching for $_GET vars\n\t\t\t#\t------------------------\n\t\t\t$_get_vars = '';\t\t\t\n\t\t\tif(!empty($_GET) || !empty($HTTP_GET_VARS)){\n\t\t\t\t$_GET = empty($_GET) ? $HTTP_GET_VARS : $_GET;\n\t\t\t\tforeach ($_GET as $_get_name => $_get_value) {\n\t\t\t\t\tif ($_get_name != \"pageNum_rs_forn\") {\n\t\t\t\t\t\t$_get_vars .= \"&$_get_name=$_get_value\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$successivo = $pageNum_Recordset1+1;\n\t\t\t$precedente = $pageNum_Recordset1-1;\n\t\t\t$firstArray = ($pageNum_Recordset1 > 0) ? \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_forn=$precedente$_get_vars\\\">$prev_Recordset1</a>\" : \"$prev_Recordset1\";\n\t\t\t# ----------------------\n\t\t\t# page numbers\n\t\t\t# ----------------------\n\t\t\tfor($a = $fgp+1; $a <= $egp; $a++){\n\t\t\t\t$theNext = $a-1;\n\t\t\t\tif($show_page)\n\t\t\t\t{\n\t\t\t\t\t$textLink = $a;\n\t\t\t\t} else {\n\t\t\t\t\t$min_l = (($a-1)*$maxRows_rs_forn) + 1;\n\t\t\t\t\t$max_l = ($a*$maxRows_rs_forn >= $totalRows_rs_forn) ? $totalRows_rs_forn : ($a*$maxRows_rs_forn);\n\t\t\t\t\t$textLink = \"$min_l - $max_l\";\n\t\t\t\t}\n\t\t\t\t$_ss_k = floor($theNext/26);\n\t\t\t\tif ($theNext != $pageNum_Recordset1)\n\t\t\t\t{\n\t\t\t\t\t$pagesArray .= \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_forn=$theNext$_get_vars\\\">\";\n\t\t\t\t\t$pagesArray .= \"$textLink</a>\" . ($theNext < $egp-1 ? $separator : \"\");\n\t\t\t\t} else {\n\t\t\t\t\t$pagesArray .= \"$textLink\" . ($theNext < $egp-1 ? $separator : \"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t$theNext = $pageNum_Recordset1+1;\n\t\t\t$offset_end = $totalPages_Recordset1;\n\t\t\t$lastArray = ($pageNum_Recordset1 < $totalPages_Recordset1) ? \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_forn=$successivo$_get_vars\\\">$next_Recordset1</a>\" : \"$next_Recordset1\";\n\t\t}\n\t}\n\treturn array($firstArray,$pagesArray,$lastArray);\n}",
"function ArrayPagination($AArray, $APage, $AAMountPerPage, $AWithModulo = false){\n $count = count($AArray);\n $page = $APage;\n\n $numberOfPage = round($count / $AAMountPerPage);\n $modulo = $count % $AAMountPerPage;\n if ($page > $numberOfPage) $page = $numberOfPage;\n $offset = (($page-1) * $AAMountPerPage);\n if ($AWithModulo) if ($page==$numberOfPage) $AAMountPerPage += $modulo; // additional modulo\n return array_slice( $AArray, $offset, $AAMountPerPage );\n}",
"public function dtPaginate($start, $length);",
"public function getPageSize();",
"public static function makePaginator($datas, $perPage = 10, $request)\n {\n $currentPage = Paginator::resolveCurrentPage();\n\n //Create a new Laravel collection from the array data\n $collection = new Collection($datas);\n\n //Slice the collection to get the items to display in current page\n $currentPageSearchResults = $collection->slice(($currentPage - 1) * $perPage, $perPage)->all();\n\n //Create our paginator and pass it to the view\n $paginatedSearchResults = new Paginator($currentPageSearchResults, count($collection), $perPage, $currentPage, [\n 'path' => $request->url(),\n 'query' => $request->query(),\n ]);\n\n return $paginatedSearchResults;\n }",
"function paginate() {\r\n\t\t/*Check for valid mysql connection\r\n\t\tif (! $this->conn || ! is_resource($this->conn )) {\r\n\t\t\tif ($this->debug)\r\n\t\t\t\techo \"MySQL connection missing<br />\";\r\n\t\t\treturn false;\r\n\t\t}*/\r\n\t\t\r\n\t/*\t//Find total number of rows\r\n\t\t$all_rs = @mysql_query($this->sql );\r\n\t\tif (! $all_rs) {\r\n\t\t\tif ($this->debug)\r\n\t\t\t\techo \"SQL query failed. Check your query.<br /><br />Error Returned: \" . mysql_error();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$this->total_rows = mysql_num_rows($all_rs );\r\n\t\t@mysql_close($all_rs );\r\n\t\t*/\r\n\t\t$this->total_rows=$this->sql;\r\n\t\t//Return FALSE if no rows found\r\n\t\tif ($this->total_rows == 0) {\r\n\t\t\tif ($this->debug)\r\n\t\t\t\techo \"<h3 style='\r\ntext-align: center;\r\ncolor: gray;\r\nwidth: 690px;\r\nfont-size: 47px;\r\nmargin: 90px 0 0 0;\r\nfont-family: trebuchet ms;\r\n'>No Record Found</h3>\";\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\t\r\n\t\t//Max number of pages\r\n\t\t$this->max_pages = ceil($this->total_rows / $this->rows_per_page );\r\n\t\tif ($this->links_per_page > $this->max_pages) {\r\n\t\t\t$this->links_per_page = $this->max_pages;\r\n\t\t}\r\n\t\t\r\n\t\t//Check the page value just in case someone is trying to input an aribitrary value\r\n\t\tif ($this->page > $this->max_pages || $this->page <= 0) {\r\n\t\t\t$this->page = 1;\r\n\t\t}\r\n\t\t\r\n\t\t//Calculate Offset\r\n\t\t$this->offset = $this->rows_per_page * ($this->page - 1);\r\n\t\t\r\n\t\t/*//Fetch the required result set\r\n\t\t$rs = @mysql_query($this->sql . \" LIMIT {$this->offset}, {$this->rows_per_page}\" );\r\n\t\tif (! $rs) {\r\n\t\t\tif ($this->debug)\r\n\t\t\t\techo \"Pagination query failed. Check your query.<br /><br />Error Returned: \" . mysql_error();\r\n\t\t\treturn false;\r\n\t\t}*/\r\n\t\treturn \"\";\r\n\t}",
"function displayPagingGrid()\r\n {\r\n\t $InfoArray = $this->InfoArray();\r\n \t\r\n\t\tif($InfoArray[\"TOTAL_RESULTS\"] <= RECORD_PER_PAGE)\r\n\t\t\treturn null;\r\n\t /* Everything below here are just examples! */\r\n\t\r\n\t /* Print our some info like \"Displaying page 1 of 49\" */\r\n\t $paging = \"<table class='paging' width='100%'><tr><td align='left'>Displaying page \" . $InfoArray[\"CURRENT_PAGE\"] . \" of \" . $InfoArray[\"TOTAL_PAGES\"] . \"</td>\";\r\n\t \r\n\t\t$paging .= \"<td align='center'>\";\r\n\t /* Print our first link */\r\n\t if($InfoArray[\"CURRENT_PAGE\"]!= 1) {\r\n\t\t $paging .= \"<a href=\\\"javascript:ajaxPaging('',1);\\\"><<</a> \";\r\n\t } else {\r\n\t\t $paging .= \"<< \";\r\n\t }\r\n\t\r\n\t /* Print out our prev link */\r\n\t if($InfoArray[\"PREV_PAGE\"]) {\r\n\t\t $paging .= \"<a href=javascript:ajaxPaging('',\" . $InfoArray[\"PREV_PAGE\"] . \")>Previous</a> | \";\r\n\t } else {\r\n\t\t $paging .= \"Previous | \";\r\n\t }\r\n\t\r\n\t /* Example of how to print our number links! */\r\n\t for($i=0; $i<count($InfoArray[\"PAGE_NUMBERS\"]); $i++) {\r\n\t\t if($InfoArray[\"CURRENT_PAGE\"] == $InfoArray[\"PAGE_NUMBERS\"][$i]) {\r\n\t\t\t $paging .= $InfoArray[\"PAGE_NUMBERS\"][$i] . \" | \";\r\n\t\t } else {\r\n\t\t\t $paging .= \"<a href=javascript:ajaxPaging('',\" . $InfoArray[\"PAGE_NUMBERS\"][$i] . \")>\" . $InfoArray[\"PAGE_NUMBERS\"][$i] . \"</a> | \";\r\n\t\t }\r\n\t }\r\n\t\r\n\t /* Print out our next link */\r\n\t if($InfoArray[\"NEXT_PAGE\"]) {\r\n\t\t $paging .= \" <a href=javascript:ajaxPaging('',\" . $InfoArray[\"NEXT_PAGE\"] . \")>Next</a>\";\r\n\t } else {\r\n\t\t $paging .= \" Next\";\r\n\t }\r\n\t\r\n\t /* Print our last link */\r\n\t if($InfoArray[\"CURRENT_PAGE\"]!= $InfoArray[\"TOTAL_PAGES\"]) {\r\n\t\t $paging .= \" <a href=javascript:ajaxPaging('',\" . $InfoArray[\"TOTAL_PAGES\"] . \")>>></a>\";\r\n\t } else {\r\n\t\t $paging .= \" >>\";\r\n\t }\r\n\t \r\n\t $InfoArray[\"START_OFFSET\"] = ($InfoArray[\"START_OFFSET\"] == 0) ? 1 : $InfoArray[\"START_OFFSET\"];\r\n\t\t\r\n\t $paging .= \"</td><td align='right'>Displaying results \" . $InfoArray[\"START_OFFSET\"] . \" - \" . $InfoArray[\"END_OFFSET\"] . \" of \" . $InfoArray[\"TOTAL_RESULTS\"] . \"</td></tr></table>\";\r\n\t \r\n\t return $paging;\r\n\t}",
"public function m_paging($form,$count,$start,$limit,$sql) {\n\n\t//count the rows of the query\n\t\t$sql = \"select count(*) as 'total' $sql limit 1\";\n\n\t\t$result = o_db::m_select($sql);\n\t\t$total = $result[0]['total'];\n\n\t//echo \"$total <br> $count\";\n\n\t\tif ($total == 0 || $count == 0)\n\t\t\treturn 0;\n\t\tif ($start > $total)\n\t\t\treturn 0;\n\n\t//the page requested is the current page plus the number of rows passed for the current page\n\t//this way, if there are less than the limit of results for the requested page\n\t//(eg. a limit range could be 1-50, but only 32 rows were retrieved, so we would show 1-32)\n\t\t$place = $start + $count;\n\n\t//if the whole result set for the sql query is the same amount as the current page passed\n\t//then paging is NOT needed because there is only 1 page of results available for the query\n\t\tif ($total >= $place)\n\t\t{\n\t\t//displayed in the colored box on the left of the paging block\n\t\t\t$range = ($start + 1).\" - \".$place.\" / $total\";\n\t\t\t$this->page_range = $range;\n\t\t} //end if\n\n\t\tif ($total > $count)\n\t\t{\n\n\t\t//get the results per page select menu\n\t\t\t_esrs::m_menu_page_limits($form);\n\t\t//get the page to display select menu\n\t\t\t_esrs::m_menu_display_page($form,$start,$total,$limit);\n\n\t\t} //end if\n\n\t//determin which buttons should appear on the requested page\n\t//the first page has only a next button, no previous\n\t//the last page has only a previous button, no next\n\n\t//if the total number of rows available in the dataset equals where we're at\n\t//then do NOT paint a next button\n\t\t$this->next_butt = (($total > $place) ? \"<input id=\\\"esrs_submit\\\" class=\\\"esrs_submit\\\" type=submit name=\\\"esrs_page_next\\\" value=\\\"Next $limit\\\">\" : \" \");\n\n\t//if we're on the first page of the result\n\t//then do NOT paint a previous button\n\t\t$this->prev_butt = (($start > 0) ? \"<input id=\\\"esrs_submit\\\" class=\\\"esrs_submit\\\" type=submit name=\\\"esrs_page_prev\\\" value=\\\"Prev $limit\\\">\" : \" \") ;\n\n\t\t$this->do_paging = 1;\n\n\t}",
"public function smartPaginate()\n {\n $limit = (int) request()->input(\n config('awemapl-repository.smart_paginate.request_parameter'), \n config('awemapl-repository.smart_paginate.default_limit')\n );\n\n if ($limit === 0) $limit = config('awemapl-repository.smart_paginate.default_limit');\n\n $maxLimit = config('awemapl-repository.smart_paginate.max_limit');\n\n $limit = ($limit <= $maxLimit) ? $limit : $maxLimit;\n\n return $this->paginate($limit);\n }",
"protected function paginate()\n {\n if ($this->currentItem == $this->pagerfanta->getMaxPerPage() and $this->pagerfanta->hasNextPage()) {\n $this->pagerfanta->setCurrentPage($this->pagerfanta->getNextPage());\n $this->loadData();\n }\n }",
"private function page()\n {\n $records = array();\n $uid = $this->pObj->zz_getMaxDbUid('sys_template');\n\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrg($uid);\n\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrgCalCaddy($uid);\n\n // #61838, 140923, dwildt, 2+\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrgCal($uid);\n\n // #61826, 140923, dwildt, 2+\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrgCalEvents($uid);\n\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrgCalLocations($uid);\n\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrgDocuments($uid);\n\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrgDocumentsCaddy($uid);\n\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrgHeadquarters($uid);\n\n // #61779, 140921, dwildt, 2+\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrgJobs($uid);\n\n // #61779, 140921, dwildt, 2+\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrgJobsJobsApply($uid);\n\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrgNews($uid);\n\n // #61779, 140921, dwildt, 2+\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrgService($uid);\n\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrgStaff($uid);\n\n // #67210, 150531, dwildt, 2+\n $uid = $uid + 1;\n $records[$uid] = $this->pageOrgStaffVcard($uid);\n\n return $records;\n }",
"public function paginate(): RepositoryInterface {\n $show = (int) $this->limitRows;\n $config = $this->config;\n\n /** @var SeekableIterator $items */\n $items = $config[\"data\"];\n $page_number = (int) $this->page;\n\n if (!is_object($items)) {\n throw new Exception(\"Invalid data for paginator\");\n }\n\n // Prevents 0 or negative page numbers\n if ($page_number <= 0) {\n $page_number = 1;\n }\n\n // Prevents a limit creating a negative or zero first page\n if ($show <= 0) {\n throw new Exception(\"The start page number is zero or less\");\n }\n\n $n = count($items);\n $last_show_page = $page_number - 1;\n $start = $show * $last_show_page;\n $page_items = [];\n\n if ($n % $show != 0) {\n $total_pages = (int) ($n / $show + 1);\n } else {\n $total_pages = (int) ($n / $show);\n }\n\n if ($n > 0) {\n // Seek to the desired position\n if ($start <= $n) {\n $items->seek($start);\n } else {\n $items->seek(0);\n $page_number = 1;\n }\n\n // The record must be iterable\n $i = 1;\n while ($items->valid()) {\n $page_items[] = $items->current();\n\n if ($i >= $show) {\n break;\n }\n\n $i++;\n $items->next();\n }\n }\n\n // Fix next\n $next = $page_number + 1;\n if ($next > $total_pages) {\n $next = $total_pages;\n }\n\n if ($page_number > 1) {\n $before = $page_number - 1;\n } else {\n $before = 1;\n }\n\n return $this->getRepository(\n [\n RepositoryInterface::PROPERTY_ITEMS => $page_items,\n RepositoryInterface::PROPERTY_TOTAL_ITEMS => $n,\n RepositoryInterface::PROPERTY_LIMIT => $this->limitRows,\n RepositoryInterface::PROPERTY_FIRST_PAGE => 1,\n RepositoryInterface::PROPERTY_PREVIOUS_PAGE => $before,\n RepositoryInterface::PROPERTY_CURRENT_PAGE => $page_number,\n RepositoryInterface::PROPERTY_NEXT_PAGE => $next,\n RepositoryInterface::PROPERTY_LAST_PAGE => $total_pages\n ]\n );\n }",
"function show_pages($amount, $rowamount, $id = '') {\n if ($amount > $rowamount) {\n $num = 8;\n $poutput = '';\n $lastpage = ceil($amount / $rowamount);\n $startpage = 1;\n\n if (!isset($_GET[\"start\"]))\n $_GET[\"start\"] = 1;\n $start = $_GET[\"start\"];\n\n if ($lastpage > $num & $start > ($num / 2)) {\n $startpage = ($start - ($num / 2));\n }\n\n echo _('Show page') . \":<br>\";\n\n if ($lastpage > $num & $start > 1) {\n $poutput .= '<a href=\" ' . htmlentities($_SERVER[\"PHP_SELF\"], ENT_QUOTES);\n $poutput .= '?start=' . ($start - 1);\n if ($id != '')\n $poutput .= '&id=' . $id;\n $poutput .= '\">';\n $poutput .= '[ < ]';\n $poutput .= '</a>';\n }\n if ($start != 1) {\n $poutput .= '<a href=\" ' . htmlentities($_SERVER[\"PHP_SELF\"], ENT_QUOTES);\n $poutput .= '?start=1';\n if ($id != '')\n $poutput .= '&id=' . $id;\n $poutput .= '\">';\n $poutput .= '[ 1 ]';\n $poutput .= '</a>';\n if ($startpage > 2)\n $poutput .= ' .. ';\n }\n\n for ($i = $startpage; $i <= min(($startpage + $num), $lastpage); $i++) {\n if ($start == $i) {\n $poutput .= '[ <b>' . $i . '</b> ]';\n } elseif ($i != $lastpage & $i != 1) {\n $poutput .= '<a href=\" ' . htmlentities($_SERVER[\"PHP_SELF\"], ENT_QUOTES);\n $poutput .= '?start=' . $i;\n if ($id != '')\n $poutput .= '&id=' . $id;\n $poutput .= '\">';\n $poutput .= '[ ' . $i . ' ]';\n $poutput .= '</a>';\n }\n }\n\n if ($start != $lastpage) {\n if (min(($startpage + $num), $lastpage) < ($lastpage - 1))\n $poutput .= ' .. ';\n $poutput .= '<a href=\" ' . htmlentities($_SERVER[\"PHP_SELF\"], ENT_QUOTES);\n $poutput .= '?start=' . $lastpage;\n if ($id != '')\n $poutput .= '&id=' . $id;\n $poutput .= '\">';\n $poutput .= '[ ' . $lastpage . ' ]';\n $poutput .= '</a>';\n }\n\n if ($lastpage > $num & $start < $lastpage) {\n $poutput .= '<a href=\" ' . htmlentities($_SERVER[\"PHP_SELF\"], ENT_QUOTES);\n $poutput .= '?start=' . ($start + 1);\n if ($id != '')\n $poutput .= '&id=' . $id;\n $poutput .= '\">';\n $poutput .= '[ > ]';\n $poutput .= '</a>';\n }\n\n echo $poutput;\n }\n}",
"function pagenationv2($offset) {\r\n $this->offset = NULL;\r\n $this->arrayText = NULL;\r\n $this->pages = NULL;\r\n $this->offset = $offset;\r\n \r\n $temp = $offset;\r\n if ($this->countRecord) {\r\n $this->pages = intval($this->countRecord / $this->limit);\r\n }\r\n if ($this->countRecord % $this->limit) {\r\n $this->pages++;\r\n }\r\n $countRecordArray = count($this->arrayVariable);\r\n $offsetloop = 0;\r\n for ($loop_page = 1; $loop_page <= $this->pages; $loop_page++) {\r\n \r\n if ($countRecordArray >= 1) {\r\n \r\n for ($k = 0; $k < $countRecordArray; $k++) {\r\n $string.=\"<li \";\r\n if($temp==$offsetloop) {\r\n $string.=\" class=active \";\r\n }\r\n $string.=\"><a href=\\\"javascript:void(0)\\\" \"; \r\n if ($this->arrayVariable[$k] == \"offset\") {\r\n $this->arrayVariableValue[$k] = $offsetloop;\r\n \r\n }\r\n $this->arrayText = $this->arrayVariable[$k] . \"=\" . $this->arrayVariableValue[$k] . \"&\" . $this->arrayText;\r\n $string.=\" onClick=\\\"ajaxQuery('\".basename($_SERVER['PHP_SELF']).\"','not',\".$offsetloop.\", '\".$this->arrayText.\"')\\\">\" . $loop_page . \"</a></li>\";\r\n\r\n \r\n }\r\n } else {\r\n $string.=\"Do play play la I know you want to hack it ?\";\r\n }\r\n \r\n $offsetloop = $offsetloop + $this->limit;\r\n \r\n }\r\n return $string;\r\n \r\n }",
"private function limit_page()\n {\n $page = $this->define_page();\n $start = $page * $this->count - $this->count;\n $fullnumber = $this->total;\n $total = $fullnumber['count'] / $this->count;\n is_float($total) ? $max = $total + 2 : $max = $total + 1;\n $array = array('start'=>(int)$start,'max'=>(int)$max);\n return $array;\n }",
"function buildNavigation($pageNum_Recordset1,$totalPages_Recordset1,$prev_Recordset1,$next_Recordset1,$separator=\" | \",$max_links=10, $show_page=true)\n{\n GLOBAL $maxRows_rs_novinky,$totalRows_rs_novinky;\n\t$pagesArray = \"\"; $firstArray = \"\"; $lastArray = \"\";\n\tif($max_links<2)$max_links=2;\n\tif($pageNum_Recordset1<=$totalPages_Recordset1 && $pageNum_Recordset1>=0)\n\t{\n\t\tif ($pageNum_Recordset1 > ceil($max_links/2))\n\t\t{\n\t\t\t$fgp = $pageNum_Recordset1 - ceil($max_links/2) > 0 ? $pageNum_Recordset1 - ceil($max_links/2) : 1;\n\t\t\t$egp = $pageNum_Recordset1 + ceil($max_links/2);\n\t\t\tif ($egp >= $totalPages_Recordset1)\n\t\t\t{\n\t\t\t\t$egp = $totalPages_Recordset1+1;\n\t\t\t\t$fgp = $totalPages_Recordset1 - ($max_links-1) > 0 ? $totalPages_Recordset1 - ($max_links-1) : 1;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$fgp = 0;\n\t\t\t$egp = $totalPages_Recordset1 >= $max_links ? $max_links : $totalPages_Recordset1+1;\n\t\t}\n\t\tif($totalPages_Recordset1 >= 1) {\n\t\t\t#\t------------------------\n\t\t\t#\tSearching for $_GET vars\n\t\t\t#\t------------------------\n\t\t\t$_get_vars = '';\t\t\t\n\t\t\tif(!empty($_GET) || !empty($_GET)){\n\t\t\t\t$_GET = empty($_GET) ? $_GET : $_GET;\n\t\t\t\tforeach ($_GET as $_get_name => $_get_value) {\n\t\t\t\t\tif ($_get_name != \"pageNum_rs_novinky\") {\n\t\t\t\t\t\t$_get_vars .= \"&$_get_name=$_get_value\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$successivo = $pageNum_Recordset1+1;\n\t\t\t$precedente = $pageNum_Recordset1-1;\n\t\t\t$firstArray = ($pageNum_Recordset1 > 0) ? \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_novinky=$precedente$_get_vars\\\">$prev_Recordset1</a>\" : \"$prev_Recordset1\";\n\t\t\t# ----------------------\n\t\t\t# page numbers\n\t\t\t# ----------------------\n\t\t\tfor($a = $fgp+1; $a <= $egp; $a++){\n\t\t\t\t$theNext = $a-1;\n\t\t\t\tif($show_page)\n\t\t\t\t{\n\t\t\t\t\t$textLink = $a;\n\t\t\t\t} else {\n\t\t\t\t\t$min_l = (($a-1)*$maxRows_rs_novinky) + 1;\n\t\t\t\t\t$max_l = ($a*$maxRows_rs_novinky >= $totalRows_rs_novinky) ? $totalRows_rs_novinky : ($a*$maxRows_rs_novinky);\n\t\t\t\t\t$textLink = \"$min_l - $max_l\";\n\t\t\t\t}\n\t\t\t\t$_ss_k = floor($theNext/26);\n\t\t\t\tif ($theNext != $pageNum_Recordset1)\n\t\t\t\t{\n\t\t\t\t\t$pagesArray .= \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_novinky=$theNext$_get_vars\\\">\";\n\t\t\t\t\t$pagesArray .= \"$textLink</a>\" . ($theNext < $egp-1 ? $separator : \"\");\n\t\t\t\t} else {\n\t\t\t\t\t$pagesArray .= \"$textLink\" . ($theNext < $egp-1 ? $separator : \"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t$theNext = $pageNum_Recordset1+1;\n\t\t\t$offset_end = $totalPages_Recordset1;\n\t\t\t$lastArray = ($pageNum_Recordset1 < $totalPages_Recordset1) ? \"<a href=\\\"$_SERVER[PHP_SELF]?pageNum_rs_novinky=$successivo$_get_vars\\\">$next_Recordset1</a>\" : \"$next_Recordset1\";\n\t\t}\n\t}\n\treturn array($firstArray,$pagesArray,$lastArray);\n}",
"function getPaging($refUrl, $aryOpts, $pgCnt, $curPg) {\n $return = '';\n $return.='<div class=\"box-bottom\"><div class=\"paginate\">';\n if ($curPg > 1) {\n $aryOpts['pg'] = 1;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\">First</a>';\n\n $aryOpts['pg'] = $curPg - 1;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\">Prev</a>';\n }\n for ($i = 1; $i <= $pgCnt; $i++) {\n $aryOpts['pg'] = $i;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\" class=\"';\n if ($curPg == $i)\n $return.='active';\n $return.='\" >' . $i . '</a>';\n }\n if ($curPg < $pgCnt) {\n $aryOpts['pg'] = $curPg + 1;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\">Next</a>';\n $aryOpts['pg'] = $pgCnt;\n $return.='<a href=\"' . $refUrl . getQueryString($aryOpts) . '\">Last</a>';\n }\n $return.='<div class=\"clearfix\"></div></div></div>';\n return $return;\n}",
"public function get_error_deals_paged($start_offset,$num_to_fetch,&$data_arr,&$data_count){\n global $g_mc;\n\t\t/************************************\n\t\tsng:28/jun/2011\n\t\tWe now allow the members to specify corrections for each fields of a deal. This means, we no longer\n\t\tuse tombstone_transaction_error_reports and no longer show a simple report for a deal and who posted it.\n\t\n\t\tAlso, there can be more than one corrections suggested for a deal. What we do is, show only the deal that\n\t\thas one or more corrections and allow admin to edit the deal. In the edit page we show the corrections and who posted it.\n\n $q = \"select r.report,r.id as report_id,r.deal_id,t.company_id,value_in_billion,date_of_deal,deal_cat_name,deal_subcat1_name,deal_subcat2_name,c.name as deal_company_name,m.f_name,m.l_name,m.designation,w.name as work_company from \".TP.\"transaction_error_reports as r left join \".TP.\"transaction as t on(r.deal_id=t.id) left join \".TP.\"company as c on(t.company_id=c.company_id) left join \".TP.\"member as m on(r.reported_by=m.mem_id) left join \".TP.\"company as w on(m.company_id=w.company_id) order by t.id desc limit \".$start_offset.\",\".$num_to_fetch;\n\t\t******************************************/\n\t\t$q = \"select t.id as deal_id,t.company_id,value_in_billion,date_of_deal,deal_cat_name,deal_subcat1_name,deal_subcat2_name,c.name as deal_company_name from (SELECT DISTINCT deal_id FROM \".TP.\"transaction_suggestions WHERE deal_id != '0') as r left join \".TP.\"transaction as t on(r.deal_id=t.id) left join \".TP.\"company as c on(t.company_id=c.company_id) order by t.id desc limit \".$start_offset.\",\".$num_to_fetch;\n\t\t\n $res = mysql_query($q);\n if(!$res){\n return false;\n }\n //////////////////\n $data_count = mysql_num_rows($res);\n if(0==$data_count){\n return true;\n }\n /////////////////\n for($i=0;$i<$data_count;$i++){\n $data_arr[$i] = mysql_fetch_assoc($res);\n $data_arr[$i]['deal_company_name'] = $g_mc->db_to_view($data_arr[$i]['deal_company_name']);\n \n }\n return true;\n }"
] | [
"0.71911424",
"0.71911424",
"0.6706617",
"0.6704734",
"0.66460437",
"0.6541788",
"0.65004593",
"0.64607495",
"0.639451",
"0.6369193",
"0.6365944",
"0.63075614",
"0.6303151",
"0.6286792",
"0.6261076",
"0.6258619",
"0.6243266",
"0.6224657",
"0.6145747",
"0.61237186",
"0.60882473",
"0.6086223",
"0.60606545",
"0.60337305",
"0.6027626",
"0.6027182",
"0.59888357",
"0.5973273",
"0.5969205",
"0.59653527",
"0.5953438",
"0.5953167",
"0.59440106",
"0.5930004",
"0.5913841",
"0.5913454",
"0.5908997",
"0.5901137",
"0.5885648",
"0.5878316",
"0.5877374",
"0.5875135",
"0.58726394",
"0.5869937",
"0.586902",
"0.5859823",
"0.5857281",
"0.58496964",
"0.58407557",
"0.58388233",
"0.58376104",
"0.5826837",
"0.5808097",
"0.5805652",
"0.5804471",
"0.5797838",
"0.5794929",
"0.5790459",
"0.57887787",
"0.5779131",
"0.57731915",
"0.57631975",
"0.5761199",
"0.57577807",
"0.57553065",
"0.57552546",
"0.5742001",
"0.57304174",
"0.5723012",
"0.57215875",
"0.57161903",
"0.5714473",
"0.5706076",
"0.5697796",
"0.56960934",
"0.5686297",
"0.5685191",
"0.5673675",
"0.56677204",
"0.5661241",
"0.56544006",
"0.5643871",
"0.56433034",
"0.5643085",
"0.5639372",
"0.5639281",
"0.5635988",
"0.5634188",
"0.5631962",
"0.5630682",
"0.5625644",
"0.56242937",
"0.5623403",
"0.5616391",
"0.56109715",
"0.56102246",
"0.56097704",
"0.56066847",
"0.5598834",
"0.55952424"
] | 0.72358215 | 0 |
Turns on the motor controller board | public function powerUp()
{
if ($this->motor_power)
$this->motor_power->setValue(1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function switchOn();",
"public function headlights_on() {\r\n echo PHP_EOL;\r\n $this->action(\"turning headlights on\");\r\n $this->lights_on = TRUE;\r\n $this->action(\"headlights are on\");\r\n }",
"public function wipers_on() {\r\n echo PHP_EOL;\r\n $this->action(\"turning windshield wipers on\");\r\n $this->wipers_on = TRUE;\r\n $this->action(\"windshield wipers are on\");\r\n }",
"private function ledOn()\n {\n $this->ledPin->setValue(PinInterface::VALUE_HIGH);\n }",
"public function ledsOn()\n {\n $payload = '';\n\n $this->sendRequest(self::FUNCTION_LEDS_ON, $payload);\n }",
"public function turn()\n {\n }",
"public function turn_on()\n {\n $this->testing = TRUE;\n }",
"function porte1() {\n\t\tsystem (\"gpio write 21 off\");\n\t\tsleep ( 1 );\n\t\tsystem (\"gpio write 21 on\");\n\t\t}",
"public function turnOn(){\n\t\treturn \"Turn On executed\";\n\t}",
"public function activate()\n\t{\n\t\techo \"fight...\\n\";\n\t}",
"public function turnOn($light,$brightness=255)\r\n {\r\n $lightname = $light;\r\n $light = $this->bulbNameToID($light);\r\n $isgroup = 'NO';\r\n $data = '<?xml version=\"1.0\"?>\r\n <s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\r\n <s:Body>\r\n <u:SetDeviceStatus xmlns:u=\"urn:Belkin:service:bridge:1\">\r\n <DeviceStatusList><?xml version="1.0" encoding="UTF-8"?><DeviceStatus><DeviceID>'.$light.'</DeviceID><CapabilityID>10008</CapabilityID><CapabilityValue>'.$brightness.':0</CapabilityValue><IsGroupAction>'.$isgroup.'</IsGroupAction></DeviceStatus></DeviceStatusList>\r\n </u:SetDeviceStatus>\r\n </s:Body>\r\n </s:Envelope>';\r\n $headers_array = array(\r\n 'Content-type: text/xml; charset=\"utf-8\"',\r\n 'SOAPACTION: \"urn:Belkin:service:bridge:1#SetDeviceStatus\"',\r\n 'Accept: ',\r\n );\r\n $url = \"http://\".WEMO_IP.\":\".WEMO_PORT.\"/upnp/control/bridge1\";\r\n $response = $this->sendCurl($url,$data,$headers_array);\r\n $this->getStatus($lightname);\r\n }",
"public function setupHardware(): void\n {\n echo 'Setup laptop hardware...<br/>';\n }",
"public function view(){\n\t\t\t$this->__switchboard();\n\t\t}",
"public function on()\n {\n echo 'The tv is on now.' . PHP_EOL;\n }",
"public function activate()\n\t{\n\t\techo \"shot...\\n\";\n\t}",
"private function changeTurn()\n {\n $this->_turn = 1 - $this->_turn; // 1-0 = 1, 1-1 = 0\n }",
"public function enable()\r\n {\r\n $this->enabled = true;\r\n\r\n if (!$this->booted) {\r\n $this->boot();\r\n }\r\n }",
"public function start()\n {\n echo 'Start odometer.',\"\\n\";\n }",
"public static function channelling(): void\n {\n self::$isChannel = true;\n }",
"protected function welcome() {\n echo \"*****************\" . PHP_EOL .\n \"*** TicTacToe ***\" . PHP_EOL .\n \"*****************\" . PHP_EOL;\n $this->drawBoard(array(), true);\n echo \"[\" . self::QUIT_BUTTON . \"] - End game\" . PHP_EOL . PHP_EOL;\n }",
"function control_gpio()\n{\n $data = read_file();\n // fetch data from object\n foreach ($data->equipment as $value) {\n if ($value->status == 1) {\n //execute command line using exec function\n exec(\"gpio -g mode {$value->port} out\");\n exec(\"gpio -g write {$value->port} 1\");\n } else {\n exec(\"gpio -g write {$value->port} 0\"); \n }\n }\n \n}",
"public function check_headlights() {\r\n echo PHP_EOL;\r\n $this->action(\"checking headlights\");\r\n $this->action($this->lights_on ? \"headlights are on\" : \"headlights are off\");\r\n }",
"public function start() {\n $cmd = sprintf(\"./control.sh start %s -game %s -ip %s -port %d -maxplayers %d -map %s -rcon %s\", $this->sid, $this->gameId, $this->ip, $this->port, $this->maxplayers, $this->map, $this->rcon);\n ssh($cmd, $this->host);\n DB::get()->query(\"UPDATE `servers` SET `status` = 1 WHERE `serverID` = '\" . $this->serverId . \"'\");\n }",
"public function run()\r\n {\r\n $this->spaceShip->navigateTo($this->destination['x'], $this->destination['y'], $this->destination['z']);\r\n }",
"public function ability() {\n\n $this->startMove(3, 0.2);\n echo \"THE ENGINE IS OVERHEATED!\\n\";\n $this->switchEngine();\n\n\n\n\n }",
"function setIsOn($isOn){\n\t\tglobal $db;\n\t\t$statement = $db->prepare('UPDATE bot_on_off SET isOn = :isOn');\n\t\t$statement->bindValue(':isOn', $isOn, PDO::PARAM_INT);\n\t\t$statement->execute();\n\t}",
"protected function AIMove() {\n $botMove = $this->botMove();\n echo \"Computer's move is '\" . $this->_botMark . \"' at box \" . $botMove . PHP_EOL;\n $this->_markers[$this->_botMark][] = $botMove;\n $this->drawBoard($this->_markers);\n if ($this->isWon($this->_botMark) || $this->isBoardFull())\n return true;\n return false;\n }",
"public function setOn($value)\n {\n $this->on = $value;\n }",
"public function openValve(){\n if ($this->game->get_current_turn()->WinStatus($this->game->getSize())){\n $this->game->set_winner();\n }else{\n $this->game->update_turn();\n $this->game->set_winner();\n }\n }",
"public function headlights_off() {\r\n echo PHP_EOL;\r\n $this->action(\"turning headlights off\");\r\n $this->lights_on = FALSE;\r\n $this->action(\"headlights are off\");\r\n\r\n }",
"public function startPowerUnits() {\n\t\techo \"power units started.<br>\";\n\t\t$this->missionControl->setState($this->missionControl->getRetractArms());\n\t}",
"function setActive() ;",
"function setDebugSwitch($switch, $onoff = true)\n {\n if ($onoff == true) {\n $this->_debugSwitches[\"$switch\"] = true;\n }else {\n unset($this->_debugSwitches[\"$switch\"]);\n }\n }",
"public function start() {\n $this->setup();\n $this->fight();\n }",
"public function controls($status = true);",
"public function makeATrip()\n {\n $this->travelStrategy->move();\n echo \"This place is kewl\";\n $this->travelStrategy->move();\n }",
"public function switchActivePlayer()\n\t{\n\t\t$activeplayer = $this -> activePlayer;\n\t\t$playerX = $this -> playerX;\n\t\t$playerO = $this -> playerO;\n\t\tif ($activeplayer == $playerX)\n\t\t\t$this -> activePlayer = $playerO;\n\t\telse\n\t\t\t$this -> activePlayer = $playerX;\n\t\t\t\n\t\t$newactive = $this -> activePlayer;\n\t\t\n\t\t$query = \"UPDATE tttgame \n\t\t\t\t SET activeplayer = '$newactive' \n\t\t\t\t WHERE playerX = '$playerX' \n\t\t\t\t AND playerO = '$playerO';\";\n\t\t$this -> queryDB($query);\n\t}",
"public function Play()\n {\n SetValue($this->GetIDForIdent(\"Status\"), 1);\n include_once(__DIR__ . \"/sonos.php\");\n (new PHPSonos($this->ReadPropertyString(\"IPAddress\")))->Play();\n \n }",
"function logger_device_activate($code) {\n\n logger_device_assign($code);\n\n drupal_set_message(t(\"The device is now associated with your account.\"));\n\n drupal_goto('device/mylist');\n}",
"public function powerDown()\n {\n if ($this->motor_power)\n $this->motor_power->setValue(0);\n }",
"public function enable()\n {\n $this->enabled = true;\n }",
"public function go(int $km): void{\n //parent::go($km);\n // On rajoute\n echo (\"POOOOOOOOOOOOOOOOOOON \");\n }",
"function stInterPlayerTurn() {\n \n // Give him extra time for his actions to come\n self::giveExtraTime(self::getActivePlayerId());\n \n // Does he plays again?\n if (self::getGameStateValue('first_player_with_only_one_action')) {\n // First turn: the player had only one action to make\n $next_player = true;\n self::setGameStateValue('first_player_with_only_one_action', 0);\n }\n else if (self::getGameStateValue('second_player_with_only_one_action')) {\n // 4 players at least and this is the second turn: the player had only one action to make\n $next_player = true;\n self::setGameStateValue('second_player_with_only_one_action', 0);\n }\n else if (self::getGameStateValue('has_second_action')) {\n // The player took his first action and has another one\n $next_player = false;\n self::setGameStateValue('has_second_action', 0);\n }\n else {\n // The player took his second action\n $next_player = true;\n self::setGameStateValue('has_second_action', 1);\n }\n if ($next_player) { // The turn for the current player is over\n // Reset the flags for Monument special achievement\n self::resetFlagsForMonument();\n \n // Activate the next player in turn\n $this->activeNextPlayer();\n $player_id = self::getActivePlayerId();\n self::setGameStateValue('active_player', $player_id);\n }\n self::notifyGeneralInfo('<!--empty-->');\n self::trace('interPlayerTurn->playerTurn');\n $this->gamestate->nextState();\n }",
"public function connected()\n {\n $this->connected = true;\n }",
"public function SwitchLight($id)\n {\n if ( !array_key_exists($id, $this->rooms)){\n throw new Exception(\"Nie ma takiego pomieszczenia\", 1);\n }\n $pin = $this->rooms[$id];\n if ($this->RelayStat($pin)) {\n $this->RelayOff($pin);\n }\n else {\n $this->RelayOn($pin);\n }\n }",
"private function controller() {\n\n\t\t# While connected, manage the input\n\t\twhile(!feof($this->socket)) {\n\t\t\t# Read inbound connection into $this->inbound\n\t\t\t$this->getTransmission();\n\n\t\t\t# Detect MOTD (message number 376 or 422)\n\t\t\tif(strpos($this->inbound, $this->config['server'].\" 376\") || strpos($this->inbound, $this->config['server'].\" 422\")) {\n\t\t\t\t# Join channel then...\n\t\t\t\t$this->sendCommand(\"JOIN \".$this->config['destinationChannel']);\n\t\t\t\t$this->log(\"[INIT]: Joined destination channel\");\n }\n\t\t\t# If successfully joined the channel, mark bot as ready (names list message id 353)\n\t\t\tif(strpos($this->inbound, $this->config['server'].\" 353\")) {\n\t\t\t\t$this->ready = true;\n\t\t\t\t$this->log(\"[INIT]: Ready for commands!\");\n }\n\n\t\t\tif($this->ready) {\n\t\t\t\t# Parse the inbound message and scan for a command\n\t\t\t\t$this->parseMessage();\n\n # See if this command can be found in the command list\n # Command list is established by the loaded modules\n\t\t\t\tif(strlen($this->lastMessage['command']) > 0) {\n\t\t\t\t\tforeach($this->modules as $moduleName => $moduleObj) {\n\t\t\t\t\t\tif($moduleObj->findCommand($this->lastMessage['command'])) {\n # Launch command\n\t\t\t\t\t\t\t$this->log(\" -> Found command '\".$this->lastMessage['command'].\"' in module '\".$moduleName.\"' called by user: '\".$this->lastMessage['nickname'].\"'\");\n\t\t\t\t\t\t\t$reply = $this->modules[$moduleName]->launch($this->lastMessage['command'], $this->lastMessage);\n\t\t\t\t\t\t\tif(strlen($reply) > 0) {\n\t\t\t\t\t\t\t\t$this->sendMessage($reply);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n # If not, scan chatter for relevant calls to the bot\n if(strlen($this->lastMessage['chatter']) > 0) {\n foreach($this->modules as $moduleName => $moduleObj) {\n if($trigger = $moduleObj->findTrigger($this->lastMessage['chatter'])) {\n # Found a trigger for a command, fire it off\n # First, strip out chatter into command and args\n $triggered_command = $moduleObj->getCommandByTrigger($trigger);\n $this->lastMessage['command'] = $triggered_command;\n $chatter = $this->lastMessage['chatter'];\n $this->lastMessage['chatter'] = '';\n $this->lastMessage['args'] = rtrim(ltrim($chatter,$trigger),\"\\n\\r\");\n # Launch command\n $this->log(\" -> Found command '\".$this->lastMessage['command'].\"' in module '\".$moduleName.\"' by trigger '\".$trigger.\"' called by user: '\".$this->lastMessage['nickname'].\"'\");\n $reply = $this->modules[$moduleName]->launch($this->lastMessage['command'], $this->lastMessage);\n if(strlen($reply) > 0) {\n $this->sendMessage($reply);\n }\n }\n }\n }\n\t\t\t}\n\n\t\t\t# If server has sent PING command, handle\n if(substr($this->inbound, 0, 6) == \"PING :\") {\n\t\t\t\t# Reply with PONG for keepalive\n\t\t\t\t$this->sendCommand(\"PONG :\".substr($this->inbound, 6));\n }\n \n $this->lastMessage = null;\n $this->inbound = null;\n\t\t}\n\t}",
"function startRelaying() { }",
"public function setActive() {}",
"function motor_status() {\n // Read pin values.\n $leftPinVal = intval(shell_exec('/usr/local/bin/gpio read ' . LEFT_PIN));\n $rightPinVal = intval(shell_exec('/usr/local/bin/gpio read ' . RIGHT_PIN));\n $forwardPinVal = intval(shell_exec('/usr/local/bin/gpio read ' . FORWARD_PIN));\n $backwardPinVal = intval(shell_exec('/usr/local/bin/gpio read ' . BACKWARD_PIN));\n\n $status = array();\n\n // Get status of front motor.\n if (($leftPinVal == 0 && $rightPinVal == 0) || ($leftPinVal == 1 && $rightPinVal == 1)) {\n $status['front'] = 'neutral';\n }\n else if ($leftPinVal == 1 && $rightPinVal == 0) {\n $status['front'] = 'left';\n }\n else {\n $status['front'] = 'right';\n }\n\n // Get status of back motor.\n if (($forwardPinVal == 0 && $backwardPinVal == 0) || ($forwardPinVal == 1 && $backwardPinVal == 1)) {\n $status['back'] = 'neutral';\n }\n else if ($forwardPinVal == 1 && $backwardPinVal == 0) {\n $status['back'] = 'forward';\n }\n else {\n $status['back'] = 'backward';\n }\n\n return $status;\n}",
"public function walkDoors()\n {\n for($i = 1; $i <= self::NUMBER_OF_WALKS; $i++)\n {\n foreach ($this->doors as $door)\n {\n if ($door->getNumber() % $i === 0)\n {\n $door->toggle();\n }\n }\n }\n }",
"function switchChannel($ch)\n {\n exec( $this->arfilelocation['iwpriv'] . ' '\n . escapeshellarg($this->interface) . ' set Channel='.$ch);\n }",
"public function switchPlayer(){\n\t\tfor($col = 0; $col < 3; $col++){\n\t\t\tfor($row = 0; $row < 3; $row++){\n\t\t\t\tif(isset($_GET[\"cell-\".$col.\"-\".$row])){\n\t\t\t\t\tif($this->player1->getSymbol() == $_GET[\"cell-\".$col.\"-\".$row]) {\n\t\t\t\t\t\t$this->currentPlayer = $this->player1;\n\t\t\t\t\t}\n\t\t\t\t\tif($this->player2->getSymbol() == $_GET[\"cell-\".$col.\"-\".$row]) {\n\t\t\t\t\t\t$this->currentPlayer = $this->player2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($this->currentPlayer === $this->player1){\n\t\t\t$this->currentPlayer = $this->player2;\n\t\t} else {\n\t\t\t$this->currentPlayer = $this->player1;\n\t\t}\n\t}",
"function MoveWheels(){\n echo \"Wheels rotate. <br>\";\n $this->wheels = 10;\n }",
"public function setActive()\n\t\t{\n\t\t\t$this->_state = 1;\n\t\t}",
"public function open()\r\n {\r\n echo \"电梯打开\";\r\n }",
"public function play() {\n if ($this->getLigado() && !($this->getTocando())) {\n $this->setTocando(true);\n }\n }",
"public function turnWheel() {\n\n $this->setGumballs($this->getGumballs() - 1);\n }",
"public function activate();",
"public function activate();",
"public function switch_on ($id, $level = 100) {\n\t\t//Returns true or false. No values are set! (Execute get_status to get the new status)\n\t\treturn $this->_switch_on ($id, $level);\n\t}",
"public function moveForward ();",
"function controls()\n\t{\n\t}",
"function start()\n\t{\n\t\t$this->score = 0;\n\t\t$this->won = false;\n\t\t$this->over = false;\n\t}",
"function AutomatSwitchState() {\r\n\r\n // Store current state to statefrom field\r\n $query = \"update actsessions \";\r\n $query .= \"set statefrom=$this->AutomatState \";\r\n $query .= \"where seshid='$this->seshid'\";\r\n // debug\r\n $this->err_level = 16;\r\n $this->err = \"AutomatSwitchState. query: \" . (string)$query;\r\n $this->err_no = 0;\r\n $this->DbgAddSqlLog();\r\n $result=mysqli_query($this->linkid,$query);\r\n // query failed\r\n if (!$result) {\r\n $this->err_level = -1;\r\n $this->err=mysqli_error($this->linkid);\r\n $this->err_no=204;\r\n $this->DbgAddSqlLog();\r\n $this->AutomatState = -1;\r\n return;\r\n }\r\n\r\n // Store new state to state field\r\n $query = \"update actsessions \";\r\n $query .= \"set state=$this->NewAutomatState \";\r\n $query .= \"where seshid='$this->seshid'\";\r\n // debug\r\n $this->err_level = 16;\r\n $this->err = \"AutomatSwitchState. query: \" . (string)$query;\r\n $this->err_no = 0;\r\n $this->DbgAddSqlLog();\r\n $result=mysqli_query($this->linkid,$query);\r\n // query failed\r\n if (!$result) {\r\n $this->err_level = -1;\r\n $this->err=mysqli_error($this->linkid);\r\n $this->err_no=204;\r\n $this->DbgAddSqlLog();\r\n $this->AutomatState = -1;\r\n return;\r\n\r\n }\r\n $this->PreviousAutomatState = $this->AutomatState;\r\n $this->AutomatState = $this->NewAutomatState;\r\n return;\r\n }",
"public function enable();",
"public function enable();",
"public function startPlay(){ \r\n\r\n $this->selectPlayer();\r\n $this->board->printBoard();\r\n\r\n while(!$this->gameOver){\r\n\r\n //check if board is full\r\n if($this->reachedMaxMoves() || $this->validateIsFullBoard()){\r\n noWinningMsg($this->currentPlayer);\r\n $this->gameOver = true;\r\n break;\r\n }\r\n // set board with table\r\n $userMove = $this->selectMove();\r\n \r\n //in case that column is not full \r\n if(!$this->validateIsFullColumn($userMove)){\r\n $this->insertMoveToBoard($userMove);\r\n $this->winCheck($userMove);\r\n $this->switchPlayer();\r\n }\r\n }\r\n }",
"public function switchView()\n {\n if ( !$this->ownerLoggedIn() )\n {\n $this->redirect(\"index.php\");\n\n }\n \n require_once('views/SwitchView.class.php'); \n \n $site = new SiteContainer($this->db);\n \n $sv = new SwitchView();\n\n $site->printHeader();\n $site->printNav(\"owner\");\n $sv->printHtml($this->businesses);\n $site->printFooter(); \n \n \n }",
"private function setController()\n\t\t{\n\t\t\t$this->_controller = $this->_separetor[1];\n\t\t}",
"public function setCurrentPlayer($player) {\n $this->game->set_current_turn($player);\n }",
"public function enable() {\n\t\tif ($this->enabled) return;\n\t\t$this->setUp($this->outputMode, $this->crashCallback, $this->destructCallback);\n\t\t$this->enabled = true;\n\t}",
"function MoveWheels() {\n\t\t// class id itself as \"$this\"\n\t\t$this->wheels = 10;\n\t\techo \"Wheels move is now \" . $this->wheels;\n\t\techo \"<br>\";\n\t}",
"public function switchStatus()\n {\n if ($this->status == 1) {\n return $this->status = '0';\n }\n $this->status = 1;\n }",
"public function enable() {}",
"private function advance(): void\n {\n if ($this->rotors[1]->isNotchOpen()) {\n $this->rotors[2]->advance();\n $this->rotors[1]->advance();\n }\n if ($this->rotors[0]->isNotchOpen()) {\n $this->rotors[1]->advance();\n }\n $this->rotors[0]->advance();\n }",
"public function SendSwitch(boolean $State)\n {\n $OldState = GetValueBoolean($this->GetIDForIdent('STATE'));\n if ($State) //Einschalten\n {\n if (!$OldState)\n {\n try\n {\n $this->DoInit(); \n } catch (Exception $exc)\n {\n trigger_error($exc->getMessage(),$exc->getCode());\n }\n\n\n }\n }\n else //Ausschalten\n {\n $data = chr(01) . chr(00) . chr(00) . chr(00) . chr(00) . chr(00) . chr(00); // farbe weg\n if ($this->SendCommand($data))\n {\n $this->SetValueBoolean('STATE', false);\n $this->SetValueInteger('Color', 0);\n $this->SetValueInteger('Play', 3);\n $data = chr(0x0B) . chr(01) . chr(00) . chr(00) . chr(00) . chr(00) . chr(00);\n if ($this->SendCommand($data))\n $this->SetValueInteger('Speed', 0);\n $data = chr(0x0C) . chr(01) . chr(00) . chr(00) . chr(00) . chr(00) . chr(00);\n if ($this->SendCommand($data))\n $this->SetValueInteger('Brightness', 1);\n $data = chr(0x01) . chr(00) . chr(00) . chr(00) . chr(00) . chr(00) . chr(00);\n $this->SendCommand($data);\n }\n }\n }",
"public static function enable(){\n self::$enabled = true; \n self::$disabled=false;\n }",
"function eis_device_poweron() {\n\tglobal $eis_conf,$eis_dev_conf,$eis_dev_status,$eis_mysqli;\n\t// do nothing\n\treturn true;\n}",
"public static function enable(): void\n {\n self::$isEnabled = true;\n }",
"function activate() {\r\r\n }",
"public function setActivation(): void;",
"private function set_device(){\n\t\n\t}",
"public function click() {\r\n\t\tswitch($this->current) {\r\n\t\t\tdefault:\r\n\t\t\t\t$this->current = self::SEA;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase self::ISLAND:\r\n\t\t\t\t$this->current = self::NONE;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase self::SEA:\r\n\t\t\t\t$this->current = self::ISLAND;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}",
"public function start()\n\t{\n\t\t// reset first, will start automaticly after a full reset\n\t\t$this->data->directSet(\"resetNeeded\", 1);\n\t}",
"public function play() {\r\n foreach ($this->cells as $cell) {\r\n $alive_neighbours = $this->alive_neighbours_around($cell);\r\n if (!$cell->alive && $alive_neighbours == 3) {\r\n $cell->next_state = 1;\r\n } else if ($alive_neighbours < 2 || $alive_neighbours > 3) {\r\n $cell->next_state = 0;\r\n }\r\n }\r\n\r\n foreach ($this->cells as $cell) {\r\n if ($cell->next_state == 1) {\r\n $cell->alive = true;\r\n } else if ($cell->next_state == 0) {\r\n $cell->alive = false;\r\n }\r\n }\r\n\r\n $this->play += 1;\r\n }",
"public function activate() {\n\t\t\n\t}",
"public static function enable() {\n\t\tself::$enabled = true;\n\t}",
"public function switchAction()\n {\n $value = $this->getRequest()->getParam('value');\n if (is_null($value))\n $value = 1;\n\n try {\n $customer = Mage::helper('mp_gateway')->getCustomer();\n\n $customer->setData('enable_savedcards', $value)->save();\n $this->_getSession()->addSuccess(sprintf('The card functionality has been successfully %s', ($value) ? 'enabled' : 'disabled'));\n } catch (Exception $e) {\n $this->_getSession()->addError('Error in the request, please try again');\n }\n\n return $this->_redirectReferer();\n }",
"public function openWall() {\n $this->output = $this->openwall;\n }",
"public function controls()\n {\n }",
"function setDeviceState($dserial, $state) {\n\t#$non_num_pattern = \"/[^0-9A-Z]/\";\n\t\n\t#if(preg_match($non_num_pattern, $dserial) || preg_match($non_num_pattern, $state)) {\n\t#\tdie('Non decimal character detected');\n\t#}\n\t\n\t$state = intval($state, 10);\n\t\n\tif($state == DeviceState::Off) $msg = 'off';\n\telse if($state == DeviceState::On) $msg = 'on';\n\telse die('Invalid state' . $state);\n\t\n\t$msg .= '/pi/' . $dserial;\n\t\n\t$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n\tif(!$sock) die('PHP cannot create socket');\n\t\n\tif(!socket_connect($sock, SCRIPT_IP, SCRIPT_PORT)) {\n\t\tsocket_close($sock);\n\t\tdie('Cannot connect to PiHome.py ip and port at ' . SCRIPT_IP . ', ' . SCRIPT_PORT);\n\t}\n\t\n\tsocket_send($sock, $msg, strlen($msg), 0);\n\t\n\tsocket_close($sock);\n}",
"public function tick(){\n\t\tif($this->status !== self::NORMAL){\n\t\t\t$this->remaining_turns--;\n\t\t\tif($this->remaining_turns <= 0){\n\t\t\t\t$this->status = self::NORMAL;\n\t\t\t}\n\t\t}\n\t}",
"public function apagar() {\n\n\t$respuesta=self::$plasma->estadoPlasma();\n\tif ( $respuesta == 'ON' ){\n\t $respuesta=self::$plasma->apagar();\n\t}\n\n }",
"public function gain(){\r\n $actionPoint = $this->target->getActionPoint();\r\n $actionPoint = round($actionPoint / 2);\r\n\r\n $this->target->setActionPoint($actionPoint);\r\n $this->target->setTimestamp();\r\n\r\n self::getActionPoint();\r\n }",
"public function setActive()\r\n {\r\n $this->active = true;\r\n }",
"public function tourSuivant() {\n\t\t\t$this -> turn = ($this-> turn == $this -> j1) ? $this -> j2 : $this -> j1 ;\n\t\t}",
"public function MyExecute()\r\n\t{\r\n Utility::turnDebugOn();\r\n //config switch\r\n// $this->addPortToVlan(\"172.16.254.2\",2143,\"tagged\",1);\r\n// $this->addPortToVlan(\"172.16.254.2\",2143,\"tagged\",2); \r\n// $this->addPortToVlan(\"172.16.254.2\",2143,\"tagged\",3); \r\n// $this->addPortToVlan(\"172.16.254.2\",2143,\"tagged\",4); \r\n// \r\n// $this->addPortToVlan(\"172.16.254.2\",2343,\"tagged\",1);\r\n// $this->addPortToVlan(\"172.16.254.2\",2343,\"tagged\",2); \r\n// $this->addPortToVlan(\"172.16.254.2\",2343,\"tagged\",3);\r\n// $this->addPortToVlan(\"172.16.254.2\",2343,\"tagged\",4); \r\n \r\n// $this->apRadioControl($this->scenario->GetDevice('AP2'),\"Disabled\");\r\n// \r\n// Utility::insertBreakPoint(); \r\n// \r\n// $this->apRadioControl($this->scenario->GetDevice('AP2'),\"Enabled\");\r\n// \r\n// $this->syncAPs();\r\n \r\n// if($this->checkPage()==TRUE)\r\n// {\r\n// Utility::insertBreakPoint(\"hahahahaha\"); \r\n// }\r\n// else\r\n// {\r\n// system(\"banner baga\");\r\n// }\r\n \r\n\r\n $MYVSC=new VSC(\"V2\",\"V2\",\"WPA2(AES/CCMP)\",\"802.1X\");\r\n $MYVSC->commit();\r\n \r\n// $MYVSC=new VSC(\"V3\",\"V3\",\"WEP\",\"HTML\");\r\n// $my_wireless=new WirelessProtection();\r\n// $my_wireless->setWirelessProtectionType(\"WEP\");\r\n// $my_wireless->setKeySource(\"STATIC\");\r\n// $my_wireless->setKey(array( \"c67347dd12a787b7a132f690d0\", \"c67347dd12a797b7a132f690d1\", \"c673a7dd12a787b7a132f690d2\", \"c67347dd16a787b7a132f690d3\", \"2\", \"HEX\"));\r\n// $MYVSC->configureWirelessProtection($my_wireless); \r\n// $MYVSC->commit();\r\n \r\n $MYVSC=new VSC(\"V3\",\"V3\",\"WPA(TKIP)\",\"HTML\");\r\n $my_wireless=new WirelessProtection();\r\n $my_wireless->setWirelessProtectionType(\"WPA(TKIP)\");\r\n $my_wireless->setKeySource(\"STATIC\");\r\n $my_wireless->setKey(\"26d4a5f7cf549710a7aae2db4e712027\");\r\n $MYVSC->configureWirelessProtection($my_wireless); \r\n $MYVSC->commit();\r\n \r\n \r\n \r\n// $MYVSC=new VSC(\"V4\",\"V4\",\"None\",\"MAC\");\r\n// $MYVSC->commit();\r\n// \r\n// $MYVSC=new VSC(\"V5\",\"V5\",\"None\",\"HTML_MAC\");\r\n// $MYVSC->commit();\r\n// \r\n // $MYVSC=new VSC(\"V6\",\"V6\",\"WEP\",\"802.1X\");\r\n// $MYVSC->commit();\r\n// \r\n// $MYVSC=new VSC(\"V7\",\"V7\",\"WPA2(AES/CCMP)\",\"802.1X\");\r\n// $MYVSC->commit();\r\n// \r\n// $MYVSC=new VSC(\"V8\",\"V8\",\"WPA/WPA2\",\"802.1X\");\r\n// $MYVSC->commit();\r\n// $MYVSC=new VSC(\"V2\",\"V2\",\"WEP\");\r\n// $MYVSC->commit(); \r\n// \r\n// $MYVSC=new VSC(\"V3\",\"V3\",\"WEP\",\"HTML\"); \r\n// $MYVSC->commit(); \r\n// \r\n \r\n Utility::insertBreakPoint(); \r\n return \"passed\";\r\n \r\n\t}",
"function Toggle ( $status = 1 ) {\n // toggle debug status to what is passed (on if you forget)\n // this allows to temporarily suspend debugging.\n $this->debug_status = $status;\n }",
"function activate() {\n }",
"function playerConnect(){\n\t return true;\n\t}"
] | [
"0.7238886",
"0.67490864",
"0.6624371",
"0.64243984",
"0.6422541",
"0.629379",
"0.6226097",
"0.5962776",
"0.58805",
"0.56093574",
"0.55032384",
"0.54843533",
"0.54410875",
"0.5408911",
"0.53970355",
"0.53923285",
"0.53055876",
"0.52272683",
"0.5185154",
"0.5181359",
"0.5173116",
"0.5168113",
"0.51411784",
"0.51400495",
"0.51286024",
"0.5111245",
"0.5094466",
"0.508005",
"0.5072792",
"0.507279",
"0.5068348",
"0.5068019",
"0.5064468",
"0.50559545",
"0.50480366",
"0.50369394",
"0.50191027",
"0.49963078",
"0.49939933",
"0.49910855",
"0.49682918",
"0.49680743",
"0.49679726",
"0.4964365",
"0.49583137",
"0.49543276",
"0.49499667",
"0.4904606",
"0.4887833",
"0.48671302",
"0.48533848",
"0.48356757",
"0.4823867",
"0.4818679",
"0.4810026",
"0.47876948",
"0.47829738",
"0.4782049",
"0.4782049",
"0.47724912",
"0.47655135",
"0.4748755",
"0.47420797",
"0.47394654",
"0.4731259",
"0.4731259",
"0.47268566",
"0.4726182",
"0.47232047",
"0.47179052",
"0.46995595",
"0.46952835",
"0.4694348",
"0.46912205",
"0.46864074",
"0.46812928",
"0.46810508",
"0.46782336",
"0.4672488",
"0.46665335",
"0.4665544",
"0.4662272",
"0.46510226",
"0.46496582",
"0.46492994",
"0.4643703",
"0.46400568",
"0.46391878",
"0.46316364",
"0.46306074",
"0.46298912",
"0.46220982",
"0.45969862",
"0.45902592",
"0.45802262",
"0.45794225",
"0.45778129",
"0.4573345",
"0.45606053",
"0.45560125"
] | 0.6090816 | 7 |
Cuts the power to motor controller board | public function powerDown()
{
if ($this->motor_power)
$this->motor_power->setValue(0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function powerUp()\n {\n if ($this->motor_power)\n $this->motor_power->setValue(1);\n }",
"public function wipers_off() {\r\n echo PHP_EOL;\r\n $this->action(\"turning windshield wipers off\");\r\n $this->wipers_on = FALSE;\r\n $this->action(\"windshield wipers are off\");\r\n }",
"public function headlights_off() {\r\n echo PHP_EOL;\r\n $this->action(\"turning headlights off\");\r\n $this->lights_on = FALSE;\r\n $this->action(\"headlights are off\");\r\n\r\n }",
"public function tiltDownCamaraPresidencia() {\n\n self::$presidencia->moverAbajo();\n\n }",
"public function cut()\n {\n }",
"public function turnWheel() {\n\n $this->setGumballs($this->getGumballs() - 1);\n }",
"public function Stop()\r\n {\r\n echo \"<b><u>Command Received: Stop Vehicle</b></u><br />\";\r\n echo $this->carName . \"'s current speed is \" . $this->speed . \".<br />\";\r\n echo \"Stopping...<br />\";\r\n $this->speed = 0;\r\n echo $this->carName . \" is now travelling at \" . $this->speed . \" mph. <br />\";\r\n }",
"private function clean() {\n echo $this->floor->areaRemainsToClean();\n while ($this->floor->areaRemainsToClean()) {\n $this->useBattery();\n }\n }",
"public function charging(): void\n {\n $this->capacity = 1;\n }",
"public function ShutdownCar()\r\n {\r\n echo \"<b><u>Command Received: Shutdown Engine</b></u><br />\";\r\n if($this->speed > 0)\r\n {\r\n echo \"Stopping prior to shutting down the engine... <br />\";\r\n $this->speed = 0;\r\n }\r\n $this->carEngine->stopEngine();\r\n echo $this->carName . \"'s engine has been shut down <br />\";\r\n }",
"public function usb()\n {\n }",
"public function eraseDown(): void\n {\n static::writeDirectly(\"\\e[J\");\n }",
"function porte1() {\n\t\tsystem (\"gpio write 21 off\");\n\t\tsleep ( 1 );\n\t\tsystem (\"gpio write 21 on\");\n\t\t}",
"private function ledOff()\n {\n $this->ledPin->setValue(PinInterface::VALUE_LOW);\n }",
"function eis_device_poweroff() {\n\tglobal $eis_conf,$eis_dev_conf,$eis_dev_status,$eis_mysqli;\n\t// do nothing\n\treturn true;\n}",
"public function turnOff() //Einschalten geht nur über WOL! \n { \n $this->lg_handshake();\n $command = '{\"id\":\"turnOff\",\"type\":\"request\",\"uri\":\"ssap://system/turnOff\"}'; \n $this->send_command($command); \n }",
"public function shutDoor()\n {\n return false;\n }",
"public function startPowerUnits() {\n\t\techo \"power units started.<br>\";\n\t\t$this->missionControl->setState($this->missionControl->getRetractArms());\n\t}",
"public function startPowerUnits() {\n\t\t\n\t}",
"public function tiltDownCamaraAlumnos1() {\n\n self::$alumnos1->moverAbajo();\n\n }",
"public function desactivarProyectorCentral( ) {\n\n $this->setComando(self::$PROYECTOR_CENTRAL, \"MUTE\");\n\n }",
"public function switchOn();",
"public function putDown();",
"public function tiltDownCamaraAlumnos2() {\n\n self::$alumnos2->moverAbajo();\n\n }",
"public function setFluidsOilMotor($value) {\n switch ($value) {\n case 0 : // Sin da�o\n return 0;\n break;\n case 6 : // Malo\n return 10;\n break;\n }\n }",
"public function shift()\n {\n \n }",
"private function clearBuildArea() {\n $plugin = SJTTournamentTools::getInstance();\n\t\t$level = Server::getInstance()->getDefaultLevel();\n\t\t$location = $plugin->getLocationManager()->getLocation('Build');\n\n\t\t$lengthx = self::PLATFORM_COUNT_X * (self::PLATFORM_WIDTH + 1);\n\t\t$lengthz = self::PLATFORM_COUNT_Z * (self::PLATFORM_WIDTH + 1);\n\n // TEMP clear large area 4 x 5 squares\n /*for ($x = -5; $x < self::PLATFORM_WIDTH * 4 + 5; $x++) {\n\t\t\tfor ($z = -5; $z < self::PLATFORM_WIDTH * 5 + 5; $z++) {\n\t\t\t\t$newx = $location['x'] + $x;\n\t\t\t\t$newy = $location['y'];\n\t\t\t\t$newz = $location['z'] + $z;\n\n\t\t\t\t$level->setBlock(new Vector3($newx, $newy, $newz), new Air(), false, false);\n\t\t\t}\n\t\t}*/\n\n // Clear area above platforms\n\t\tfor ($x = 0; $x < $lengthx; $x++) {\n\t\t\tfor ($y = 0; $y < self::AIR_CLEARANCE; $y++) {\n\t\t\t\tfor ($z = 0; $z < $lengthz; $z++) {\n\t\t\t\t\t$newx = $location['x'] + $x;\n\t\t\t\t\t$newy = $location['y'] + $y + 1;\n\t\t\t\t\t$newz = $location['z'] + $z;\n\t\t\t\t\t$level->setBlock(new Vector3($newx, $newy, $newz), new Air(), false, false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n // Rebuild platforms and gaps between\n\t\tfor ($x = 0; $x < $lengthx; $x++) {\n\t\t\tfor ($z = 0; $z < $lengthz; $z++) {\n\t\t\t\t$newx = $location['x'] + $x;\n\t\t\t\t$newy = $location['y'];\n\t\t\t\t$newz = $location['z'] + $z;\n\t\t\t\tif (!($x % (self::PLATFORM_WIDTH + 1)) || !($z % (self::PLATFORM_WIDTH + 1))) {\n\t\t\t\t\t$level->setBlock(new Vector3($newx, $newy, $newz), new Air(), false, false);\n\t\t\t\t} else {\n\t\t\t\t\t$level->setBlock(new Vector3($newx, $newy, $newz), new Quartz(), false, false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n // Remove entities within build area\n $entities = $level->getEntities();\n foreach($entities as $entity) {\n if (!$entity instanceof Player &&\n $entity->getX() >= $location['x'] && $entity->getX() <= $location['x'] + $lengthx &&\n $entity->getZ() >= $location['z'] && $entity->getZ() <= $location['z'] + $lengthz) {\n\n $entity->kill();\n }\n }\n }",
"public function setPower()\n {\n $this->_role->power = 200;\n }",
"public function ledsOff()\n {\n $payload = '';\n\n $this->sendRequest(self::FUNCTION_LEDS_OFF, $payload);\n }",
"function revItUp($x) {\r\n return $this->speedometer + 5; \r\n }",
"public function setLeakageOilMotor($value) {\n switch ($value) {\n case 0 : // Sin da�o\n return 0;\n break;\n case 6 : // Malo\n return 10;\n break;\n }\n }",
"function ZimAPI_shutdown() {\r\n\t$CI = &get_instance();\r\n\t$CI->load->helper('printerstate');\r\n\t\r\n\treturn PrinterState_powerOff();\r\n}",
"public function tiltUpCamaraPresidencia() {\n\n self::$presidencia->moverArriba();\n\n }",
"public function desligarMudo() {\n if ($this->getLigado() && $this->getVolume == 0) {\n $this->setVolume(50);\n }\n }",
"public function eraseFloorButtons(int $floor): void;",
"function HM_LC_Dim1PWM_CV($component) {\n if ($component['parent_device_interface'] == 'BidCos-RF' && $component['visible'] == 'true' && isset($component['LEVEL'])) {\n $modalId = mt_rand();\n \n return '<div class=\"hh\">'\n . '<div data-toggle=\"collapse\" data-target=\"#' . $modalId . '\">'\n . '<div class=\"pull-left\"><img src=\"../assets/icons/' . $component[\"icon\"] . '\" class=\"icon\">' . $component['name'] . '</div>'\n . '<div class=\"pull-right\">'\n . '<span class=\"info\" data-id=\"' . $component['LEVEL'] . '\" data-component=\"' . $component['component'] . '\" data-datapoint=\"LEVEL\"></span>'\n . '</div>'\n . '<div class=\"clearfix\"></div>'\n . '</div>'\n . '<div class=\"hh2 collapse\" id=\"' . $modalId . '\">'\n . '<div class=\"row text-center\">'\n . '<div class=\"btn-group\">'\n . '<button type=\"button\" class=\"btn btn-primary set\" data-set-id=\"' . $component['LEVEL'] . '\" data-set-value=\"1.0\">'\n . '<img src=\"../assets/icons/light_light_dim_100.png\" />'\n . '</button>'\n . '<button type=\"button\" class=\"btn btn-primary set\" data-set-id=\"' . $component['LEVEL'] . '\" data-set-value=\"0.8\">'\n . '<img src=\"../assets/icons/light_light_dim_80.png\" />'\n . '</button>'\n . '<button type=\"button\" class=\"btn btn-primary set\" data-set-id=\"' . $component['LEVEL'] . '\" data-set-value=\"0.6\">'\n . '<img src=\"../assets/icons/light_light_dim_60.png\" />'\n . '</button>'\n . '<button type=\"button\" class=\"btn btn-primary set\" data-set-id=\"' . $component['LEVEL'] . '\" data-set-value=\"0.4\">'\n . '<img src=\"../assets/icons/light_light_dim_40.png\" />'\n . '</button>'\n . '<button type=\"button\" class=\"btn btn-primary set\" data-set-id=\"' . $component['LEVEL'] . '\" data-set-value=\"0.2\">'\n . '<img src=\"../assets/icons/light_light_dim_20.png\" />'\n . '</button>'\n . '<button type=\"button\" class=\"btn btn-primary set\" data-set-id=\"' . $component['LEVEL'] . '\" data-set-value=\"0.0\">'\n . '<img src=\"../assets/icons/light_light_dim_00.png\" />'\n . '</button>'\n . '</div>'\n . '</div>'\n . '<div class=\"row text-center top15\">'\n . '<div class=\"row text-center\">'\n . '<div class=\"form-inline\">'\n . '<div class=\"input-group\">'\n . '<input type=\"number\" name=\"' . $component['LEVEL'] . '\" min=\"0\" max=\"100\" class=\"form-control\" placeholder=\"Zahl eingeben\">'\n . '<span class=\"input-group-btn\">'\n . '<button class=\"btn btn-primary set\" data-datapoint=\"4\" data-set-id=\"' . $component['LEVEL'] . '\" data-set-value=\"\">OK</button>'\n . '</span>'\n . '</div>'\n . '<div class=\"btn-group\">'\n . '<button type=\"button\" class=\"btn btn-primary set\" data-set-id=\"' . $component['LEVEL'] . '\" data-set-value=\"1.0\">'\n . 'An'\n . '</button>'\n . '<button type=\"button\" class=\"btn btn-primary set\" data-set-id=\"' . $component['LEVEL'] . '\" data-set-value=\"0.0\">'\n . 'Aus'\n . '</button>'\n . '</div>'\n . '</div>'\n . '</div>'\n . '</div>'\n . '</div>'\n . '</div>';\n }\n}",
"protected function changeGearDown()\n\t{\n\tif ($this->currentGear <= 1){\n\t\t\techo 'Already on the minimum gear.';\n\t\t}\n\t\telse {\n\t\t\t$this->currentGear--;\n\t\t}\n\t}",
"public function motorcycles(){\n\n $motorcycles = array(\n 'ACABION',\n 'ACE',\n 'ADLER',\n 'ADLY',\n 'AEON',\n 'AERMACCHI',\n 'AJP',\n 'AJS',\n 'ALFER',\n 'ALIGATOR',\n 'AMAZONAS', \n 'AMC',\n 'AMERICAN IRONHORSE',\n 'ANZANI',\n 'APRILIA',\n 'ARCTIC CAT',\n 'ARIEL',\n 'ATK',\n 'ATLAS HONDA',\n 'ATOMO',\n 'AUDI',\n 'AUTOSTUDIO',\n 'BAJAJ',\n 'BATMAN',\n 'BENNCHE',\n 'BENELLI',\n 'BETA',\n 'BIG BEAR CHOPPERS',\n 'BIMAN',\n 'BIMOTA',\n 'BLATA',\n 'BLUE',\n 'BMW',\n 'BOMBARDIER RECREATIONAL PRODUCTS',\n 'BORILE',\n 'BOSS HOG CYCLES',\n 'BRAMMO',\n 'BRENNABOR',\n 'BROUGH SUPERIOR',\n 'BSA',\n 'BUCCIMOTO',\n 'BUELL',\n 'BULTACO',\n 'CAGIVA',\n 'CAMPAGNA',\n 'CAN-AM',\n 'CANNONDALE',\n 'CCM',\n 'CENTAURUS',\n 'CLEVELAND CYCLEWERKS',\n 'CONDOR',\n 'CONFEDERATE',\n 'CR AND S',\n 'CZ',\n 'DAELIM',\n 'DERBI',\n 'DKW',\n 'DNEPR',\n 'DODGE',\n 'DOLMER',\n 'DOUGLAS',\n 'DUCATI',\n 'EBR',\n 'ESCORTS',\n 'EXCELSIOR',\n 'FANTIC',\n 'FERRARI',\n 'FISCHER',\n 'FLYSCOOTERS',\n 'FUTONG',\n 'GARELLI',\n 'GAS GAS',\n 'GENERIC',\n 'GENEVA',\n 'GILERA',\n 'HDT',\n 'HERCULES',\n 'HERO HONDA',\n 'HIGHLAND',\n 'HONDA',\n 'HOREX',\n 'HUSABERG',\n 'HUSQVARNA',\n 'HYOSUNG',\n 'ICON',\n 'IDEAL JAWA',\n 'INDIAN',\n 'ITALJET',\n 'JAMES',\n 'JAWA',\n 'JINLANG',\n 'JRL',\n 'KAWASAKI',\n 'KEEWAY',\n 'KREIDLER',\n 'KTM',\n 'KYMCO',\n 'LAVERDA',\n 'LITO',\n 'MAHINDRA',\n 'MAICO',\n 'MALAGUTI',\n 'MANSORY',\n 'MATCHLESS',\n 'MBK',\n 'MINI',\n 'MINSK',\n 'MISSION MOTORS',\n 'MITSUBISHI MOTORS',\n 'MODENAS',\n 'MONDIAL',\n 'MOTESA',\n 'MORINI',\n 'MOTO FGR',\n 'MOTO GUZZI',\n 'MOTO MORINI',\n 'MOTO CZYSZ',\n 'MOTO LEVO',\n 'MOTORHISPANIA',\n 'MOTUS',\n 'MTT',\n 'MUNCH',\n 'MUZ',\n 'MV AUGUSTA',\n 'MZ',\n 'NCR',\n 'NEANDER',\n 'NEMBO MOTOCICLETTE',\n 'NORTON',\n 'NSU',\n 'ORION',\n 'OSSA',\n 'PANNONIA',\n 'PANTHER',\n 'PETRONAS',\n 'PEUGEOT',\n 'PGO SCOOTERS',\n 'PIAGGIO',\n 'POLARIS',\n 'PUCH',\n 'QUADRO',\n 'RADIAL ENGINE',\n 'REGENT',\n 'RENARD',\n 'RIEJU',\n 'ROEHR',\n 'ROKON',\n 'ROTAX',\n 'ROYAL ENFIELD',\n 'SACHS',\n 'SBAY',\n 'SCOTT',\n 'SHERCO',\n 'SHL',\n 'SIEMENS',\n 'SIMSON',\n 'SMART',\n 'SOKOL',\n 'SUNBEAM',\n 'SUZUKI',\n 'SYM',\n 'TRACK',\n 'TRIUMPH',\n 'TROJAN',\n 'TUNTURI',\n 'TVS',\n 'URAL',\n 'VAHRENKAMP',\n 'VECTRIX',\n 'VELOCETTE',\n 'VERTEMATI',\n 'VESPA',\n 'VICTORY',\n 'VINCENT',\n 'VOLTA',\n 'VOR',\n 'VOXAN',\n 'VYRUS',\n 'WALZ HARDCORE CYCLES',\n 'WEST COAST CHOPPERS',\n 'YAMAHA',\n 'YUMBO',\n 'ZERO',\n 'ZONGSHEN',\n 'ZUNDAPP'\n );\n\n return $motorcycles;\n }",
"public function gain(){\r\n $actionPoint = $this->target->getActionPoint();\r\n $actionPoint = round($actionPoint / 2);\r\n\r\n $this->target->setActionPoint($actionPoint);\r\n $this->target->setTimestamp();\r\n\r\n self::getActionPoint();\r\n }",
"public function walkDoors()\n {\n for($i = 1; $i <= self::NUMBER_OF_WALKS; $i++)\n {\n foreach ($this->doors as $door)\n {\n if ($door->getNumber() % $i === 0)\n {\n $door->toggle();\n }\n }\n }\n }",
"public function wipers_on() {\r\n echo PHP_EOL;\r\n $this->action(\"turning windshield wipers on\");\r\n $this->wipers_on = TRUE;\r\n $this->action(\"windshield wipers are on\");\r\n }",
"function shutdown() ;",
"function doStopTourAction() {\n//\t\t$request = DevblocksPlatform::getHttpRequest();\n\n\t\t$worker = CerberusApplication::getActiveWorker();\n\t\tDAO_WorkerPref::set($worker->id, 'assist_mode', 0);\n\t\t\n//\t\tDevblocksPlatform::redirect(new DevblocksHttpResponse($request->path, $request->query));\n\t}",
"public function swim()\n {\n }",
"function startShop(){\n $wiredController = new Controller(20, true);\n $notWiredController = new Controller(30, true);\n \n //First TV / values for price, maxExtras(default 0) infite extras = -1, \n $Television1 = new Television(250.50, \"TV1\", -1);\n\n $Television1Extras = 2;\n\n for($i = 0; $i < $Television1Extras; $i++){\n $Television1->setExtra($notWiredController);\n }\n\n $Television1->totalEletronicPrice();\n\n //Second TV / values for price, maxExtras\n $Television2 = new Television(200.50, \"TV 2\", -1);\n\n $Television2Extras = 1;\n for($i = 0; $i < $Television2Extras; $i++){\n $Television2->setExtra($notWiredController);\n }\n\n $Television2->totalEletronicPrice();\n\n //Console / values for price, maxExtras(default 0)\n $Console1 = new Console(500.50, \"Console\", 4);\n\n //add extra not wired controller\n $Console1Extras = 2;\n for($i = 0; $i < $Console1Extras; $i++){\n $Console1->setExtra($notWiredController);\n }\n\n //add extra wired controller \n $Console1Extras = 3;\n for($i = 0; $i < $Console1Extras; $i++){\n $Console1->setExtra($wiredController);\n }\n\n $Console1->totalEletronicPrice();\n\n //microwave / values for price, maxExtras(default 0)\n $Microwave1 = new microwave(350.80, \"Microwave\");\n\n $Microwave1Extras = 0;\n for($i = 0; $i < $Microwave1Extras; $i++){\n $Microwave1->setExtra($wiredController);\n }\n $Microwave1->totalEletronicPrice();\n\n $EletronicList = array(\n $Television1,\n $Television2,\n $Console1,\n $Microwave1\n );\n\n return $EletronicList;\n}",
"private function stop_ATD()\n\t{\n\t\texecuteCommand('killall run-lowmem.sh', '', $result, $return_status);\n\t}",
"function deactivate_wcfm_order_splitter() {\n\trequire 'includes/class-wcfmos-order-splitter-deactivator.php';\n\tWCFMOS_Order_Splitter_Deactivator::run();\n}",
"public function shutdown(Device $device)\n {\n\n }",
"public function setPower()\n {\n $this->_role->power = 100;\n }",
"public function pauseWorking(){\r\n\r\n }",
"function manageCollector($temperatures){\r\n\tglobal $settings;\r\n\tglobal $states;\r\n\tglobal $logicDescription;\r\n\t$pt= $temperatures[\"pT\"]; // if current temp bad it may use average value\r\n\t$ct= GreenhouseClass::averageTemp(\"cT\",2);\r\n\t$rt= $temperatures[\"rT\"];\r\n\t$response .= \"\"; // maybe do nothing\r\n\t$initCollState = \"5\"; // off\r\n\tif($states['collectorPumpOn'] == 1){ \r\n\t\t$initCollState = \"4\";\r\n\t}\r\n\t\t\r\n\t// ------------------ Always send some signal--------------------------\r\n\t\r\n\t//Send PUMP ON signal\r\n\tif($ct > ($pt + $settings['collectorTempDeltaOn'])){\r\n\t\tif($states['collectorPumpOn'] != 1){\r\n\t\t\t$logicDescription .= \"Col. on. $ct > $pt + \" . $settings['collectorTempDeltaOn'] . \"<br>\";\r\n\t\t}\r\n\t\t$states['collectorPumpOn'] = 1;\r\n\t\treturn \"4\";\r\n\t}\r\n\t\t//- SEND PUMP OFF SIGNAL -----------------------\r\n\t\t// Pump is on\r\n\tif($rt < ($pt + $settings['returnTempDeltaOff'])){\r\n\t\tif($states['collectorPumpOn'] != 0){\r\n\t\t\t\t$logicDescription .= \"Col. off. $rt < $pt + \" . $settings['returnTempDeltaOff'] . \"<br>\";\r\n\t\t}\r\n\t\t$states['collectorPumpOn'] = 0;\r\n\t\treturn \"5\";\r\n\t}\r\n\treturn $initCollState; // No change was called for. But send bc arduino will turn off q 60 minutes \r\n}",
"public function setElectricTeamFrontWindshieldWipers($value) {\n switch ($value) {\n case 0 :\n return 0;\n break;\n case 6 :\n return 10;\n break;\n }\n }",
"function fermerToutesPortes(){\n\t\tfor ( $i = 25 ; $i <= 28 ; $i++ ) {\n\t\t$gpio=$i-4;\n\t\t$porte = system ( \"gpio read \".$i);\n\t\tif ($porte == \"0\"){\n\t\t\t\tsystem (\"gpio write \". $gpio .\" off\");\n\t\t\t\tsleep ( 1 );\n\t\t\t\tsystem (\"gpio write \". $gpio .\" on\");\n\t\t\t}\n\n\t\t}\n\t}",
"private function nextStop(): void\n {\n foreach ($this->drivers as $driver) {\n $driver->nextStop();\n }\n }",
"public function chargeStop(){\n\t\treturn $this->_sendPacketToController(self::CHARGE_STOP);\n\t}",
"public function useBattery() {\n $time = $this->floor->getCleaningTime();\n if ($time <= $this->remainingBattery()) {\n $this->remainingBatteryTime = $this->remainingBattery() - $time;\n $this->floor->doneCleaning();\n echo sprintf(\"Battery Remaining for %s seconds\" . PHP_EOL, $this->remainingBattery());\n } else {\n $this->charge();\n }\n }",
"public function retractArms() {\n\t\techo \"Power units have not been started.<br>\";\n\t}",
"private function _resetBoard()\n {\n $this->curPos = 0;\n $this->curRow = 0;\n $this->_createBoard();\n }",
"public function turn()\n {\n }",
"function eis_device_poweron() {\n\tglobal $eis_conf,$eis_dev_conf,$eis_dev_status,$eis_mysqli;\n\t// do nothing\n\treturn true;\n}",
"public function hapus_toko(){\n\t}",
"public function wake()\n {\n }",
"function MoveWheels(){\n echo \"Wheels rotate. <br>\";\n $this->wheels = 10;\n }",
"public function JStop() {}",
"function moveWheels($n) {\n // class.\n Car::$wheels = $n;\n }",
"private function handleStop(): void\n {\n for ($i = 0; $i < count($this->drivers); $i++) {\n for ($j = $i + 1; $j < count($this->drivers); $j++) {\n if ($this->drivers[$i]->getCurrentStop() === $this->drivers[$j]->getCurrentStop()) {\n $this->exchangeGossips($this->drivers[$i], $this->drivers[$j]);\n }\n }\n }\n }",
"public function bajarVolumen( ) {\n $vol = $this->getVolumen();\n if ($vol > 0) {\n $vol = $vol - 8;\n }\n else {\n $vol = 0;\n }\n $this->setVolumen($vol);\n }",
"public function preOpenSkullWoodsCurtains() {\n $this->setValue($this::ROOM_DATA + 0x93, 0x80);\n }",
"public function brake() {\n /*\n * stop the Car!\n * code specific for Car to brake\n */\n return \"Car $this->name is slowing down\";\n }",
"public function pelicula( ) {\n\n\n AccesoGui::$guiSistema->esperarInicioSistema();\n\n AccesoControladoresDispositivos::$ctrlLuz->setLucesEscenarios(LuzTecho::$ESCENARIO_PELICULA);\n AccesoControladoresDispositivos::$ctrlMatrizVGA->asignarAudio(1,1);\n ConexionServidorCliente::$ctrlGuiPantallas->bajarPantallaElectrica();\n usleep(500000);\n AccesoControladoresDispositivos::$ctrlAutomata->encenderLuzSala(Automata::$intensidades[\"minima\"]);\n if(!AccesoControladoresDispositivos::$ctrlPantallas->isEncendidaPresidencia()) {\n ConexionServidorCliente::$ctrlGuiPantallas->presidenciaEncender();\n }\n else {\n AccesoControladoresDispositivos::$ctrlPantallas->quitarPIPPresidencia();\n }\n usleep(3000000);\n AccesoControladoresDispositivos::$ctrlFoco->apagar();\n ConexionServidorCliente::$ctrlGuiPlasmas->apagar();\n ConexionServidorCliente::$ctrlGuiProyectores->apagarPizarra();\n AccesoControladoresDispositivos::$ctrlMesaMezclas->preset90();\n\tAccesoControladoresDispositivos::$ctrlMesaMezclas->desactivarMicPresidencia(\"M1\");\n ConexionServidorCliente::$ctrlGuiPantallas->presidenciaDVD();\n usleep(100000);\n AccesoControladoresDispositivos::$ctrlPantallas->verEntradaPresidenciaAV1();\n ConexionServidorCliente::$ctrlGuiProyectores->encenderCentral();\n ConexionServidorCliente::$ctrlGuiProyectores->activarCentral();\n AccesoGui::$guiSistema->esperarInicioSistema();\n usleep(5000000);\n ConexionServidorCliente::$ctrlGuiProyectores->verDVDEnCentral();\n ConexionServidorCliente::$ctrlGuiDvd->onOffDVD();\n //Comentado mientras se repara la visor de opacos\n\t//ConexionServidorCliente::$ctrlGuiCamaraDocumentos->camaraDocumentosApagar();//apagarDoc\n usleep(100000);\n AccesoGui::$guiSistema->esperarInicioSistema();\n AccesoGui::$guiEscenarios->escenarioPelicula();\n AccesoGui::$guiMenus->menuPrincipal(true);\n AccesoGui::$guiSistema->mostrarMenu();\n AccesoGui::$guiEscenarios->enviarEstadoVideoconferencia();\n usleep(3000000);\n ConexionServidorCliente::$ctrlGuiDvd->playDVD();\n AccesoGui::$guiDispositivos->seleccionarDvd();\n\tAccesoControladoresDispositivos::$ctrlProyectores->estadoCentral();\n\tAccesoControladoresDispositivos::$ctrlProyectores->estadoPizarra();\n\n }",
"private function ledOn()\n {\n $this->ledPin->setValue(PinInterface::VALUE_HIGH);\n }",
"public function clearCMDPieces()\n {\n $this->collCMDPieces = null; // important to set this to NULL since that means it is uninitialized\n }",
"function tideways_disable()\n{\n}",
"public function ZapDNDoff($zapChannel);",
"public function preDown()\n {\n }",
"public function turnOff($light)\r\n {\r\n $lightname = $light;\r\n $light = $this->bulbNameToID($light);\r\n $isgroup = 'NO';\r\n $data = '<?xml version=\"1.0\"?>\r\n <s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">\r\n <s:Body>\r\n <u:SetDeviceStatus xmlns:u=\"urn:Belkin:service:bridge:1\">\r\n <DeviceStatusList><?xml version="1.0" encoding="UTF-8"?><DeviceStatus><DeviceID>'.$light.'</DeviceID><CapabilityID>10008</CapabilityID><CapabilityValue>0:0</CapabilityValue><IsGroupAction>'.$isgroup.'</IsGroupAction></DeviceStatus></DeviceStatusList>\r\n </u:SetDeviceStatus>\r\n </s:Body>\r\n </s:Envelope>';\r\n $headers_array = array(\r\n 'Content-type: text/xml; charset=\"utf-8\"',\r\n 'SOAPACTION: \"urn:Belkin:service:bridge:1#SetDeviceStatus\"',\r\n 'Accept: ',\r\n );\r\n $url = \"http://\".WEMO_IP.\":\".WEMO_PORT.\"/upnp/control/bridge1\";\r\n $response = $this->sendCurl($url,$data,$headers_array);\r\n $this->getStatus($lightname);\r\n }",
"public function off()\n {\n echo 'The tv is off now.' . PHP_EOL;\n }",
"public function chairlevelupAction()\n {\n $uid = $this->_USER_ID;\n $floorId = $this->getParam(\"CF_floorid\");\n $storeType = $this->getParam(\"CF_storetype\");\n\n $mbllApi = new Mbll_Tower_ServiceApi($uid);\n $aryRst = $mbllApi->getUpChairList($floorId);\n\n if (!$aryRst || !$aryRst['result']) {\n $errParam = '-1';\n if (!empty($aryRst['errno'])) {\n $errParam = $aryRst['errno'];\n }\n return $this->_redirectErrorMsg($errParam);\n }\n //wait chairs\n $tempWaitChairInfo = $aryRst['result']['wait_chair'];\n\n for ($i=count($tempWaitChairInfo); $i<6; $i++) {\n $tempWaitChairInfo[$i]['wait_add'] = 1;\n }\n\n $waitChairInfo = array();\n for ($i=0; $i<=5; $i++) {\n $waitChairInfo[$i] = $tempWaitChairInfo[5-$i];\n }\n\n //work chairs\n $workChairInfo = $aryRst['result']['work_chair'];\n $chairList1 = array();\n $chairList2 = array();\n $chairList3 = array();\n\n foreach ($workChairInfo as $key => $value) {\n if (1002001 == $value['cid'] || 1002004 == $value['cid'] || 1002007 == $value['cid'] || 1002010 == $value['cid'] || 1002013 == $value['cid']) {\n $chairList1[] = $value;\n }\n\n if (1002002 == $value['cid'] || 1002005 == $value['cid'] || 1002008 == $value['cid'] || 1002011 == $value['cid'] || 1002014 == $value['cid']) {\n $chairList2[] = $value;\n }\n\n if (1002003 == $value['cid'] || 1002006 == $value['cid'] || 1002009 == $value['cid'] || 1002012 == $value['cid'] || 1002015 == $value['cid']) {\n $chairList3[] = $value;\n }\n }\n\n if (count($chairList1) < 5) {\n for ($i=count($chairList1); $i<5; $i++) {\n $chairList1[$i]['wait_add'] = 1;\n }\n }\n if (count($chairList2) < 5) {\n for ($i=count($chairList2); $i<5; $i++) {\n $chairList2[$i]['wait_add'] = 1;\n }\n }\n if (count($chairList3) < 5) {\n for ($i=count($chairList3); $i<5; $i++) {\n $chairList3[$i]['wait_add'] = 1;\n }\n }\n\n //check if chairs can level up\n $canLevelUp = false;\n foreach ($waitChairInfo as $value) {\n if (isset($value['cid']) && 0 == $value['used']) {\n $canLevelUp = true;\n break;\n }\n }\n\n if (!$canLevelUp) {\n foreach ($workChairInfo as $value) {\n if (isset($value['cid']) && 0 == $value['used']) {\n $canLevelUp = true;\n break;\n }\n }\n }\n\n $picName = Mbll_Tower_Common::getChairPicName($storeType);\n\n $this->view->storeName = $aryRst['result']['name'];\n $this->view->gb = $aryRst['result']['gb'];\n $this->view->mb = $aryRst['result']['mb'];\n $this->view->star = $aryRst['result']['st'];\n $this->view->waitChairInfo = $waitChairInfo;\n $this->view->chairList1 = $chairList1;\n $this->view->chairList2 = $chairList2;\n $this->view->chairList3 = $chairList3;\n $this->view->floorId = $floorId;\n $this->view->userInfo = $this->_user;\n $this->view->storeName = Mbll_Tower_Common::getStoreName($storeType);\n $this->view->storeType = $storeType;\n $this->view->canLevelUp = $canLevelUp;\n $this->view->picName = $picName;\n $this->render();\n }",
"static function shutdown() {\n\t\tif (self::hasCurrent()) {\n\t\t\tself::$_ctrl->__destruct();\n\t\t\tself::$_ctrl = null;\n\t\t}\n\t}",
"function remove_devicepx() {\nwp_dequeue_script( 'devicepx' );\n}",
"public function setupHardware(): void\n {\n echo 'Setup laptop hardware...<br/>';\n }",
"public function dock(){\n\t\treturn $this->_sendPacketToController(self::DOCK);\n\t}",
"function matrixBorderChase($MATRIX,$COLOR=255) {\n\t\n\tglobal $pluginDirectory,$fppMM,$settings,$pluginSettings,$blockOutput;\n\t\n\t//\t['channelOutputsFile'] = $mediaDirectory . \"/channeloutputs\";\n\t//$settings['channelMemoryMapsFile']\n\t\n\t\n\t\n}",
"public function clip() {}",
"public function fastBlink()\n {\n $this->label.= '6;';\n return $this;\n }",
"public function handelKupon()\n {\n }",
"public function stopEngine()\n {\n }",
"public function stop() {\n $cmd = sprintf(\"./control.sh stop %s -game %s\", $this->sid, $this->gameId);\n ssh($cmd, $this->host);\n DB::get()->query(\"UPDATE `servers` SET `status` = 0 WHERE `serverID` = '\" . $this->serverId . \"'\");\n }",
"public function go(int $km): void{\n //parent::go($km);\n // On rajoute\n echo (\"POOOOOOOOOOOOOOOOOOON \");\n }",
"public function ligarMudo() {\n if ($this->getLigado() && $this->getVolume() > 0) {\n $this->setVolume(0);\n }\n }",
"function carr_move_media_menu() {\n\tglobal $menu;\n\n\t$menu[24] = $menu[10];\n\tunset( $menu[10] );\n}",
"public function powerOff($id)\n {\n return $this->post('/servers/' . $this->encodePath($id) . '/actions/poweroff');\n }",
"public function liftUp();",
"function shutdown()\n {\n }",
"public function use_controlbin() {return $this->useControlbin();}",
"public function shootArrow()\n {\n echo \"<p>Disparó una flecha</p>\";\n }",
"function logger_device_deactivate($device) {\n\n global $user;\n\n module_load_include('inc', 'logger', 'logger.rrd');\n\n $device_type_id = db_select('logger_devices', 'd')\n ->fields('d', array('type_id'))\n ->condition('d.device', $device)\n ->execute()\n ->fetchField();\n\n $sensors = db_select('logger_meters', 'm')\n ->fields('m')\n ->condition('m.device', $device)\n ->execute();\n\n foreach ($sensors as $sensor) {\n\n //FIXME: define a hook\n msgdump_remove_by_sensor($sensor->meter);\n\n db_update('logger_meters')\n ->fields(array(\n 'uid' => 0,\n ))\n ->condition('meter', $sensor->meter)\n ->execute();\n\n if ($device_type_id <= VZLOGGER_DEVICE_TYPE_ID) {\n logger_rrd_clear($sensor->meter);\n }\n }\n\n //FIXME: define a hook\n notification_remove_by_device($device);\n\n db_update('logger_devices')\n ->fields(array(\n 'uid' => 0\n ))\n ->condition('device', $device)\n ->execute();\n\n logger_check_fluksonian($user->uid);\n\n logger_free_support_slot($device);\n\n drupal_goto(\"device/mylist\");\n}",
"private function changeTurn()\n {\n $this->_turn = 1 - $this->_turn; // 1-0 = 1, 1-1 = 0\n }",
"function shutdown_action_hook()\n {\n }",
"function doDown()\n {\n }"
] | [
"0.61525005",
"0.5422426",
"0.5267127",
"0.522891",
"0.52227116",
"0.5096829",
"0.50050414",
"0.5002043",
"0.50003695",
"0.49834076",
"0.49579746",
"0.484042",
"0.4826675",
"0.48074186",
"0.48030967",
"0.47433087",
"0.46998537",
"0.46993312",
"0.46944326",
"0.46933746",
"0.46555626",
"0.4620262",
"0.4612576",
"0.45846063",
"0.45845875",
"0.4576097",
"0.45698646",
"0.45610508",
"0.45553342",
"0.45471787",
"0.45282033",
"0.45164588",
"0.451269",
"0.4505729",
"0.4497203",
"0.44887573",
"0.44845074",
"0.4479492",
"0.44760573",
"0.44615382",
"0.44597855",
"0.44529983",
"0.44417772",
"0.4436839",
"0.44204375",
"0.44154012",
"0.4413888",
"0.4409874",
"0.44055322",
"0.43985787",
"0.4397789",
"0.4395475",
"0.4392845",
"0.43830693",
"0.43787253",
"0.4376895",
"0.43718567",
"0.43707138",
"0.43400347",
"0.43189886",
"0.42921132",
"0.42795298",
"0.42726403",
"0.42678776",
"0.42655104",
"0.42638004",
"0.42512587",
"0.42510182",
"0.42417854",
"0.42314473",
"0.42284226",
"0.42269215",
"0.4207892",
"0.42069608",
"0.42068386",
"0.42057335",
"0.42025307",
"0.41995397",
"0.41963598",
"0.4189194",
"0.41845775",
"0.41832992",
"0.4175152",
"0.4170254",
"0.41665655",
"0.41636226",
"0.41577667",
"0.41543594",
"0.4153623",
"0.41502243",
"0.4140414",
"0.41402572",
"0.41400614",
"0.41367084",
"0.4134967",
"0.41347158",
"0.413455",
"0.4127524",
"0.4126128",
"0.41257122"
] | 0.62825936 | 0 |
Create a new command instance. | public function __construct()
{
parent::__construct();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function newCommand() {\n return newinstance(Command::class, [], '{\n public static $wasRun= false;\n public function __construct() { self::$wasRun= false; }\n public function run() { self::$wasRun= true; }\n public function wasRun() { return self::$wasRun; }\n }');\n }",
"public function createCommand()\r\n\t{\r\n\t\t$obj = new DbCommand($this,$this->dbms);\r\n\t\treturn $obj;\r\n\t}",
"public function createCommand() {\n\t\treturn new UnboxedCommand( $this );\n\t}",
"protected function createCommand($args) {\n $command = new Command();\n $command->id = ifseta($args, 'id');\n $command->name = ifseta($args, 'name');\n $command->url = ifseta($args, 'url');\n $command->description = ifseta($args, 'description');\n $command->uses = ifseta($args, 'uses');\n $command->creationDate = ifseta($args, 'creation_date');\n $command->lastUseDate = ifseta($args, 'last_use_date');\n $command->goldenEggDate = ifseta($args, 'golden_egg_date');\n return $command;\n }",
"static public function create($cmd = null, $args = null)\n {\n return new self($cmd, $args);\n }",
"public function createCommand($kernel, string $commandName = null, string $commandDescription = null): Command;",
"public function makeCommand() \n {\n if($this->CrontabCommandObject === NULL)\n {\n $this->CrontabCommandObject = new \\root\\library\\Crontab\\CrontabCommand\\CrontabCommand();\n }\n \n return $this->CrontabCommandObject;\n }",
"public function testInstantiation()\n {\n $command = new CreateRule('dummy name');\n }",
"public function command(Command $command);",
"public function __construct($command)\n {\n $this->command = $command;\n }",
"public static function create(array $data)\n {\n $command = new static();\n $command->exchangeArray($data);\n return $command;\n }",
"protected function getCreateCommand()\n {\n $command = new IndexCreateCommand();\n $command->setContainer($this->getContainer());\n\n return $command;\n }",
"public function createCommand($string = '')\n {\n return $this->createStringable($string);\n }",
"public function createCommand($type) {\r\n $command = $this->xml->createElement('command');\r\n $command->setAttribute('xsi:type', $type);\r\n $command->setAttribute('xmlns', '');\r\n $this->xmlSchema($command);\r\n return $command;\r\n }",
"public function __construct()\n {\n // We will go ahead and set the name, description, and parameters on console\n // commands just to make things a little easier on the developer. This is\n // so they don't have to all be manually specified in the constructors.\n if (isset($this->signature)) {\n $this->configureUsingFluentDefinition();\n } else {\n parent::__construct($this->name);\n }\n\n // Once we have constructed the command, we'll set the description and other\n // related properties of the command. If a signature wasn't used to build\n // the command we'll set the arguments and the options on this command.\n $this->setDescription((string) $this->description);\n\n $this->setHelp((string) $this->help);\n\n $this->setHidden($this->isHidden());\n\n if (! isset($this->signature)) {\n $this->specifyParameters();\n }\n }",
"public function make(string $name, PreprocessorInterface $preprocessor = null): CommandInterface;",
"private function _getCommandByClassName($className)\n {\n return new $className;\n }",
"public function newCommand($regex, $callable) {\n $cmd = new Command();\n $cmd->regex = $regex;\n $cmd->callable = $callable;\n return $this->addCommand($cmd);\n }",
"public static function create($commandID, ...$args)\n {\n $arguments = func_get_args();\n\n return new static(array_shift($arguments), $arguments);\n }",
"private function __construct($command = null)\n {\n $this->command = $command;\n }",
"public static function factory(string $command, string $before = '', string $after = ''): self\n {\n return new self($command, $before, $after);\n }",
"public function getCommand() {}",
"protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\ESCAPE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('tag', null, null, false))\n ->addArgument(new Argument($this->tag, null, null, true));\n\n return $command;\n }",
"public function testCanBeInstantiated()\n {\n $command = $this->createInstance();\n $this->assertInstanceOf('\\\\Dhii\\\\ShellInterop\\\\CommandInterface', $command, 'Command must be an interoperable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\ConfigurableCommandInterface', $command, 'Command must be a configurable command');\n $this->assertInstanceOf('\\\\Dhii\\\\ShellCommandInterop\\\\MutableCommandInterface', $command, 'Command must be a mutable command');\n }",
"public function getCommand();",
"protected function createCommand($name, array $parameters = [])\n {\n return new Fluent(\n array_merge(\n compact('name'),\n $parameters)\n );\n }",
"public function testCanPassCommandStringToConstructor()\n {\n $command = new Command('/bin/ls -l');\n\n $this->assertEquals('/bin/ls -l', $command->getExecCommand());\n }",
"public function makeCommandInstanceByType(...$args): CommandInterface\n {\n $commandType = array_shift($args);\n\n switch ($commandType) {\n case self::PROGRAM_READ_MODEL_FETCH_ONE_COMMAND:\n return $this->makeFetchOneCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_COMMAND:\n return $this->makeFindCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_FIND_LITE_COMMAND:\n return $this->makeFindLiteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_TASK_COMMAND:\n return $this->makeItemCreateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_CREATE_COMMAND:\n return $this->makeItemCreateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_TASK_COMMAND:\n return $this->makeItemUpdateTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_UPDATE_COMMAND:\n return $this->makeItemUpdateCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_TASK_COMMAND:\n return $this->makeItemDeleteTaskCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_DELETE_COMMAND:\n return $this->makeItemDeleteCommand(...$args);\n\n case self::PROGRAM_READ_MODEL_ADD_ID_COMMAND:\n return $this->makeItemAddIdCommand(...$args);\n\n default:\n throw new FactoryException(sprintf('Command bus for type `%s` not found!', (string) $commandType));\n }\n }",
"public function __construct($cmd)\n {\n $this->cmd = $cmd;\n }",
"public function getCommand()\n {\n }",
"public function command($class)\n {\n $runnable = $this->resolveClass($class);\n\n if ( ! $runnable instanceof Command) {\n throw new InvalidArgumentException(get_class($runnable).' must be an instance of '.Command::class.'.');\n }\n\n $command = $runnable;\n\n if ($runnable instanceof Taggable) {\n $command = new Cached($command, $this);\n }\n\n if ($runnable instanceof Transactional) {\n $command = new Transaction($command, $this, $this->makeFromContainer(ConnectionInterface::class));\n }\n\n if ($runnable instanceof Eventable) {\n $command = new Evented($command, $this);\n }\n\n return $this->newBuilder($command);\n }",
"protected function createCommandFactory(): CommandFactory\n {\n return new CommandFactory([\n 'CLOSE' => Command\\CLOSE::class,\n ]);\n }",
"public static function register() {\n\n if ( !defined( 'WP_CLI' ) || !WP_CLI ) {\n return;\n }\n \n $instance = new static;\n if(empty( $instance->namespace )) {\n throw new \\Exception(\"Command namespace not defined\", 1);\n \n }\n\t\t\\WP_CLI::add_command( $instance->namespace, $instance, $instance->args ?? null );\n\t}",
"public function addCommand($command);",
"public function add(Command $command);",
"abstract protected function getCommand();",
"public function createCommand()\r\n\t{\r\n\t\t//start the string\r\n\t\t$command = '';\r\n\t\t\r\n\t\t//add the java command or the path to java\r\n\t\t$command .= $this->java_path;\r\n\t\t\r\n\t\t//add the class path\r\n\t\t$command .= ' -cp \"'. $this->stanford_path . $this->seperator . '*\" ';\r\n\t\t\r\n\t\t//add options\r\n\t\t$options = implode(' ', $this->java_options);\r\n\t\t$command .= '-'.$options;\r\n\t\t\r\n\t\t//add the call to the pipeline object\r\n\t\t$command .= ' edu.stanford.nlp.pipeline.StanfordCoreNLP ';\r\n\r\n\t\t//add the annotators\r\n\t\t$command .= '-annotators '. $this->listAnnotators();\r\n\t\t\r\n\t\t//add the input and output directors\r\n\t\t$command .= ' -file '. $this->tmp_file . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//this is for testing purposes\r\n\t\t//$command .= ' -file '. $this->tmp_path .'\\\\nlp3F25.tmp' . ' -outputDirectory '. $this->tmp_path;\r\n\t\t\r\n\t\t//if using regexner add this to the command string\r\n\t\tif($this->annotators['regexner'] === true)\r\n\t\t{\r\n\t\t\t$command .=' -regexner.mapping '. $this->regexner_path . $this->seperator . $this->regexner_file;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn $command;\r\n\t}",
"protected function createCommand(string $name, array $parameters = []): Fluent\n {\n return new Fluent(array_merge(compact('name'), $parameters));\n }",
"public function __construct()\n {\n parent::__construct(static::NAME, static::VERSION);\n $this->add(new DefaultCommand());\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->command_name = config(\"custom-commands.command_name\");\n\n parent::__construct($this->signature = $this->command_name);\n\n $this->commands = (array) config(\"custom-commands.commands\");\n \n $this->table = config(\"custom-commands.table\");\n\n $this->row = config(\"custom-commands.row\");\n\n $this->changeEnv = (boolean) config(\"custom-commands.change_env\");\n\n }",
"protected function createCommandFile()\n {\n $command_file_full_path = $this->command_dir_path . DIRECTORY_SEPARATOR . $this->arg->getCommandFileName();\n\n // Check if the command already exists\n if (file_exists($command_file_full_path)) {\n throw new Exception('Command already exists.');\n }\n\n // Create the file for the new command\n $command_file = fopen($command_file_full_path, 'w');\n\n // TODO: Create Script Generator to generate the PHP scripts for the new command.\n\n fclose($command_file);\n\n $this->console->getOutput()->println('File created at: ' . $command_file_full_path);\n $this->console->getOutput()->success('Command ' . $this->arg->getSignature() . ' created successfully.');\n }",
"public static function create() {}",
"public static function create() {}",
"public static function create() {}",
"public static function create(InteropContainer $container)\n {\n $middleware = $container->get('cmd.middleware');\n return new CommandBusFactory($middleware);\n }",
"private function createCli() {\n $this->cli = new Cli();\n $this->commands = $this->commandParser->getAllCommands();\n\n foreach ($this->commands as $command) {\n if ($command->isDefault()) {\n $this->cli->command(\"*\");\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n if ($command->getName() != \"\") {\n $this->cli->command($command->getName())->description($command->getDescription());\n foreach ($command->getOptions() as $option) {\n $this->cli->opt($option->getName(), $option->getDescription(), $option->isRequired(), $option->getType());\n }\n foreach ($command->getArguments() as $argument) {\n if (!$argument->isVariadic())\n $this->cli->arg($argument->getName(), $argument->getDescription(), $argument->isRequired());\n }\n }\n }\n\n\n }",
"public function testInstantiation()\n {\n $this->assertInstanceOf('Contao\\ManagerBundle\\Command\\InstallWebDirCommand', $this->command);\n }",
"public function command(string $command): self\n {\n $this->addCommands[] = $command;\n\n return $this;\n }",
"public function create() {}",
"protected function createProcess($cmd)\n {\n return new Process(explode(' ', $cmd));\n }",
"public function create(){}",
"protected function getCommandFactory(): Command\\Factory\n {\n return new Command\\RedisFactory();\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->commandData = new CommandData($this, CommandData::$COMMAND_TYPE_API);\n }",
"public function testNewCommand() : void\n {\n $this->assertFalse($this->command->hasArguments());\n $this->assertEquals(\"\", $this->command->getArguments());\n }",
"protected function createCommandBuilder()\n\t{\n\t\treturn new CSqliteCommandBuilder($this);\n\t}",
"public function __construct($command, $config = [])\n {\n $this->command = $command;\n $this->_output = $this->getDefaultOutput();\n parent::__construct($config);\n }",
"public function __construct(){\n\n global $argv;\n\n if(!isset($argv[1])){\n echo 'You must supply a command!' . PHP_EOL;\n exit;\n }//if\n\n $args = $argv;\n\n $scriptName = array_shift($args);\n $method = array_shift($args);\n\n $method = explode('-',$method);\n foreach($method as $k => $v){\n if($k != 0){\n $method[$k] = ucwords($v);\n }//if\n }//foreach\n\n $method = implode('',$method);\n\n $resolved = false;\n\n if(method_exists($this,$method)){\n call_user_func(Array($this,$method), $args);\n $resolved = true;\n }//if\n else {\n foreach(static::$extendedCommands as $commandClass){\n if(method_exists($commandClass,$method)){\n call_user_func(Array($commandClass,$method), $args);\n $resolved = true;\n break;\n }//if\n }//foreach\n }//el\n\n if(!$resolved){\n echo \"`{$method}` is not a valid CLI command!\";\n }//if\n\n echo PHP_EOL;\n exit;\n\n }",
"public function forCommand($command)\n {\n $this->command = $command;\n $this->pipe = new NullPipe();\n $this->manager = new InteractiveProcessManager($this->userInteraction);\n\n return $this;\n }",
"public function __construct()\n {\n parent::__construct('pwman', '0.1.0');\n\n $getCommand = new Get();\n $this->add($getCommand);\n\n $setCommand = new Set();\n $this->add($setCommand);\n }",
"public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }",
"public function createCommand(?string $sql = null, array $params = []): Command;",
"public function __construct($command = NULL, $name = NULL)\n {\n $args = func_get_args();\n\n switch ($command) {\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n case self::CONSTR_CMD_POP_FROM_ARR:\n case self::CONSTR_CMD_POP_FROM_OBJ:\n case self::CONSTR_CMD_POP_FROM_DB:\n case self::CONSTR_CMD_NEW:\n $this->setup_name = $name;\n\n # shift off known args\n array_shift($args);\n array_shift($args);\n break;\n }\n\n switch ($command) {\n case self::CONSTR_CMD_POP_FROM_ARR:\n $this->applyArray($args[0]);\n break;\n case self::CONSTR_CMD_POP_FROM_OBJ:\n break;\n case self::CONSTR_CMD_POP_FROM_DB:\n break;\n case self::CONSTR_CMD_POPULATE_SYNCED_ARRAY:\n $this->applyArray($args[0]);\n $this->setAllLoaded();\n break;\n default:\n throw new OrmInputException('Guessing not supported, please explicitly specify construction type');\n self::constructGuess($args);\n }\n\n $this->ensureObjectInDb();\n }",
"public function generateCommands();",
"protected function newInstanceCommand($commandClass)\n {\n $class = new ReflectionClass($commandClass);\n\n return $class->newInstanceArgs($this->resolveCommandParameters($class));\n }",
"protected function buildCommand()\n {\n return $this->command;\n }",
"public function makeItemCreateCommand(string $processUuid, array $item): ItemCreateCommand\n {\n $processUuid = ProcessUuid::fromNative($processUuid);\n $uuid = Uuid::fromNative(null);\n $item = Item::fromNative($item);\n\n return new ItemCreateCommand($processUuid, $uuid, $item);\n }",
"public function __construct($commandName, $args = [], $description = '') {\n if (!$this->setName($commandName)) {\n $this->setName('--new-command');\n }\n $this->addArgs($args);\n\n if (!$this->setDescription($description)) {\n $this->setDescription('<NO DESCRIPTION>');\n }\n }",
"public function getCommand($name, array $args = array())\n {\n return parent::getCommand($name, $args)\n ->setRequestSerializer(RequestSerializer::getInstance());\n }",
"protected function buildCommand()\n {\n $command = new Command(\\Tivie\\Command\\DONT_ADD_SPACE_BEFORE_VALUE);\n $command\n ->chdir(realpath($this->repoDir))\n ->setCommand($this->gitDir)\n ->addArgument(new Argument('rev-parse'))\n ->addArgument(new Argument('HEAD'));\n\n return $command;\n }",
"protected function instantiateCommand(Request $request, $args)\n {\n $command = new DeletePackageCustomerCommand($args);\n\n $requestBody = $request->getParsedBody();\n\n $this->setCommandFields($command, $requestBody);\n\n return $command;\n }",
"public function createCommand($sql = null, $params = [])\n {\n $command = new Command([\n 'db' => $this,\n 'sql' => $sql,\n ]);\n\n return $command->bindValues($params);\n }",
"protected function setCommand($value) {\n\t\t$this->_command = trim($value);\n\t\treturn $this;\n\t}",
"public function setCommand($command)\n {\n $this->command = $command;\n\n return $this;\n }",
"public function buildCommand()\n {\n return parent::buildCommand();\n }",
"private function registerMakeModuleCommand()\n {\n $this->app->singleton('command.make.module', function($app) {\n return $app['Caffeinated\\Modules\\Console\\Generators\\MakeModuleCommand'];\n });\n\n $this->commands('command.make.module');\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->currentDirectory = getcwd();\n $this->baseIndentLevel = 0;\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\HelpCommand\", \"help\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\InitializePlanetCommand\", \"init\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackAndPushUniToolCommand\", \"packpushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PackLightPluginCommand\", \"packlightmap\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushCommand\", \"push\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\PushUniverseSnapshotCommand\", \"pushuni\");\n $this->registerCommand(\"Ling\\LingTalfi\\Kaos\\Command\\UpdateSubscriberDependenciesCommand\", \"updsd\");\n\n }",
"public function getCommand(string $command);",
"protected function registerCommand(){\n\t\t$this->app->singleton('fakeid.command.setup', function ($app){\n\t\t\treturn new SetupCommand();\n\t\t});\n\n\t\t$this->commands('fakeid.command.setup');\n\t}",
"public function addCommand($command, $args = [], $data = [])\n {\n $item = new ScreenCommand();\n $item->screen_id = $this->id;\n $item->command = $command;\n $item->arguments = $args;\n $item->fill($data);\n $item->save();\n\n return $item;\n }",
"public function test_creating_command_from_container()\n {\n $now = new \\DateTime();\n $this->container->add('DateTime', $now);\n $command = 'Spekkionu\\DomainDispatcher\\Test\\Commands\\CommandWithConstructor';\n $result = $this->dispatcher->dispatch($command);\n $this->assertSame($now, $result);\n }",
"protected function createProcess(): Process\n {\n $command = [\n $this->settings['executable']\n ];\n\n $command[] = $this->from;\n $command[] = $this->to;\n\n // Set the margins if needed.\n if ($this->settings['marginsType'] !== self::MARGIN_TYPE_NO_MARGINS) {\n $command[] = '--marginsType=' . $this->settings['marginsType'];\n }\n\n // If we need to proxy with node we just need to prepend the $command with `node`.\n if ($this->settings['proxyWithNode']) {\n array_unshift($command, 'node');\n }\n\n // If there's no graphical environment we need to prepend the $command with `xvfb-run\n // --auto-servernum`.\n if (! $this->settings['graphicalEnvironment']) {\n array_unshift($command, '--auto-servernum');\n array_unshift($command, 'xvfb-run');\n }\n\n return new Process($command);\n }",
"private function registerCommand()\n {\n $this->app->singleton('command.shenma.push', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\Push();\n });\n\n $this->app->singleton('command.shenma.push.retry', function () {\n return new \\Larva\\Shenma\\Push\\Commands\\PushRetry();\n });\n }",
"public function __construct(string $command, string $before = '', string $after = '')\n {\n $this->command = $command;\n $this->before = $before;\n $this->after = $after;\n }",
"public function generateCommand($singleCommandDefinition);",
"public function create() {\n }",
"public function create() {\n }",
"public function create() {\r\n }",
"public function create() {\n\n\t}",
"private function getImportCommand()\n {\n return new IndexImportCommand(self::getContainer());\n }",
"public function __construct($command)\n {\n $this->command = $command;\n\n $this->command->line('Installing Images: <info>✔</info>');\n }",
"public function __construct()\n {\n self::$instance =& $this;\n\n $commanddir = Config::main('directory');\n $excludes = Config::main('exclude');\n\n if(is_null($commanddir))\n die('Could not find commands directory. It should be specified in the main config.');\n\n //The directory where commands reside should be relative\n //to the directory with the clip executable.\n $dir = realpath(__DIR__.\"/{$commanddir}\");\n\n $cmdfiles = scandir($dir);\n //Loop through each file in the commands directory\n foreach($cmdfiles as $file)\n {\n //Assume that each file uses the standard '.php' file extension.\n $command = substr($file, 0, -4);\n\n //Ignore the unnecessary directories as commands and anything that\n //has been marked for exclusion then attempt to include the valid ones.\n if($file !== '.' && $file !== '..' && array_search($command, $excludes) === false && include(\"{$dir}/{$file}\"))\n {\n if(class_exists($command, false))\n {\n $obj = new $command;\n //Only load commands that use the clip command interface\n if($obj instanceof Command)\n $this->commands[strtolower($command)] = $obj;\n }\n }\n }\n }",
"public function __construct($action, $command = null) {\n parent::__construct($action, self::NAME);\n\n $fieldFactory = FieldFactory::getInstance();\n\n $commandField = $fieldFactory->createField(FieldFactory::TYPE_STRING, self::FIELD_COMMAND, $command);\n\n $this->addField($commandField);\n }",
"public function createCommand($db = null, $action = 'get')\n {\n if ($db === null) {\n $db = Yii::$app->get(Connection::getDriverName());\n }\n $this->addAction($action);\n $commandConfig = $db->getQueryBuilder()->build($this);\n\n return $db->createCommand($commandConfig);\n }",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();"
] | [
"0.8010746",
"0.7333379",
"0.72606754",
"0.7164165",
"0.716004",
"0.7137585",
"0.6748632",
"0.67234164",
"0.67178184",
"0.6697025",
"0.6677973",
"0.66454077",
"0.65622073",
"0.65437883",
"0.64838654",
"0.64696646",
"0.64292693",
"0.6382209",
"0.6378306",
"0.63773245",
"0.6315901",
"0.6248427",
"0.6241929",
"0.6194334",
"0.6081284",
"0.6075819",
"0.6069913",
"0.60685146",
"0.6055616",
"0.6027874",
"0.60132784",
"0.60118896",
"0.6011778",
"0.5969603",
"0.59618074",
"0.5954538",
"0.59404427",
"0.59388787",
"0.5929363",
"0.5910562",
"0.590651",
"0.589658",
"0.589658",
"0.589658",
"0.58692765",
"0.58665586",
"0.5866528",
"0.58663124",
"0.5852474",
"0.5852405",
"0.58442044",
"0.58391577",
"0.58154446",
"0.58055794",
"0.5795853",
"0.5780188",
"0.57653266",
"0.57640004",
"0.57584697",
"0.575748",
"0.5742612",
"0.5739361",
"0.5732979",
"0.572247",
"0.5701043",
"0.5686879",
"0.5685233",
"0.56819254",
"0.5675983",
"0.56670785",
"0.56606543",
"0.5659307",
"0.56567776",
"0.56534046",
"0.56343585",
"0.56290466",
"0.5626615",
"0.56255764",
"0.5608852",
"0.5608026",
"0.56063116",
"0.56026554",
"0.5599553",
"0.5599351",
"0.55640906",
"0.55640906",
"0.5561977",
"0.5559745",
"0.5555084",
"0.5551485",
"0.5544597",
"0.55397296",
"0.5529626",
"0.552908",
"0.552908",
"0.552908",
"0.552908",
"0.552908",
"0.552908",
"0.552908",
"0.552908"
] | 0.0 | -1 |
Execute the console command. | public function handle()
{
// $mq = new Rabbitmq('demo_product', 'demo_product_queue', 'direct', false, [
// 'delay' => true
// ]);
//
// $mq->pull(function ($body) {
//
// $start_time = $body['time'];
// $end_time = Carbon::now()->toDateTimeString();
// echo '发送时间:' . $start_time . ' Name:' . $body['name'] . ' 消费时间:' . $end_time . ' 延迟:' . Carbon::parse($end_time)->diffInSeconds($start_time) . PHP_EOL;
//
// dd('消费成功,但未删除队列可以重复消费');
// });
$mq = new DemoMQ();
$mq->run();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function handle()\n {\n\t\t$this->info('league fetching ..');\n $object = new XmlFeed();\n\t\t$object->fetchLeague($this->argument('sports_id'));\n\t\t$this->info('league saved');\n }",
"public function handle()\n {\n //get us the Converter class instance and call the convert() method on it.\n $this->info(\n \\Aregsar\\Converter\\ConverterFacade::convert($this->argument(\"currency\"))\n );\n }",
"public function handle()\n {\n $this->locale = $this->argument('locale');\n\n $this->loadGroupLines();\n\n $this->loadNameSpacedLines();\n\n $this->info('Complete');\n }",
"public function handle()\n {\n $this->importUser($this->argument('username'));\n $this->call('ldap:show-user', $this->arguments());\n }",
"public function handle() {\n $user = User::where('id', $this->argument('userId'))->first();\n $this->info($user->email);\n }",
"public function handle()\n {\n $translations = collect(json_decode(file_get_contents('https://raw.githubusercontent.com/getbible/Bibles/master/translations.json')))->flatten();\n switch($this->argument('action')) {\n case 'fetch':\n $this->fetchBibles($translations);\n break;\n case 'convert':\n $this->convertBibles($translations);\n break;\n }\n }",
"public function handle()\n {\n try {\n $evalstr = $this->evaluater->evaluate($this->argument('evalString'));\n $this->info($evalstr);\n } catch (ForbiddenSymbolsException $exception) {\n $this->error($exception->getMessage());\n } catch (IncorrectSymbolsException $exception) {\n $this->error($exception->getMessage());\n }\n }",
"public function handle()\n {\n\n $settings = Setting::fetch();\n $id = $this->argument('id');\n $this->scrape_game_data($id);\n }",
"public function handle()\n {\n // env('CALENDARINDEX_TOKEN', '6f2bd927201ba4b22bb57df08db0c517e51732de')\n $this->getData($this->argument('country'), $this->argument('region'));\n }",
"public function handle()\n {\n $email = $this->argument('email');\n $name = $this->argument('name');\n\n $this->info(\"starting to generate users details\");\n\n }",
"public function handle()\n {\n\t\t$this->info('Importing translations...');\n\n\t\t$this->manager->importTranslations(true);\n }",
"public function handle()\n {\n $user = null;\n\n if ($email = $this->option(\"email\", false)) {\n $user = $this->findByEmail($email);\n }\n\n if ($id = $this->option(\"id\", false)) {\n $user = $this->findById($id);\n }\n\n if (empty($user)) {\n $this->warn(\"User no found\");\n }\n else {\n $this->setRoleToUser($user);\n }\n }",
"public function handle()\n {\n $name = ucwords($this->argument('name'));\n $this->call('repository:contract', [ 'name' => $name ]);\n $this->call('repository:class', [ 'name' => $name, '--driver' => $this->option('driver') ]);\n }",
"public function handle()\n\t{\n\t\t// Superuser\n\t\tif( ! $this->option('no-superuser'))\n\t\t\t$this->call('setup:superuser');\n\n\t\t// Countries\n\t\tif( ! $this->option('no-countries'))\n\t\t\t$this->call('setup:countries', ['country' => array_filter(explode(',', $this->option('countries')))]);\n\n\t\t// Languages\n\t\tif( ! $this->option('no-languages'))\n\t\t\t$this->call('setup:languages', ['language' => array_filter(explode(',', $this->option('languages')))]);\n\n\t\t// Currencies\n\t\tif( ! $this->option('no-currencies'))\n\t\t\t$this->call('setup:currencies', ['currency' => array_filter(explode(',', $this->option('currencies')))]);\n\n\t\t// Clear cache\n\t\t$this->call('cache:clear');\n\t}",
"public function handle()\n\t{\n\t\t$name = $this->argument('name');\n\t\t\n\t\t$this->info(\"Searching eve api for {$name}\");\n\t\t$result = Corporation::searchEVEAPI($name);\n\n\t\t$this->info(\"results\");\n\t\tforeach($result as $corp)\n\t\t{\n\t\t\tprint $corp->name . \" \" . $corp->id . \"\\r\\n\";\n\t\t}\n\t}",
"public function handle()\n {\n $user = $this->argument('user');\n $this->info('Display this on the screen, user ' . $user);\n return 0;\n }",
"public function handle()\n {\n $this->userVectors->test($this->option('force'));\n }",
"public function handle()\n {\n $mapping = $this->formatMappingName((string)$this->argument('mapping'));\n \n $model = $this->option('model') ? $this->formatModelName($this->option('model')) : null;\n \n $this->filesystem->put(\n $this->buildMappingFilePath($mapping),\n $this->buildMapping(\n $this->getDefaultStub(),\n $mapping,\n $model\n )\n );\n \n $this->composer->dumpAutoloads();\n }",
"public function handle()\n {\n switch ($this->argument('type')) {\n case 'dns':\n $this->dnscheck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n case 'whois':\n $this->whoischeck->run($this->option('dry-run') ? true : false, $this->argument('domain'));\n break;\n }\n }",
"public function handle()\n {\n $option = $this->argument('option');\n\n if (! in_array($option, ['expired', 'all'])) {\n return $this->error('Invalid option supplied to command...');\n }\n\n $this->comment('Beginning pruning process...');\n\n $this->comment($this->pruneDatabase($option) . ' deleted from database...');\n\n $this->comment($this->pruneFiles($option) . ' deleted from files...');\n\n $this->info('Nonces pruned successfully!');\n }",
"public function handle()\n {\n $subscriptionUpdateService = new SubscriptionUpdateService();\n $subscriptionUpdateService->runUpdates();\n }",
"public function handle()\n\t{\n\t\t\n\t\t$source_directory = $this->argument( 'source_directory' );\n\t\t$target_directory = $this->argument( 'target_directory' );\n\t\t$template = (string) $this->option( 'template' );\n\n\t\t$statik = new \\App\\Statik\\Statik;\n\n\t\t$statik->generateHTMLFiles( $this, $source_directory, $target_directory, $template ) && $this->info( \"\\e[1;32mDONE!\" );\n\n\t}",
"public function handle()\n {\n if (!$this->argument('file')) {\n $this->info('Please specify file to call.');\n }\n\n $file = $this->argument('file');\n\n if (!$this->fileHandler->exists($file)) {\n $this->info('Wrong path or file not exist.');\n }\n\n $this->executeFile($file);\n }",
"public function handle()\n {\n $user = $this->argument('user');\n $this->scanner->setUserName($user);\n $this->scanner->scanUser();\n }",
"public function handle()\n {\n if ($this->argument('user')) {\n $userId = $this->argument('user');\n\n $this->info(\"Liquidate affiliate commission for user \" . $userId);\n\n $user = $this->userService->findById($userId);\n\n if ($user) {\n $this->walletService->liquidateUserBalance($user);\n } else {\n $this->error(\"User not found\");\n }\n\n $this->info(\"Done\");\n } else {\n $this->info(\"Liquidate all commissions\");\n\n $this->walletService->liquidateAllUsersBalance();\n\n $this->info(\"Done\");\n }\n }",
"public function handle()\n {\n $action = $this->choice('what action do you have on mind', [\n 'add-relation', 'remove-columns', 'column-type', 'rename-column'\n ]);\n switch ($action) {\n case 'add-relation':\n $this->addRelation();\n break;\n\n case 'remove-columns':\n $this->removeColumns();\n break;\n case 'column-type':\n $this->columnType();\n break;\n case 'rename-column':\n $this->renameColumn();\n break;\n default:\n $this->error('Unsupported action requested...');\n }\n $this->info('Command executed successfully');\n }",
"public function handle()\n {\n $arguments = $this->arguments();\n $storageDir = $arguments['storageDir'];\n $localStorageDir = $arguments['localStorageDir'];\n $url = $arguments['url'];\n $cmd = sprintf(\"./app/Console/Commands/ShellScripts/screen_shot.sh %s %s %s\", $storageDir, $localStorageDir, $url);\n\n while (true) {\n $result = shell_exec($cmd);\n print_r($result);\n sleep(3);\n }\n }",
"public function handle()\n {\n $city = $this->argument('city');\n\n $weatherService = new CurrentWeatherService();\n try {\n $weather = $weatherService->getByCity($city);\n } catch (WeatherException $e) {\n $this->error($e->getMessage());\n return;\n }\n\n $this->info('Weather for city '.$city);\n dump($weather->toArray());\n }",
"public function handle()\n {\n $this->getModels($this->argument('model'));\n $this->getLanguages($this->argument('locale'));\n $this->createMultiLanguageRecords();\n }",
"public function handle()\n {\n $this->processOptions();\n\n echo json_encode( $this->dateTimeRange ) . \"\\n\";\n\n $this->dispatch( new ProcessNewActionsJob(\n $this->dateTimeRange ,\n str_random( 16 ),\n $this->option('runtime-threshold')\n ) );\n }",
"public function handle()\n {\n $fightId = $this->argument('fight_id');\n $metricId = $this->argument('metric_id');\n //$strategyName = 'App\\\\'.$this->argument('metric_name');\n\n $metric = BossMetric::find($metricId);\n if ($metric === null) {\n $this->error(\"Error: no metric with id: $metricId found!\");\n return;\n }\n\n $fight = Fight::find($fightId);\n\n if ($fight === null) {\n $this->error(\"Error: no fight with id: $fightId found!\");\n return;\n }\n\n $strategy = $metric->getStrategy();\n $strategy->setFight($fight);\n $strategy->run();\n }",
"public function handle()\n {\n\t\t$this->call('vendor:publish');\n\t\t$this->call('migrate');\n\t\t$this->call('db:seed');\n\t\t$this->call('factotum:storage');\n\t\t$this->call('factotum:storage');\n }",
"public function handle()\n {\n $user_id = $this->argument('user') ?? null;\n\n if (is_null($user_id)) {\n $users = User::all();\n\n foreach ($users as $user) {\n $this->showUserBalance($user);\n }\n } else {\n $user = User::find($user_id);\n\n $this->showUserBalance($user);\n }\n }",
"public function handle()\n {\n $this->capsuleService->getAll();\n $this->line('Command Worked');\n }",
"public function handle()\n {\n $platform_wechat_id = $this->argument('id');\n $customer_id = $this->argument('customer_id');\n $this->info(\"Starting at \".date('Y-m-d H:i:s').\". Running initial for 【{$this->signature}】\");\n $this->getUserInfoList($platform_wechat_id,$customer_id);\n $this->info(\"End at \".date('Y-m-d H:i:s').\". over for 【{$this->signature}】\");\n }",
"public function handle()\n {\n $this->publishAssets();\n $this->call('twill:flush-manifest');\n $this->call('view:clear');\n }",
"public function handle()\n {\n \n $argument = $this->argument('data');\n \n $this->prepare( $argument );\n \n $this->make();\n \n $this->info( 'migration has been created : '. $this->fileName );\n \n }",
"public function handle()\n {\n chdir(resource_path('assets/ts'));\n $path = $this->argument(\"path\");\n if(isset($path))\n {\n Logger::info('execute '.$path);\n Command::executeRaw('tsc', [\"-p\", $path]);\n }else\n Logger::info('execute tsc');\n Command::executeRaw('tsc');\n }",
"public function handle()\n {\n $this->info('Starting date change command.');\n\n Word::where('language_id', 1)->update(array('created_at' => '1970-01-01 00:00:01'));\n Word::where('language_id', 2)->update(array('created_at' => '1970-01-01 00:00:01'));\n\n $this->info('Dates have been changed to 1970-01-01 00:00:01');\n }",
"public function handle()\n {\n $this->info($this->slugger->encode($this->argument('id')));\n }",
"public function handle()\n {\n $this->line(static::$logo);\n $this->line('Neat admin current version:' . Neat::version());\n\n $this->comment('');\n $this->comment('Available commands:');\n\n $this->listAvailableCommands();\n }",
"public function handle()\n {\n $this->revisions->updateListFiles();\n }",
"public function handle(): void\n {\n // Set argument\n $this->url = $this->argument(self::URL_ARGUMENT);\n\n // Handler takes care of computation\n (new CommandHandler($this))->compute();\n }",
"public function handle()\n {\n try\n {\n $filename = $this->argument('filename');\n Excel::import(new ObjectsImport, $filename);\n\n $this->info('Data import is now completed');\n }\n catch(Exception $ex)\n {\n $this->error($ex->getMessage());\n }\n }",
"public function handle() {\n $entity = $this->validateEntity($this->argument('entity'));\n $job = new DataProcessingJob($entity, str_random(16));\n $this->dispatch($job);\n }",
"public function handle()\n {\n $isProductionMode = 'prod' == $this->argument('mode');\n\n if ($isProductionMode) {\n if (!$this->confirm('Are you sure to run in production mode? Running this command may cause critical issues?')) {\n exit(1);\n }\n }\n\n $this->_recalculate($isProductionMode);\n }",
"public function handle()\n {\n if(!$this->verify()) {\n $rank = $this->createRankSuperAdmin();\n $user = $this->createUserSuperAdmin();\n $user->Ranks()->attach($rank);\n $this->line('Felicitaciones');\n } else {\n $this->error('No se puede ejecutar');\n }\n }",
"public function handle()\n {\n // Get CLI Input\n $user_id = $this->option(\"uid\");\n\n // User Products\n ( new CommandManager() )->showUserProducts( $user_id );\n }",
"public function handle()\n {\n $force = $this->option('force');\n\n if($this->option('without-bulk')){\n $this->withoutBulk = true;\n }\n\n if ($this->generateClass($force)){\n $this->info('Generating permissions for '.$this->modelBaseName.' finished');\n }\n }",
"public function handle()\n {\n $tournaments = Tournament::all()->toArray();\n foreach ($tournaments as $tournament) {\n $slug = $this->tournamentRepoObj->generateSlug($tournament['name'].Carbon::createFromFormat('d/m/Y', $tournament['start_date'])->year,'');\n DB::table('tournaments')\n ->where('id', $tournament['id'])\n ->update([\n 'slug' => $slug\n ]);\n }\n $this->info('Script executed.');\n }",
"public function handle()\n {\n $userId = $this->argument('user');\n\n /** @var User $user */\n $user = User::findOrFail($userId);\n\n // Get token.\n $info = (new Client())->auth();\n\n // Save to db.\n $user->access_token = $info['access_token'];\n $user->access_secret = $info['access_secret'];\n $user->save();\n\n $this->line(\"Saved access token and secret for user: {$user->email}\");\n }",
"public function handle()\n {\n $m = new MemberFromText;\n $m->train();\n $id = $m->predict($this->argument('text'));\n dump(Miembro::find($id)->toArray());\n }",
"public function handle()\n {\n $this->generator\n ->setConsole($this)\n ->run();\n }",
"public function handle()\n {\n $this->createController();\n $this->createServiceDir();\n\n exit;\n $args = [\n '--provider' => TestProvider::class\n ];\n $className = $this->argument('className');\n if (!$className) {\n $className = 'MethodsList';\n }\n $className = ucwords($className);\n $this->call('vendor:publish', $args);\n $this->info('Display this on the screen ' . $className);\n }",
"public function handle()\n {\n $this->createDirectories();\n\n $this->publishTests();\n\n $this->info('Authentication tests generated successfully.');\n }",
"public function handle()\n {\n $this->setDbConnection(\n $this->input->getOption('database') ?: config('ghost-database.default_connection')\n );\n\n $native = $this->input->getOption('native-import') ?: config('ghost-database.use_native_importer');\n\n $snapshot = $this->import($native);\n\n $this->info(\"Snapshot `{$snapshot->name}` loaded!\");\n }",
"public function handle()\n {\n $exec = $this->argument('exec');\n\n switch ($exec) {\n case 'download' :\n $this->download();\n break;\n\n case 'generate' :\n $this->generate();\n break;\n\n default :\n echo \"Choose 'download' or 'generate' for this command\";\n break;\n }\n }",
"public function handle()\n {\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-admin.js', '--group' => 'admin']);\n $this->call('ziggy:generate', ['path' => './resources/js/ziggy-frontend.js', '--group' => 'frontend']);\n $this->call(TranslationsGenerateCommand::class);\n }",
"public function handle()\n {\n $tenantName = $this->argument('tenant');\n\n $tenant = Tenant::where('name', $tenantName)->orWhere('subdomain', $tenantName)->first();\n\n if ($tenant) {\n $tenant->setActive();\n \\Artisan::call('tinker');\n } else {\n $this->error('Error: Tenant not found');\n }\n }",
"public function handle()\n {\n try {\n if (!empty($userId = $this->argument('user'))) {\n $user = User::find($userId);\n } else {\n $user = User::inRandomOrder()->first();\n }\n\n if (empty($user)) {\n throw new \\Exception('User not found');\n }\n\n echo JWTAuth::fromUser($user);\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n\n }",
"public function handle()\n {\n $this->fetchAndSetToken();\n $imagesToDownload = $this->peekImages(WatchedApp::pluck('package_name'));\n $this->fetchImages($imagesToDownload);\n\n if ($this->option('dont-optimize')) {\n return;\n }\n\n $this->runOptimizeCommand();\n }",
"public function handle()\n {\n $this->setCryptIVFromUrl($this->argument('url'));\n\n $participant = URLParser::parseByName('santa.index', $this->argument('url'))->participant;\n if($participant) {\n $draw = $participant->draw;\n } else {\n $draw = URLParser::parseByName('organizer.index', $this->argument('url'))->draw;\n }\n\n $this->table(\n ['ID', 'Name', 'Email'],\n $draw->participants()->get(['id', 'name', 'email'])->toArray()\n );\n }",
"public function handle()\n {\n // if you are on the local environment\n if (!(app()->isLocal() || app()->runningUnitTests())) {\n $this->error('This command is only available on the local environment.');\n return;\n }\n\n $fqdn = $this->argument('fqdn');\n if ($tenant = Tenant::retrieveBy($fqdn)){\n $tenant->delete($fqdn);\n $this->info(\"Tenant {$fqdn} successfully deleted.\");\n }else {\n $this->error('This fqdn doesn\\'t exist.');\n }\n\n }",
"public function handle()\n {\n $user_from = $this->option('from');\n $user_to = $this->option('to');\n $sum = $this->option('sum');\n\n CreateTransaction::dispatch($this->usersRepository->getByID($user_from), $this->usersRepository->getByID($user_to), $sum, true);\n $this->transactionsRepository->getAll()->each(function ($transaction){\n \tExecuteTransaction::dispatch($transaction);\n });\n }",
"public function handle()\n {\n $this->warn('Starting Retrieve Data');\n\n PeopleService::retrieveData();\n\n $this->info('Retrieve Data Completed');\n }",
"public function handle()\n {\n \n $period = $this->option('period');\n \n switch ($period) {\n\n case 'half_month':\n $this->info('Grabing Half Month Income...');\n $this->halfMonth();\n break;\n\n case 'monthly':\n $this->info('Grabing Monthly Income...');\n $this->monthly();\n break;\n \n default:\n $this->info('Grabing Daily Income...');\n $this->daily();\n break;\n\n }\n\n \n }",
"public function handle()\n {\n $countryFiles = $this->getFiles();\n\n foreach ($countryFiles as $fileName) {\n $this->seed($fileName);\n }\n\n $this->info('End.');\n }",
"public function fire()\n {\n $entityName = $this->argument('entityName');\n $startEntityId = $this->argument('startEntityId');\n $endEntityId = $this->argument('endEntityId');\n $depth = $this->argument('depth');\n\n $this->fixturePath = $this->option('outputPath');\n\n $this->info(\"Generating fixtures for $entityName in {$this->fixturePath}...\");\n \n $this->generateFixtures($entityName, $startEntityId, $endEntityId, $depth);\n }",
"public function handle()\n {\n $check = PublishTraitsService::publishTraits();\n\n if ($check)\n {\n $this->info('All files have been published');\n }\n\n $this->info('Failed to publish');\n }",
"public function handle()\n {\n $user = User::where('username', $this->argument('user'))\n ->orWhere('email', $this->argument('user'))\n ->first();\n\n if ($user != null) {\n $user->assign('admin');\n $this->line(\"{$user->email} was successfully made an admin.\");\n } else {\n $this->line(\"No user found where username or email is '{$this->argument('user')}'\");\n }\n }",
"public function handle()\n {\n event( 'laraview:compile' );\n $this->checkForSelectedViewGeneration();\n\n app( RegisterBlueprint::class )\n ->console( $this )\n ->generate();\n }",
"public function handle()\n {\n $project = Project::with(['team.admins', 'team.members'])->findOrFail($this->option('project-id'));\n $user = User::findOrFail($this->option('user-id'));\n if ($this->option('admin')) {\n $project->team->admins()->syncWithoutDetaching($user);\n } else {\n $project->team->members()->syncWithoutDetaching($user);\n }\n return Command::SUCCESS;\n }",
"public function handle() {\n try {\n $this->roomService->loadRoomOccupations();\n Log::notice('untis:occupations executed successfully.');\n $this->line('Loaded room occupations from WebUntis.');\n } catch (Exception $e) {\n Log::error('Error loading room occupations.', ['exception' => $e]);\n $this->error('Error loading room occupations: ' . $e->getMessage());\n }\n }",
"public function handle()\n {\n $this->loadIxList();\n $this->loadIxMembersList();\n $this->updateIxInfo();\n $this->updateIxMembersInfo();\n }",
"public function handle()\n {\n $this->call('vendor:publish', [\n '--provider' => \"Qoraiche\\MailEclipse\\MailEclipseServiceProvider\",\n ]);\n }",
"public function handle()\n\t{\n\t\tif ($this->option('dev')) {\n\t\t\tsystem('php '.base_path('.deploy/deploy-dev.php'));\n\t\t} else {\n\t\t\tsystem('php '.base_path('.deploy/deploy.php'));\n\t\t}\n\t}",
"public function handle(Command $command);",
"public function handle(Command $command);",
"public function handle()\n {\n $date_from = $this->argument('date_from');\n\t\t$date_to = $this->argument('date_to');\n\t\tif(!$date_from) {\n\t\t\t$date_from = Carbon::today()->subDays(5);\n\t\t}\n\t\tif(!$date_to) {\n\t\t\t$date_to = Carbon::yesterday();\n\t\t}\n\t\tStats::computeMembers($this->argument('venue_id'), $date_from, $date_to);\n }",
"public function handle()\n {\n switch ($this->argument('type')){\n case 'fih':\n $scrapper = new Scrappers\\FederationScrapper();\n $scrapper->get($this->option('level'));\n print $scrapper->message();\n break;\n }\n }",
"public function handle()\n {\n Log::info(\"seed:dash Command is working fine!\");\n $this->info('Dashboard Database seeding completed successfully.');\n }",
"public function handle()\n {\n $originalId = $this->argument('original_id');\n\n $status = true;\n if ($this->option('status') === 'false') {\n $status = false;\n }\n\n if ($video = Video::where('original_id', $originalId)->first()) {\n $video->dmca_claim = $status;\n $video->save();\n\n $this->info('Video\\'s dmca_claim set to: ' . json_encode($status));\n return ;\n }\n\n $this->error('No video found with original_id of: ' . $originalId);\n return;\n }",
"public function handle()\n {\n $this->call('config:clear');\n\n $this->call('config:update');\n\n $this->info('Configuration cached successfully!');\n }",
"public function handle()\n {\n //\n $modelName = $this->argument('model');\n $column = $this->argument('column');\n $this->generateMutation($modelName, $column);\n\n }",
"public function handle()\n {\n $filePath = 'public/' . $this->argument('fileName');\n $count = $this->argument('count');\n \n $fileData = array_slice(file($filePath), 0, $count);\n $this->info(implode('', $fileData));\n }",
"public function handle()\n {\n $email = $this->argument('email');\n\n Mail::to($email)->send(new SendMailable('Test Mail'));\n\n if (Mail::failures()) {\n $this->info('Email failed to send');\n } else {\n $this->info('Email successfully sent');\n }\n }",
"public function handle()\n {\n $this->call('route:trans:clear');\n\n $this->cacheRoutesPerLocale();\n\n $this->info('Routes cached successfully for all locales!');\n }",
"public function handle()\n {\n $this->info('Welcome to command for Bantenprov\\WilayahIndonesia package');\n }",
"public function handle()\n {\n if($this->hasOption('no_dump') && $this->option('no_dump')){\n $this->composer_dump = false;\n }\n $this->readyDatas();\n $this->datas['startSymbol']='{{';\n $this->datas['endSymbol']='}}';\n $this->create();\n }",
"public function handle()\n {\n $repository = new OglasiCrawlerRepository();\n $ads = $repository->getAds();\n $repository->saveAds($ads);\n\n echo 'Ads were successfully retrieved' . PHP_EOL;\n }",
"public function handle()\n {\n $this->makeDir($this->basePath . $this->kebabPlural());\n\n $this->exportViews();\n\n $this->info('Resource views generated successfully.');\n }",
"public function handle()\n {\n $movies = \\App\\Models\\Movie::whereNull('meta')->take(40)->orderBy('id')->get();\n $movies->each(function($movie){ sleep(1); $movie->getMeta(); });\n return Command::SUCCESS;\n }",
"public function handle()\n {\n $this->packageGenerator->setConsole($this)\n ->setPackage($this->argument('package'))\n ->setType('shipping')\n ->setForce($this->option('force'))\n ->generate();\n }",
"public function handle()\n {\n $test = $this->argument('test');\n\n $dir = config('speed-test.dir');\n\n $className = ucfirst(\\Str::camel($test));\n\n $namespace = config('speed-test.namespace');\n\n $class = class_entity($className)\n ->namespace($namespace);\n\n $class->method('speed1')\n ->line($this->option('line'))->doc(function ($doc) use ($className) {\n /** @var DocumentorEntity $doc */\n $doc->tagCustom('times', $this->option('times'));\n $doc->description($this->option('description') ?: \"{$className} Speed 1\");\n });\n\n if (! is_dir($dir)) {\n mkdir($dir, 0777, 1);\n }\n\n file_put_contents(\n $dir.'/'.$className.'.php',\n $class->wrap('php')\n );\n\n $this->info('Speed created!');\n\n return 0;\n }",
"public function handle()\n {\n $message = $this->GenerateRandomUser($this->argument('count'));\n $this->info($message);\n }",
"public function handle()\n {\n $host = Cache::get('executingHost', null);\n $this->info(\"Host: ${host}\");\n\n if ($host === null) {\n $this->info('実行するホストが選択されていません');\n return;\n }\n\n if (Schema::hasTable('companies') && Company::count() !== 0) {\n $this->info('マイグレーションが既に1回以上実行されています');\n return;\n }\n\n $should_execute = $host === $this->argument('executingHost');\n\n if ($should_execute) {\n Artisan::call('migrate:fresh', ['--seed' => true]);\n $this->info('マイグレーションが完了しました');\n\n Cache::forget('executingHost');\n } else {\n $this->info('別ホストにてマイグレーションが行われます');\n }\n }",
"public function handle()\n {\n // Configuration...\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-config']);\n\n // Migrations\n $this->callSilent('vendor:publish', ['--tag' => 'model-login-migrations']);\n\n $this->info('Model Login resources published.');\n }",
"public function handle()\n {\n if ($this->validation()) {\n $money = $this->argument('money');\n Cache::increment('amount', $money);\n }\n }",
"public function handle()\n {\n $this->info('Publishing stuff..');\n\n $this->publishFiles();\n\n $this->info('Setup complete. Enjoy!');\n }",
"public function handle()\n {\n $this->publishConfig();\n $this->publishClassStub();\n $this->generateAndStoreKey();\n\n $this->info('Use the details below for your \"Lead delivery options\" in Google Ads.');\n $this->info('Webhook URL: ' . route('GoogleAdsLeadExtensionController@index'));\n $this->info('Key: ' . $this->generated_key);\n }",
"public function handle()\n {\n $opts = $this->options();\n $args = $this->arguments();\n #print_r($opts);\n #print_r($args);\n\n # Redundant as argument validation handled by Laravel\n #\n if (!isset($args['destination'])) {\n printf(\"Usage: php artisan %s\\n\", $this->signature);\n exit(1);\n }\n\n # Default to normal message type\n #\n if (!isset($opts['type'])) {\n $opts['type'] = 'normal';\n }\n\n $uac = new UserApiController();\n\n if ($opts['type'] == 'normal') {\n if (!isset($opts['message'])) {\n printf(\"Usage: php artisan %s\\n\\n\", $this->signature);\n printf(\"ERROR: Message must be specified for type 'normal'\\n\");\n exit(1);\n }\n $result = $uac->sendSms(\n $args['destination'],\n $opts['message'],\n $opts['route']\n );\n }\n else if ($opts['type'] == 'otp') {\n $result = $uac->sendVerificationSms(\n $args['destination'],\n '<code>',\n '<name>',\n $opts['route'],\n '<appName>'\n );\n }\n\n if ($result === true) {\n printf(\"INFO: SMS message to %s sent successfully (%s)\\n\",\n $args['destination'], $opts['type']);\n }\n else {\n printf(\"INFO: SMS message to %s failed to send (%s)\\n\", \n $args['destination'], $opts['type']);\n printf(\"ERROR: %s\\n\", $result);\n }\n\n return;\n }"
] | [
"0.6469962",
"0.6463639",
"0.64271367",
"0.635053",
"0.63190264",
"0.62747604",
"0.6261977",
"0.6261908",
"0.6235821",
"0.62248456",
"0.62217945",
"0.6214421",
"0.6193356",
"0.61916095",
"0.6183878",
"0.6177804",
"0.61763877",
"0.6172579",
"0.61497146",
"0.6148907",
"0.61484164",
"0.6146793",
"0.6139144",
"0.61347336",
"0.6131662",
"0.61164206",
"0.61144686",
"0.61109483",
"0.61082935",
"0.6105106",
"0.6103338",
"0.6102162",
"0.61020017",
"0.60962653",
"0.6095482",
"0.6091584",
"0.60885274",
"0.6083864",
"0.6082142",
"0.6077832",
"0.60766655",
"0.607472",
"0.60739267",
"0.607275",
"0.60699606",
"0.6069931",
"0.6068753",
"0.6067665",
"0.6061175",
"0.60599935",
"0.6059836",
"0.605693",
"0.60499364",
"0.60418284",
"0.6039709",
"0.6031963",
"0.6031549",
"0.6027515",
"0.60255647",
"0.60208166",
"0.6018581",
"0.60179937",
"0.6014668",
"0.60145515",
"0.60141796",
"0.6011772",
"0.6008498",
"0.6007883",
"0.60072047",
"0.6006732",
"0.60039204",
"0.6001778",
"0.6000803",
"0.59996396",
"0.5999325",
"0.5992452",
"0.5987503",
"0.5987503",
"0.5987477",
"0.5986996",
"0.59853584",
"0.5983282",
"0.59804505",
"0.5976757",
"0.5976542",
"0.5973796",
"0.5969228",
"0.5968169",
"0.59655035",
"0.59642595",
"0.59635514",
"0.59619296",
"0.5960217",
"0.5955025",
"0.5954439",
"0.59528315",
"0.59513766",
"0.5947869",
"0.59456027",
"0.5945575",
"0.5945031"
] | 0.0 | -1 |
Shows only published items. | public function published(): self
{
$this->andWhere(['{{%task}}.[[status]]' => TaskRecord::STATUS_ACTIVE]);
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAllPublished();",
"public static function published()\n {\n // return self::where('published',1)->get();\n return self::where('published',true);\n }",
"public static function published()\n {\n return self::where('published', '=', true)->orderBy('published_at', 'DESC')->get();\n }",
"public function getAllPublished()\n {\n $result = $this->getManyBy('status', 'publish');\n\n return $result;\n }",
"public function published()\n {\n $published = [];\n\n foreach ($this->items as $path => $slug) {\n $page = $this->pages->get($path);\n if ($page !== null && $page->published()) {\n $published[$path] = $slug;\n }\n }\n $this->items = $published;\n\n return $this;\n }",
"public static function published()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->published();\n }",
"public function findOnlyPublished($id);",
"public function isPublished();",
"public function isPublished();",
"public function isPublished();",
"public function isPublished();",
"public function isPublished();",
"public function isPublished();",
"public function isPublished();",
"public function isPublished();",
"public function isPublished();",
"public function isPublished();",
"public function isPublished();",
"public function isPublished();",
"public function isPublished();",
"public function has_published_pages()\n {\n }",
"public static function getFeedItems()\n {\n return Post::where('published', true)->get();\n }",
"function getPublished()\n {\n return $this->published()->orderBy('sort')->get();\n }",
"public function nonPublished()\n {\n $published = [];\n\n foreach ($this->items as $path => $slug) {\n $page = $this->pages->get($path);\n if ($page !== null && !$page->published()) {\n $published[$path] = $slug;\n }\n }\n $this->items = $published;\n\n return $this;\n }",
"public function indexPublishAction()\n {\n $em = $this->getDoctrine()->getManager();\n $date=new \\DateTime('now');\n $query = $em->createQuery(\n 'SELECT a\n FROM ArticleBundle:Article a\n WHERE a.datePublication <= :date and a.online = 1\n ORDER BY a.dateArticle ASC'\n )->setParameter('date', $date);\n\n $articles = $query->getResult();\n\n return $this->render('article/all.html.twig', array(\n 'articles' => $articles\n ));\n }",
"public function actionUnpublishItems()\n {\n $civ = CatalogItemVariant::find()\n ->where(['published' => 0])\n ->asArray()\n ->all();\n\n if (!empty($civ)) {\n foreach ($civ as $ci) {\n $oCi = CatalogItem::findOne(['id' => $ci['product_id'], 'published' => 1]);\n if (!empty($oCi)) {\n $oCi->published = 0;\n $oCi->save();\n echo 'Unpublished catalog item id: ' . $ci['product_id'] . PHP_EOL;\n }\n }\n \n }\n }",
"public function index()\n {\n $items = Item::where(\"user_id\", '=', Auth::id())->get();\n $drafts = Item::onlyTrashed()->where(\"user_id\", '=', Auth::id())->get();\n $user = User::find(Auth::id());\n\n return view('items', compact('items','drafts', 'user'));\n }",
"public function index()\n {\n return view('publishers')->with('active_menu', 'publishers');\n }",
"public function getPublish() {\n return $this->changeFilter('publish');\n }",
"public function actionPublished()\n {\n $Formatter=CommonHelpers::returnFormatter();\n\n //set returnUrl so you can use $this->goBack in actionDelete()\n Yii::$app->user->returnUrl = Url::to(['published']);\n\n $status=Story::STATUS_PUBLISHED;\n $searchModel = new StorySearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams, $status);\n\n return $this->render('stories', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'status' => $status,\n 'Formatter'=>$Formatter,\n ]);\n }",
"function isPublished(){\n\t\tif($this->isPublished == 1){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function isPublished()\n {\n return $this->published_at->lte(Carbon::now());\n }",
"public function isPublished()\n {\n return $this->postID > 0;\n }",
"public function isPublished()\n {\n return $this->publish_status == Status::PUBLISHED;\n }",
"public static function getPublishedPosts(int $itemsPerPage = 10)\n {\n return Post::where('status', 'publish')\n ->whereDate('published_at', '<=', now())\n ->orderBy('published_at', 'desc')\n ->paginate($itemsPerPage);\n }",
"public function findOnlyPublished($id)\n {\n $result = $this\n ->_model\n ->where('id', $id)\n ->where('status', 'publish')\n ->first();\n\n return $result;\n }",
"public function isPublished()\n {\n return ($this->published == 1);\n }",
"public function isPublished()\n {\n if(!strcmp($this->getStatus(), 'approved')) {\n return true;\n }\n\n return false;\n }",
"public function hasPublished() {\n return $this->_has(6);\n }",
"function block_core_calendar_has_published_posts()\n {\n }",
"public function index()\n {\n return ResourcesProduct::collection(Auth::check() ? Product::all() : Product::where('publish', true)->get());\n }",
"public function isPublished()\n {\n return $this->status == static::PUBLISHED;\n }",
"public function actionIndex()\n\t{\t\t\t\t\n\t\t// Load premium items\n\t\t$sql = \"NOW() BETWEEN date_published AND date_end AND premium=true ORDER BY date_published DESC\";\n\t\t$items = Item::model()->findAll($sql);\n\t\t\n\t\t$data = array(\n\t\t\t'premium' => $items,\n\t\t);\n\t\t\n\t\t$this->render('index', $data);\n\t}",
"public function index()\n {\n return PostShort::collection(\n BlogPost::orderByRaw('(CASE WHEN publication = 0 THEN id END) DESC')\n ->orderBy('publication_date', 'desc')\n ->paginate(20)\n );\n }",
"public function viewAll()\n {\n $items = Item::all();\n\n\n return view('pages.items')->with('items', $items);\n }",
"public function isPublished(): bool\n {\n $publishedStatus = ['publish'];\n\n return in_array($this->status, $publishedStatus);\n }",
"public function scopeOnlyPublished($query)\n {\n return $query->where('published', 1);\n }",
"public function publish() {\n\t\t\tif (!empty($this->params['pass'][0])) {\n\t\t\t\t/* Get id of menu item */\n\t\t\t\t$this->menuId = $this->MyMenu->id = Sanitize::escape($this->params['pass'][0]);\n\t\t\t\t\n\t\t\t\t/* Get current publish status */\n\t\t\t\t$publish = $this->MyMenu->field('publish', array('id' => $this->menuId));\n\t\t\t\t\n\t\t\t\t/* Set new publish status */\n\t\t\t\tif ($publish == 0) {\n\t\t\t\t\t$togglePublish = array('MyMenu' => array('publish' => 1));\n\t\t\t\t} else if ($publish == 1) {\n\t\t\t\t\t$togglePublish = array('MyMenu' => array('publish' => 0));\n\t\t\t\t}\n\t\t\t\t$this->MyMenu->save($togglePublish);\n\t\t\t}\n\t\t\t\n\t\t\t/* Get list of menu items */\n\t\t\t$this->menuList = $this->getThreadedList();\n\t\t\t$this->set('menuList', $this->menuList);\n\t\t\t\n\t\t\t$this->render('list');\n\t\t}",
"public function index() {\n \n //return \\Auth::user();\n //$articles = Article::all();\n //$articles = Article::latest()->get();\n //$articles = Article::oldest()->get();\n //$articles = Article::orderBy('published_at', 'desc')->get(); // you can do this too\n //$articles = Article::latest('published_at')->where('published_at', '<=', Carbon::now())->get(); // not give the articles that published in the future\n $articles = Article::latest('published_at')->published()->get();\n\n return view('articles.index', compact('articles'));\n }",
"function block_core_calendar_update_has_published_posts()\n {\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function show(Items $items)\n {\n //\n }",
"public function visible()\n {\n $visible = [];\n\n foreach ($this->items as $path => $slug) {\n $page = $this->pages->get($path);\n if ($page !== null && $page->visible()) {\n $visible[$path] = $slug;\n }\n }\n $this->items = $visible;\n\n return $this;\n }",
"public function getPublishedChoices()\n\t{\n\t\treturn array(1=>'Published',0=>'Unpublished');\n\t}",
"public function getPublished() {\n\t\treturn $this->published;\n\t}",
"public function viewall(){\n\t\t$gallery = Gallery::orderBy('created_at', 'asc')->get();\n\t\t$obj_actions = [\n\t\t\t[\n\t\t\t\t'name' => 'Add',\n\t\t\t\t'route' => 'new',\n\t\t\t\t'method' => 'get',\n\t\t\t\t'button' => 'success'\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Edit',\n\t\t\t\t'route' => 'edit',\n\t\t\t\t'method' => 'get',\n\t\t\t\t'button' => 'secondary',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Delete',\n\t\t\t\t'route' => 'delete',\n\t\t\t\t'method' => 'post',\n\t\t\t\t'button' => 'danger'\n\t\t\t],\n\t\t];\n\t\treturn view('admin.viewitems')\n\t\t\t->with('publications', $gallery)\n\t\t\t->with('obj_actions', $obj_actions)\n\t\t\t->with('routeprefix', 'admin')\n\t\t\t->with('short_category', 'gallery')\n\t\t\t->with('category', 'Gallery Item')\n\t\t\t->with('addExists', true);\n\t}",
"public function no_items() {\n\n\t\t\t_e( 'No items avaliable.', 'js_topic_manager' );\n\n\t\t}",
"public function index()\n\n {\n $articles = Article::latest('published_at')->published()->get();\n\n return view('articles.index',compact('articles'));\n }",
"public function isPublished()\n {\n if (\n $this->getStatus() === PageStatus::PUBLISHED ||\n ($this->getStatus() === PageStatus::SCHEDULED &&\n $this->getPublishedAt() < new \\DateTime())\n ) {\n return true;\n } else {\n return false;\n }\n }",
"public function isPublished()\n {\n return $this->attribute('state') == self::STATUS_PUBLISHED;\n }",
"public function getIsPublished()\n\t{\n\t\treturn $this->is_published;\n\t}",
"public function isPublished()\n {\n # code...\n return !is_null($this->published_at) && $this->published_at < today();\n }",
"public function hasPublished() {\n return $this->_has(14);\n }",
"public function index()\n {\n $posts = Post::latest()->with('author')->paginate(5);\n $filtered = $posts->whereIn('audience', ['public']);\n return PostResource::collection($filtered);\n }",
"public function index()\n {\n //\n $articles = Article::latest()->published()->get();\n return view('articles.index',compact('articles'));\n }",
"function isPublished() {\n\t\tif ($this->status == 'published') {\n\t\t\t$now = time();\n\t\t\tif ($this->datePublish <= $now) {\n\t\t\t\tif ($this->dateUnpublish > $now || $this->dateUnpublish == null) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public function index()\n {\n $articles = Article::latest('published_at')->published()->paginate(8);\n return view('articles.index', compact('articles'));\n }",
"public function index()\n {\n $publishers = User::where('role', 'publisher')->get();\n if ( count($publishers) > 10 ) {\n $publishers = User::where('role', 'publisher')->paginate(10);\n }\n\n return view('admin.stats', compact('publishers'));\n }",
"public function publishedItem(){\n $tommorow=date('Y-m-d',strtotime('+1 day'));\n $sql=\"SELECT * FROM `items` \n INNER JOIN `categories` ON items.category_id=categories.category_id WHERE `publish_date`<'$tommorow'\";\n $result=$this->conn->query($sql);\n $records=array();\n\n if($result->num_rows>0){\n while($rows=$result->fetch_assoc()){\n array_push($records,$rows);\n\n }\n return $records;\n }else{\n return false;\n }\n \n }",
"public function index_pub()\n {\n //\n //\n \n if(auth()->user()->role == \"admin\"){\n $facturePubs = Facture::whereIn('type',['pack_pub'])->latest()->get();\n \n }else{\n $facturePubs = Facture::where('user_id',auth()->user()->id)->where('type',['pack_pub'])->latest()->get();\n }\n \n \n return view ('facture.index_pub',compact(['facturePubs']));\n }",
"public function show(items $items)\n {\n //\n }",
"public function scopePublished($query){ \n \t$query->where('published_at','<=',Carbon::now());\n }",
"public function isPublishedField()\n {\n return $this->get('check_publish') == 1;\n }",
"public function index()\n {\n $items = Item::orderBy('id', 'asc')->paginate(10);\n return view('AdministratorPages.items')->with('items', $items);\n }",
"public function index()\n {\n DB::listen(function ($query) {\n info($query->sql);\n });\n\n // $posts = Post::published()->get();\n $posts = Post::published()->paginate(15);\n\n\n // $users = User::with(['posts' => function ($qb) {\n // $qb->where('is_published', true);\n // }])\n // ->where('email', 'like', '%@%')->get();\n // echo $users;\n\n\n return view('posts.index', compact('posts'));\n }",
"public function getPublished($value='')\n {\n // get current logged in user\n $uid = \\Auth::user()->id;\n\n // get all published the events from this user\n $events = User::find($uid)->events->where('status', '=', 1);\n\n // load the view and pass the events\n return view('admin.events.index')\n ->with('events', $events);\n }",
"public function index()\n {\n $posts = $this->getPublishedPosts();\n return view('index', compact('posts'));\n }",
"function getPublishedPostsOnly() {\n\tglobal $conn;\n\t$sql = \"SELECT * FROM posts WHERE published=true order by created_at DESC LIMIT 3\";\n\t$result = mysqli_query($conn, $sql);\n\n\t// fetch all posts as an associative array called $posts\n\t$posts = mysqli_fetch_all($result, MYSQLI_ASSOC);\n\t$final_posts = array();\n\tforeach ($posts as $post) {\n\t\t$post['topic'] = getPostTopic($post['id']); \n\t\tarray_push($final_posts, $post);\n\t}\n\treturn $final_posts;\n}",
"public function toggle_published() {\n $will_be_published = !$this->post->is_published();\n $this->post->toggle_published();\n redirect(\n '/backend/posts/edit',\n ['notice' => $will_be_published ? 'Published' : 'Unpublished'],\n ['id' => $this->post->id]\n );\n }",
"public function onBeforePublish() {\n if (false == $this->owner->ShowInSearch)\n {\n if ($this->owner->isPublished())\n {\n $liveRecord = \\Versioned::get_by_stage(get_class($this->owner), 'Live')->byID($this->owner->ID);\n if ($liveRecord->ShowInSearch != $this->owner->ShowInSearch)\n {\n $this->doDeleteDocument();\n }\n }\n }\n }",
"public function no_items() {\n\n\t\tif ( $this->is_filtered() ) {\n\t\t\tesc_html_e( 'No emails found.', 'wp-mail-smtp-pro' );\n\t\t} else {\n\t\t\tesc_html_e( 'No emails have been logged for now.', 'wp-mail-smtp-pro' );\n\t\t}\n\t}",
"public function index()\n {\n $publishers = DB::table('publishers')->get();\n return view('publishers.index', ['publishers' => $publishers]);\n }",
"public function actionUnpublished()\n {\n $Formatter=CommonHelpers::returnFormatter();\n\n //set returnUrl so you can use $this->goBack in actionDelete()\n Yii::$app->user->returnUrl = Url::to(['unpublished']);\n $status=Story::STATUS_UNPUBLISHED;\n $searchModel = new StorySearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams, $status);\n\n return $this->render('stories', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'status' => $status,\n 'Formatter'=>$Formatter,\n ]);\n }",
"public function findAllPublishedPaginated($perPage = 10)\n {\n return $this->model\n ->with(static::$relations)\n ->where('is_published', 1)\n ->orderBy('is_top', 'DESC')\n ->orderBy('created_at', 'DESC')\n ->paginate($perPage);\n }",
"public function index()\n {\n $topics = Topic::whereHas('questions', function ($query) {\n $query->where('status', 'public');\n })\n ->with(['questions' => function ($query) {\n $query->where('status', 'public');\n }])\n ->get();\n }",
"public function publishedArticles()\n {\n return Courses::loadAllPublished();\n }",
"public function admin() {\n $items = Item::orderBy('id','DESC')->paginate(15);\n return view('dashboard.item.item',compact('items'));\n }",
"public function scopePublished($query) {\n return $query->where('published_at', '<=', now());\n }",
"public function justPublished()\n {\n\n return $this->created_at->gt(Carbon::now()->subMinute());\n }",
"public function index()\n {\n $items = Item::WhereUser(Auth::user())->get(['title', 'price', 'currency', 'id', 'public']);\n return View::make('items.index')\n ->with('title', 'My products')\n ->with('items', $items->toArray())\n ->with('hasNavbar', 1);\n\n }",
"public function nonVisible()\n {\n $visible = [];\n\n foreach ($this->items as $path => $slug) {\n $page = $this->pages->get($path);\n if ($page !== null && !$page->visible()) {\n $visible[$path] = $slug;\n }\n }\n $this->items = $visible;\n\n return $this;\n }",
"public function get_all_public_items () {\n\t\treturn array();\n\t}",
"public function isPublished()\n {\n if ($this->getStatus() === self::PUBLISHED) {\n return true;\n }\n\n if ($this->getStatus() === self::SCHEDULED) {\n return $this->getPublishedAt() <= new \\DateTime();\n }\n\n return false;\n }",
"public function index()\n {\n $items = Item::with(['category'])->get();\n\n return view('pages.item.index',[\n 'items' => $items\n ]);\n }",
"public function GetPublished()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n return $this->_published_search;\n }",
"protected function hasAccessOnPublished()\n\t{\n\t\treturn $this->User->hasAccess($GLOBALS['TL_DCA'][$this->strTable]['config']['ptable'] . '::published', 'alexf');\t\t\n\t}",
"public function actionIndex()\n {\n $query = Article::find()->published()->with('category', 'tags');\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => ['defaultPageSize' => 10],\n ]);\n\n $dataProvider->sort = [\n 'defaultOrder' => ['created_at' => SORT_DESC],\n ];\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n 'menuItems' => self::getMenuItems(),\n ]);\n }",
"public function getAllPublishedPosts() \n\t{\n $q = \"SELECT * FROM in_posts WHERE publish_flag = 1 ORDER BY publish_time DESC\";\n $ps = $this->execute($q);\n $result = $this->getDataRowsAsObjects($ps, 'Post');\n return $result;\n }",
"public function scopePublished($query)\n\t{\n\t\t$query->where('published_at', '<=', Carbon::now());\n\t}",
"public function index()\n {\n $items = Item::orderBy('created_at', 'desc')->paginate(5);\n return view('admin.item.index', compact('items'));\n }",
"public function index()\n {\n $articles = Article::where('published_at', '<', Carbon::now())\n ->orderBy('created_at', 'desc')\n ->get();\n return view('articles.index', compact('articles'));\n }"
] | [
"0.7028043",
"0.68847245",
"0.67490226",
"0.65963566",
"0.65814364",
"0.6525952",
"0.647258",
"0.64674944",
"0.64674944",
"0.64674944",
"0.64674944",
"0.64674944",
"0.64674944",
"0.64674944",
"0.64674944",
"0.64674944",
"0.64674944",
"0.64674944",
"0.64674944",
"0.64674944",
"0.6444664",
"0.63714594",
"0.63563883",
"0.6345814",
"0.6255642",
"0.6247236",
"0.6171821",
"0.61616516",
"0.6156555",
"0.6147343",
"0.61450845",
"0.61341417",
"0.611989",
"0.60037804",
"0.598973",
"0.5981424",
"0.59807914",
"0.59689265",
"0.5965777",
"0.5953136",
"0.5931352",
"0.5908114",
"0.59010327",
"0.5884624",
"0.5876901",
"0.5866957",
"0.5863188",
"0.5842425",
"0.5841625",
"0.5839066",
"0.5836063",
"0.5816679",
"0.58109206",
"0.5804642",
"0.58010983",
"0.5797118",
"0.5796",
"0.578906",
"0.5783314",
"0.57829565",
"0.57677794",
"0.57568586",
"0.57566464",
"0.5747169",
"0.5731187",
"0.57251954",
"0.5695224",
"0.56942916",
"0.56821644",
"0.56816536",
"0.5665625",
"0.56549144",
"0.5654461",
"0.5648547",
"0.5643442",
"0.56403506",
"0.5636148",
"0.56287724",
"0.56063104",
"0.55926335",
"0.55925035",
"0.5581134",
"0.5579948",
"0.5574428",
"0.55725455",
"0.55677617",
"0.5567132",
"0.55647576",
"0.55646574",
"0.5563152",
"0.55544573",
"0.5546281",
"0.5535948",
"0.55326855",
"0.55261856",
"0.55248576",
"0.5521417",
"0.551883",
"0.5512825",
"0.55043274",
"0.55041"
] | 0.0 | -1 |
Shows only draft items. | public function draft(): self
{
$this->andWhere(['{{%task}}.[[status]]' => TaskRecord::STATUS_NOT_ACTIVE]);
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function drafts()\n {\n return self::where('published', '=', false)->get();\n }",
"public function drafts()\n {\n $postsQuery = Post::unpublished();\n $posts = $postsQuery->paginate();\n return view('posts.drafts', compact('posts'));\n }",
"public function drafts()\n {\n $rqsQuery = RequestModel::all();\n\n $rqs = $rqsQuery;\n $id = Auth::user()->id;\n $user = User::where('id', $id)->first();\n if ($user->inRole('admin')) {\n $rqs = $rqsQuery->where('status', '<>', 'Close');\n }\n if ($user->inRole('user')) {\n $rqs = $rqsQuery->where('user_id', Auth::user()->id);\n }\n if ($user->inRole('manager')) {\n $rqs = $rqsQuery->where('manager', $user->name);\n }\n return view('requests.drafts', compact('rqs'));\n }",
"public function index()\n {\n $items = Item::where(\"user_id\", '=', Auth::id())->get();\n $drafts = Item::onlyTrashed()->where(\"user_id\", '=', Auth::id())->get();\n $user = User::find(Auth::id());\n\n return view('items', compact('items','drafts', 'user'));\n }",
"public function getDrafts()\n {\n $mostRecommended = Post::mostRecommended();\n $last = Post::lastPosts()\n ->orderBy('created_at')\n ->where('public', 0)\n ;\n\n $categories = PostCategory::all();\n\n $drafts = Post::where('public', 0)->get();\n\n $last = $last->paginate(4);\n\n return View('blog/index',\n array(\n 'title'=>\"News\",\n 'mostRecommended'=>$mostRecommended,\n 'last'=>$last,\n 'categories' => $categories,\n 'category' => \"Drafts\" , \n 'drafts' => $drafts\n )\n );\n }",
"public static function drafted()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->drafted();\n }",
"public function isDraft();",
"public function isDraft();",
"public function isDraft();",
"public function draftPost()\n {\n \t$posts = Post::where([['status', 0], ['user_id', auth()->id()]])->get();\n \t$countPublicPosts = Post::where([['status', 1], ['user_id', auth()->id()]])->count();\n\n \treturn view('users.posts.draft', compact('posts', 'countPublicPosts'));\n }",
"public static function withDrafted()\n {\n return (new static )->newQueryWithoutScope(new ContentPublishingScope())->withDrafted();\n }",
"public function index()\n {\n //\n $user = auth()->user();\n $drafts = Draft::where(['user_id' => $user->id])->get();\n\n $n = Notification::where([\"user_id\" => auth()->user()->id, \"read\" => \"no\"])->get();\n\n return view(\"drafts.index\", compact(\"drafts\", \"user\", \"n\"));\n }",
"public function isDraft()\n {\n return $this->publish_status == Status::DRAFT;\n }",
"public function setAsDraft();",
"public function getDrafts()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('drafts');\n }",
"public function isDraft() {\n return $this->getEditingStatus() != '';\n }",
"public function isDraft() {\r\n return $this->isDraft;\r\n }",
"public function isDraft()\n {\n return ($this->getData('draft')) ? true : false;\n }",
"public function getDrafts($value='')\n {\n // get current logged in user\n $uid = \\Auth::user()->id;\n\n // get all the drafts events from this user\n $events = User::find($uid)->events->where('status', '=', 0);\n\n // load the view and pass the events\n return view('admin.events.index')\n ->with('events', $events);\n }",
"protected function set_draft_bulk_actions() {\n\t\t\t\n\t\t\t$post_id = '';\n\t\t\tif ( ! empty( $_GET['post_id'] ) ) {\n\t\t\t\t$post_id = (int) sanitize_text_field($_GET['post_id']);\n\t\t\t}\n\t\t\t?>\n\t\t\t<div class=\"wrap\">\n\t\t\t\t<h1>WPGlobus :: <?php esc_html_e( 'Set Draft', 'wpglobus-plus' ); ?></h1>\n\t\t\t\t<hr />\n\t\t\t\t<?php\n\t\t\t\t$params = array();\n\t\t\t\tif ( ! empty($post_id) && $post_id > 0 ) {\n\t\t\t\t\t$this->process_by_post_id($post_id, $_GET['lang']);\n\t\t\t\t\t$params['post_id'] = $post_id;\n\t\t\t\t}\n\t\t\t\t$this->back_button('bulk-actions', $params);\n\t\t\t\t?>\n\t\t\t</div><!-- .wrap -->\t<?php\n\t\t}",
"public function show($id)\n {\n //\n $user = auth()->user();\n $draft = Draft::where([\"id\" => $id])->first();\n $n = Notification::where([\"user_id\" => auth()->user()->id, \"read\" => \"no\"])->get();\n return view(\"drafts.show\", compact(\"draft\", \"user\", \"n\"));\n }",
"public function isDraft()\n {\n return $this->isInStatus($this::DRAFT);\n }",
"public function drafts()\n {\n if (is_a($this->drafts, 'Kirby\\Cms\\Pages') === true) {\n return $this->drafts;\n }\n\n $kirby = $this->kirby();\n\n // create the inventory for all drafts\n $inventory = Dir::inventory(\n $this->root() . '/_drafts',\n $kirby->contentExtension(),\n $kirby->contentIgnore(),\n $kirby->multilang()\n );\n\n return $this->drafts = Pages::factory($inventory['children'], $this, true);\n }",
"public function hasDrafts(): bool\n {\n return $this->drafts()->count() > 0;\n }",
"public function getDraft(Filter $filter): Collection;",
"public function user_posts_draft(Request $request)\n {\n //\n $user = $request->user();\n $posts = Posts::where('author_id',$user->id)->where('active',0)->orderBy('created_at','desc')->paginate(5);\n $title = $user->name;\n return view('home')->withPosts($posts)->withTitle($title);\n }",
"public function isDraft() {\n return $this->state === self::STATUS_DRAFT;\n }",
"function wp_dashboard_recent_drafts($drafts = \\false)\n {\n }",
"public function get_unapproved_items() {\n return $this->query(\"SELECT * FROM `items` where NOT `approved` order by `premium` desc, `date`\");\n }",
"public function showFavoritesOnly()\n {\n $this->displayOnlyFavorites = true;\n }",
"function get_users_drafts($user_id)\n {\n }",
"public function index()\n {\n $drafts = Draft::latest()->get();\n\n if ($drafts->count() < 1) {\n return response()->json([\n 'data' => [],\n 'status' => 'info',\n 'message' => 'No data found!'\n ], 404);\n }\n\n return response()->json([\n 'data' => $drafts,\n 'status' => 'success',\n 'message' => 'Draft List'\n ], 200);\n }",
"public function is_submission_draft($itemid) {\n return false;\n }",
"public function showSoftDeleted()\n {\n $posts = Post::onlyTrashed()->get();\n return view('admin-posts', ['posts' => $posts]);\n }",
"public function set_draft_single_action() {\n\t\t\t?>\n\t\t\t<div class=\"wrap\">\n\t\t\t\t<h1>WPGlobus :: <?php esc_html_e( 'Set Draft', 'wpglobus-plus' ); ?></h1>\n\t\t\t\t<hr />\n\t\t\t\t<?php\n\n\t\t\t\t$ok_to_process = true;\n\n\t\t\t\t// Check for required parameters.\n\t\t\t\tif ( empty( $_GET['lang'] ) || empty( $_GET['post_type'] ) ) {\n\t\t\t\t\tesc_html_e( 'URL format', 'wpglobus-plus' );\n\t\t\t\t\techo \": &lang=...&post_type=...\";\n\n\t\t\t\t\t$ok_to_process = false;\n\t\t\t\t}\n\n\t\t\t\t// Check if language is one of the enabled\n\t\t\t\t$language = $_GET['lang'];\n\t\t\t\tif ( ! WPGlobus_Utils::is_enabled( $language ) ) {\n\t\t\t\t\techo '<p>';\n\t\t\t\t\tesc_html_e( 'Unknown language', 'wpglobus-plus' );\n\t\t\t\t\techo ': ' . esc_html( $language );\n\t\t\t\t\techo '</p>';\n\n\t\t\t\t\t$ok_to_process = false;\n\t\t\t\t}\n\n\t\t\t\t$post_type = $_GET['post_type'];\n\n\t\t\t\t/**\n\t\t\t\t * Filter the array of disabled entities on page of module Publish.\n\t\t\t\t *\n\t\t\t\t * @since 1.1.22\n\t\t\t\t * @scope admin\n\t\t\t\t *\n\t\t\t\t * @param array WPGlobus::Config()->disabled_entities Array of disabled entities.\n\t\t\t\t */\n\t\t\t\t$disabled_entities = apply_filters( 'wpglobus_plus_publish_bulk_disabled_entities', WPGlobus::Config()->disabled_entities );\n\n\t\t\t\tif ( in_array( $post_type, $disabled_entities, true ) ) {\n\t\t\t\t\techo '<p>';\n\t\t\t\t\tesc_html_e( 'Disabled post type', 'wpglobus-plus' );\n\t\t\t\t\techo ': <strong>' . esc_html( $post_type ) . '</strong>';\n\t\t\t\t\techo '</p>';\n\n\t\t\t\t\t$ok_to_process = false;\n\t\t\t\t}\n\n\t\t\t\tif ( $ok_to_process ) {\n\n\t\t\t\t\techo '<h2>';\n\t\t\t\t\techo esc_html( sprintf(\n\t\t\t\t\t\t__( 'Setting as \"draft\" all records with post type \"%1$s\" for language \"%2$s\"',\n\t\t\t\t\t\t\t'wpglobus-plus' ),\n\t\t\t\t\t\t$post_type, $language\n\t\t\t\t\t) );\n\t\t\t\t\techo '</h2>';\n\t\t\t\t\techo '<hr/>';\n\n\t\t\t\t\t// Get all posts with the specified type\n\t\t\t\t\t$posts = get_posts( array(\n\t\t\t\t\t\t'numberposts' => - 1,\n\t\t\t\t\t\t'post_type' => $post_type,\n\t\t\t\t\t\t'orderby' => 'ID',\n\t\t\t\t\t\t'order' => 'ASC'\n\t\t\t\t\t) );\n\n\t\t\t\t\t// Loop through the posts\n\t\t\t\t\tforeach ( $posts as $post ) {\n\n\t\t\t\t\t\t$order = array(\n\t\t\t\t\t\t\t'action' \t=> 'set_status',\n\t\t\t\t\t\t\t'post_id' \t=> $post->ID,\n\t\t\t\t\t\t\t'language'\t=> $language,\n\t\t\t\t\t\t\t'status'\t=> 'draft'\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$result = $this->set_status( $order );\n\n\t\t\t\t\t\t// Print the post title and link to edit\n\t\t\t\t\t\tprintf(\n\t\t\t\t\t\t\t'<a href=\"%s\">%s</a> : %s : ',\n\t\t\t\t\t\t\tadmin_url( '/post.php?post=' . $post->ID . '&action=edit' ),\n\t\t\t\t\t\t\t$post->ID,\n\t\t\t\t\t\t\tesc_html( apply_filters( 'the_title', $post->post_title ) )\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\techo $result[ 'message' ];\n\n\t\t\t\t\t\techo '<br/>';\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( count( $posts ) === 0 ) {\n\t\t\t\t\t\tesc_html_e( 'No records found.', 'wpglobus-plus' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo '<br/>';\n\t\t\t\t\t\tesc_html_e( 'Done.', 'wpglobus-plus' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->back_button('single-action');\n\t\t\t\t?>\n\t\t\t</div><!-- .wrap -->\t\n\t\t\t<?php\n\t\t}",
"public function isNotDraft()\n {\n return ! $this->isDraft();\n }",
"function get_others_drafts($user_id)\n {\n }",
"public function getDraft() : bool\n {\n return $this->draft;\n }",
"public function showAllForums()\n {\n $this->displayOnlyFavorites = false;\n }",
"public static function display( $title = null, $userID = null ) {\n\t\tglobal $wgRequest;\n\n\t\t// Gets draftID\n\t\t$currentDraft = Draft::newFromID( $wgRequest->getIntOrNull( 'draft' ) );\n\t\t// Output HTML for list of drafts\n\t\t$drafts = self::get( $title, $userID );\n\t\tif ( $drafts !== null ) {\n\t\t\t$html = '';\n\t\t\t$context = RequestContext::getMain();\n\t\t\t$user = $context->getUser();\n\t\t\t$lang = $context->getLanguage();\n\t\t\t$editToken = $user->getEditToken();\n\n\t\t\t// Build XML\n\t\t\t$html .= Xml::openElement( 'table',\n\t\t\t\t[\n\t\t\t\t\t'cellpadding' => 5,\n\t\t\t\t\t'cellspacing' => 0,\n\t\t\t\t\t'width' => '100%',\n\t\t\t\t\t'border' => 0,\n\t\t\t\t\t'id' => 'drafts-list-table'\n\t\t\t\t]\n\t\t\t);\n\n\t\t\t$html .= Xml::openElement( 'tr' );\n\t\t\t$html .= Xml::element( 'th',\n\t\t\t\t[ 'width' => '75%', 'nowrap' => 'nowrap' ],\n\t\t\t\twfMessage( 'drafts-view-article' )->text()\n\t\t\t);\n\t\t\t$html .= Xml::element( 'th',\n\t\t\t\tnull,\n\t\t\t\twfMessage( 'drafts-view-saved' )->text()\n\t\t\t);\n\t\t\t$html .= Xml::element( 'th' );\n\t\t\t$html .= Xml::closeElement( 'tr' );\n\t\t\t// Add existing drafts for this page and user\n\t\t\t/**\n\t\t\t * @var $draft Draft\n\t\t\t */\n\t\t\tforeach ( $drafts as $draft ) {\n\t\t\t\t// Get article title text\n\t\t\t\t$htmlTitle = htmlspecialchars( $draft->getTitle()->getPrefixedText() );\n\t\t\t\t// Build Article Load link\n\t\t\t\t$urlLoad = $draft->getTitle()->getFullURL(\n\t\t\t\t\t'action=edit&draft=' . urlencode( (string)$draft->getID() )\n\t\t\t\t);\n\t\t\t\t// Build discard link\n\t\t\t\t$urlDiscard = SpecialPage::getTitleFor( 'Drafts' )->getFullURL(\n\t\t\t\t\tsprintf( 'discard=%s&token=%s',\n\t\t\t\t\t\turlencode( (string)$draft->getID() ),\n\t\t\t\t\t\turlencode( $editToken )\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t// If in edit mode, return to editor\n\t\t\t\tif (\n\t\t\t\t\t$wgRequest->getRawVal( 'action' ) === 'edit' ||\n\t\t\t\t\t$wgRequest->getRawVal( 'action' ) === 'submit'\n\t\t\t\t) {\n\t\t\t\t\t$urlDiscard .= '&returnto=' . urlencode( 'edit' );\n\t\t\t\t}\n\t\t\t\t// Append section to titles and links\n\t\t\t\tif ( $draft->getSection() !== null ) {\n\t\t\t\t\t// Detect section name\n\t\t\t\t\t$lines = explode( \"\\n\", $draft->getText() );\n\n\t\t\t\t\t// If there is any content in the section\n\t\t\t\t\tif ( count( $lines ) > 0 ) {\n\t\t\t\t\t\t$htmlTitle .= '#' . htmlspecialchars(\n\t\t\t\t\t\t\ttrim( trim( substr( $lines[0], 0, 255 ), '=' ) )\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\t// Modify article link and title\n\t\t\t\t\t$urlLoad .= '§ion=' . urlencode( (string)$draft->getSection() );\n\t\t\t\t\t$urlDiscard .= '§ion=' .\n\t\t\t\t\t\turlencode( (string)$draft->getSection() );\n\t\t\t\t}\n\t\t\t\t// Build XML\n\t\t\t\t$html .= Xml::openElement( 'tr' );\n\t\t\t\t$html .= Xml::openElement( 'td' );\n\t\t\t\t$html .= Xml::tags( 'a',\n\t\t\t\t\t[\n\t\t\t\t\t\t'href' => $urlLoad,\n\t\t\t\t\t\t'class' => 'mw-draft-load-link',\n\t\t\t\t\t\t'data-draft-id' => $draft->getID(),\n\t\t\t\t\t\t'style' => 'font-weight:' .\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t$currentDraft->getID() == $draft->getID() ?\n\t\t\t\t\t\t\t\t\t'bold' : 'normal'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t],\n\t\t\t\t\t$htmlTitle\n\t\t\t\t);\n\t\t\t\t$html .= Xml::closeElement( 'td' );\n\t\t\t\t$html .= Xml::element( 'td',\n\t\t\t\t\tnull,\n\t\t\t\t\t$lang->getHumanTimestamp( MWTimestamp::getInstance( $draft->getSaveTime() ), null, $user )\n\t\t\t\t);\n\t\t\t\t$html .= Xml::openElement( 'td' );\n\t\t\t\t$html .= Xml::element( 'a',\n\t\t\t\t\t[\n\t\t\t\t\t\t'href' => $urlDiscard,\n\t\t\t\t\t\t'class' => 'mw-discard-draft-link'\n\t\t\t\t\t],\n\t\t\t\t\twfMessage( 'drafts-view-discard' )->text()\n\t\t\t\t);\n\t\t\t\t$html .= Xml::closeElement( 'td' );\n\t\t\t\t$html .= Xml::closeElement( 'tr' );\n\t\t\t}\n\t\t\t$html .= Xml::closeElement( 'table' );\n\t\t\t// Return html\n\t\t\treturn $html;\n\t\t}\n\t\treturn '';\n\t}",
"function no_items() {\n\t\techo apply_filters( 'bdpp_style_no_item_msg', esc_html__('No style found', 'blog-designer-pack') );\n\t}",
"public function pending()\n {\n $this->viewData['index'] = [\n 'topics' => Topic::withoutGlobalScope(ApprovedTopicScope::class)\n ->pending()\n ->paginate(),\n 'filter' => 'pending',\n ];\n\n return parent::contentIndex();\n }",
"public static function isDrafted()\n\t{\n\t\t$app = Factory::getApplication();\n\t\t$template = $app->getTemplate(true);\n\t\t$templateId = 0;\n\n\t\tif ($app->isClient('site'))\n\t\t{\n\t\t\t$templateId = $template->id;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($app->input->get('option') === 'com_ajax' && $app->input->get('helix') === 'ultimate')\n\t\t\t{\n\t\t\t\t$templateId = $app->input->get('id', 0, 'INT');\n\t\t\t}\n\t\t}\n\n\t\t$draftKeyOptions = [\n\t\t\t'option' => 'com_ajax',\n\t\t\t'helix' => 'ultimate',\n\t\t\t'status' => 'draft',\n\t\t\t'id' => $templateId\n\t\t];\n\n\t\t$key = self::generateKey($draftKeyOptions);\n\t\t$cache = new HelixCache($key);\n\n\t\treturn $cache->contains();\n\t}",
"public function showApprovedPost();",
"function show(){\n return view(\"admin.post.list\") ;\n }",
"public function my_is_not_approved()\n {\n $user = User::all();\n $category = Category::all();\n $posts = Post::where('user_id',Auth::user()->id)->where('post_status', 0)->orWhere('post_status', 1)->orWhere('post_status', 3)->orderBy('post_id', 'DESC')->paginate(15);\n return view('admin.my_post.is_not_approved', compact('posts', 'category', 'user'));\n }",
"public function make_auto_draft_status_previewable()\n {\n }",
"public function draft_discard() {\n\n\t\t// Delete all the current draft content\n\t\treturn $this->save($this->_get_current_data(), 0, 'draft_discard');\n\t}",
"function wppb_hide_rf_publishing_actions(){\r\n\tglobal $post;\r\n\r\n\tif ( $post->post_type == 'wppb-rf-cpt' ){\r\n\t\techo '<style type=\"text/css\">#misc-publishing-actions, #minor-publishing-actions{display:none;}</style>';\r\n\t\t\r\n\t\t$rf = get_posts( array( 'posts_per_page' => -1, 'post_status' => apply_filters ( 'wppb_check_singular_rf_form_publishing_options', array( 'publish' ) ) , 'post_type' => 'wppb-rf-cpt' ) );\r\n\t\tif ( count( $rf ) == 1 )\r\n\t\t\techo '<style type=\"text/css\">#major-publishing-actions #delete-action{display:none;}</style>';\r\n\t}\r\n}",
"public function scopeDraft($query)\n {\n return $query->whereStatus(self::STATUS_DRAFT);\n }",
"public function get_approved_items() {\n return $this->query(\"SELECT * FROM `items` where `approved` order by `premium`, `date`\");\n }",
"public function draft_publish()\n\t{\n\t\t$where = array(\n\t\t\t'parent_entry_id' => $this->settings['entry_id'],\n\t\t\t'parent_is_draft' => 0\n\t\t);\n\t\t$this->EE->db->where($where)->delete('playa_relationships');\n\n\t\t$where['parent_is_draft'] = 1;\n\t\t$update = array('parent_is_draft' => 0);\n\t\t$this->EE->db->where($where)->update('playa_relationships', $update);\n\n\t\treturn;\n\t}",
"public function draft_question()\n\t{\n\n\t\t$data['rs'] = $this->lib_model->Select('m_addques', 'id,createdBy,name,about,status,subjectcode,createdBy', array('createdBy' => $this->session->EmpId,'status' => 4));\n\trsort($data['rs']);\n\t\n\t\t$this->load->view('f/f_header', $data);\n\t\t$this->load->view('f/draft_ques_list');\n\t\t$this->load->view('f/f_footer');\n\t}",
"public function hasIsDraft()\n {\n return $this->IsDraft !== null;\n }",
"function draft($ids) {\n if (!is_array($ids)) {\n $ids = array(intval($ids));\n }\n $ids = join(', ', $ids);\n $this->query(\"UPDATE {$this->useTable} SET draft = 1 WHERE id IN ($ids)\");\n }",
"public function nonVisible()\n {\n $visible = [];\n\n foreach ($this->items as $path => $slug) {\n $page = $this->pages->get($path);\n if ($page !== null && !$page->visible()) {\n $visible[$path] = $slug;\n }\n }\n $this->items = $visible;\n\n return $this;\n }",
"public function authorize()\n {\n return $this->user()->can('manage-drafts');\n }",
"public function getDraftInvoicesList(InvoiceListingFilter $filter): Collection;",
"public function actionIndex()\n\t{\t\t\t\t\n\t\t// Load premium items\n\t\t$sql = \"NOW() BETWEEN date_published AND date_end AND premium=true ORDER BY date_published DESC\";\n\t\t$items = Item::model()->findAll($sql);\n\t\t\n\t\t$data = array(\n\t\t\t'premium' => $items,\n\t\t);\n\t\t\n\t\t$this->render('index', $data);\n\t}",
"function show_news_approve_form($qpa_pending, $qpa_rejected, $qpa_approved) {\n\t/*\n\t\tShow list of waiting news items\n\t*/\n\n\t// function to show single news item\n\t// factored out because called 3 time below\n\tfunction show_news_item($row, $i, $approved, $selectable) {\n\t\tglobal $HTML;\n\n\t\techo '<tr '. $HTML->boxGetAltRowStyle($i) . '><td>';\n\t\tif ($selectable) {\n\t\t\techo '<input type=\"checkbox\" '\n\t\t\t.'name=\"news_id[]\" value=\"'\n\t\t\t.$row['id'].'\" />';\n\t\t}\n\t\techo date(_('Y-m-d'), $row['post_date']).'</td>\n\t\t<td width=\"45%\">';\n\t\techo '\n\t\t<a href=\"'.getStringFromServer('PHP_SELF').'?approve=1&id='.$row['id'].'\">'.$row['summary'].'</a>\n\t\t</td>\n\n\t\t<td class=\"onethirdwidth\">'\n\t\t.util_make_link_g ($row['unix_group_name'], $row['group_id'], $row['group_name'].' ('.$row['unix_group_name'].')')\n\t\t.'</td>\n\t\t</tr>'\n\t\t;\n\t}\n\n\t$title_arr = array(\n\t\t_('Date'),\n\t\t_('Subject'),\n\t\t_('Project')\n\t);\n\n\t$ra = RoleAnonymous::getInstance();\n\n\t$result = db_query_qpa($qpa_pending);\n\t$items = array();\n\twhile ($row_item = db_fetch_array($result)) {\n\t\tif ($ra->hasPermission('project_read', $row_item['group_id'])) {\n\t\t\t$items[] = $row_item;\n\t\t}\n\t}\n\t$rows = count($items);\n\n\tif ($rows < 1) {\n\t\techo '\n\t\t\t<h2>'._('No pending items found.').'</h2>';\n\t} else {\n\t\techo '<form action=\"'. getStringFromServer('PHP_SELF') .'\" method=\"post\">';\n\t\techo '<input type=\"hidden\" name=\"mass_reject\" value=\"1\" />';\n\t\techo '<input type=\"hidden\" name=\"post_changes\" value=\"y\" />';\n\t\techo '<h2>'.sprintf(_('These items need to be approved (total: %d)'), $rows).'</h2>';\n\t\techo $GLOBALS['HTML']->listTableTop($title_arr);\n\t\tfor ($i=0; $i < $rows; $i++) {\n\t\t\tshow_news_item($items[$i], $i, false,true);\n\t\t}\n\t\techo $GLOBALS['HTML']->listTableBottom();\n\t\techo '<br /><input type=\"submit\" name=\"submit\" value=\"'._('Reject Selected').'\" class=\"btn-cta\" />';\n\t\techo '</form>';\n\t}\n\n\n\t/*\n\t\tShow list of rejected news items for this week\n\t*/\n\n\t$result = db_query_qpa($qpa_rejected);\n\t$items = array();\n\twhile ($row_item = db_fetch_array($result)) {\n\t\tif ($ra->hasPermission('project_read', $row_item['group_id'])) {\n\t\t\t$items[] = $row_item;\n\t\t}\n\t}\n\t$rows = count($items);\n\n\tif ($rows < 1) {\n\t\techo '\n\t\t\t<h2>'._('No rejected items found for this week.').'</h2>';\n\t} else {\n\t\techo '<h2>'.sprintf(_('These items were rejected this past week or were not intended for front page (total: %d).'), $rows).'</h2>';\n\t\techo $GLOBALS['HTML']->listTableTop($title_arr);\n\t\tfor ($i=0; $i<$rows; $i++) {\n\t\t\tshow_news_item($items[$i], $i, false, false);\n\t\t}\n\t\techo $GLOBALS['HTML']->listTableBottom();\n\t}\n\n\t/*\n\t\tShow list of approved news items for this week\n\t*/\n\n\t$result = db_query_qpa($qpa_approved);\n\t$items = array();\n\twhile ($row_item = db_fetch_array($result)) {\n\t\tif ($ra->hasPermission('project_read', $row_item['group_id'])) {\n\t\t\t$items[] = $row_item;\n\t\t}\n\t}\n\t$rows = count($items);\n\tif ($rows < 1) {\n\t\techo '\n\t\t\t<h2>'._('No approved items found for this week.').'</h2>';\n\t} else {\n\t\techo '<h2>'.sprintf(_('These items were approved this past week (total: %d).'), $rows).'</h2>';\n\t\techo $GLOBALS['HTML']->listTableTop($title_arr);\n\t\tfor ($i=0; $i < $rows; $i++) {\n\t\t\tshow_news_item($items[$i], $i, false, false);\n\t\t}\n\t\techo $GLOBALS['HTML']->listTableBottom();\n\t}\n}",
"public function no_items() {\n\n\t\tif ( $this->is_filtered() ) {\n\t\t\tesc_html_e( 'No emails found.', 'wp-mail-smtp-pro' );\n\t\t} else {\n\t\t\tesc_html_e( 'No emails have been logged for now.', 'wp-mail-smtp-pro' );\n\t\t}\n\t}",
"public function showList(): void\n {\n \n $admin = filter_input(INPUT_GET, 'admin');\n $type = (isset($admin)) ? 'admin' : 'front';\n \n $path = 'posts-list';\n \n switch($type)\n {\n case 'front':\n $pageTitle = 'News';\n $condition = 'status = '.self::STATUS_APPROVED.' AND publication_date <= NOW()'; // only approved and published posts\n $order = 'publication_date DESC';\n $filter_com = true; // count only approved comments in getComments function\n break;\n case 'admin':\n $this->checkAccess(); // redirect to login page if not connected\n $pageTitle = 'Gérer les posts';\n $condition = '1 = 1';\n // If user is not admin, he can only see his own posts\n if(!($this->isAdmin())) $condition = 'author = '.$_SESSION['user_id'];\n $order = 'last_update_date DESC';\n $filter_com = false; // count all comments (= approved or not) in getComments function\n break;\n }\n\n $posts = $this->model->findAll($condition, $order);\n\n foreach ($posts as $post)\n { \n $post->nb_comments = $post->getComments($filter_com, true); // get the number of comments on the post (only approved ones in public list)\n }\n\n $this->display($type, $path, $pageTitle, compact('posts'));\n }",
"function _wp_delete_orphaned_draft_menu_items()\n {\n }",
"public function admin() {\n $items = Item::orderBy('id','DESC')->paginate(15);\n return view('dashboard.item.item',compact('items'));\n }",
"public function getDisplayOnlyFavorites()\n {\n return $this->displayOnlyFavorites;\n }",
"public function index()\n {\n abort_unless(\\Gate::allows('item_access'), 403);\n\n $item = Item::all();\n\n return view('admin.item.index', compact('item'));\n }",
"public function readAll2()\n {\n show_view('views/admin/post/create.php', ['bodyParts' => BodyPart::all()]);\n }",
"public function get_drafts($args)\n\t\t{\n\t\t\t// Set only drafts posts\n\t\t\t$this->set_files_by_draft();\n\n\t\t\tif($this->files_count > 0)\n\t\t\t\treturn $this->get_list_by($args['page'], $args['amount']);\n\n\t\t\treturn array();\n\t\t}",
"function renderList(array $items, $a_cmd = \"preview\", $a_link_template = null, $a_show_inactive = false, $a_export_directory = null)\n\t{\n\t\tglobal $lng, $ilCtrl;\n\t\t\n\t\tinclude_once \"Services/Calendar/classes/class.ilCalendarUtil.php\";\n\t\t$wtpl = new ilTemplate(\"tpl.blog_list.html\", true, true, \"Modules/Blog\");\n\t\t\n\t\t// quick editing in portfolio\n\t\tif($_REQUEST[\"prt_id\"] && \n\t\t\tstristr($a_cmd, \"embedded\"))\n\t\t{\t\t\n\t\t\tglobal $ilUser;\n\t\t\tif(ilObject::_lookupOwner($_REQUEST[\"prt_id\"]) == $ilUser->getId())\n\t\t\t{\t\t\t\t\n\t\t\t\t// see ilPortfolioPageTableGUI::fillRow()\n\t\t\t\t$ilCtrl->setParameterByClass(\"ilportfoliopagegui\", \"ppage\", (int)$_REQUEST[\"user_page\"]);\n\t\t\t\t$link = $ilCtrl->getLinkTargetByClass(array(\"ilportfoliopagegui\", \"ilobjbloggui\"), \"render\");\n\t\t\t\t$ilCtrl->setParameterByClass(\"ilportfoliopagegui\", \"ppage\", \"\");\n\t\t\t\t\n\t\t\t\t$wtpl->setCurrentBlock(\"prtf_edit_bl\");\n\t\t\t\t$wtpl->setVariable(\"PRTF_BLOG_URL\", $link);\n\t\t\t\t$wtpl->setVariable(\"PRTF_BLOG_TITLE\", sprintf($lng->txt(\"prtf_edit_embedded_blog\"), $this->object->getTitle()));\n\t\t\t\t$wtpl->parseCurrentBlock();\n\t\t\t}\n\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t$can_approve = ($this->object->hasApproval() && $this->checkPermissionBool(\"write\"));\n\t\t$can_deactivate = $this->checkPermissionBool(\"write\");\n\t\t\n\t\tinclude_once(\"./Modules/Blog/classes/class.ilBlogPostingGUI.php\");\t\n\t\t$last_month = null;\n\t\t$is_empty = true;\n\t\tforeach($items as $item)\n\t\t{\t\t\t\n\t\t\t// only published items\n\t\t\t$is_active = ilBlogPosting::_lookupActive($item[\"id\"], \"blp\");\n\t\t\tif(!$is_active && !$a_show_inactive)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$is_empty = false;\n\t\t\t\n\t\t\tif(!$this->keyword && !$this->author)\n\t\t\t{\n\t\t\t\t$month = substr($item[\"created\"]->get(IL_CAL_DATE), 0, 7);\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(!$last_month || $last_month != $month)\n\t\t\t{\n\t\t\t\tif($last_month)\n\t\t\t\t{\n\t\t\t\t\t$wtpl->setCurrentBlock(\"month_bl\");\n\t\t\t\t\t$wtpl->parseCurrentBlock();\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t// title according to current \"filter\"/navigation\n\t\t\t\tif($this->keyword)\n\t\t\t\t{\n\t\t\t\t\t$title = $lng->txt(\"blog_keyword\").\": \".$this->keyword;\n\t\t\t\t}\n\t\t\t\telse if($this->author)\n\t\t\t\t{\n\t\t\t\t\tinclude_once \"Services/User/classes/class.ilUserUtil.php\";\n\t\t\t\t\t$title = $lng->txt(\"blog_author\").\": \".ilUserUtil::getNamePresentation($this->author);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tinclude_once \"Services/Calendar/classes/class.ilCalendarUtil.php\";\n\t\t\t\t\t$title = ilCalendarUtil::_numericMonthToString((int)substr($month, 5)).\n\t\t\t\t\t\t\t\" \".substr($month, 0, 4);\n\t\t\t\t\t\n\t\t\t\t\t$last_month = $month;\n\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t$wtpl->setVariable(\"TXT_CURRENT_MONTH\", $title);\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(!$a_link_template)\n\t\t\t{\n\t\t\t\t$ilCtrl->setParameterByClass(\"ilblogpostinggui\", \"bmn\", $this->month);\n\t\t\t\t$ilCtrl->setParameterByClass(\"ilblogpostinggui\", \"blpg\", $item[\"id\"]);\n\t\t\t\t$preview = $ilCtrl->getLinkTargetByClass(\"ilblogpostinggui\", $a_cmd);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$preview = $this->buildExportLink($a_link_template, \"posting\", $item[\"id\"]);\n\t\t\t}\n\n\t\t\t// actions\t\t\t\t\t\n\t\t\t$item_contribute = $this->mayContribute($item[\"id\"], $item[\"author\"]);\n\t\t\tif(($item_contribute || $can_approve || $can_deactivate) && !$a_link_template && $a_cmd == \"preview\")\n\t\t\t{\n\t\t\t\tinclude_once(\"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php\");\n\t\t\t\t$alist = new ilAdvancedSelectionListGUI();\n\t\t\t\t$alist->setId($item[\"id\"]);\n\t\t\t\t$alist->setListTitle($lng->txt(\"actions\"));\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tif($is_active && $this->object->hasApproval() && !$item[\"approved\"])\n\t\t\t\t{\n\t\t\t\t\tif($can_approve)\n\t\t\t\t\t{\n\t\t\t\t\t\t$ilCtrl->setParameter($this, \"apid\", $item[\"id\"]);\n\t\t\t\t\t\t$alist->addItem($lng->txt(\"blog_approve\"), \"approve\", \n\t\t\t\t\t\t\t$ilCtrl->getLinkTarget($this, \"approve\"));\n\t\t\t\t\t\t$ilCtrl->setParameter($this, \"apid\", \"\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$wtpl->setVariable(\"APPROVAL\", $lng->txt(\"blog_needs_approval\"));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($item_contribute)\n\t\t\t\t{\n\t\t\t\t\t$alist->addItem($lng->txt(\"edit_content\"), \"edit\", \n\t\t\t\t\t\t$ilCtrl->getLinkTargetByClass(\"ilblogpostinggui\", \"edit\"));\n\t\t\t\t\t\n\t\t\t\t\t// #11858\n\t\t\t\t\tif($is_active)\n\t\t\t\t\t{\n\t\t\t\t\t\t$alist->addItem($lng->txt(\"blog_toggle_draft\"), \"deactivate\", \n\t\t\t\t\t\t\t$ilCtrl->getLinkTargetByClass(\"ilblogpostinggui\", \"deactivatePageToList\"));\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$alist->addItem($lng->txt(\"blog_toggle_final\"), \"activate\", \n\t\t\t\t\t\t\t$ilCtrl->getLinkTargetByClass(\"ilblogpostinggui\", \"activatePageToList\"));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$alist->addItem($lng->txt(\"rename\"), \"rename\", \n\t\t\t\t\t\t$ilCtrl->getLinkTargetByClass(\"ilblogpostinggui\", \"edittitle\"));\n\t\t\t\t\t\n\t\t\t\t\tif($this->object->hasKeywords()) // #13616\n\t\t\t\t\t{\n\t\t\t\t\t\t$alist->addItem($lng->txt(\"blog_edit_keywords\"), \"keywords\", \n\t\t\t\t\t\t\t$ilCtrl->getLinkTargetByClass(\"ilblogpostinggui\", \"editKeywords\"));\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$alist->addItem($lng->txt(\"blog_edit_date\"), \"editdate\", \n\t\t\t\t\t\t$ilCtrl->getLinkTargetByClass(\"ilblogpostinggui\", \"editdate\"));\n\t\t\t\t\t$alist->addItem($lng->txt(\"delete\"), \"delete\",\n\t\t\t\t\t\t$ilCtrl->getLinkTargetByClass(\"ilblogpostinggui\", \"deleteBlogPostingConfirmationScreen\"));\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if($can_deactivate)\n\t\t\t\t{\n\t\t\t\t\t// #10513\t\t\t\t\n\t\t\t\t\tif($is_active)\n\t\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t\t$ilCtrl->setParameter($this, \"apid\", $item[\"id\"]);\n\t\t\t\t\t\t$alist->addItem($lng->txt(\"blog_toggle_draft_admin\"), \"deactivate\", \n\t\t\t\t\t\t\t$ilCtrl->getLinkTarget($this, \"deactivateAdmin\"));\n\t\t\t\t\t\t$ilCtrl->setParameter($this, \"apid\", \"\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$alist->addItem($lng->txt(\"delete\"), \"delete\",\n\t\t\t\t\t\t$ilCtrl->getLinkTargetByClass(\"ilblogpostinggui\", \"deleteBlogPostingConfirmationScreen\"));\t\t\n\t\t\t\t}\n\n\t\t\t\t$wtpl->setCurrentBlock(\"actions\");\n\t\t\t\t$wtpl->setVariable(\"ACTION_SELECTOR\", $alist->getHTML());\n\t\t\t\t$wtpl->parseCurrentBlock();\n\t\t\t}\n\t\t\t\n\t\t\t// comments\n\t\t\tif($this->object->getNotesStatus() && !$a_link_template && !$this->disable_notes)\n\t\t\t{\n\t\t\t\t// count (public) notes\n\t\t\t\tinclude_once(\"Services/Notes/classes/class.ilNote.php\");\n\t\t\t\t$count = sizeof(ilNote::_getNotesOfObject($this->obj_id, \n\t\t\t\t\t$item[\"id\"], \"blp\", IL_NOTE_PUBLIC));\n\t\t\t\t\n\t\t\t\tif($a_cmd != \"preview\")\n\t\t\t\t{\n\t\t\t\t\t$wtpl->setCurrentBlock(\"comments\");\n\t\t\t\t\t$wtpl->setVariable(\"TEXT_COMMENTS\", $lng->txt(\"blog_comments\"));\n\t\t\t\t\t$wtpl->setVariable(\"URL_COMMENTS\", $preview);\n\t\t\t\t\t$wtpl->setVariable(\"COUNT_COMMENTS\", $count);\n\t\t\t\t\t$wtpl->parseCurrentBlock();\n\t\t\t\t}\n\t\t\t\t/* we disabled comments in edit mode (should always be done via pagegui)\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$hash = ilCommonActionDispatcherGUI::buildAjaxHash(ilCommonActionDispatcherGUI::TYPE_WORKSPACE, \n\t\t\t\t\t\t$this->node_id, \"blog\", $this->obj_id, \"blp\", $item[\"id\"]);\n\t\t\t\t\t$notes_link = \"#\\\" onclick=\\\"\".ilNoteGUI::getListCommentsJSCall($hash);\n\t\t\t\t}\n\t\t\t\t*/\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t// permanent link\n\t\t\tif($a_cmd != \"preview\" && $a_cmd != \"previewEmbedded\")\n\t\t\t{\n\t\t\t\tif($this->id_type == self::WORKSPACE_NODE_ID)\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\t$goto = $this->getAccessHandler()->getGotoLink($this->node_id, $this->obj_id, \"_\".$item[\"id\"]);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tinclude_once \"Services/Link/classes/class.ilLink.php\";\n\t\t\t\t\t$goto = ilLink::_getStaticLink($this->node_id, $this->getType(), true, \"_\".$item[\"id\"]);\n\t\t\t\t}\n\t\t\t\t$wtpl->setCurrentBlock(\"permalink\");\n\t\t\t\t$wtpl->setVariable(\"URL_PERMALINK\", $goto); \n\t\t\t\t$wtpl->setVariable(\"TEXT_PERMALINK\", $lng->txt(\"blog_permanent_link\"));\n\t\t\t\t$wtpl->parseCurrentBlock();\t\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t$snippet = ilBlogPostingGUI::getSnippet($item[\"id\"], \n\t\t\t\t$this->object->hasAbstractShorten(),\n\t\t\t\t$this->object->getAbstractShortenLength(),\n\t\t\t\t\"…\",\n\t\t\t\t$this->object->hasAbstractImage(),\n\t\t\t\t$this->object->getAbstractImageWidth(),\n\t\t\t\t$this->object->getAbstractImageHeight(),\n\t\t\t\t$a_export_directory);\t\n\t\t\t\n\t\t\tif($snippet)\n\t\t\t{\n\t\t\t\t$wtpl->setCurrentBlock(\"more\");\n\t\t\t\t$wtpl->setVariable(\"URL_MORE\", $preview); \n\t\t\t\t$wtpl->setVariable(\"TEXT_MORE\", $lng->txt(\"blog_list_more\"));\n\t\t\t\t$wtpl->parseCurrentBlock();\n\t\t\t}\n\t\t\t\n\t\t\t$wtpl->setCurrentBlock(\"posting\");\n\t\t\t\n\t\t\tif(!$is_active)\n\t\t\t{\n\t\t\t\t$wtpl->setVariable(\"DRAFT_CLASS\", \" ilBlogListItemDraft\");\n\t\t\t}\n\t\t\t\n\t\t\t$author = \"\";\n\t\t\tif($this->id_type == self::REPOSITORY_NODE_ID)\n\t\t\t{\t\t\t\t\n\t\t\t\t$author_id = $item[\"author\"];\n\t\t\t\tif($author_id)\n\t\t\t\t{\n\t\t\t\t\tinclude_once \"Services/User/classes/class.ilUserUtil.php\";\n\t\t\t\t\t$author = ilUserUtil::getNamePresentation($author_id).\" - \";\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// title\n\t\t\t$wtpl->setVariable(\"URL_TITLE\", $preview);\n\t\t\t$wtpl->setVariable(\"TITLE\", $item[\"title\"]);\n\t\t\t$wtpl->setVariable(\"DATETIME\", $author.\n\t\t\t\tilDatePresentation::formatDate($item[\"created\"], IL_CAL_DATE));\t\t\n\n\t\t\t// content\t\t\t\n\t\t\t$wtpl->setVariable(\"CONTENT\", $snippet);\t\t\t\n\n\t\t\t$wtpl->parseCurrentBlock();\n\t\t}\n\t\t\n\t\t// permalink\n\t\tif($a_cmd == \"previewFullscreen\")\n\t\t{\t\t\t\n\t\t\t$this->tpl->setPermanentLink(\"blog\", $this->node_id, \n\t\t\t\t($this->id_type == self::WORKSPACE_NODE_ID)\n\t\t\t\t? \"_wsp\"\n\t\t\t\t: \"\");\t\t\t\n\t\t}\n\t\t\n\t\tif(!$is_empty || $a_show_inactive)\n\t\t{\n\t\t\treturn $wtpl->get();\n\t\t}\n\t}",
"function workshop_view_attendees_list() {\n // Allow Attendees to be deleted\n if ( isset( $_GET['action'], $_GET[id], $_GET['_wpnonce'] ) && 'delete' == $_GET['action'] ) {\n // Make sure the user is who they say they are\n if ( ! wp_verify_nonce( $_GET['_wpnonce'], 'attendee-delete' ) ) {\n wp_die( esc_html__( \"Tsk, tsk. You can't do that.\", 'workshop' ) );\n }\n\n // Make sure the guest author actually exists\n } else {\n echo '<div class=\"wrap\">';\n echo '<div class=\"icon32\" id=\"icon-users\"><br></div>';\n echo '<h2>' . __( 'Attendees', 'workshop' );\n // @todo caps check for creating a new user\n $add_new_link = admin_url( \"post-new.php?post_type=attendee\" );\n echo '<a href=\"' . esc_url( $add_new_link ) . '\" class=\"add-new-h2\">' . esc_html__( 'Add New', 'workshop' ) . '</a>';\n echo '</h2>';\n $attendee_list_table = new Workshop_Attendees_WP_List_Table();\n $attendee_list_table->prepare_items();\n echo '<form id=\"workshop-attendees-filter\" action=\"\" method=\"GET\">';\n echo '<input type=\"hidden\" name=\"page\" value=\"view-workshop-attendees\" />';\n $attendee_list_table->display();\n echo '</form>';\n echo '</div>';\n }\n}",
"public function show($id)\n {\n // TODO: TEST THIS TO MAKE SURE IT WORKS\n $item = Item::find($id);\n return view('pages.modifyItems')->with('item', $item);\n }",
"public function notRead()\n {\n $notifications_query = \\Auth::user()->notifications()->noneRead();\n\n $notifications = $notifications_query->paginate(100);\n\n $notifications_query->update([\n 'read' => 1\n ]);\n\n return view('users::notifications.index', compact('notifications'));\n }",
"public function no_items() {\n\n\t\t\t_e( 'No items avaliable.', 'js_topic_manager' );\n\n\t\t}",
"public function show(Items $items)\n {\n //\n }",
"public static function published()\n {\n // return self::where('published',1)->get();\n return self::where('published',true);\n }",
"public function viewall(){\n\t\t$gallery = Gallery::orderBy('created_at', 'asc')->get();\n\t\t$obj_actions = [\n\t\t\t[\n\t\t\t\t'name' => 'Add',\n\t\t\t\t'route' => 'new',\n\t\t\t\t'method' => 'get',\n\t\t\t\t'button' => 'success'\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Edit',\n\t\t\t\t'route' => 'edit',\n\t\t\t\t'method' => 'get',\n\t\t\t\t'button' => 'secondary',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Delete',\n\t\t\t\t'route' => 'delete',\n\t\t\t\t'method' => 'post',\n\t\t\t\t'button' => 'danger'\n\t\t\t],\n\t\t];\n\t\treturn view('admin.viewitems')\n\t\t\t->with('publications', $gallery)\n\t\t\t->with('obj_actions', $obj_actions)\n\t\t\t->with('routeprefix', 'admin')\n\t\t\t->with('short_category', 'gallery')\n\t\t\t->with('category', 'Gallery Item')\n\t\t\t->with('addExists', true);\n\t}",
"static function listHiddenExhibit(){\n\t\t$res = requete_sql(\"SELECT id FROM exhibit WHERE visible = FALSE ORDER BY creation_date ASC\");\n\t\t$res = $res->fetchAll(PDO::FETCH_ASSOC);\n\t\t$list = array();\n\t\tforeach ($res as $exhibit) {\n\t\t\t$exhibit = new Exhibit($exhibit['id']);\n\t\t\tarray_push($list, $exhibit);\n\t\t}\n\t\treturn $list;\n\t}",
"public function scopeOnlyPublished($query)\n {\n return $query->where('published', 1);\n }",
"public function findOnlyPublished($id);",
"public function visible()\n {\n $visible = [];\n\n foreach ($this->items as $path => $slug) {\n $page = $this->pages->get($path);\n if ($page !== null && $page->visible()) {\n $visible[$path] = $slug;\n }\n }\n $this->items = $visible;\n\n return $this;\n }",
"public function index()\n {\n return view('publishers')->with('active_menu', 'publishers');\n }",
"public function actionUnpublishItems()\n {\n $civ = CatalogItemVariant::find()\n ->where(['published' => 0])\n ->asArray()\n ->all();\n\n if (!empty($civ)) {\n foreach ($civ as $ci) {\n $oCi = CatalogItem::findOne(['id' => $ci['product_id'], 'published' => 1]);\n if (!empty($oCi)) {\n $oCi->published = 0;\n $oCi->save();\n echo 'Unpublished catalog item id: ' . $ci['product_id'] . PHP_EOL;\n }\n }\n \n }\n }",
"public function show(Draft $draft)\n {\n return view('draft.show')\n ->with('draft', $draft);\n }",
"function view_items() {\n $items = \\Model\\Item::all();\n \n $this->SC->CP->load_view('stock/view_items',array('items'=>$items));\n }",
"public function edit(Draft $draft)\n {\n //\n }",
"public function nonPublished()\n {\n $published = [];\n\n foreach ($this->items as $path => $slug) {\n $page = $this->pages->get($path);\n if ($page !== null && !$page->published()) {\n $published[$path] = $slug;\n }\n }\n $this->items = $published;\n\n return $this;\n }",
"public function changeContentSortingAndCopyDraftPage() {}",
"public function scopePublished($query)\n {\n if (PreviewMode::fromRequest()->check()) {\n return;\n }\n\n $query->where('published', 1);\n }",
"function isVisible() {\n return ($this->entry->staff_id || $this->entry->user_id)\n && $this->entry->type != 'R' && $this->isEnabled();\n }",
"public function draftsGet($page_id = '') {\n\t\t$url = $this->draftsUrl($page_id);\n\n\t\t$output = $this->get($url);\n\t\treturn $this->parseOutput($output);\n\t}",
"public function index()\n {\n $posts = $this->srvPost->paginationPost(self::NUMBER_ITEM_POST_PER_PAGE, Post::POST_STATUS_PENDING);\n\n return view('admin.index', compact('posts'));\n }",
"public function getAvailableItemsOnly()\n {\n return $this->availableItemsOnly;\n }",
"public function actionVisible ()\n\t\t{\n\t\t\tif (Yii::$app->request->isAjax)\n\t\t\t{\n\t\t\t\t$id = Yii::$app->request->post('id');\n\t\t\t\t$menu = Menu::findOne($id);\n\t\t\t\tif ($menu !== null)\n\t\t\t\t{\n\t\t\t\t\t$menu->setAttribute('visible', $menu->visible == 1 ? 0 : 1);\n\t\t\t\t\tif (!$menu->save())\n\t\t\t\t\t\techo Json::encode(current($menu->firstErrors));\n\t\t\t\t\telse\n\t\t\t\t\t\techo $menu->visible;\n\t\t\t\t}\n\t\t\t}\n\t\t\tYii::$app->end();\n\t\t}",
"public static function showModeratedTopics()\n {\n \t$ini = eZINI::instance('site.ini.append.php');\n \tif ( !$ini->variable('SiteAccessSettings', 'ShowModeratedForumItems') )\n \t{\n \t\treturn false;\n \t}\n \t\n \treturn true;\n }",
"public function viewAll()\n {\n $items = Item::all();\n\n\n return view('pages.items')->with('items', $items);\n }",
"public static function getFeedItems()\n {\n return Post::where('published', true)->get();\n }",
"function filter_posts_toggle() {\n\n\t\t$is_private_filter_on = isset( $_GET['private_posts'] ) && 'private' == $_GET['private_posts'];\n\n\t\t?>\n\n\t\t<select name=\"private_posts\">\n\t\t\t<option <?php selected( $is_private_filter_on, false ); ?> value=\"public\">Public</option>\n\t\t\t<option <?php selected( $is_private_filter_on, true ); ?> value=\"private\">Private</option>\n\t\t</select>\n\n\t\t<?php\n\n\t}",
"public function selected()\n {\n $items = $this->postService::getSelectedPost('selected');\n\n\n return view('admin.pages.posts')->with(compact('items'));\n }",
"function genesisawesome_portfolio_items( $query ) {\n\n if( $query->is_main_query() && is_post_type_archive( 'portfolio' ) && ! is_admin() ) {\n $query->set( 'nopaging', true );\n }\n\n}",
"public function actionUnreadPosts()\r\n {\r\n if (Podium::getInstance()->user->isGuest) {\r\n $this->info(Yii::t('podium/flash', 'This page is available for registered users only.'));\r\n return $this->redirect(['account/login']);\r\n }\r\n return $this->render('unread-posts');\r\n }"
] | [
"0.6955797",
"0.69241834",
"0.65678054",
"0.65415156",
"0.6540532",
"0.6532885",
"0.65129197",
"0.65129197",
"0.65129197",
"0.63597995",
"0.63079834",
"0.62181413",
"0.62022847",
"0.6182741",
"0.613072",
"0.6081839",
"0.60727715",
"0.6064039",
"0.60354996",
"0.60297817",
"0.5959091",
"0.5930602",
"0.5905655",
"0.5894824",
"0.5872389",
"0.5867783",
"0.5846317",
"0.58301044",
"0.5741374",
"0.5731363",
"0.5714507",
"0.5690483",
"0.5688048",
"0.56668687",
"0.56618744",
"0.5642361",
"0.5624877",
"0.5609032",
"0.55994016",
"0.5590347",
"0.55184346",
"0.55125344",
"0.5508959",
"0.5484916",
"0.54427046",
"0.5434257",
"0.54283804",
"0.5416342",
"0.541298",
"0.539663",
"0.538095",
"0.5379726",
"0.5370014",
"0.53523904",
"0.53478754",
"0.5339762",
"0.5325253",
"0.5313151",
"0.5311283",
"0.53093106",
"0.5271635",
"0.5269631",
"0.5262012",
"0.5259798",
"0.52461535",
"0.52432543",
"0.52349156",
"0.52250814",
"0.5208162",
"0.52035517",
"0.52004945",
"0.5189952",
"0.51852536",
"0.5183735",
"0.51781785",
"0.51662314",
"0.5161442",
"0.51561993",
"0.5149485",
"0.5146633",
"0.5141794",
"0.51395947",
"0.5134343",
"0.513405",
"0.51319474",
"0.51300216",
"0.5129819",
"0.51297736",
"0.5119927",
"0.51196843",
"0.51002043",
"0.50983334",
"0.50931454",
"0.50930667",
"0.5078117",
"0.50774074",
"0.50746745",
"0.5074128",
"0.5069283",
"0.5067173"
] | 0.54139096 | 48 |
Uncomment if you want to allow posts from other domains | function slimasync($email,$folder,$rORe){
// header('Access-Control-Allow-Origin: *');
require_once('slim.php');
// get posted data, if something is wrong, exit
try {
$images = Slim::getImages();
}
catch (Exception $e) {
Slim::outputJSON(SlimStatus::Failure);
return;
}
// if no images found
if (count($images)===0) {
Slim::outputJSON(SlimStatus::Failure);
return;
}
// should always be one file (when posting async)
$image = $images[0];
$file = Slim::saveFile($image['output']['data'], $image['input']['name'],'img/');
// echo results
Slim::outputJSON(SlimStatus::Success, $file['name'], $file['path']);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function restrict() {\n $this->restrict_to_permission('blog');\n }",
"function wp_check_comment_disallowed_list($author, $email, $url, $comment, $user_ip, $user_agent)\n {\n }",
"function restrict_access_install(){\n\n $post = array(\n 'comment_status' => 'closed',\n 'ping_status' => 'closed' ,\n 'post_author' => 1,\n 'post_date' => date('Y-m-d H:i:s'),\n 'post_name' => 'restrict_access',\n 'post_status' => 'publish' ,\n 'post_title' => 'Restrict Access',\n 'post_type' => 'page',\n );\n\n wp_insert_post( $post, false );\n}",
"function allow_save_post($post)\n {\n }",
"function is_post_publicly_viewable($post = \\null)\n {\n }",
"function domain_check() {\n\tif (!isset($_SERVER['HTTP_REFERER']) || strpos($_SERVER['HTTP_REFERER'], $_SERVER['SERVER_NAME']) == FALSE) {\n\t\tsend_message('error', array('reason' => 'wrong_domain','message' => 'Cross-domain calls are not allowed'));\n\t}\n}",
"function wpcom_vip_enable_sharing() {\n\tadd_filter( 'post_flair', 'sharing_display', 20 );\n}",
"function wp_allowed_protocols()\n {\n }",
"public static function allowedDomains() {\n return [\n //Need to allow * for iOS webview to work!!\n '*',\n ];\n }",
"function wp_blacklist_check($author, $email, $url, $comment, $user_ip, $user_agent)\n {\n }",
"function trusted() {\n\t//-----------------------------------------------------------\n\t// Check for trusted host\n\tif(getenv('HTTP_REFERRER')) {\n\t\t$ref_url_parts=parse_url(getenv('HTTP_REFERRER'));\n\t\t} else {\n\t\t$ref_url_parts=parse_url(getenv('HTTP_REFERER'));\n\t\t}\n\tif($ref_url_parts['host'] !== $this->accept_host) {\n\t\treturn false;\n\t\t//print \"ERROR - You do not have permission to access this site remotely.\";\n\t\t//exit;\n\t} else {\n\t\treturn true;\n\t}\n}",
"function phpfmg_hotlinking_mysite(){\r\n $yes = phpfmg_is_mysite() \r\n && ( empty($_SERVER['HTTP_REFERER']) || false === strpos( strtolower($_SERVER['HTTP_REFERER']),'formmail-maker.com') ) ; // doesn't have referer of mysite\r\n\r\n if( $yes ){\r\n die( \"<b>Access Denied.</b>\r\n <br><br>\r\n You are visiting a form hotlinkink from <a href='http://www.formmail-maker.com'>formmail-maker.com</a> which is not allowed. \r\n Please read the <a href='http://www.formmail-maker.com/web-form-mail-faq.php'>FAQ</a>. \r\n \" );\r\n }; \r\n}",
"function wpcom_vip_disable_sharing() {\n\t// Post Flair sets things up on init so we need to call on that if init hasn't fired yet.\n\t_wpcom_vip_call_on_hook_or_execute( function() {\n\t\tremove_filter( 'post_flair', 'sharing_display', 20 );\n\t\tremove_filter( 'the_content', 'sharing_display', 19 );\n \t\tremove_filter( 'the_excerpt', 'sharing_display', 19 );\n\n\t\twpcom_vip_disable_sharing_resources();\n\t}, 'init', 99 );\n}",
"public static function get_allowed_on_site($blog_id = \\null)\n {\n }",
"function wpcom_vip_disable_postpost() {\n _deprecated_function( __FUNCTION__, '2.0.0' );\n}",
"function robots_access(){\r\n if(is_production() && get_option('blog_public') == '0') update_option('blog_public', '1');\r\n if(!is_production() && get_option('blog_public') == '1') update_option('blog_public', '0');\r\n}",
"function mu_disable_feed_comments() { \n\twp_redirect( esc_url( home_url( '/' ) ), 301 );\n\tdie();\n}",
"function is_ip_allowed ()\n{\n if($_SERVER['REMOTE_ADDR'] != LIMIT_TO_IP)\n {\n die('You are not allowed to shorten URLs with this service.');\n }\n\n}",
"function allow_iframes( $allowedposttags ) {\n\tif ( current_user_can( 'edit_posts' ) ) {\n\t\t$allowedposttags['iframe'] = array(\n\t\t\t'align' => true,\n\t\t\t'width' => true,\n\t\t\t'height' => true,\n\t\t\t'frameborder' => true,\n\t\t\t'name' => true,\n\t\t\t'src' => true,\n\t\t\t'id' => true,\n\t\t\t'class' => true,\n\t\t\t'style' => true,\n\t\t\t'scrolling' => true,\n\t\t\t'marginwidth' => true,\n\t\t\t'marginheight' => true,\n\t\t);\n\t}\n\n\treturn $allowedposttags;\n}",
"protected function checkTrustedHostPattern() {}",
"private function isSocialPost()\n\t{\n\t\treturn ( get_post_type($this->post_id) == 'social-post' ) ? true : false;\n\t}",
"function avoid_blog_page_permalink_collision($data, $postarr)\n {\n }",
"function rnf_postie_inreach_author($email) {\n // So we can inspect the domain, refer to $domain[1]\n $domain = explode('@', $email);\n\n // Get the whitelisting options\n $options = get_option( 'rnf_postie_settings' );\n $accept_addresses = $options['emails'];\n $accept_domains = $options['domains'];\n\n // Test the email address and change it to mine if it's allowable.\n if (in_array($email, $accept_addresses) || in_array($domain[1], $accept_domains)) {\n // For a multi-author site, this should be a setting. For me, this is fine.\n $admin = get_userdata(1);\n return $admin->get('user_email');\n }\n return $email;\n}",
"function wpcom_vip_disable_post_flair() {\n\tadd_filter( 'post_flair_disable', '__return_true' );\n}",
"function ajan_use_embed_in_forum_posts() {\n\treturn apply_filters( 'ajan_use_embed_in_forum_posts', !defined( 'AJAN_EMBED_DISABLE_FORUM_POSTS' ) || !AJAN_EMBED_DISABLE_FORUM_POSTS );\n}",
"function wp_idolondemand_save_post()\n{\n\t// TODO not sure this is the way to do this, too error prone imo, to investigate\n\t$whitelist = array(\n\t\t\t'127.0.0.1',\n\t\t\t'::1'\n\t);\n\t$input_type = wp_idolondemand_get_add_to_text_index_input_type();\n\t\n\tif(! in_array($_SERVER['REMOTE_ADDR'], $whitelist) || $input_type=='json'){\n\t\t\n\t\t// TODO if status changes to un-publish remove from index\n\t\tglobal $post;\n\t\tif($post){\n\t\t\t\n\t\t\t$post_id = $post->ID;\n\t\t\t$post_ids = array($post_id);\n\t\t\t$response = wp_idolondemand_add_to_text_index($post_ids, \"sync\");\n\t\t\t \n\t\t\t$notice = get_option('otp_notice');\n\t\t\t$notice[$post_id] = $response;\n\t\t\tupdate_option('otp_notice',$notice);\n\t\t\t\n\t\t\treturn $response;\n\t\t}\n\t\t\n\t}else{\n\t\t\n\t\t// TODO on localhost cannot index by url\n\t\t// either override to url or throw errror message\n\t\techo \"On localhost you cannot index by url. Change index input type to json.\";\n\t}\n}",
"public static function is_forbidden_source() {\n\t\t\t// Forbidden domains.\n\t\t\t$forbidden = array(\n\t\t\t\t'wpengine' => '.wpengine.com',\n\t\t\t\t'dev' => '.dev',\n\t\t\t\t'local' => '.local',\n\t\t\t);\n\n\t\t\t// Filter to add or remove domains from forbidden array.\n\t\t\t$forbidden = apply_filters( 'imutils_forbiddden_domains', $forbidden );\n\n\t\t\t// Grab the installs url.\n\t\t\t$this_domain = self::get_site_hostname();\n\n\t\t\tforeach ( $forbidden as $domain ) {\n\t\t\t\tif ( false !== strpos( $this_domain, $domain ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}",
"public function process_domain() {\r\n\t\t$url = esc_url( $_POST['domain'] );\r\n\t\t$post = array(\r\n\t\t\t'post_title' => $url,\r\n\t\t\t'post_status' => 'publish',\r\n\t\t\t'post_type' => 'spam-stats',\r\n\t\t);\r\n\t\t\r\n\t\t$spam_post = get_page_by_title( $url, '', 'spam-stats' );\r\n\t\tif ( isset( $spam_post->ID ) ) {\r\n\t\t\t$post_id = $spam_post->ID;\r\n\t\t} else {\r\n\t\t\t$post_id = wp_insert_post( $post );\r\n\t\t}\r\n\r\n\t\tif ( isset( $_POST['previous_spam'] ) ) {\r\n\t\t\t$previous_spam = (int) $_POST['previous_spam'];\r\n\t\t\tupdate_post_meta( $post_id, '_previous_spam', $previous_spam );\r\n\t\t}\r\n\t\tif ( isset( $_POST['previous_ham'] ) ) {\r\n\t\t\t$previous_ham = (int) $_POST['previous_ham'];\r\n\t\t\tupdate_post_meta( $post_id, '_previous_ham', $previous_ham );\r\n\t\t}\r\n\t\tif ( isset( $_POST['previous_false'] ) ) {\r\n\t\t\t$previous_false = (int) $_POST['previous_false'];\r\n\t\t\tupdate_post_meta( $post_id, '_previous_false', $previous_false );\r\n\t\t}\r\n\t\tif ( isset( $_POST['previous_start'] ) ) {\r\n\t\t\t$previous_start = (int) $_POST['previous_start'];\r\n\t\t\tupdate_post_meta( $post_id, '_previous_start', $previous_start );\r\n\t\t}\r\n\t\tif ( isset( $_POST['previous_end'] ) ) {\r\n\t\t\t$previous_end = (int) $_POST['previous_end'];\r\n\t\t\tupdate_post_meta( $post_id, '_previous_end', $previous_end );\r\n\t\t}\r\n\t\tif ( isset( $_POST['total_spam'] ) ) {\r\n\t\t\t$total_spam = (int) $_POST['total_spam'];\r\n\t\t\tupdate_post_meta( $post_id, '_total_spam', $total_spam );\r\n\t\t}\r\n\t\tif ( isset( $_POST['total_ham'] ) ) {\r\n\t\t\t$total_ham = (int) $_POST['total_ham'];\r\n\t\t\tupdate_post_meta( $post_id, '_total_ham', $total_ham );\r\n\t\t}\r\n\t\tif ( isset( $_POST['total_false'] ) ) {\r\n\t\t\t$total_false = (int) $_POST['total_false'];\r\n\t\t\tupdate_post_meta( $post_id, '_total_false', $total_false );\r\n\t\t}\r\n\t\tif ( isset( $_POST['total_start'] ) ) {\r\n\t\t\t$total_start = (int) $_POST['total_start'];\r\n\t\t\tupdate_post_meta( $post_id, '_total_start', $total_start );\r\n\t\t}\r\n\t\tif ( isset( $_POST['plugins'] ) ) {\r\n\t\t\t$plugins = esc_html( $_POST['plugins'] );\r\n\t\t\tupdate_post_meta( $post_id, '_plugins', $plugins );\r\n\t\t}\r\n\t\tif ( isset( $_POST['ver'] ) ) {\r\n\t\t\t$version = esc_html( $_POST['ver'] );\r\n\t\t\tupdate_post_meta( $post_id, '_ver', $version );\r\n\t\t}\r\n\r\n\t\twp_die( 'Thanks for storing with us :)' );\r\n\t}",
"public static function allowedDomains()\n{\n return [\n '*', // star allows all domains\n\t\t'http://localhost:8100',\n\t\t'http://localhost:3000',\n\t\t'localhost:3000',\n\t\t'localhost:8100',\n ];\n}",
"public static function allowedDomains()\n {\n return [\n // '*', // star allows all domains\n 'http://export.mysite',\n 'http://localhost:3000',\n 'http://localhost:3030',\n 'http://localhost:3033',\n \"http://alex.dmitxe.ru\",\n \"https://alex.dmitxe.ru\",\n \"http://alex.dmitxe.ru:3333\",\n \"https://xn--80ahyfc6d7ba.xn--80aabfyii3adadgocjt5p1b.xn--p1ai\",\n \"https://xn--80aabfyii3adadgocjt5p1b.xn--p1ai\"\n\n \n \n ];\n }",
"public function whois_looking_check(){\n\t\tglobal $post;\n\t\t$post_id = get_the_ID();\n\t\t$current_user_id = get_current_user_id();\n\t\t$author_user_id = $post->post_author;\n\t\tif ($current_user_id == $author_user_id){\n\t\t\t$include_file = plugin_dir_path( __FILE__ ) . \"subscription_view_author.php\";\n\t\t\tinclude_once($include_file);\n\t\t\tif (isset ($$subscription_view_author)){return;}\n\t\t\t$subscription_view_author = new subscription_view_author($post_id);\n\t\t}\n\t}",
"private function requested_post_is_valid(){\n return (get_post_type((int) $_GET['post_id']) === $this->post_type && get_post_status((int) $_GET['post_id']) === 'publish');\n }",
"function sh_can_user_post_in_forum($id) {\n\treturn true;\n}",
"public static function prevent_publicize_blacklisted_posts( $should_publicize, $post ) {\n\t\t_deprecated_function( __METHOD__, 'jetpack-7.5', 'Automattic\\Jetpack\\Sync\\Actions' );\n\n\t\treturn Actions::prevent_publicize_blacklisted_posts( $should_publicize, $post );\n\t}",
"function isWhiteListed($tld) {\r\n\t$wpbar_options = get_option(\"wpbar_options\");\r\n\t$whitelist=explode(\"\\n\",$wpbar_options[\"whitelist\"]);\r\n\t$white=false;\r\n\tfor($i=0;$i<sizeof($whitelist);$i++){\r\n\t\tif(trim($tld)==trim(get_domain($whitelist[$i])))\r\n\t\t\t$white=true;\r\n\t}\r\n\treturn $white;\r\n}",
"public function isPost();",
"function wbcRedirect(){\n if ( ! defined('DOING_AJAX') && ! current_user_can('edit_posts') && DOING_AJAX) {\n wp_redirect( site_url() );\n exit; \n }\n}",
"public function addPostToBlogInTheMiddle() {}",
"function indieauth_allow_localhost( $r, $url ) {\n\t$r['reject_unsafe_urls'] = false;\n\n\treturn $r;\n}",
"function network_domain_check()\n {\n }",
"function mtws_redirect_admin(){\n // check if Ajax request\n if( empty($_SERVER['HTTP_X_REQUESTED_WITH']) || strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) !== 'xmlhttprequest' ) {\n // proceed if was not Ajax request\n if ( ! current_user_can( 'edit_posts' ) ){\n wp_redirect( site_url() );\n exit; \n }\n }\n}",
"function theme_comments_restrict_access() {\n\tif (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))\n\t\tdie ('Please do not load this page directly. Thanks!');\n\t\n\tif ( post_password_required() ) {\n\t\techo '<p class=\"nocomments\">This post is password protected. Enter the password to view comments.</p>';\n\t\treturn false;\n\t}\n\treturn true;\n}",
"public function all_post() {\n return false;\n }",
"public function all_post() {\n return false;\n }",
"public function allowedToPost($user)\n {\n /*\n * When an invalid (reserved) username is used, prevent\n * posting\n */\n if (!$this->validUsername($user['username'])) {\n return false;\n } // if\n\n // Als de user niet ingelogged is, dan heeft dit geen zin\n if ($user['userid'] <= SPOTWEB_ADMIN_USERID) {\n return false;\n } // if\n\n return true;\n }",
"function hook_wordpress_mu_domain_mapping() {\n\t\tif ( ! Constants::is_defined( 'SUNRISE_LOADED' ) || ! $this->function_exists( 'domain_mapping_siteurl' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tadd_filter( 'jetpack_sync_home_url', 'domain_mapping_siteurl' );\n\t\tadd_filter( 'jetpack_sync_site_url', 'domain_mapping_siteurl' );\n\n\t\treturn true;\n\t}",
"function user_can_delete_post($user_id, $post_id, $blog_id = 1)\n {\n }",
"static function getrules_forbid_proxy_comment_posting()\r\n {\r\n global $aio_wp_security;\r\n $rules = '';\r\n if ($aio_wp_security->configs->get_value('aiowps_forbid_proxy_comments') == '1') {\r\n $rules .= AIOWPSecurity_Utility_Htaccess::$forbid_proxy_comments_marker_start . PHP_EOL; //Add feature marker start\r\n $rules .= '<IfModule mod_rewrite.c>' . PHP_EOL;\r\n $rules .= 'RewriteEngine On' . PHP_EOL;\r\n $rules .= 'RewriteCond %{REQUEST_METHOD} ^POST' . PHP_EOL;\r\n $rules .= 'RewriteCond %{HTTP:VIA} !^$ [OR]' . PHP_EOL;\r\n $rules .= 'RewriteCond %{HTTP:FORWARDED} !^$ [OR]' . PHP_EOL;\r\n $rules .= 'RewriteCond %{HTTP:USERAGENT_VIA} !^$ [OR]' . PHP_EOL;\r\n $rules .= 'RewriteCond %{HTTP:X_FORWARDED_FOR} !^$ [OR]' . PHP_EOL;\r\n $rules .= 'RewriteCond %{HTTP:X_FORWARDED_HOST} !^$ [OR]' . PHP_EOL;\r\n $rules .= 'RewriteCond %{HTTP:PROXY_CONNECTION} !^$ [OR]' . PHP_EOL;\r\n $rules .= 'RewriteCond %{HTTP:XPROXY_CONNECTION} !^$ [OR]' . PHP_EOL;\r\n $rules .= 'RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [OR]' . PHP_EOL;\r\n $rules .= 'RewriteCond %{HTTP:HTTP_CLIENT_IP} !^$' . PHP_EOL;\r\n $rules .= 'RewriteRule wp-comments-post\\.php - [F]' . PHP_EOL;\r\n $rules .= '</IfModule>' . PHP_EOL;\r\n $rules .= AIOWPSecurity_Utility_Htaccess::$forbid_proxy_comments_marker_end . PHP_EOL; //Add feature marker end\r\n }\r\n\r\n return $rules;\r\n }",
"protected function is_post_private($post_object = null)\n {\n }",
"function redirect_if_not_author()\n {\n if ( isset( $_GET['post'] ) && $_GET['action'] === 'edit' && get_post( $_GET['post'] )->post_type === self::CPT_TYPE )\n {\n if( ! current_user_can( 'publish_posts' ) && get_post($_GET['post'])->post_author != get_current_user_id() )\n {\n wp_redirect( admin_url() );\n }\n }\n }",
"public function no_post_author_cannot_accept_a_comment_as_post_answer()\n {\n $comment = factory(\\App\\Comment::class)->create();\n\n $this->actingAs(factory(\\App\\User::class)->create());\n\n $this->visit($comment->post->url);\n\n $this->post(route('comment.accept',$comment));\n $this->seeInDatabase('posts',[\n 'id' => $comment->post_id,\n 'pending' => true\n ]);\n\n\n }",
"function disable_feeds() {\n wp_redirect(home_url());\n die;\n}",
"static private function CheckCorrectHost() {\n\t\tif (count($_POST) > 0) {\n\t\t\treturn;\n\t\t}\n\t\t$correct_host = str_replace('https://', '', self::getURL());\n\n\t\tif ($_SERVER[\"SERVER_NAME\"] !== $correct_host) {\n\t\t\tself::redirect(self::getCurrentURL() . $_SERVER[\"REQUEST_URI\"]);\n\t\t}\n\t}",
"public function denyLink()\n {\n }",
"function vip_crossdomain_redirect() {\n\tadd_action( 'init', '_vip_crossdomain_redirect');\n}",
"function custom_feed_request( $vars ) {\n\tif (isset($vars['feed']) && !isset($vars['post_type']))\n\t\t$vars['post_type'] = array( 'post', 'site', 'plugin', 'theme', 'person' );\n\treturn $vars;\n}",
"function sanitize_post($post, $context = 'display')\n {\n }",
"function post_options()\n\t{\n\t\tglobal $auth;\n\n\t\t$this->auth_bbcode = ($auth->acl_get('u_blogbbcode')) ? true : false;\n\t\t$this->auth_smilies = ($auth->acl_get('u_blogsmilies')) ? true : false;\n\t\t$this->auth_img = ($auth->acl_get('u_blogimg')) ? true : false;\n\t\t$this->auth_url = ($auth->acl_get('u_blogurl')) ? true : false;\n\t\t$this->auth_flash = ($auth->acl_get('u_blogflash')) ? true : false;\n\n\t\tblog_plugins::plugin_do('post_options');\n\t}",
"protected function restrict_to_author() {\n if ($this->post->author_id != $this->current_user->id) {\n forbidden();\n }\n }",
"function validate_post($data)\n\t{\n\t\t/* Validating the hostname, the database name and the username. The password is optional. */\n\t\treturn !empty($data['db_host']) && !empty($data['db_username']) && !empty($data['db_name']) && !empty($data['site_url']);\n\t}",
"function is_blog_admin()\n {\n }",
"public function canPost()\n {\n $role = $this->role;\n if($role == 'author' || $role == 'admin')\n {\n return true;\n } else {\n return false;\n }\n }",
"function allow_my_post_types($allowed_post_types) {\n $allowed_post_types[] = 'video';\n return $allowed_post_types;\n}",
"public function require_posts_to_posts() {\n\t\t// Initializes the database tables\n\t\t\\P2P_Storage::init();\n\n\t\t// Initializes the query mechanism\n\t\t\\P2P_Query_Post::init();\n\t}",
"public function content_is_trusted() {\n \treturn true;\n }",
"public function isPost(): bool {}",
"function dynamo_support_block_ticket_access() {\n $url = trim(substr($_SERVER['REQUEST_URI'],0,-1)); \n $url = explode('/',$url);\n if(end($url) == 'ticket') {\n wp_redirect(get_bloginfo('home'));\n }\n }",
"function register_post_metas() {\n\tregister_post_meta(\n\t\t'reblogged-post',\n\t\t'rbf_source_url',\n\t\tarray(\n\t\t\t'type' => 'string',\n\t\t\t'single' => true,\n\t\t\t'sanitize_callback' => 'esc_url_raw',\n\t\t\t'show_in_rest' => true,\n\n\t\t\t'auth_callback' => function( $post ) {\n\t\t\t\treturn current_user_can( 'edit_post', $post );\n\t\t\t}\n\t\t)\n\t);\n}",
"function clix_uppe_post_exclude( $posts ){\r\n\t$bail_out = ( ( defined( 'WP_ADMIN' ) && WP_ADMIN == true ) || ( strpos( $_SERVER[ 'PHP_SELF' ], 'wp-admin' ) !== false ) );\r\n\tif($bail_out){\r\n\t\treturn $posts;\r\n\t\t}\r\n\tif( is_category() ){\r\n\t\t$uppefield='_clix_uppe_disable_archive';\r\n\t\t}\r\n\telseif( is_tag() ){\r\n\t\t$uppefield='_clix_uppe_disable_tag';\r\n\t\t}\r\n\telseif( is_search() ){\r\n\t\t$uppefield='_clix_uppe_disable_search';\r\n\t\t}\r\n\telseif( is_home() ){\r\n\t\t$uppefield='_clix_uppe_disable_home';\r\n\t\t}\r\n\t//create an array to hold the posts we want to show\r\n\t$new_posts = array();\r\n\t//loop through all the post objects\r\n\tforeach( $posts as $post ){\r\n\t \tif(get_post_meta( $post->ID, $uppefield, true)==1 ){\r\n\t \t\tcontinue;\r\n\t \t\t}\r\n\t \telseif( !is_user_logged_in() && get_post_meta( $post->ID, '_clix_uppe_disable_unlesslogin', true )==1){\r\n\t \t\tcontinue;\r\n\t \t\t}\r\n\t \t$new_posts[] = $post;\r\n\t\t}\r\n\treturn $new_posts;\r\n}",
"function check_and_publish_future_post($post)\n {\n }",
"function wp_internal_hosts()\n {\n }",
"function checkOEmbedUrl($url) {\n\n $parsedUrl = parse_url($url);\n $domain = str_replace('www.','',$parsedUrl['host']);\n\n switch ($domain) {\n\n case 'youtube.com':\n return true;\n break;\n\n case 'm.youtube.com':\n return true;\n break;\n\n case 'flickr.com':\n return true;\n break;\n\n case 'm.flickr.com':\n return true;\n break;\n\n /*case 'viddler.com':\n return true;\n break;*/\n\n case 'vimeo.com':\n return true;\n break;\n\n case 'dribbble.com':\n return true;\n break;\n\n case 'drbl.in':\n return true;\n break;\n\n case 'instagr.am':\n return true;\n break;\n\n case 'instagram.com':\n return true;\n break;\n\n case 'amazon.com':\n return true;\n break;\n\n case 'amzn.com':\n return true;\n break;\n\n case 'twitpic.com':\n return true;\n break;\n\n case 'speakerdeck.com':\n return true;\n break;\n\n case 'slideshare.net':\n return true;\n break;\n\n case 'skitch.com':\n return true;\n break;\n\n case 'img.skitch.com':\n return true;\n break;\n\n case 'gist.github.com':\n return true;\n break;\n\n case 'huffduffer.com':\n return true;\n break;\n\n case 'soundcloud.com':\n return true;\n break;\n\n case 'ted.com':\n return true;\n break;\n\n /*case 'wikipedia.org':\n return true;\n break;\n\n case 'en.wikipedia.org':\n return true;\n break;*/\n\n default:\n return false;\n break;\n\n }\nreturn false;\n}",
"function caldol_protect_content() {\n\t\n\tglobal $post;\n\n\t$slug = get_post( $post )->post_name;\n\n\t\n\n\tif( !is_user_logged_in() &&\n ( ! is_front_page() && \n $slug != 'register' && \n $slug != 'about-pl' && \n $slug != 'contact-us' &&\n $slug != 'cclpd' &&\n\t\t$slug != 'ccdp-registration-form'\n\t\t\t //&& !(substr( $slug, 0, 5 ) === \"cclpd\")\n\t ) ){\n\n\t//if ( !is_user_logged_in() ) {\n\n\t\tauth_redirect();\n\n\t}\n\n}",
"private function validatePostLocation($_post_location){\n $url = \"https://usqitsn.org\".$_post_location;\n if(strlen($url)>19 && strlen($url)<255 && filter_var($url, FILTER_VALIDATE_URL)){\n $this->post_location = $_post_location;\n return true;\n }else{\n return false;\n }\n }",
"function wp_newPost( $args ) {\n\n global $wp_xmlrpc_server;\n $wp_xmlrpc_server->escape($args);\n\n $blog_ID = (int) $args[0]; // for future use\n $username = $args[1];\n $password = $args[2];\n $content_struct = $args[3];\n $publish = isset( $args[4] ) ? $args[4] : false;\n\n if ( ! $user = $wp_xmlrpc_server->login( $username, $password ) )\n return $wp_xmlrpc_server->error;\n \n $post_type = get_post_type_object( $content_struct['post_type'] );\n if( ! ( (bool)$post_type ) )\n return new IXR_Error( 403, __( 'Invalid post type' ) );\n\n if( ! current_user_can( $post_type->cap->edit_posts ) )\n return new IXR_Error( 401, __( 'Sorry, you are not allowed to create posts in this post type' ));\n\n // this holds all the post data needed\n $post_data = array();\n $post_data['post_type'] = $content_struct['post_type'];\n\n $post_data['post_status'] = $publish ? 'publish' : 'draft';\n\n if( isset ( $content_struct[\"{$content_struct['post_type']}_status\"] ) )\n $post_data['post_status'] = $content_struct[\"{$post_data['post_type']}_status\"];\n\n\n switch ( $post_data['post_status'] ) {\n\n case 'draft':\n break;\n case 'pending':\n break;\n case 'private':\n if( ! current_user_can( $post_type->cap->publish_posts ) )\n return new IXR_Error( 401, __( 'Sorry, you are not allowed to create private posts in this post type' ));\n break;\n case 'publish':\n if( ! current_user_can( $post_type->cap->publish_posts ) )\n return new IXR_Error( 401, __( 'Sorry, you are not allowed to publish posts in this post type' ));\n break;\n default:\n return new IXR_Error( 401, __( 'Invalid post status' ) );\n break;\n \n }\n\n // Only use a password if one was given.\n if ( isset( $content_struct['wp_password'] ) ) {\n\n if( ! current_user_can( $post_type->cap->publish_posts ) )\n return new IXR_Error( 401, __( 'Sorry, you are not allowed to create password protected posts in this post type' ) );\n $post_data['post_password'] = $content_struct['wp_password'];\n \n }\n\n // Let WordPress generate the post_name (slug) unless one has been provided.\n $post_data['post_name'] = \"\";\n if ( isset( $content_struct['wp_slug'] ) )\n $post_data['post_name'] = $content_struct['wp_slug'];\n\n if ( isset( $content_struct['wp_page_order'] ) ) {\n\n if( ! post_type_supports( $content_struct['post_type'] , 'page-attributes' ) )\n return new IXR_Error( 401, __( 'This post type does not support page attributes.' ) );\n\n $post_data['menu_order'] = (int)$content_struct['wp_page_order'];\n \n }\n\n if ( isset( $content_struct['wp_page_parent_id'] ) ) {\n\n if( ! $post_type->hierarchical )\n return new IXR_Error( 401, __( 'This post type does not support post hierarchy.' ) );\n\n // validating parent ID\n $parent_ID = (int)$content_struct['wp_page_parent_id'];\n if( $parent_ID != 0 ) {\n\n $parent_post = (array)wp_get_single_post( $parent_ID );\n if ( empty( $parent_post['ID'] ) )\n return new IXR_Error( 401, __( 'Invalid parent ID.' ) );\n\n if ( $parent_post['post_type'] != $content_struct['post_type'] )\n return new IXR_Error( 401, __( 'The parent post is of different post type.' ) );\n\n }\n\n $post_data['post_parent'] = $content_struct['wp_page_parent_id'];\n\n }\n\n // page template is only supported only by pages\n if ( isset( $content_struct['wp_page_template'] ) ) {\n\n if( $content_struct['post_type'] != 'page' )\n return new IXR_Error( 401, __( 'Page templates are only supported by pages.' ) );\n\n // validating page template\n $page_templates = get_page_templates( );\n $page_templates['Default'] = 'default';\n \n if( ! array_key_exists( $content_struct['wp_page_template'], $page_templates ) )\n return new IXR_Error( 403, __( 'Invalid page template.' ) );\n\n $post_data['page_template'] = $content_struct['wp_page_template'];\n\n }\n\n $post_data['post_author '] = $user->ID;\n\n // If an author id was provided then use it instead.\n if( isset( $content_struct['wp_author_id'] ) && ( $user->ID != (int)$content_struct['wp_author_id'] ) ) {\n\n if( ! post_type_supports( $content_struct['post_type'] , 'author' ) )\n return new IXR_Error( 401, __( 'This post type does not support to set author.' ) );\n\n if( ! current_user_can( $post_type->cap->edit_others_posts ) )\n return new IXR_Error( 401, __( 'You are not allowed to create posts as this user.' ) );\n \n $author_ID = (int)$content_struct['wp_author_id'];\n\n $author = get_userdata( $author_ID );\n if( ! $author )\n return new IXR_Error( 404, __( 'Invalid author ID.' ) );\n \n $post_data['post_author '] = $author_ID;\n \n }\n\n if( isset ( $content_struct['title'] ) ) {\n\n if( ! post_type_supports( $content_struct['post_type'] , 'title' ) )\n return new IXR_Error( 401, __('This post type does not support title attribute.') );\n $post_data['post_title'] = $content_struct['title'];\n \n }\n\n if( isset ( $content_struct['description'] ) ) {\n\n if( ! post_type_supports( $content_struct['post_type'] , 'editor' ) )\n return new IXR_Error( 401, __( 'This post type does not support post content.' ) );\n $post_data['post_content'] = $content_struct['description'];\n \n }\n\n if( isset ( $content_struct['mt_excerpt'] ) ) {\n\n if( ! post_type_supports( $content_struct['post_type'] , 'excerpt' ) )\n return new IXR_Error( 401, __( 'This post type does not support post excerpt.' ) );\n $post_data['post_excerpt'] = $content_struct['mt_excerpt'];\n \n }\n\n if( post_type_supports( $content_struct['post_type'], 'comments' ) ) {\n\n $post_data['comment_status'] = get_option('default_comment_status');\n\n if( isset( $content_struct['mt_allow_comments'] ) ) {\n\n if( ! is_numeric( $content_struct['mt_allow_comments'] ) ) {\n\n switch ( $content_struct['mt_allow_comments'] ) {\n case 'closed':\n $post_data['comment_status']= 'closed';\n break;\n case 'open':\n $post_data['comment_status'] = 'open';\n break;\n default:\n return new IXR_Error( 401, __( 'Invalid comment option.' ) );\n }\n\n } else {\n\n switch ( (int) $content_struct['mt_allow_comments'] ) {\n case 0: // for backward compatiblity\n case 2:\n $post_data['comment_status'] = 'closed';\n break;\n case 1:\n $post_data['comment_status'] = 'open';\n break;\n default:\n return new IXR_Error( 401, __( 'Invalid comment option.' ) );\n }\n\n }\n \n }\n\n } else {\n\n if( isset( $content_struct['mt_allow_comments'] ) )\n return new IXR_Error( 401, __( 'This post type does not support comments.' ) );\n\n }\n\n\n if( post_type_supports( $content_struct['post_type'], 'trackbacks' ) ) {\n\n $post_data['ping_status'] = get_option('default_ping_status');\n\n if( isset( $content_struct['mt_allow_pings'] ) ) {\n\n if ( ! is_numeric( $content_struct['mt_allow_pings'] ) ) {\n\n switch ( $content_struct['mt_allow_pings'] ) {\n case 'closed':\n $post_data['ping_status']= 'closed';\n break;\n case 'open':\n $post_data['ping_status'] = 'open';\n break;\n default:\n return new IXR_Error( 401, __( 'Invalid ping option.' ) );\n }\n\n } else {\n\n switch ( (int) $content_struct['mt_allow_pings'] ) {\n case 0:\n case 2:\n $post_data['ping_status'] = 'closed';\n break;\n case 1:\n $post_data['ping_status'] = 'open';\n break;\n default:\n return new IXR_Error( 401, __( 'Invalid ping option.' ) );\n }\n\n }\n\n }\n\n } else {\n\n if( isset( $content_struct['mt_allow_pings'] ) )\n return new IXR_Error( 401, __( 'This post type does not support trackbacks.' ) );\n\n }\n\n $post_data['post_more'] = null;\n if( isset( $content_struct['mt_text_more'] ) ) {\n\n $post_data['post_more'] = $content_struct['mt_text_more'];\n $post_data['post_content'] = $post_data['post_content'] . '<!--more-->' . $post_data['post_more'];\n \n }\n\n $post_data['to_ping'] = null;\n if ( isset( $content_struct['mt_tb_ping_urls'] ) ) {\n\n $post_data['to_ping'] = $content_struct['mt_tb_ping_urls'];\n if ( is_array( $to_ping ) )\n $post_data['to_ping'] = implode(' ', $to_ping);\n \n }\n\n // Do some timestamp voodoo\n if ( ! empty( $content_struct['date_created_gmt'] ) )\n $dateCreated = str_replace( 'Z', '', $content_struct['date_created_gmt']->getIso() ) . 'Z'; // We know this is supposed to be GMT, so we're going to slap that Z on there by force\n elseif ( !empty( $content_struct['dateCreated']) )\n $dateCreated = $content_struct['dateCreated']->getIso();\n\n if ( ! empty( $dateCreated ) ) {\n $post_data['post_date'] = get_date_from_gmt( iso8601_to_datetime( $dateCreated ) );\n $post_data['post_date_gmt'] = iso8601_to_datetime( $dateCreated, 'GMT' );\n } else {\n $post_data['post_date'] = current_time('mysql');\n $post_data['post_date_gmt'] = current_time('mysql', 1);\n }\n\n // we got everything we need\n $post_ID = wp_insert_post( $post_data, true );\n\n if ( is_wp_error( $post_ID ) )\n return new IXR_Error( 500, $post_ID->get_error_message() );\n\n if ( ! $post_ID )\n return new IXR_Error( 401, __( 'Sorry, your entry could not be posted. Something wrong happened.' ) );\n\n // the default is to unstick\n if( $content_struct['post_type'] == 'post' ) {\n\n $sticky = $content_struct['sticky'] ? true : false;\n if( $sticky ) {\n\n if( $post_data['post_status'] != 'publish' )\n return new IXR_Error( 401, __( 'Only published posts can be made sticky.' ));\n\n if( ! current_user_can( $post_type->cap->edit_others_posts ) )\n return new IXR_Error( 401, __( 'Sorry, you are not allowed to stick this post.' ) );\n\n stick_post( $post_ID );\n\n\n } else {\n\n unstick_post( $post_ID );\n\n }\n\n } else {\n\n if( isset ( $content_struct['sticky'] ) )\n return new IXR_Error( 401, __( 'Sorry, only posts can be sticky.' ) );\n \n }\n\n if( isset ( $content_struct['custom_fields'] ) ) {\n\n if( ! post_type_supports( $content_struct['post_type'], 'custom-fields' ) )\n return new IXR_Error( 401, __( 'This post type does not support custom fields.' ) );\n $wp_xmlrpc_server->set_custom_fields( $post_ID, $content_struct['custom_fields'] );\n \n } \n\n $post_type_taxonomies = get_object_taxonomies( $content_struct['post_type'] );\n\n if( isset( $content_struct['terms'] ) ) {\n\n $terms = $content_struct['terms'];\n $taxonomies = array_keys( $terms );\n\n // validating term ids\n foreach( $taxonomies as $taxonomy ) {\n\n if( ! in_array( $taxonomy , $post_type_taxonomies ) )\n return new IXR_Error( 401, __( 'Sorry, one of the given taxonomy is not supported by the post type.' ));\n\n $term_ids = $terms[ $taxonomy ];\n foreach ( $term_ids as $term_id) {\n\n $term = get_term( $term_id, $taxonomy );\n\n if ( is_wp_error( $term ) )\n return new IXR_Error( 500, $term->get_error_message() );\n\n if ( ! $term )\n return new IXR_Error( 401, __( 'Invalid term ID' ) );\n\n }\n\n }\n\n foreach( $taxonomies as $taxonomy ) {\n\n $term_ids = $terms[ $taxonomy ];\n $term_ids = array_map( 'intval', $term_ids );\n $term_ids = array_unique( $term_ids );\n wp_set_object_terms( $post_ID , $term_ids, $taxonomy , $append);\n\n }\n\n return true;\n\n }\n\n // backward compatiblity\n\t\tif ( isset( $content_struct['categories'] ) ) {\n\n if( ! in_array( 'category', $post_type_taxonomies ) )\n return new IXR_Error( 401, __( 'Sorry, Categories are not supported by the post type' ));\n \n\t\t\t$category_names = $content_struct['categories'];\n\n foreach( $category_names as $category_name ) {\n $category_ID = get_cat_ID( $category_name );\n if( ! $category_ID )\n return new IXR_Error( 401, __( 'Sorry, one of the given categories does not exist!' ));\n $post_categories[] = $category_ID;\n }\n\n wp_set_post_categories ($post_ID, $post_categories );\n\n\t\t}\n\n if( isset( $content_struct['mt_keywords'] ) ) {\n\n if( ! in_array( 'post_tag' , $post_type_taxonomies ) )\n return new IXR_Error( 401, __( 'Sorry, post tags are not supported by the post type' ));\n\n wp_set_post_terms( $post_id, $tags, 'post_tag', false); // append is set false here\n\n }\n\n if( isset( $content_struct['wp_post_format'] ) ) {\n\n if( ! in_array( 'post_format' , $post_type_taxonomies ) )\n return new IXR_Error( 401, __( 'Sorry, post formats are not supported by the post type' ));\n \n wp_set_post_terms( $post_ID, array( 'post-format-' . $content_struct['wp_post_format'] ), 'post_format' );\n\n }\n\n // Handle enclosures\n $thisEnclosure = isset($content_struct['enclosure']) ? $content_struct['enclosure'] : null;\n $wp_xmlrpc_server->add_enclosure_if_new($post_ID, $thisEnclosure);\n $wp_xmlrpc_server->attach_uploads( $post_ID, $post_data['post_content'] );\n\n return strval( $post_ID );\n\n}",
"function user_can_delete_post_comments($user_id, $post_id, $blog_id = 1)\n {\n }",
"function wpcom_vip_is_valid_domain( $url, $whitelisted_domains ) {\n\t$domain = parse_url( $url, PHP_URL_HOST );\n\n\tif ( ! $domain )\n\t\treturn false;\n\n\t// Check if we match the domain exactly\n\tif ( in_array( $domain, $whitelisted_domains ) )\n\t\treturn true;\n\n\t$valid = false;\n\n\tforeach( $whitelisted_domains as $whitelisted_domain ) {\n\t\t$whitelisted_domain = '.' . $whitelisted_domain; // Prevent things like 'evilsitetime.com'\n\t\tif( strpos( $domain, $whitelisted_domain ) === ( strlen( $domain ) - strlen( $whitelisted_domain ) ) ) {\n\t\t\t$valid = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn $valid;\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 ljpost_post_local(array &$b)\n{\n\tif ($b['edit']) {\n\t\treturn;\n\t}\n\n\tif (!DI::userSession()->getLocalUserId() || (DI::userSession()->getLocalUserId() != $b['uid'])) {\n\t\treturn;\n\t}\n\n\tif ($b['private'] || $b['parent']) {\n\t\treturn;\n\t}\n\n\t$lj_post = intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(),'ljpost','post'));\n\t$lj_enable = (($lj_post && !empty($_REQUEST['ljpost_enable'])) ? intval($_REQUEST['ljpost_enable']) : 0);\n\n\tif ($b['api_source'] && intval(DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'ljpost', 'post_by_default'))) {\n\t\t$lj_enable = 1;\n\t}\n\n\tif (!$lj_enable) {\n\t\treturn;\n\t}\n\n\tif (strlen($b['postopts'])) {\n\t\t$b['postopts'] .= ',';\n\t}\n\t$b['postopts'] .= 'ljpost';\n}",
"function wp_force_plain_post_permalink($post = \\null, $sample = \\null)\n {\n }",
"public function isSite() {\n return false;\n }",
"public function setAllowedOrigin($domain)\n {\n $domain = str_replace('http://', '', $domain);\n $domain = str_replace('www.', '', $domain);\n $domain = (strpos($domain, '/') !== false) ? substr($domain, 0, strpos($domain, '/')) : $domain;\n if(empty($domain))\n {\n return false;\n }\n $this->_allowedOrigins[$domain] = true; \n return true;\n }",
"public function blogPosts()\n\t{\n\t\t$auth = $this->ensureAuthed();\n\t\t$output = Output::getInstance();\n\t\t$feeds = Feeds::getInstance();\n\n\t\t$urls = $feeds->getValidURLs();\n\n\t\t$posts = array();\n\t\tforeach ($urls as $url => $user)\n\t\t{\n\t\t\t$teams = $auth->getTeams($user);\n\t\t\tif (count($teams) > 0)\n\t\t\t{\n\t\t\t\t$author = $auth->displayNameForTeam($teams[0]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$author = $user;\n\t\t\t}\n\t\t\t$msgs = Feeds::getRecentPosts($url, 3, $author);\n\t\t\t$posts = array_merge($posts, $msgs);\n\t\t}\n\t\t$output->setOutput('posts', $posts);\n\t\treturn true;\n\t}",
"function privacy_ping_filter($sites)\n {\n }",
"public function just_editing_post() {\n\t\tdefine('suppress_newpost_action', TRUE);\n\t}",
"public function canonical_domain() {\n\t\t$target = $this->get_canonical_target();\n\n\t\tif ( $target ) {\n\t\t\t// phpcs:ignore\n\t\t\twp_redirect( $target, 301, 'redirection' );\n\t\t\tdie();\n\t\t}\n\t}",
"public function authorize()\n {\n // パラメータのIDからで削除対象のリプライを取得\n $post = Post::find($this->route(\"id\"));\n // if ($reply == null) return false;\n\n return $post && $this->user()->id == $post->user_id ? true : false;\n }",
"function adelle_theme_check_referrer() {\r\n if (!isset($_SERVER['HTTP_REFERER']) || $_SERVER['HTTP_REFERER'] == \"\" ) {\r\n wp_die( __( 'Please enable referrers in your browser.', 'adelle-theme' ) );\r\n }\r\n}",
"function block_spam_deletion_message_is_spammy($message) {\n global $CFG;\n\n // Work with a copy of the passed value (in case we will need it yet later).\n $text = $message;\n\n // Firstly, ignore all links to our draftfile.php as those are probably attached media.\n $urldraftfile = \"$CFG->httpswwwroot/draftfile.php\";\n $text = str_ireplace($urldraftfile, '', $text);\n\n // Also, ignore all links to our site itself.\n $text = str_ireplace($CFG->httpswwwroot, '', $text);\n $text = str_ireplace($CFG->wwwroot, '', $text);\n\n // How many URLs are left now? We do not rely on href=\"...\" or similar HTML\n // syntax as the spammer can use Markdown or even just plain URLs in the text.\n $found = preg_match_all(\"~(http://|https://|ftp://)~i\", $text, $matches);\n\n // A post with three or more URLs is considered spammy for our purposes.\n if ($found >= 3) {\n return true;\n }\n\n // Look for words that may indicate spam.\n if (!empty($CFG->block_spam_deletion_badwords)) {\n $badwords = explode(',', $CFG->block_spam_deletion_badwords);\n\n $pattern = '/';\n $divider = '';\n foreach ($badwords as $badword) {\n $badword = trim($badword);\n $pattern .= $divider . '\\b' . preg_quote($badword) . '\\b';\n $divider = '|';\n }\n $pattern .= '/i';\n if (preg_match($pattern, $text)) {\n return true;\n }\n }\n\n return false;\n}",
"function shapeSpace_block_proxy_visits() {\n\tif (@fsockopen($_SERVER['REMOTE_ADDR'], 80, $errstr, $errno, 1)) {\n\t\tdie('Proxy access not allowed');\n\t}\n}",
"function ks_disable_post_archives($query){\n if ((!is_front_page() && is_home()) || is_category() || is_tag() || is_author() || is_date()) {\n global $wp_query;\n $wp_query->set_404();\n status_header(404);\n nocache_headers();\n }\n}",
"function DelTrust($posts)\n {\n foreach($posts as $post){\n if(isset($this->TrustedNetworks[$post])){\n unset($this->TrustedNetworks[$post]); \n }\n }\n }",
"function block_core_calendar_has_published_posts()\n {\n }",
"public function canManageSubdomains();",
"function can_edit() {\n\n if ( ! strpos( $_SERVER['REQUEST_URI'], 'index.php') ) return false;\n\n $what = isset($_GET['what']) ? $_GET['what'] : false;\n $add = isset($_GET['add']) ? $_GET['add'] : false;\n\n // this is the rule for add posts\n return $what === 'bryndzoveHalusky' && $add == 1;\n}",
"function remove_author_publish_cap(){\n\t// access author class instance\n\t$author = get_role( 'author' );\n\t// set publish_post capability to false\n\t$author->add_cap( 'publish_posts', false );\n}",
"public function post_link($post) {\n\n if ($this->template->is_ajax()) {\n\n $post['post_to_groups'] = array($this->profile->id);\n\n $post['title'] = 'from '.get_instance()->config->config['OCU_site_name'];\n\n $this->bitly_load();\n\n\n\n // add http://\n\n if (!empty($post['url']) && !preg_match(\"~^(?:f|ht)tps?://~i\", $post['url'])) {\n\n $post['url'] = \"http://\" . $post['url'];\n\n }\n\n\n\n $post['timezone'] = User_timezone::get_user_timezone($this->c_user->id);\n\n $errors = Social_post::validate_post($post);\n\n\n\n if (empty($errors)) {\n\n\n\n try {\n\n if (!isset($post['post_id'])) {\n\n\n\n if (!empty($post['url'])) {\n\n\n\n if ($this->bitly) {\n\n $bitly_data = $this->bitly->shorten($post['url']);\n\n if (strlen($bitly_data['url']) < strlen($post['url'])) {\n\n $post['url'] = $bitly_data['url'];\n\n //ddd($post['url']);\n\n }\n\n\n\n }\n\n }\n\n\n\n }\n\n\n\n $this->load->library('Socializer/socializer');\n\n Social_post::add_new_post($post, $this->c_user->id, $this->profile->id);\n\n\n\n $result['success'] = true;\n\n $result['message'] = lang('post_was_successfully_added');\n\n } catch(Exception $e) {\n\n $result['success'] = false;\n\n $result['errors']['post_to_groups[]'] = '<span class=\"message-error\">' . $e->getMessage() . '</span>';\n\n }\n\n\n\n } else {\n\n $result['success'] = false;\n\n $result['errors'] = $errors;\n\n }\n\n echo json_encode($result);\n\n }\n\n exit();\n\n }",
"protected function isValidOrigin()\n {\n //TODO\n //Check origem\n $domain = 'wamp';\n //$domain = 'gotmoneyapp.com';\n $serverHost = parse_url('http://' . $this->getRequest()->getServer('SERVER_NAME'));\n $httpHost = parse_url('http://' . $this->getRequest()->getServer('HTTP_HOST'));\n $httpOrigin = parse_url($this->getRequest()->getServer('HTTP_ORIGIN'));\n $httpReferer = parse_url($this->getRequest()->getServer('HTTP_REFERER'));\n\n if (!empty($httpOrigin['host']) && $httpOrigin['host'] != $httpHost['host']) {\n return false;\n //exit(\"CSRF protection in POST request - detected invalid Origin header: \" . htmlspecialchars($_SERVER[\"HTTP_ORIGIN\"]));\n } elseif (!empty($httpReferer['host']) && $httpReferer['host'] != $httpHost['host']) {\n return false;\n //exit($httpHost . \"CSRF protection in POST request - detected invalid Referer header: \" . htmlspecialchars($_SERVER[\"HTTP_REFERER\"]));\n } else {\n //return false;\n //exit(\"CSRF protection in POST request - NO HEADER\");\n }\n\n if ($domain === $httpHost['host']) {\n return false;\n }\n\n return true;\n }",
"function disable_author_page() {\n\tglobal $wp_query;\n\n\tif ( is_author() ) {\n\t\t$wp_query->set_404();\n\t\tstatus_header(404);\n\t\t// Redirect to homepage\n\t\t// wp_redirect(get_option('home'));\n\t}\n}",
"function authenticateRSS() {\n if (!isset($_SERVER['PHP_AUTH_USER'])) {\n header('WWW-Authenticate: Basic realm=\"RSS Feeds\"');\n header('HTTP/1.0 401 Unauthorized');\n echo 'Feeds from this site are private';\n exit;\n } else {\n if (is_wp_error(wp_authenticate($_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW']))) {\n header('WWW-Authenticate: Basic realm=\"RSS Feeds\"');\n header('HTTP/1.0 401 Unauthorized');\n echo 'Username and password were not correct';\n exit;\n }\n }\n}",
"public function authorize()\n {\n /*\n * Ovde mozete vrsiti proveru da li vas user ima dozvolu\n * za kreiranje Bloga, i vrsiti bilo kakvu dodatnu proveru u zavisnosti od\n * biznis logike\n * (pr. mozda user mora da ima min 18 godina da bi submitovao blog)\n *\n * Posto nemam nikakvu logiku za to, samo vracam true\n */\n return true;\n }"
] | [
"0.6145495",
"0.59315",
"0.59196335",
"0.5876129",
"0.58547753",
"0.5840969",
"0.58333623",
"0.58144104",
"0.5754458",
"0.5735341",
"0.5731626",
"0.5729871",
"0.57219356",
"0.5678486",
"0.5655985",
"0.5639675",
"0.56013846",
"0.5600825",
"0.5599456",
"0.5591413",
"0.5591379",
"0.5575172",
"0.5573906",
"0.554933",
"0.5520483",
"0.55189955",
"0.54966813",
"0.5493899",
"0.548081",
"0.54743433",
"0.54707915",
"0.54658973",
"0.54489475",
"0.5444679",
"0.5433347",
"0.5425912",
"0.5418252",
"0.5418005",
"0.5411513",
"0.54089636",
"0.5397574",
"0.539682",
"0.53838766",
"0.53838766",
"0.53544223",
"0.53508395",
"0.534494",
"0.53396404",
"0.5339434",
"0.5328923",
"0.53263116",
"0.53215015",
"0.5315736",
"0.5311395",
"0.53093076",
"0.53086305",
"0.5302443",
"0.5301121",
"0.5298616",
"0.5296239",
"0.5286884",
"0.5266097",
"0.5264275",
"0.526119",
"0.52547",
"0.5206353",
"0.5205896",
"0.5202865",
"0.52028024",
"0.51875067",
"0.51848435",
"0.51830053",
"0.5176099",
"0.51701087",
"0.5169509",
"0.51619285",
"0.51531583",
"0.51493305",
"0.51469207",
"0.5128333",
"0.51281106",
"0.51237804",
"0.51209474",
"0.51117396",
"0.5110365",
"0.5092575",
"0.5085835",
"0.50849056",
"0.50847214",
"0.50812083",
"0.5076738",
"0.50710034",
"0.5070621",
"0.5069704",
"0.5065367",
"0.50543875",
"0.5054296",
"0.5047627",
"0.50451",
"0.5040132",
"0.50378644"
] | 0.0 | -1 |
if registering a person, r will be passed. If a picture is baing updated e will be passed | public function picture_upload($id,$folder,$rORe){
if($_FILES[$id]["name"]==""){
return;
}
$validextensions = array("jpeg", "jpg", "png");
$temporary = explode(".", $_FILES[$id]["name"]);
$file_extension = end($temporary);
$targtid = "";
if($folder=="provider")
$targtid = $this->Register_model->getShopID($_POST["txtemail"]);
else if($folder=="customer")
if ($rORe == "r")
$targtid = $this->Register_model->getCustomerID($_POST["customeremail"]);
else
$targtid = $this->Register_model->getCustomerID($_POST["custresetemail"]);
if ($_FILES[$id]["error"] > 0)
{
$alert = "Return Code: " . $_FILES[$id]["error"] . "<br/><br/>";
echo $alert;
return;
}
else
{
$name = $targtid."pic.".$file_extension;
if ($rORe == "r" && file_exists("img/".$folder."/cover/" . $name)) {
$alert = $name . " already exists. ";
echo $alert;
return;
}
else
{
$sourcePath = $_FILES[$id]['tmp_name']; // Storing source path of the file in a variable
$targetPath = "img/".$folder."/cover/" . $name; // Target path where file is to be stored
move_uploaded_file($sourcePath,$targetPath);
$_SESSION['picture']="img/".$folder."/cover/".$name;
$alert=$this->Register_model->insert_picture($folder,$targtid,"img/".$folder."/cover/".$name);
echo $alert;
return;
//$alert="aafsdfdfdfgfdhd11111111111111111111111111111111111";
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function registerRun(){\n if(in_array($this->imageFileType, $this->extensions_arr)){\n $sql = \"insert into rider (R_Name,R_Email,R_Password,R_Phone,R_License,\n R_Address,R_image)\n\n value(:R_Name, :R_Email, :R_Password, :R_Phone, :R_License, :R_Address, :R_image)\";\n\t\t\n\t\t $args = [':R_Name'=>$this->R_Name, ':R_Email'=>$this->R_Email, ':R_Phone'=>$this->R_Phone,\n ':R_License'=>$this->R_License,':R_Address'=>$this->R_Address, ':R_image'=>$this->R_image,\n ':R_Password'=>$this->R_Password];\n//print_r($sql);\n//exit();\n \n //Upload FIle \n move_uploaded_file($_FILES['photoFile']['tmp_name'], $this->target_dir.$this->R_image);\n\n $stmt = DB::run($sql, $args);\n $count = $stmt->rowCount();\n return $count;\n }\n }",
"public function availablePhoto(){\n\t\t$this->query->save(\"pmj_member_photo\",array(\"registration_id\"=>getSessionUser(),\"filename_ori\"=>$this->input->post('radio-avatar'),\"filename\"=>$this->input->post('radio-avatar'),\"filename_thumb\"=>$this->input->post('radio-avatar'),\"type\"=>\"main\",\"avatar\"=>\"1\",\"submit_date\"=> date(\"Y-m-d H:i:s\"),\"status\"=>\"online\"));\n\t\t\n\t\tredirect(base_url().\"profile\");\n\t}",
"public function picture()\n\t\t{\n\t\t\tif(!Auth::check())\n\t\t\t\treturn 'fail';\n\n\t\t\t$user = Auth::user();\n\t\t\t$profile = Profile::find($user->id);\n\t\t\t$profile->picture = Input::get('picture');\n\n\t\t\tif ($profile->save())\n\t\t\t\treturn 'success';\n\t\t}",
"public function testUpdateAvatarImage()\n {\n }",
"function RegisterPerson()\n {\n if(!isset($_POST['submitted']))\n {\n return false;\n }\n // Maak een Array\n $formvars = array();\n \n $this->CollectRegistrationSubmissionPerson($formvars);\n \n \n if(!$this->SaveToDatabasePerson($formvars))\n {\n return false;\n }\n \n return true;\n }",
"function register(){\r\n //FullName\r\n $fullName = $this->safety($_REQUEST['reg_fullName']);\r\n \t$_SESSION['reg_fullName'] = $fullName;\r\n //Email\r\n \t$email = $this->safety($_REQUEST['reg_email']);\r\n \tif (! filter_var($email, FILTER_VALIDATE_EMAIL) ){\r\n \t\t$errors[] = \"Invalid email format\";\r\n \t}\r\n \telseif( $this->emailExists($email) ) {\r\n \t\t\t$errors[] = \"Email already in use\";\r\n \t}\r\n \t$_SESSION['reg_email'] = $email; //Stores email into session variable\r\n \t//Password\r\n \t$password = $_REQUEST['reg_password'];\r\n //Fav. Quote\r\n \t$quote = $this->safety($_REQUEST['reg_quote']);\r\n //Current date\r\n \t$date = date(\"Y-m-d\");\r\n //Validate name\r\n \tif(strlen($fullName) > 100 || strlen($fullName) < 2) {\r\n \t\t$errors[] = \"Your name must be between 2 and 100 characters\";\r\n \t}\r\n //Validate password\r\n \tif (strlen($password) < 6) {\r\n \t $errors[] = \"Password is too short!\";\r\n \t}\r\n \t/* Check Password Strength */\r\n /* More about regular expressions https://www.w3schools.com/php/php_regex.asp */\r\n \tif (!preg_match(\"#[0-9]+#\", $password)) {\r\n \t $errors[] = \"Password must include at least one number!\";\r\n \t}\r\n \tif (!preg_match(\"#[a-zA-Z]+#\", $password)) {\r\n \t $errors[] = \"Password must include at least one letter!\";\r\n \t}\r\n // only proceed if there are no errors.\r\n \tif(empty($errors)) {\r\n //Encrypt before sending to database\r\n $password = password_hash($password, PASSWORD_DEFAULT);\r\n \t\t//Assign a random profile picture\r\n \t\t$number = rand(1, 16); //Random number between 1 and 16\r\n \t\t$avatar = 'assets/avatars/'.$number.'.png';\r\n \t\t// prepare data to be inserted\r\n $data = [\r\n 'fullName' => $fullName,\r\n 'email' => $email,\r\n 'password' => $password,\r\n 'quote' => $quote,\r\n 'signup_date' => $date,\r\n 'avatar' => $avatar\r\n ];\r\n // wrap structure with `backticks` and content with regular \"quotemarks\"\r\n $columns = '`'.implode('`,`',array_keys($data)).'`';\r\n $values = '\"'.implode('\",\"', $data).'\"';\r\n $sql = \"INSERT INTO `users` ($columns) VALUES ($values) \";\r\n if ( $this->q($sql) ){\r\n // redirect if registration was successful.\r\n header('Location: '.site_root.'?login_form®_success='.$email);\r\n \t\t}\r\n \t\telse{\t$errors[] = \"Something went wrong: \".$this->ixd->error; }\r\n \t}\r\n return $errors;\r\n }",
"public function register($name, $gender, $fhname, $dob, $age, $education, $religion, $caste, $hno, $street, $constituency, $mandal, $village, $mobile, $phone, $email, $generalcurrentpositionlevel, $generalcurrentpositionname, $partycurrentpositionlevel, $partycurrentpositionname, $pastpositions, $otherdetails, $userimage)\n\t{\n\t\tif ($dob != '')\n\t\t{\n\t\t\t$dob1 = explode('/', $dob);\n\t\t\t$year = $dob1[2];\n\t\t} else\n\t\t{\n\t\t\tdate_default_timezone_set('Asia/Kolkata');\n\t\t\t$ageyear = date(\"Y\");\n\t\t\t$year = $ageyear - $age;\n\t\t}\n\t\tdate_default_timezone_set('Asia/Kolkata');\n\t\t$registerdate = date(\"d/m/Y\");\n\n\t\t$result = mysql_query(\"INSERT INTO register (name, gender, fhname, dob,birthyear, education, religion, caste, hno,street,constituency, mandal, village, mobile, phone, email, generalcurrentpositionlevel, generalcurrentpositionname, partycurrentpositionlevel, partycurrentpositionname, pastpositions, otherdetails,image,registerdate) VALUES ('\" . $name . \"', '\" . $gender . \"', '\" . $fhname . \"', '\" . $dob . \"','\" . $year . \"', '\" . $education . \"', '\" . $religion . \"', '\" . $caste . \"', '\" . $hno . \"','\" . $street . \"','\" . $constituency . \"', '\" . $mandal . \"', '\" . $village . \"', '\" . $mobile . \"', '\" . $phone . \"', '\" . $email . \"', '\" . $generalcurrentpositionlevel . \"', '\" . $generalcurrentpositionname . \"', '\" . $partycurrentpositionlevel . \"', '\" . $partycurrentpositionname . \"', '\" . $pastpositions . \"', '\" . $otherdetails . \"','\" . $userimage . \"','\" . $registerdate . \"')\") or die(mysql_error());\n\t\treturn $result;\n\t}",
"function profile_pic($doctor_id) {\r\n \r\n $srch = Doctor::getDoctores();\r\n $srch->addCondition('doctor_id', \"=\", $doctor_id);\r\n $doctor_data = $srch->fetch();\r\n\r\n if (intval($doctor_data['doctor_id']) < 1) {\r\n die(\"Invalid Request\");\r\n }\r\n\r\n\r\n $response = \"\";\r\n\r\n if ($_FILES['fileupload']['name'] != \"\" && $_FILES['fileupload']['error'] == 0) {\r\n $isUpload = uploadContributionFile($_FILES['fileupload']['tmp_name'], $_FILES['fileupload']['name'], $response, \"doc_profile/\");\r\n\r\n if ($isUpload) {\r\n $fls = new Files();\r\n\r\n //Check if previous file\r\n\r\n $record = $fls->getFile($doctor_id, Files::DOCTOR_PROFILE);\r\n if (intval($record['file_id']) > 0) {\r\n $dat['file_id'] = $record['file_id'];\r\n $filepath = $record['file_path'];\r\n }\r\n\r\n $dat['file_record_type'] = Files::DOCTOR_PROFILE;\r\n $dat['file_record_id'] = $doctor_id;\r\n $dat['file_path'] = $response;\r\n $dat['file_display_name'] = $_FILES['fileupload']['name'];\r\n $dat['file_display_order'] = 0;\r\n\t\t\t\t\r\n $file_id = $fls->addFile($dat);\r\n\r\n Message::addMessage(\"Profile picture is successfully changed\");\r\n $removeFilePath = CONF_INSTALLATION_PATH . 'user-uploads/' . $filepath;\r\n unlink($removeFilePath);\r\n\t\t\t\tdieJsonSuccess(Message::getHtml());\r\n } else {\r\n\t\t\t\t Message::addErrorMessage($response);\r\n\t\t\t\tdieJsonError(Message::getHtml());\r\n \r\n }\r\n } else {\r\n Message::addErrorMessage(\"Error While changing the profile picture.\");\r\n\t\t\t//Message::addErrorMessage($this->Banners->getError());\r\n\t\t\tdieJsonError(Message::getHtml());\r\n }\r\n\r\n //redirectUser(generateUrl('doctors'));\r\n }",
"function dialogue_add_user_picture_fields(stdClass &$user) {\n global $PAGE;\n\n $user->fullname = fullname($user);\n $userpic = new user_picture($user);\n $imageurl = $userpic->get_url($PAGE);\n $user->imageurl = $imageurl->out();\n if (empty($user->imagealt)) {\n $user->imagealt = get_string('pictureof', '', $user->fullname);\n }\n return;\n}",
"public function registration( array $data )\n\t{\n\t\tif( !empty( $data ) ){\n\t\t\t\n\t\t\t// Trim all the incoming data:\n\t\t\t$trimmed_data = array_map('trim', $data); //echo '<pre>'; print_r($trimmed_data);\n\t\t\t// escape variables for security\n\t\t\t$name = mysqli_real_escape_string( $con, $trimmed_data['name'] );\n\t\t\t$nick_name = mysqli_real_escape_string( $con, $trimmed_data['nick_name'] );\n\t\t\tif($nick_name=='')\n\t\t\t{\n\t\t\t\t$new_nick_name = 'lazygamer'.mt_rand(0,10000).''; //echo $new_nick_name; die();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$new_nick_name = $nick_name; //echo $nick_name; die();\n\t\t\t}\n\t\t\t$password = mysqli_real_escape_string( $con, $trimmed_data['password'] );\n\t\t\t$cpassword = mysqli_real_escape_string( $con, $trimmed_data['confirm_password'] );\n\t\t\t$gender = mysqli_real_escape_string( $con, $trimmed_data['gender'] );\n\t\t\t$address = mysqli_real_escape_string( $con, $trimmed_data['address'] );\n\t\t\t$contact_no = mysqli_real_escape_string( $con, $trimmed_data['contact_no'] );\n\t\t\t$file = $_FILES['file']['name'];\t\n\t\t\t\n\t\t\t// Check for an email address:\n\t\t\tif (filter_var( $trimmed_data['email'], FILTER_VALIDATE_EMAIL)) {\n\t\t\t\t$email = mysqli_real_escape_string( $con, $trimmed_data['email']);\n\t\t\t} else {\n\t\t\t\tthrow new Exception( \"Please enter a valid email address!\" );\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif((!$name) || (!$email) || (!$password) || (!$cpassword) ) {\n\t\t\t\tthrow new Exception( FIELDS_MISSING );\n\t\t\t}\n\t\t\tif ($password !== $cpassword) {\n\t\t\t\tthrow new Exception( PASSWORD_NOT_MATCH );\n\t\t\t}\n\t\t\t$password = md5( $password );\n\t\t\t$query = \"INSERT INTO users (id, name, nick_name, email, password, contactno, gender, shippingAddress, user_picture, regDate) VALUES (NULL, '$name', '$new_nick_name', '$email', '$password', '$contact_no', '$gender', '$address', '$file', CURRENT_TIMESTAMP)\";\n\t\t\tif(mysqli_query($con, $query))return true;\n\t\t} else{\n\t\t\tthrow new Exception( USER_REGISTRATION_FAIL );\n\t\t}\n\t}",
"function updatePicture($picture,$firebase)\n\t{\n \t\t$CI=&get_instance();\n \t\tdefine('DEFAULT_PATH','users/'.$CI->session->userdata('user').'/');\n \t\t$firebase->set(DEFAULT_PATH.'picture',$picture);\n \t\t$firebase->set(DEFAULT_PATH.'last_updated',date(\"m/d/Y\"));\n \t\treturn $firebase->get(DEFAULT_PATH.'picture');\n\t}",
"public function register() {\n $this->autoLayout = false;\n header('Content-Type: application/json');\n $this->User->recursive = -1;\n if ($this->request->is('post')) {\n $is_present = $this->User->findByEmail($this->request->data['User']['email'], 'User.email');\n if (empty($is_present)) {\n $this->request->data['User']['password'] = AuthComponent::password($this->request->data['User']['password']);\n $this->request->data['User']['is_login'] = 1;\n $image_upload_user = $this->_upload($this->request->data['Picture']['imagex']);\n /*if (!empty($image_upload_user)) {\n $this->loadModel('Picture');\n $this->_upload($this->request->data['Picture']['round_image'], 'round_images', $image_upload_user);\n $data['Picture']['image'] = $image_upload_user;\n //$data['Picture']['user_id'] = $user_obj['User']['id'];\n $this->Picture->create();\n $this->Picture->save($data);\n $this->request->data['User']['profile_img'] = $data['Picture']['image'];\n }*/\n $this->User->create();\n if ($this->User->save($this->request->data)) {\n if (!empty($image_upload_user)) {\n $this->loadModel('Picture');\n $this->_upload($this->request->data['Picture']['round_image'], 'round_images', $image_upload_user);\n $data['Picture']['image'] = $image_upload_user;\n $data['Picture']['user_id'] = $this->User->id;\n $this->Picture->create();\n $this->Picture->save($data);\n $this->request->data['User']['profile_img'] = $data['Picture']['image'];\n }\n // call device token function \n $device_type = $this->request->data['DeviceToken']['device_type'];\n $this->_deviceToken($this->User->id, $this->request->data['DeviceToken']['device_token'], $device_type, $this->request->data['DeviceToken']['stage']);\n $user = $this->User->findById($this->User->id);\n $user = $user['User'];\n \n // Add 10 credits\n $Transaction = array();\n $Transaction['user_id'] = $this->User->id;\n if ($device_type == 'ios') {\n $Transaction['itunes_product'] = 'com.dicu.app.10credits';\n } else {\n $Transaction['android_product'] = 'com.dicu.app.10credits';\n }\n $Transaction['amount'] = 0;\n $Transaction['description'] = '10 Credits Points';\n //$Transaction['time_stamp'] = date('Y-m-d H:i:s');\n $Transaction['credit'] = 10;\n $this->_credit(compact('Transaction'));\n \n // Send Welcome Email\n $body = '<br/><br/>Hi there,<br/><br/>'\n . 'I\\'d like to thank you for joining the Did I See U Real Time Dating App…. the app that is powered by real life interactions! '\n . 'As a thank you for joining our online dating community, I have credited your account with 10 Free Credits.<br/><br/>'\n . 'Go out and see the people around you and never miss a dating opportunity again!<br/><br/>'\n . 'The app that gives you a second chance to make a first impression.<br/><br/>'\n . 'Good Luck! Best regards, <br/>The Did I See U Team!<br/><br/><a href=\"www.didiseeu.com\"><img width=\"150\" src=\"http://didiseeu.com/resources/images/did-see-u-logo.png\" title=\"DidISeeU.com\" alt=\"DidISeeU.com\"></a>';\n \n $Email = new CakeEmail();\n $Email->from(array('[email protected]' => 'DidISeeU.com'));\n $Email->to($this->request->data['User']['email']);\n $Email->subject('Welcome to DID I SEE U!');\n $Email->emailFormat('html');\n $sent_email = $Email->send($body);\n \n $this->set(compact('user', 'sent_email', 'device_type')); \n //die(json_encode(array('success' => true, 'user' => $user['User']))); \n }\n } else {\n die(json_encode(array('success' => false, 'msg' => 'This email is already in use, please try another.')));\n }\n } else {\n die(json_encode(array('success' => false, 'msg' => 'Invalid request')));\n }\n }",
"public function UpdatePersonnage(){\r\n $this->idPost();\r\n $this->lastFileNamePost();\r\n $this->titlePost();\r\n $this->contentPost();\r\n $this->personnage(); \r\n // Testons si le fichier a bien été envoyé et s'il n'y a pas d'erreur\r\nif (isset($_FILES['file']) AND $_FILES['file']['error'] == 0){\r\n // Testons si le fichier n'est pas trop gros\r\n if ($_FILES['file']['size'] <= 2000000)\r\n {\r\n \r\n unlink(\"public/images/personnage/\" . $_POST['lastFileName']);\r\n \r\n $infosfichier = pathinfo($_FILES['file']['name']);// le'extention du fichier envoye .jpg etc\r\n \r\n $extension_upload = $infosfichier['extension'];//on le met dans un tableau\r\n \r\n $extensions_autorisees = array('jpg', 'jpeg', 'gif', 'png');// les extention qu'on acceptes\r\n \r\n\t\t $name = $infosfichier['filename'];// On recupere le nom du fichier envoye\r\n \r\n\t\t $file = 'Time' .time(). 'Name' .$name. '.' .$extension_upload;\r\n //Nom du fichier qu'on lui donne Time du moment + name + nom du fichier + extention\r\n \r\n // Testons si l'extension du fichier est egale a celle que l'on autorise\r\n if (in_array($extension_upload, $extensions_autorisees))\r\n {\r\n // On peut valider le fichier et le stocker définitivement\r\n move_uploaded_file($_FILES['file']['tmp_name'], 'public/images/personnage/' . $file);\r\n }else{\t \r\n echo \"<script>alert(\\\"L'extension du fichier n'est pas autorisée. Seuls les fichiers jpg, jpeg, png sont acceptés.\\\")</script>\";\r\n}\r\n }else{\r\n echo \"<script>alert(\\\"Le fichier est trop volumineux (Poids limité à 4Mo)\\\")</script>\";\r\n\t\t}\r\n }else{\r\n $file = $this->_lastFileNamePostSecure;\r\n} \r\n $this->_personnageManager->updatePersonnage($this->_idPostSecure, $this->_titlePostSecure, $this->_contentPostSecure, $file);\r\n \r\n header('location: GestionPersonnage'); \r\n }",
"public function person() {\n $personId = $_REQUEST['id'];\n $person = $this->tmdb->getPerson($personId);\n $imageUrl = $this->tmdb->getImageUrl($person['profile_path'], TMDb::IMAGE_PROFILE, 'w185');\n //$images = $this->tmdb->getPersonImages($personId);\n $credits = $this->tmdb->getPersonCredits($personId);\n $map = array('person' => $person, 'imageUrl' => $imageUrl, 'credits' => $credits);\n $this->reply($map);\n }",
"public function add_pic() {\n if (isset($_POST) && !empty($_POST) && isset($_POST['add_pic']) && !empty($_POST['add_pic'])) {\n if (isset($_POST['token']) && $this->_model->compareTokens($_POST['token'])) {\n if ($this->_model->addPicture($_POST['picture'])) {\n $this->_model->setFlash(\"add_success\", \"Photo ajoutée avec succès!\");\n $this->redirect(\"/montage\");\n }\n }\n }\n $this->_model->setFlash(\"add_error\", \"Erreur lors de l'ajout de votre photo!\");\n $this->redirect(\"/montage\");\n }",
"public function testUpdatePerson()\n {\n }",
"function saveUserPic($img,$action)\n\t\t{\n\t\t\t//checking that product with order id is present or not\n\t\t\tif($action == 'pro')\n\t\t\t{\n\t\t\t\t//update user profile pic\n\t\t\t\t$update = $this->manageContent->updateValueWhere('user_info', 'profile_image', 'files/pro-image/'.$img, 'user_id', $_SESSION['user_id']);\n\t\t\t}\n\t\t\telseif($action == 'cov')\n\t\t\t{\n\t\t\t\t//update user cover pic\n\t\t\t\t$update = $this->manageContent->updateValueWhere('user_info', 'cover_image', 'files/cov-image/'.$img, 'user_id', $_SESSION['user_id']);\n\t\t\t}\n\t\t}",
"function setProfilePicture(){ \n\t\t\t\t$this->__dataDecode();\n\t\t\t\t$data=$this->data;\n\t\t\t\tpr($this->data);\n\t\t\t\tpr($data); \n\t\t\t\t//print_R($this->data)\n\t\t\t\techo $this->webroot.'/webroot/images/adv1.jpg';\n\t\t\t\t$string\t= base64_encode(file_get_contents('http://softprodigy.in/iWrestled/webroot/images/adv1.jpg'));\n\t\t\t\t$playerId = $data['User']['playerId'];\n\t\t\t\t$token = $data['User']['secToken'];\n\t\t\t\n\t\t\t\tpr($string);die;\n\t\t\t\tif(isset($string) && $string !='' && $string !='NULL'){//pr('ok');die;\n\t\t\t\t\t$imageName\t\t= $this->createImage($string);\n\t\t\t\t\t$imageDirectory\t\t= '';\n\t\t\t\t\t$thumbDirectory\t\t= 'img/upload_userImages';\n\t\t\t\t\t$thumbWidth\t\t\t= 300;\n\t\t\t\t\t$this->createThumbnail($imageDirectory, $imageName, $thumbDirectory, $thumbWidth);\n\t\t\t\t\t$requiredData['profilePicture']\t= \t$imageName;\n\t\t\t\t\tunlink($imageName);\n\t\t\t\t\t//pr($token);die('ok');\n\t\t\t\t\t$data['User']['id'] = $this->data['User']['playerId'];\n\t\t\t\t\t$data['User']['secToken'] = $this->data['User']['secToken'];\n\t\t\t\t\t$details = $this->User->find('first', array('conditions' => array('User.id' => $data['User']['id'],'User.secToken' => $data['User']['secToken'])));//pr($details);die;\n\t\t\t\t\tif(!empty($details)){\n\t\t\t\t\t\n\t\t\t\t\t$query\t\t= \"UPDATE users set image = '\".$requiredData['profilePicture'].\"' WHERE id = '\".$playerId.\"' and secToken = '\".$token.\"' \";\n\t//pr($query);die;\n\t\t\t\t\t$resource\t= mysql_query($query);\n\t\t\t\t\tif($resource){\n\t\t\t\t\t\t$response['error']\t\t= 0;\n\t\t\t\t\t\t$response['response']['msg']\t= \"profilePicture Successfully changed.\";\n\t\t\t\t\t\t$response['response']['profilePicture']\t= PROFILE_IMAGE_URL.'upload_userImages/'.$requiredData['profilePicture'];\t\t\t\t$response['response']['message']\t= 'setProfilePicture successfully';\n\t\t\t\t\t\t$this->set('response', $response);\n\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\tdie();\n\n\t\t\t\t\t}else{\n\t\t\t\t\n\t\t\t\t\t\t$response['error']\t\t= 1;\n\t\t\t\t\t\t$response['response']['message']\t= \"setProfilePicture Un-successfully\";\n\t\t\t\t\t\t$this->set('response', $response);\n\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\tdie();\t\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t}\telse{\n\t\t\t\t\n\t\t\t\t\t\t\t$response['error']\t\t\t= 1;\n\t\t\t\t\t\t\t$response['response']['result'] \t= 'failure';\n\t\t\t\t\t\t\t$response['response']['message']\t= 'UnAuthorized User';\n\t\t\t\t\t\t\t$this->set('response', $response);\n\t\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\t\tdie();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdie;\t\t\n\t\t\t}",
"function verify_person () {\n $bh=new gs_base_handler($this->data,$this->params);\n $f=$bh->validate();\n if (!is_object($f) || !is_a($f,'g_forms')) return $f;\n $d=$f->clean();\n\n $rec=person($this->params['role']);\n if (!$rec) {\n $f->trigger_error('FORM_ERROR','REC_NOTFOUND');\n return $bh->showform($f);\n }\n\n $fname=$this->params['field_name'].'_secret';\n $ga=new GoogleAuthenticator;\n $code=$ga->getCode($rec->$fname);\n\n\n if ($code!=$d['ga_code']) {\n $f->trigger_error('FORM_ERROR','GA_INCORRECT_CODE');\n return $bh->showform($f);\n }\n\n $person=person();\n $fname=$this->params['field_name'].'_verified';\n $person->$fname=TRUE;\n return true;\n }",
"static function changePhoto() {\n\t\t\n\t\t$case_intra = rcube_utils::get_input_value('photo_intra', RCUBE_INPUT_POST);\n\t\t$case_ader = rcube_utils::get_input_value('photo_ader', RCUBE_INPUT_POST);\n\n\t\t$info = array();\n\t\tif ( !empty($case_intra) && $case_intra == '1') {\n\t\t\t$info['mineqpublicationphotointranet'] = 1;\n\t\t} else {\n\t\t\t$info['mineqpublicationphotointranet'] = 0;\n\t\t}\n\t\t\n\t\tif ( !empty($case_ader) && $case_ader == '1' && !empty($case_intra) && $case_intra == '1')\n\t\t{\n\t\t\t$info['mineqpublicationphotoader'] = 1;\n\t\t} else {\n\t\t\t$info['mineqpublicationphotoader'] = 0;\n\t\t}\n\t\t\t\n\t\t$user_infos = melanie2::get_user_infos(Moncompte::get_current_user_name());\n\t\t\n\t\t$user_dn = $user_infos['dn'];\n\t\t$password = rcmail::get_instance()->get_user_password();\n\t\t\n\t\t$auth = Ldap::GetInstance(Config::$MASTER_LDAP)->authenticate($user_dn, $password);\n\t\t\n\t\tif(Ldap::GetInstance(Config::$MASTER_LDAP)->modify($user_dn, $info)) {\n\t\t\trcmail::get_instance()->output->show_message(rcmail::get_instance()->gettext('photo_pub_ok', 'melanie2_moncompte'), 'confirmation');\n\t\t} else {\n\t\t\t$err = Ldap::GetInstance(Config::$MASTER_LDAP)->getError();\n\t\t\trcmail::get_instance()->output->show_message(rcmail::get_instance()->gettext('photo_pub_nok', 'melanie2_moncompte') . $err, 'error');\n\t\t}\n\t\t\n\t}",
"public function uploadAvatar()\n {\n\n if (!empty($_FILES['avatar']['name'])) {\n\n\n // array containg the extensions of popular image files\n $allowedExtensions = array(\"gif\", \"jpeg\", \"jpg\", \"png\");\n\n //echo $_FILES['avatar']['name'];\n\n\n // make it so i can get the .extension\n $tmp = explode(\".\", $_FILES['avatar']['name']);\n\n\n // get the end part of the file\n $newfilename = hash('sha256', reset($tmp) . time());\n\n $extension = end($tmp);\n\n $_FILES['avatar']['name'] = $newfilename . \".\" . $extension;\n //echo $_FILES['avatar']['name'];\n\n\n // ok here we go.. maybe a switch might be nice?.. meh..\n if ((($_FILES['avatar']['type'] == \"image/gif\")\n || ($_FILES['avatar']['type'] == \"image/jpeg\")\n || ($_FILES['avatar']['type'] == \"image/jpg\")\n || ($_FILES['avatar']['type'] == \"image/png\"))\n && ($_FILES['avatar']['size'] < 2000000)\n && in_array($extension, $allowedExtensions)\n ) {\n\n // get the error\n if ($_FILES['avatar']['error'] > 0) {\n redirect('register.php', $_FILES['avatar']['error'], 'error');\n } else {\n // and finally move the file into the folder\n move_uploaded_file($_FILES['avatar']['tmp_name'], \"images/avatars/\" . $_FILES['avatar']['name']);\n //redirect('index.php', 'Amazing! your all signed up', 'success');\n $_SESSION['avatar'] = $_FILES['avatar']['name'];\n return true;\n }\n\n } else {\n // stop and warn the user that the file type is not suppoerted\n redirect('register.php', 'Invalid File Type! We only accept \"gif\", \"jpeg\", \"jpg\", or \"png\"', 'error');\n }\n } else {\n //move_uploaded_file($_FILES['avatar']['tmp_name'], SERVER_URI . \"images/avatars/\" . $_FILES['avatar']['name']);\n return false;\n }\n\n }",
"function reg() {\n\t\t//~ screening input data\n\t\t$tmp_arr=mysql::screening_array($_POST);\n\t\t$login=$tmp_arr['login'];\n\t\t$passwd=$tmp_arr['passwd'];\n\t\t$passwd2=$tmp_arr['passwd2'];\n\t\t$mail=$tmp_arr['mail'];\n\n\t\t//~ Check valid user data\n\t\tif ($this->check_new_user($login, $passwd, $passwd2, $mail)) {\n\t\t\t//~ User data is correct. Register.\n\t\t\t$user_key = $this->generateCode(10);\n\t\t\t$passwd = md5($user_key.$passwd.SECRET_KEY); //~ password hash with the private key and user key\n\t\t\t$query=mysql::query(\"INSERT INTO `users` (`id_user`, `login_user`, `passwd_user`, `mail_user`, `key_user`,`img`) VALUES (NULL, '\".$login.\"', '\".$passwd.\"', '\".$mail.\"', '\".$user_key.\"','/feditor/attached/image/20150313/20150313102144_79301.jpg');\");\n\t\t\tif ($query) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tself::$error='Произошла ошибка при регистрации нового пользователя. Связаться с администрацией.';\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function Uploadpicture()\r\n\t\t{\r\n\t\t}",
"function EditPerson()\n {\n if(!isset($_POST['submitted']))\n {\n return false;\n }\n \n // Maak een Array\n $formvars = array();\n \n $this->CollectRegistrationSubmissionPerson($formvars);\n \n $formvars['edit'] = \"1\";\n \n if(!$this->SaveToDatabasePerson($formvars))\n {\n return false;\n }\n \n return true;\n }",
"function insertImage($data){\n\n\t\t\t$this->db->where('username', $this->session->userdata('usernameGradeControl'));\n\t\t\t$this->db->update('user.account',$data);\n \t\treturn TRUE;\n\n\t\t}",
"function form_upload_picture() {\n $user = $this->ion_auth->user()->row();\n $this->load->view('portofolio/form_update_foto', $user);\n }",
"public function register () {\r\n if (isset($_POST['submitr'])) {\r\n\r\n $fnm = addslashes(strip_tags($_POST['fname']));\r\n $lnm = addslashes(strip_tags($_POST['lname']));\r\n $email = addslashes(strip_tags($_POST['emailr']));\r\n $pwd = addslashes(strip_tags($_POST['pwdr']));\r\n\r\n if ($fnm !==\"\" && $lnm !==\"\" && $email !==\"\" && $pwd!==\"\") {\r\n\r\n\r\n $s = \"INSERT INTO users (firstName,lastName,email, password) VALUES (?,?,?,?)\";\r\n $sql = $this->_r-> prepare($s);\r\n $sql->execute(array($fnm,$lnm,$email,$pwd));\r\n\r\n echo \"Successfully registered\";\r\n\r\n\r\n\r\n }else {\r\n echo \"Please fill all the information\";\r\n }\r\n\r\n }\r\n\r\n\r\n }",
"public function update(Request $r) {\n if (!filter_var($r->email, FILTER_VALIDATE_EMAIL)) {\n $r->session()->flash('sms1', \"Your email is invalid. Check it again!\");\n return redirect('/profile/edit/'.$r->id)->withInput();\n }\n $count_email = DB::table('memberships')->where('id', \"!=\", $r->id)\n ->where('email', $r->email)\n ->count();\n if($count_email>0)\n {\n $r->session()->flash('sms1', \"The email '{$r->email}' already exist. Change a new one!\");\n return redirect('/profile/edit/'.$r->id);\n }\n $data = array(\n 'first_name' => $r->first_name,\n 'last_name' => $r->last_name,\n 'gender' => $r->gender,\n 'email' => $r->email,\n 'username' => $r->username\n );\n if($r->photo) {\n $file = $r->file('photo');\n $file_name = $file->getClientOriginalName();\n $ss = substr($file_name, strripos($file_name, '.'), strlen($file_name));\n $file_name = 'profile' .$r->id . $ss;\n \n $destinationPath = 'uploads/profiles/'; // usually in public folder\n \n // upload 250\n $n_destinationPath = 'uploads/profiles/small/';\n $new_img = Image::make($file->getRealPath())->resize(120, null, function ($con) {\n $con->aspectRatio();\n });\n \n\n $nn_destinationPath = 'uploads/profiles/smaller/';\n $new_img1 = Image::make($file->getRealPath())->resize(30, null, function ($con) {\n $con->aspectRatio();\n });\n $new_img1->save($nn_destinationPath . $file_name, 80);\n $new_img->save($n_destinationPath . $file_name, 80);\n $file->move($destinationPath, $file_name);\n $data['photo'] = $file_name;\n } \n $sms = \"All changes have been saved successfully.\";\n $sms1 = \"Fail to to save changes, please check again!\";\n $i = DB::table('memberships')->where('id', $r->id)->update($data);\n if ($i)\n {\n $r->session()->flash('sms', $sms);\n return redirect('/profile/edit/'.$r->id);\n }\n else\n {\n $r->session()->flash('sms1', $sms1);\n return redirect('/profile/edit/'.$r->id);\n }\n\n }",
"public function p_signup() {\n $duplicate = DB::instance(DB_NAME)->select_field(\"SELECT email FROM users WHERE email = '\" . $_POST['email'] . \"'\");\n \n //If email already exists \n if($duplicate){ \n //Redirect to error page \n Router::redirect('/users/login/?duplicate=true');\n }\n\n // Encrypt the password \n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']); \n\n // Create an encrypted token via their email address and a random string\n $_POST['token'] = sha1(TOKEN_SALT.$_POST['email'].Utils::generate_random_string()); \n\n // Insert this user into the database\n $user_id = DB::instance(DB_NAME)->insert('users', $_POST);\n\n\n\n //Image Upload\n Upload::upload($_FILES, \"/uploads/avatars/\", array(\"JPG\", \"JPEG\", \"jpg\", \"jpeg\", \"gif\", \"GIF\", \"png\", \"PNG\"), $user_id);\n \n $filename = $_FILES['avatar']['name']; // original filename (i.e. picture.jpg)\n $extension = substr($filename, strrpos($filename, '.')); // filename format extension (i.e. .jpg)\n $avatar = $user_id.$extension; // user id + .jpg or .png or .gif (i.e. 26.png)\n\n // Add Image to DB in \"avatar\" column\n $data = Array(\"avatar\" => $avatar);\n DB::instance(DB_NAME)->update(\"users\", $data, \"WHERE id = '\".$user_id.\"'\"); \n\n // Send them back to the login page with a success message\n Router::redirect(\"/users/login/?success=true\"); \n\n \n }",
"public function actualizarRutaImagenUser($rutaFichero, $email) {\r\n $dato = array('foto' => $rutaFichero);\r\n // actualiza en la DB la ruta de la foto\r\n $this->db->where('email_usuario', $email);\r\n $this->db->update('usuario', $dato);\r\n }",
"public function saveImageToUser($image, $user);",
"public function update_profile() {\n\t\tloggedOnly();\n\n\t\t// Busca o usuario\n\t\t$user = auth();\n\n\t\t// Pega o email\n\t\t$email = $this->input->post( 'email' ) ? \n\t\t\t\t $this->input->post( 'email' ) :\n\t\t\t\t $user->email;\n\n\t\t// Verifica se o email foi alterado\n\t\tif( $email !== $user->email ) {\n\n\t\t\t// Verifica se o email é unico\n\t\t\tif( $this->User->email( $email ) ) {\n\t\t\t\treturn reject( 'E-mail ja cadastrado no sistema' );\n\t\t\t}\n\t\t\t\n\t\t\t// Seta o email\n\t\t\t$user->email = $email;\n\t\t}\n\n\t\t// Verifica se a senha foi alterada\n\t\tif( $password = $this->input->post( 'password' ) ) {\n\t\t\t$user->setPassword( $password );\n\t\t}\n\n\t\t// seta o nome\n\t\t$user->name = $this->input->post( 'name' ) ? \n\t\t\t\t\t $this->input->post( 'name' ) : \n\t\t\t\t\t $user->name;\n\n\t\t// Verifica se a foto foi alterada\n\t\tif( $base64 = $this->input->post( 'image' ) ) {\n\n\t\t\t// Guarda a imagem\n\t\t\tif( $midia_id = $this->__saveUserImage( $base64 ) ) {\n\t\t\t\t$user->midia_id = $midia_id;\n\t\t\t} else return reject( 'Erro ao salvar a imagem do usuário' );\n\t\t}\n\n\t\t// salvar a alteração\n\t\tif( $user->save() ) {\n\t\t\treturn resolve( $user->authData() );\n\t\t} else return reject( 'Erro ao realizar a ação' );\n\t}",
"function addPerson(){\n\t\t \n\t\t $this->getMakeMetadata();\n\t\t $changesMade = false;\n\t\t $requestParams = $this->requestParams;\n\t\t if(isset($requestParams[\"uuid\"]) && isset($requestParams[\"role\"])){\n\t\t\t\t\n\t\t\t\t$personUUID = trim($requestParams[\"uuid\"]);\n\t\t\t\t$uri = self::personBaseURI.$personUUID;\n\t\t\t\t\n\t\t\t\tif(isset($requestParams[\"rank\"])){\n\t\t\t\t\t $rank = $requestParams[\"rank\"];\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t $rank = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$pObj = new dbXML_dbPerson;\n\t\t\t\t$pObj->initialize();\n\t\t\t\t$pObj->dbPenelope = true;\n\t\t\t\t$pFound = $pObj->getByID($personUUID);\n\t\t\t\tif($pFound){\n\t\t\t\t\t $name = $pObj->label;\n\t\t\t\t\t if($requestParams[\"role\"] == \"creator\"){\n\t\t\t\t\t\t $persons = $this->rawCreators;\n\t\t\t\t\t\t $persons = $this->addPersonRank($persons, $name, $uri, $rank);\n\t\t\t\t\t\t $this->rawCreators = $persons;\n\t\t\t\t\t\t $changesMade = true;\n\t\t\t\t\t }\n\t\t\t\t\t elseif($requestParams[\"role\"] == \"contributor\"){\n\t\t\t\t\t\t $persons = $this->rawContributors;\n\t\t\t\t\t\t $persons = $this->addPersonRank($persons, $name, $uri, $rank);\n\t\t\t\t\t\t $this->rawContributors = $persons;\n\t\t\t\t\t\t $changesMade = true;\n\t\t\t\t\t }\n\t\t\t\t\t elseif($requestParams[\"role\"] == \"person\"){\n\t\t\t\t\t\t $persons = $this->rawLinkedPersons;\n\t\t\t\t\t\t $persons = $this->addPersonRank($persons, $name, $uri, $rank);\n\t\t\t\t\t\t $this->rawLinkedPersons = $persons;\n\t\t\t\t\t\t $changesMade = true;\n\t\t\t\t\t }\n\t\t\t\t\t else{\n\t\t\t\t\t\t \n\t\t\t\t\t }\n\t\t\t\t}\n\t\t }\n\t\t \n\t\t if($changesMade){\n\t\t\t\t$this->saveMetadata(); //save the results\n\t\t }\n\t\t return $changesMade;\n\t }",
"public function UpdateProfile(){\n if($this->session->userdata('username') != ''){\n $profileImageName = time() . '-' . $_FILES[\"profileImage\"][\"name\"]; \n $fullname = $this->input->post('fullname');\n $genres = $this->input->post('genres[]');\n $check_array = implode(',',$genres); \n $email = $this->input->post('email');\n $profileImageSize = $_FILES['profileImage']['size'];\n $profileImageTmp = $_FILES[\"profileImage\"][\"tmp_name\"];\n\n $this->load->model('Users','us');\n $createUserProfile = $this->us->updateUserProfile($profileImageName,$fullname,$check_array,$profileImageSize,$profileImageTmp,$email);\n $this->load->helper('url');\n redirect(base_url().'index.php/UserController/Enter');\n } else {\n $this->load->helper('url');\n redirect(base_url().'index.php/UserController/LoginButton');\n }\n\n }",
"public function updatePhoto()\n {\n //Intenta subir la foto que viene en el campo 'photo'\n if ($photo = $this->uploadPhoto('photo')) {\n //Modifica el campo photo del usuario y lo intenta actualizar\n $this->photo = $photo;\n return $this->update();\n }\n }",
"public function update_profileImage() {\n \n $data = $_POST['image'];\n\n list($type, $data) = explode(';', $data);\n list(, $data) = explode(',', $data);\n\n $data = base64_decode($data);\n $imageName = time().'.png';\n\n file_put_contents('files/uploads/users/'.$imageName, $data);\n $data = $this->request->data;\n $id = $this->Auth->user('id');\n $profile_image = $imageName;\n if (!empty($profile_image)) {\n $ext = substr(strtolower(strrchr($profile_image, '.')), 1);\n $arr_ext = array(\n 'jpg',\n 'jpeg',\n 'gif',\n 'png',\n );\n if (in_array($ext, $arr_ext)) {\n move_uploaded_file($profile_image, WWW_ROOT . 'files/uploads/users/' . $profile_image);\n \n $data['profile_image'] = $profile_image;\n $update = $this->User->updateUser($id, $data);\n if ($update == 1) {\n $this->Session->write('Auth.User.profile_image', $profile_image);\n die();\n }\n }\n }\n \n \n \n }",
"function change_picture($data, $pic) {\n $data = str_replace('data:image/png;base64', '', $data);\n $data = str_replace(' ', '+', $data);\n $data = base64_decode($data);\n $source_img = imagecreatefromstring($data);\n $file = '../users/'.$_SESSION['username'].'/'.$pic.'.jpg';\n imagejpeg($source_img, $file,75);\n imagedestroy($source_img);\n http_response_code(200);\n}",
"public function register_post()\n {\n\n $first_name = strip_tags($_POST['first_name']);\n $last_name = strip_tags($_POST['last_name']);\n $email = strip_tags($_POST['email']);\n $password = $_POST['password'];\n $photo_path = 'default.png';\n $phone = '';\n $create_at = time();\n $update_at = time();\n $roles = 1;\n\n $token = base64_encode(random_bytes(32));\n\n $emailConfig = [\n 'protocol' => 'smtp',\n 'smtp_host' => 'ssl://smtp.googlemail.com',\n 'smtp_user' => '[email protected]',\n 'smtp_pass' => 'emansudirman123',\n 'smtp_port' => 465,\n 'mailtype' => 'html',\n 'charset' => 'utf-8',\n 'newline' => \"\\r\\n\"\n ];\n\n if (!empty($first_name) && !empty($last_name) && !empty($email) && !empty($password)) {\n // $data['email'] = $email;\n $user_check = $this->user->check_user($email);\n\n if ($user_check > 0) {\n $this->response([\n 'status' => false,\n 'message' => 'Email already registered, check your email for verification'\n ], 404);\n } else {\n $data = [\n 'first_name' => $first_name,\n 'last_name' => $last_name,\n 'email' => $email,\n 'password' => password_hash($password, PASSWORD_DEFAULT),\n 'photo_profile_path' => $photo_path,\n 'phone' => $phone,\n 'create_at' => $create_at,\n 'update_at' => $update_at,\n 'is_active' => 0,\n 'roles' => $roles,\n 'deleted_at' => '',\n 'last_login' => ''\n ];\n\n $insertdata = $this->user->insertdata($data);\n\n if ($insertdata) {\n\n $this->email->initialize($emailConfig);\n $this->email->from('[email protected]', 'User Activation');\n $this->email->to($email);\n $this->email->subject('Account Verification');\n $this->email->message('Click this link to verify you account : <a href=\"' . base_url() . 'auth/verify?email=' . $email . '&token=' . urlencode($token) . '\">Activate</a>');\n if ($this->email->send()) {\n $this->response([\n 'status' => true,\n 'message' => 'Success registered, please check email for verification your account'\n ], 200);\n } else {\n $this->response([\n 'status' => false,\n 'message' => 'Failed to register'\n ], 404);\n }\n } else {\n $this->response([\n 'status' => false,\n 'message' => 'Failed to register'\n ], 404);\n }\n }\n } else {\n $this->response([\n 'status' => false,\n 'message' => 'Something wrong'\n ], 404);\n }\n }",
"public function update_user($email, $lastname, $firstname, $genre, $phone, $target_file) {\n global $pdo;\n $user = $this->get_user_talent_by_email($email, 'users');\n\n if($user) {\n $old_author = $user['firstname'].' '.$user['lastname'];\n $author = $firstname.' '.$lastname;\n $query = $pdo->prepare(\"UPDATE users SET lastname=?, firstname=?, genre=?, phone=? , profile_target = ? WHERE email = ?\");\n $query->bindValue(1, $lastname);\n $query->bindValue(2, $firstname);\n $query->bindValue(3, $genre);\n $query->bindValue(4, $phone);\n $query->bindValue(5, $target_file);\n $query->bindValue(6, $email);\n $query->execute();\n\n $this->update_author($old_author, $author, 'articles');\n $this->update_author($old_author, $author, 'events');\n $_SESSION['message_CB_admin'] = 'Votre profil à bien été mis a jour';\n } else {\n return json_encode(array('error' => \"Nous n'avons pas pu mettre à jour votre profil. Merci de r&essayer ultérieurement\"));\n }\n }",
"public function doRegister(RegisterRequest $request)\n {\n try {\n $data = $request->all();\n // $image = \"/assets/photo/no_avatar.jpg\";\n //get avatar form account fb or google\n // if ($data['fb_google'] == 1)\n // $image = DB::table('facebook_temp')->where('facebook_id', $data['facebook_id'])->first()->picture;\n // else if ($data['fb_google'] == 2)\n // $image = DB::table('google_temp')->where('google_id', $data['google_id'])->first()->avatar;\n $profile_sample = \"\";\n if ($data['manage_flag'] == 0) {\n $profile_sample = \"assets/photo/client_sample.png\";\n } else if ($data['manage_flag'] == 1) {\n $profile_sample = \"assets/photo/agency_sample.png\";\n }\n $expire_date = date(\"Y-m-d H:i:s\");\n $token = md5($expire_date).md5($data['e_mail']);\n $created_at = date('Y-m-d');\n $param = [\n 'e_mail' => $data['e_mail'],\n 'password' => md5($data['password']),\n 'username' => $data['username'],\n 'displayname' => '',\n 'manage_flag' => $data['manage_flag'],\n 'fb_google' => 0,\n 'api_token' => $token,\n 'expire_date' => $expire_date,\n 'zip_code' => '',\n 'created_at' => $created_at,\n 'set_cost' => \"[]\", \n 'image' => $profile_sample\n ];\n $id = DB::table('users')->insertGetId($param);\n if (!empty($id)) {\n $user = DB::table('users')->where('id', $id)->first();\n $dataLog = [\n 'user_id' => $user->id,\n 'ipaddress' => $request->ip(),\n 'login_day' => date(\"Y-m-d\"),\n ];\n DB::table('user_login_info')->insert($dataLog);\n //send mail\n $data['token'] = $token;\n $this->insertDefaultUserData($id);\n Mail::queue(new \\App\\Mail\\RegisterSuccess($data));\n return redirect('/registersuccess');\n }\n return redirect('/register');\n } catch(Exception $e) {\n return response()->json([\n 'status' => false,\n ]);\n }\n }",
"public function store(){\n //check request method\n if($_SERVER['REQUEST_METHOD'] !== 'POST'){\n redirect('pages/home');\n }\n $validate=$this->validateRegForm();\n if(!$validate['result']){\n $validate['errors']['status'] = 'failure';\n echo json_encode($validate['errors']);\n die();\n }else{\n //store validated user\n $author=$this->authorModel->insert($validate);\n $id=$author->id;\n $this->authorModel->storeImage($id);\n $this->setSessionTo($author);\n unset($validate['password']);//to prevent output password\n $validate['status'] = 'success';\n echo json_encode($validate);\n };\n }",
"public function register()\n {\n checkLoginSession();\n\n if (isset($_POST['submit'])) {\n /**\n * POSTED RECORDS\n * For $data['avatar'], that means inserting default.jpeg record into database,\n * [+++] which later on the app will read from root assets to load default avatar.\n * [+++] in case user want to change avatar, it's from edit profile settings on the dashboard.\n */\n $data['first_name'] = $this->input->post('first_name');\n $data['last_name'] = $this->input->post('last_name');\n $data['email'] = $this->input->post('email');\n $data['email_confirm'] = $this->input->post('email_confirm');\n $data['password'] = $this->input->post('password');\n $data['password_confirm'] = $this->input->post('password_confirm');\n $data['avatar'] = 'default.jpeg';\n\n // Email validation step 1\n if ($data['email'] !== $data['email_confirm']) {\n $this->__setFlashData($data);\n $this->session->set_flashdata('message', 'Email dan Konfirmasi Email harus sama!');\n redirect('auth/register');\n }\n\n // Email validation step 2\n $user = $this->user->getUserByEmail($data['email']);\n if ($user === true) {\n $this->__setFlashData($data);\n $this->session->set_flashdata('message', 'Email sudah terdaftar dan tidak dapat digunakan!');\n redirect('auth/register');\n }\n\n // Password validation\n if ($data['password'] !== $data['password_confirm']) {\n $this->__setFlashData($data);\n $this->session->set_flashdata('message', 'Pastikan password dan konfirmasi_password sama!');\n redirect('auth/register');\n }\n\n // Insert to db\n $user = $this->user->createUser($data);\n\n // Conditioning\n if ($user === true) {\n $this->session->set_flashdata('message', 'Akun dengan email ' . $data['email'] . ' telah berhasil dibuat!');\n redirect('auth/login');\n }\n else {\n print_r($user);\n }\n } else {\n $this->template->load('template/login_template', 'register/index');\n } // End if isset $_POST submit.\n }",
"function updateRoomPics($roomID,$pictureurl){\n $add_data = array(\"roomID\"=>$roomID,\"url\"=>$pictureurl);\n\n if ($this->db->insert('room_pictures', $add_data))\n {\n $response['status'] = 'success';\n $response['code'] = 'image uploaded Successfuly';\n\n }\n else\n {\n $response['status'] = 'failure';\n $response['code'] = 'database failure';\n\n }\n\n return $response;\n }",
"public function updatePicture(Request $request)\n {\n $user = User::findOrFail(auth()->user()->id);\n\n\n\n //dd('radi');\n\n\n // Get current user\n if($request->has('country')&&$request->country!='Choose'){\n $user->country=$request->country;\n }\n $user->save();\n if($request->has('bio')&&$request->bio!=\"\"){\n $user->bio=$request->bio;\n //dd($request->bio);\n }\n $user->save();\n\n // Check if a profile image has been uploaded\n\n if ($request->has('profile_image')&&$request->profile_image!=null) {\n $request->validate([\n 'profile_image' => 'required|image|mimes:jpeg,png,jpg,gif|max:2048'\n ]);\n // Get image file\n $image = $request->file('profile_image');\n // Make a image name based on user name and current timestamp\n $name = str_slug($request->input('name')).'_'.time();\n // Define folder path\n $folder = '/uploads/images/';\n // Make a file path where image will be stored [ folder path + file name + file extension]\n $filePath = $folder . $name. '.' . $image->getClientOriginalExtension();\n // Upload image\n $this->uploadOne($image, $folder, 'public', $name);\n // Set user profile image path in database to filePath\n $user->profile_image = $filePath;\n }\n // Persist user record to database\n $user->save();\n\n // Return user back and show a flash message\n return redirect()->back()->with(['status' => 'Profile updated successfully.']);\n }",
"public function processpictureAction() {\n \t$this->_helper->layout->disableLayout();\n \t$this->_helper->viewRenderer->setNoRender(TRUE);\n \n \t$session = SessionWrapper::getInstance();\n \t$config = Zend_Registry::get(\"config\");\n \t$this->_translate = Zend_Registry::get(\"translate\");\n \n \t$formvalues = $this->_getAllParams();\n \n \t//debugMessage($this->_getAllParams());\n \t$user = new UserAccount();\n \t$user->populate(decode($this->_getParam('id')));\n \n \t// only upload a file if the attachment field is specified\n \t$upload = new Zend_File_Transfer();\n \t// set the file size in bytes\n \t$upload->setOptions(array('useByteString' => false));\n \n \t// Limit the extensions to the specified file extensions\n \t$upload->addValidator('Extension', false, $config->uploads->photoallowedformats);\n \t$upload->addValidator('Size', false, $config->uploads->photomaximumfilesize);\n \n \t// base path for profile pictures\n \t$destination_path = BASE_PATH.DIRECTORY_SEPARATOR.\"uploads\".DIRECTORY_SEPARATOR.\"users\".DIRECTORY_SEPARATOR.\"user_\";\n \n \t// determine if user has destination avatar folder. Else user is editing there picture\n \tif(!is_dir($destination_path.$user->getID())){\n \t\t// no folder exits. Create the folder\n \t\tmkdir($destination_path.$user->getID(), 0777);\n \t}\n \n \t// set the destination path for the image\n \t$profilefolder = $user->getID();\n \t$destination_path = $destination_path.$profilefolder.DIRECTORY_SEPARATOR.\"avatar\";\n \n \tif(!is_dir($destination_path)){\n \t\tmkdir($destination_path, 0777);\n \t}\n \t// create archive folder for each user\n \t$archivefolder = $destination_path.DIRECTORY_SEPARATOR.\"archive\";\n \tif(!is_dir($archivefolder)){\n \t\tmkdir($archivefolder, 0777);\n \t}\n \n \t$oldfilename = $user->getProfilePhoto();\n \n \t//debugMessage($destination_path);\n \t$upload->setDestination($destination_path);\n \n \t// the profile image info before upload\n \t$file = $upload->getFileInfo('profileimage');\n \t$uploadedext = findExtension($file['profileimage']['name']);\n \t$currenttime = time();\n \t$currenttime_file = $currenttime.'.'.$uploadedext;\n \n \t$thefilename = $destination_path.DIRECTORY_SEPARATOR.'base_'.$currenttime_file;\n \t$thelargefilename = $destination_path.DIRECTORY_SEPARATOR.'large_'.$currenttime_file;\n \t$updateablefile = $destination_path.DIRECTORY_SEPARATOR.'base_'.$currenttime;\n \t$updateablelarge = $destination_path.DIRECTORY_SEPARATOR.'large_'.$currenttime;\n \t//debugMessage($thefilename);\n \t// rename the base image file\n \t$upload->addFilter('Rename', array('target' => $thefilename, 'overwrite' => true));\n \t// exit();\n \t// process the file upload\n \tif($upload->receive()){\n \t\t// debugMessage('Completed');\n \t\t$file = $upload->getFileInfo('profileimage');\n \t\t// debugMessage($file);\n \t\t \n \t\t$basefile = $thefilename;\n \t\t// convert png to jpg\n \t\tif(in_array(strtolower($uploadedext), array('png','PNG','gif','GIF'))){\n \t\t\tak_img_convert_to_jpg($thefilename, $updateablefile.'.jpg', $uploadedext);\n \t\t\tunlink($thefilename);\n \t\t}\n \t\t$basefile = $updateablefile.'.jpg';\n \t\t \n \t\t// new profilenames\n \t\t$newlargefilename = \"large_\".$currenttime_file;\n \t\t// generate and save thumbnails for sizes 250, 125 and 50 pixels\n \t\tresizeImage($basefile, $destination_path.DIRECTORY_SEPARATOR.'large_'.$currenttime.'.jpg', 400);\n \t\tresizeImage($basefile, $destination_path.DIRECTORY_SEPARATOR.'medium_'.$currenttime.'.jpg', 165);\n \t\t \n \t\t// unlink($thefilename);\n \t\tunlink($destination_path.DIRECTORY_SEPARATOR.'base_'.$currenttime.'.jpg');\n \t\t \n \t\t// exit();\n \t\t// update the user with the new profile images\n \t\ttry {\n \t\t\t$user->setProfilePhoto($currenttime.'.jpg');\n \t\t\t$user->save();\n \n \t\t\t// check if user already has profile picture and archive it\n \t\t\t$ftimestamp = current(explode('.', $user->getProfilePhoto()));\n \n \t\t\t$allfiles = glob($destination_path.DIRECTORY_SEPARATOR.'*.*');\n \t\t\t$currentfiles = glob($destination_path.DIRECTORY_SEPARATOR.'*'.$ftimestamp.'*.*');\n \t\t\t// debugMessage($currentfiles);\n \t\t\t$deletearray = array();\n \t\t\tforeach ($allfiles as $value) {\n \t\t\t\tif(!in_array($value, $currentfiles)){\n \t\t\t\t\t$deletearray[] = $value;\n \t\t\t\t}\n \t\t\t}\n \t\t\t// debugMessage($deletearray);\n \t\t\tif(count($deletearray) > 0){\n \t\t\t\tforeach ($deletearray as $afile){\n \t\t\t\t\t$afile_filename = basename($afile);\n \t\t\t\t\trename($afile, $archivefolder.DIRECTORY_SEPARATOR.$afile_filename);\n \t\t\t\t}\n \t\t\t}\n \n \t\t\t$session->setVar(SUCCESS_MESSAGE, $this->_translate->translate(\"global_update_success\"));\n \t\t\t$this->_helper->redirector->gotoUrl($this->view->baseUrl(\"profile/picture/id/\".encode($user->getID()).'/crop/1'));\n \t\t} catch (Exception $e) {\n \t\t\t$session->setVar(ERROR_MESSAGE, $e->getMessage());\n \t\t\t$session->setVar(FORM_VALUES, $this->_getAllParams());\n \t\t\t$this->_helper->redirector->gotoUrl($this->view->baseUrl('profile/picture/id/'.encode($user->getID())));\n \t\t}\n \t} else {\n \t\t// debugMessage($upload->getMessages());\n \t\t$uploaderrors = $upload->getMessages();\n \t\t$customerrors = array();\n \t\tif(!isArrayKeyAnEmptyString('fileUploadErrorNoFile', $uploaderrors)){\n \t\t\t$customerrors['fileUploadErrorNoFile'] = \"Please browse for image on computer\";\n \t\t}\n \t\tif(!isArrayKeyAnEmptyString('fileExtensionFalse', $uploaderrors)){\n \t\t\t$custom_exterr = sprintf($this->_translate->translate('global_invalid_ext_error'), $config->uploads->photoallowedformats);\n \t\t\t$customerrors['fileExtensionFalse'] = $custom_exterr;\n \t\t}\n \t\tif(!isArrayKeyAnEmptyString('fileUploadErrorIniSize', $uploaderrors)){\n \t\t\t$custom_exterr = sprintf($this->_translate->translate('global_invalid_size_error'), formatBytes($config->uploads->photomaximumfilesize,0));\n \t\t\t$customerrors['fileUploadErrorIniSize'] = $custom_exterr;\n \t\t}\n \t\tif(!isArrayKeyAnEmptyString('fileSizeTooBig', $uploaderrors)){\n \t\t\t$custom_exterr = sprintf($this->_translate->translate('global_invalid_size_error'), formatBytes($config->uploads->photomaximumfilesize,0));\n \t\t\t$customerrors['fileSizeTooBig'] = $custom_exterr;\n \t\t}\n \t\t$session->setVar(ERROR_MESSAGE, 'The following errors occured <ul><li>'.implode('</li><li>', $customerrors).'</li></ul>');\n \t\t$session->setVar(FORM_VALUES, $this->_getAllParams());\n \t\t \n \t\t$this->_helper->redirector->gotoUrl($this->view->baseUrl('profile/picture/id/'.encode($user->getID())));\n \t}\n \t// exit();\n }",
"function biller_registration() {\n\t\t$user_id = $_REQUEST['user_id'];\n\t\t$company_name = $_REQUEST['company_name'];\n\t\t$company_reg_no = $_REQUEST['company_reg_no'];\n\t\t$rc_no = $_REQUEST['rc_no'];\n\t\t$tin_no = $_REQUEST['tin_no'];\n\t\t$bussiness_phone = $_REQUEST['bussiness_phone'];\n\t\t$bussiness_address = $_REQUEST['bussiness_address'];\n\t\t$biller_name = $_REQUEST['biller_name'];\n\t\t$biller_email = $_REQUEST['biller_email'];\n\t\t$biller_category_id = $_REQUEST['biller_category_id'];\n\t\t$biller_reg_type = '2';\n\t\t$image = $_FILES['bussiness_logo']['name'];\n\t\t$current_date = date(\"Y-m-d h:i:sa\");\n\t\t$biller_status = '2';\n\t\t//--1 approved, 2- pending\n\t\tif (!empty($company_name) && ($company_reg_no) && !empty($rc_no) && !empty($tin_no) && !empty($bussiness_phone) && !empty($biller_name) && !empty($biller_name) && !empty($_FILES['bussiness_logo']['name']) && !empty($user_id)) {\n\t\t\t$biller_records = $this -> conn -> get_table_row_byidvalue('biller_details', 'biller_email', $biller_email);\n\t\t\tif (empty($biller_records)) {\n\n\t\t\t\t$user_image = '';\n\t\t\t\tif ($_FILES['bussiness_logo']['name']) {\n\t\t\t\t\t$user_image = $_FILES['bussiness_logo']['name'];\n\t\t\t\t}\n\t\t\t\t$attachment = $_FILES['bussiness_logo']['name'];\n\n\t\t\t\tif (!empty($attachment)) {\n\t\t\t\t\t$file_extension = explode(\".\", $_FILES[\"bussiness_logo\"][\"name\"]);\n\t\t\t\t\t$new_extension = strtolower(end($file_extension));\n\t\t\t\t\t$today = time();\n\t\t\t\t\t$custom_name = \"bussiness_logo\" . $today;\n\t\t\t\t\t$file_name = $custom_name . \".\" . $new_extension;\n\n\t\t\t\t\tif ($new_extension == 'png' || $new_extension == 'jpeg' || $new_extension == 'jpg' || $new_extension == 'bmp') {\n\t\t\t\t\t\tmove_uploaded_file($_FILES['bussiness_logo']['tmp_name'], \"../uploads/biller_company_logo/\" . $file_name);\n\t\t\t\t\t\t$biller_company_logo = $file_name;\n\t\t\t\t\t}\n\t\t\t\t\t$original_pass = rand('10000000', '99999999');\n\t\t\t\t\t$biller_pass = md5($original_pass);\n\t\t\t\t\t$biller_insert = $this -> conn -> insertnewrecords('biller_details', 'biller_category_id,biller_name,biller_email,company_reg_no,rc_no,tin_no,biller_address,biller_contact_no,biller_company_name,biller_company_logo,biller_created_date,biller_status,biller_reg_type,biller_password,biller_original_pass', '\"' . $biller_category_id . '\",\"' . $biller_name . '\",\"' . $biller_email . '\",\"' . $company_reg_no . '\",\"' . $rc_no . '\",\"' . $tin_no . '\",\"' . $bussiness_address . '\",\"' . $bussiness_phone . '\",\"' . $company_name . '\",\"' . $biller_company_logo . '\",\"' . $current_date . '\",\"' . $biller_status . '\",\"' . $biller_reg_type . '\",\"' . $biller_pass . '\",\"' . $original_pass . '\"');\n\n\t\t\t\t\tif (!empty($biller_insert)) {\n\t\t\t\t\t\t$data_admin['biller_id'] = $biller_insert;\n\t\t\t\t\t\t$data_admin['biller_status'] = 2;\n\t\t\t\t\t\t$update_toekn = $this -> conn -> updatetablebyid('user', 'user_id', $user_id, $data_admin);\n\t\t\t\t\t\t$post = array('status' => \"true\", \"message\" => \"Biller added successfully, please wait for admin approval.\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$post = array('status' => \"false\", \"message\" => \"Technical server error\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$post = array('status' => \"false\", \"message\" => \"These Bussiness email already exist\");\n\t\t\t}\n\t\t} else {\n\t\t\t$post = array('status' => \"false\", \"message\" => \"Missing parameter\", 'company_name' => $company_name, 'company_reg_no' => $company_reg_no, 'rc_no' => $rc_no, 'tin_no' => $tin_no, 'bussiness_phone' => $bussiness_phone, 'biller_name' => $biller_name, 'biller_email' => $biller_email, 'image' => $image, 'user_id' => $user_id, 'biller_category_id' => $biller_category_id);\n\t\t}\n\t\techo $this -> json($post);\n\t}",
"function user_register($user_info)\n {\n }",
"public function testPeopleImagesCreate()\n { \n $randomId = self::$f1->randomId('person');\n $checkNoImage = self::$f1->get('/v1/people/'.$randomId['person'].'.json');\n if($checkNoImage['body']['person']['@imageURI'] != null){\n $this->testPeopleImagesCreate();\n } else {\n $img = file_get_contents('../tests/img/smilley.jpg');\n $r = self::$f1->post_img($img, '/v1/people/'.$randomId['person'].'/images'); \n $this->assertEquals('201', $r['http_code']);\n return $personId = $randomId['person'];\n }\n }",
"private function changeAvatar()\n {\n try\n {\n global $userquery; \n\n if(!userid())\n throw_error_msg(\"Please login to perform this action\");\n\n if(!isset($_FILES['avatar_file']['name']))\n throw_error_msg(\"provide avatar_file\");\n\n $array['userid'] = userid();\n $userquery->update_user_avatar_bg($array);\n\n if( error() )\n {\n throw_error_msg(error('single')); \n }\n else\n {\n $user_info = format_users($array['userid']);\n $data = array('code' => \"204\", 'status' => \"success\", \"msg\" => \"success\", \"data\" => $user_info);\n $this->response($this->json($data)); \n } \n\n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }",
"public function register_post() \n {\n $first_name = $this->post('fname');\n $last_name = $this->post('lname');\n $username = $this->post('username');\n $email = $this->post('email');\n $password = $this->post('password');\n $dob = $this->post('dob');\n $contact_no = $this->post('contact_no');\n $gender = $this->post('gender');\n $address = $this->post('address');\n $user_type = 2;//Member user\n $status = 1;//Active\n $added_date = time();\n if($first_name != '' && $last_name != '' && $username != '' && $email != '' && $password != '' && $dob != '' && $gender != '' && $address != '')\n {\n $userData = array('fname'=>$first_name,'lname'=>$last_name,'username'=>$username,'status'=>$status,\n 'email'=>$email,'password'=>$password,'dob'=>$dob,'contact_no'=>$contact_no,'address'=>$address,\n 'user_type'=>$user_type,'gender'=>$gender,'added_date'=>$added_date);\n \n $record = $this->artists_model->register_member($userData);\n $message = [\n 'status' => TRUE, \n 'message' => 'Registered successfully',\n 'status_code'=> 200\n ];\n $this->set_response($message, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code\n }\n else\n {\n $message = [\n 'status' => FALSE,\n 'message' => 'Not register,please enter required fields properly',\n 'status_code'=> 400\n ];\n $this->set_response($message, REST_Controller::HTTP_BAD_REQUEST); \n \n }\n }",
"public function actualizarperfil($id,$nombre,$primer_apellido,$segundo_apellido,$ano,$email,$telefono,$alias,$foto)\n {\n \n //busca en la tabla usuarios los campos donde el id sea el que le ha pasado el controlador\n $usuarios = R::load('usuarios',$id);\n \n //sobreescribe los campos\n $usuarios->nombre=$nombre;\n $usuarios->primer_apellido=$primer_apellido;\n $usuarios->segundo_apellido=$segundo_apellido;\n $usuarios-> fecha_nacimiento=$ano;\n $usuarios->email=$email;\n $usuarios->telefono=$telefono;\n $usuarios->alias=$alias;\n //si la foto exite se guarda en la base de datos se guarda el campo extension como png si la foto no exite se guarda como null\n $sustitutuirespaciosblancos = str_replace(\" \",\"_\",$alias);\n $directorio = \"assets/fotosperfil/usuario-\".$sustitutuirespaciosblancos.\".png\";\n $existefichero = is_file( $directorio );\n \n \n \n if($foto!=null){\n \n if ( $existefichero==true ){\n $extension=\"png\";\n }else{\n \n \n \n \n \n \n \n }}\n $usuarios->foto = $extension;\n // almacena los datos en la tabla usuarios de la base de datos\n R::store($usuarios);\n //rdirege al controlador Usuarios/Bienvenidos_u\n \n redirect(base_url().\"usuario/Usuarios/perfil_usuario\");\n \n \n }",
"function oid_update_user($user, $sreg)\n{\n $profile = $user->getProfile();\n\n $orig_profile = clone($profile);\n\n if (!empty($sreg['fullname']) && strlen($sreg['fullname']) <= 255) {\n $profile->fullname = $sreg['fullname'];\n }\n\n if (!empty($sreg['country'])) {\n if ($sreg['postcode']) {\n // XXX: use postcode to get city and region\n // XXX: also, store postcode somewhere -- it's valuable!\n $profile->location = $sreg['postcode'] . ', ' . $sreg['country'];\n } else {\n $profile->location = $sreg['country'];\n }\n }\n\n // XXX save language if it's passed\n // XXX save timezone if it's passed\n\n if (!$profile->update($orig_profile)) {\n // TRANS: OpenID plugin server error.\n common_server_error(_m('Error saving the profile.'));\n return false;\n }\n\n $orig_user = clone($user);\n\n if (!empty($sreg['email']) && Validate::email($sreg['email'], common_config('email', 'check_domain'))) {\n $user->email = $sreg['email'];\n }\n\n if (!$user->update($orig_user)) {\n // TRANS: OpenID plugin server error.\n common_server_error(_m('Error saving the user.'));\n return false;\n }\n\n return true;\n}",
"protected function saveUserProfile(){\n\t\t$req = $this->postedData;\n\t\t$avatar = $req['avatar'];\n\t\t// Si un fichier est chargé, alors l'utilisateur veut certainement celui-ci comme avatar...\n\t\tif (isset($_FILES['field_string_avatarFile']) and !empty($_FILES['field_string_avatarFile']['name'])) $avatar = 'user';\n\n\t\tswitch ($avatar){\n\t\t\tcase 'default': $this->user->setAvatar('default'); break;\n\t\t\tcase 'gravatar': $this->user->setAvatar('gravatar'); break;\n\t\t\tcase 'user':\n\t\t\t\t$userAvatarFile = Sanitize::sanitizeFilename($this->user->getName()).'.png';\n\t\t\t\tif ((!isset($_FILES['field_string_avatarFile']) or empty($_FILES['field_string_avatarFile']['name'])) and !file_exists(\\Settings::AVATAR_PATH.$userAvatarFile)){\n\t\t\t\t\t// Si l'utilisateur n'a pas d'image déjà chargée et qu'il n'en a pas indiqué dans le champ adéquat, on retourne false\n\t\t\t\t\tnew Alert('error', 'Impossible de sauvegarder l\\'avatar, aucune image n\\'a été chargée !');\n\t\t\t\t\treturn false;\n\t\t\t\t}elseif(isset($_FILES['field_string_avatarFile']) and !empty($_FILES['field_string_avatarFile']['name'])){\n\t\t\t\t\t// Chargement de l'image\n\t\t\t\t\t$args = array();\n\t\t\t\t\t$args['resize'] = array('width' => 80, 'height' => 80);\n\t\t\t\t\t// Les avatars auront le nom des utilisateurs, et seront automatiquement transformés en .png par SimpleImages\n\t\t\t\t\t$args['name'] = $this->user->getName().'.png';\n\t\t\t\t\t$avatarFile = Upload::file($_FILES['field_string_avatarFile'], \\Settings::AVATAR_PATH, \\Settings::AVATAR_MAX_SIZE, \\Settings::ALLOWED_IMAGES_EXT, $args);\n\t\t\t\t\tif (!$avatar) {\n\t\t\t\t\t\tnew Alert('error', 'L\\'avatar n\\'a pas été pris en compte !');\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t$this->user->setAvatar($avatarFile);\n\t\t\t\t}else{\n\t\t\t\t\t// Si l'utilisateur a déjà une image chargée et qu'il n'en a pas indiqué de nouvelle, on lui remet celle qu'il a déjà.\n\t\t\t\t\t$this->user->setAvatar($userAvatarFile);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'ldap': $this->user->setAvatar('ldap');\n\t\t}\n\t\t// L'authentification via LDAP ramène déjà le nom l'adresse email et la gestion du mot de passe\n\t\tif (AUTH_MODE == 'sql'){\n\t\t\tif (!isset($req['name'])){\n\t\t\t\tnew Alert('error', 'Vous n\\'avez pas indiqué le nom d\\'utilisateur !');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!isset($req['email'])){\n\t\t\t\tnew Alert('error', 'Vous n\\'avez pas indiqué l\\'adresse email !');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$name = htmlspecialchars($req['name']);\n\t\t\tif (UsersManagement::getDBUsers($name) != null and $name != $this->user->getName()){\n\t\t\t\tnew Alert('error', 'Ce nom d\\'utilisateur est déjà pris !');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$email = $req['email'];\n\t\t\tif (!\\Check::isEmail($email)){\n\t\t\t\tnew Alert('error', 'Le format de l\\'adresse email que vous avez saisi est incorrect !');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$currentPwd = (isset($req['currentPwd'])) ? $req['currentPwd'] : null;\n\t\t\t$newPwd = (isset($req['newPwd'])) ? $req['newPwd'] : null;\n\t\t\tif (!empty($newPwd)){\n\t\t\t\t// On vérifie que le mot de passe actuel a bien été saisi\n\t\t\t\tif (!ACL::canAdmin('admin', 0) and empty($currentPwd)){\n\t\t\t\t\tnew Alert('error', 'Vous avez saisi un nouveau mot de passe sans saisir le mot de passe actuel !');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t// On vérifie que le mot de passe actuel est correct\n\t\t\t\tif (!ACL::canAdmin('admin', 0) and Login::saltPwd($currentPwd) != $this->user->getPwd()){\n\t\t\t\t\tnew Alert('error', 'Le mot de passe actuel que vous avez saisi est incorrect !');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t// On vérifie que le nouveau mot de passe comporte bien le nombre minimum de caractères requis\n\t\t\t\tif (strlen($newPwd) < \\Settings::PWD_MIN_SIZE){\n\t\t\t\t\tnew Alert('error', 'Le mot de passe doit comporter au moins '.\\Settings::PWD_MIN_SIZE.' caractères !');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t$this->user->setPwd($newPwd);\n\t\t\t}\n\t\t}\n\n\t\tif (UsersManagement::updateDBUser($this->user)){\n\t\t\t$msg = ($this->user->getId() == $GLOBALS['cUser']->getId()) ? '' : 'de '.$this->user->getName().' ';\n\t\t new Alert('success', 'Les paramètres du profil '.$msg.'ont été correctement sauvegardés !');\n\t\t\treturn true;\n\t\t}else{\n\t\t\tnew Alert('error', 'Echec de la sauvegarde des paramètres !');\n\t\t\treturn false;\n\t\t}\n\t}",
"function register()\n{\n\t$name = $_POST['name'];\n\t$username = $_POST['username'];\n\t$email = $_POST['email'];\n\t$password = md5($_POST['password']);\n\t$phone = $_POST['phone'];\n\t$address = $_POST['address'];\n\t$category = $_POST['category'];\t\n\t$image = '';\n\t$created_date = date('Y-m-d H:i:s');\n\t\n\t// Call to function to check out whether same email/username already exists\n\t$checkUser = getUserExistsOrNot();\n\t\n\tif(empty($checkUser)) {\n\t\n\t\tif($_FILES['image']['tmp_name']) {\n\t\t\t$timestamp = time();\n\t\t\t$image = $timestamp.$_FILES['image']['name'];\t\t\t\n\t\t\tmove_uploaded_file($_FILES['image']['tmp_name'], 'uploads/'.$image);\n\t\t}\n\t\t\n\t\t$query = \"INSERT INTO users(name, username, email, phone, password, address, category, image, created_date) VALUES ('\".$name.\"', '\".$username.\"', '\".$email.\"', '\".$phone.\"', '\".$password.\"', '\".$address.\"', '\".$category.\"', '\".$image.\"', '\".$created_date.\"')\";\n\t\t$result = mysql_query($query) or die('Failed to enter details in user table: '.mysql_error());\n\t\t\n\t\tif($result) {\n\t\t\theader(\"Location: index.php\");\n\t\t} else {\n\t\t\t\n\t\t\tif($_FILES['image']['tmp_name']) {\n\t\t\t\t\tunlink('uploads/'.$image);\n\t\t\t}\n\t\t\t\n\t\t\t$_SESSION['errormsg'] = \"Please try again: Registration failed\";\n\t\t\theader(\"Location: register.php\");\n\t\t} \n\t} else {\n\t\t$_SESSION['errormsg'] = \"Please choose again: Username already exists\";\n\t\theader(\"Location: register.php\");\t\t\n\t}\n}",
"public function p_upload(){\n \n if(!isset($_FILES)){\n //send the user back to the profile but this time have error set.\n Router::redirect(\"/users/profile/\".$this->user->user_id.\"/error\");\n }\n //fixed filename upper case possibility.\n $_FILES['avatar_pic']['name'] = strtolower($_FILES['avatar_pic']['name']);\n //get file extension \n $parts = pathinfo( ($_FILES['avatar_pic']['name']) );\n //boolean set to FALSE for incorrect file extension uploading\n $upload_ok = FALSE;\n \n \n \n \n if($parts['extension'] == \"jpg\")\n $upload_ok = TRUE;\n if($parts['extension'] == \"jpeg\")\n $upload_ok = TRUE; \n if($parts['extension'] == \"png\")\n $upload_ok = TRUE;\n if($parts['extension'] == \"gif\")\n $upload_ok = TRUE; \n \n if($upload_ok) { \n //upload the chosen file and rename it temp-user_id.original extension\n Upload::upload($_FILES, \"/uploads/avatars/\", array(\"jpg\", \"jpeg\", \"gif\", \"png\"), \"temp-\".$this->user->user_id); \n //resize the image to 258x181 -- usually it's 258 wide then optimal height.\n $imgObj = new Image(APP_PATH.'uploads/avatars/'.'temp-'.$this->user->user_id.'.'.$parts['extension']);\n \n $imgObj->resize(100, 100);\n $imgObj->save_image(APP_PATH.'uploads/avatars/'.$this->user->user_id.'.'.'png'); //save the file as user_id.png\n unlink('uploads/avatars/'.'temp-'.$this->user->user_id.'.'.$parts['extension']); //delete the temp file\n Router::redirect(\"/users/profile/\".$this->user->user_id);\n }\n else {\n //send the user back to the profile but this time have error set.\n Router::redirect(\"/users/profile/\".$this->user->user_id.\"/error\");\n } //else\n }",
"public function adduser($fullname,$tel,$dob,$addr,$nextofkin,$addrnextofkin,$sex,$rel){\n\t\tglobal $link;\n\t\t\n\t\t/*------------------------\tChecking Book Existence\t-------------------------------------------*/\n\t\t\n\t\t//No Account Limit\n\t\t\n\t\t\n\t\t/*------------------------------Registering Client by Preparing A Query-----------*/\n\t\t\n\t\t$sql=mysqli_prepare($link,\"INSERT INTO client(id,fname,addr,dob,tel,addrnextofkin,nextofkin,sex,rel,pix,cardno) VALUES(?,?,?,?,?,?,?,?,?,?,?)\");\n\t\t\n\t\t$e='';\n\t\t$photo=$_SESSION['funame'];\n\t\t\n\t\tmysqli_stmt_bind_param($sql,'issssssssss',$e,$fullname,$addr,$dob,$tel,$addrnextofkin,$nextofkin,$sex,$rel,$photo,$e);\n\t\tif(mysqli_stmt_execute($sql)){\n\t\t\t$c=mysqli_stmt_insert_id($sql);\n\t\t\t@rename(\"../uploads/pix/del/$photo\",\"../uploads/pix/$photo\");\n\t\t\t\n\t\t\t$rand=$c.(rand(100,999))-(rand(15,800));\n\t\t\t\n\t\t\t$cardno=\"JJ\".$rand;\n\t\t\t\n\t\t\tmysqli_stmt_close($sql);\n\t\t\t\n\t\t\tmysqli_query($link,\"UPDATE client SET cardno='$cardno' WHERE id='$c'\");\n\t\t\techo X;\n\t\t\t$_SESSION['msg']=$c;\n\t\t}else{\n\t\t\t\techo \"<img src='../images/cancel.png' width='auto' height='14px'> Registration FAILED ,Please Retry\";\n\t\t\t\t}\n\n\t\t}",
"public function update(Request $r)\n {\n $data = [\n 'first_name' => $r->first_name,\n 'last_name' => $r->last_name,\n 'phone' => $r->phone,\n 'email' => $r->email,\n ];\n $count_email = DB::table('shop_owners')->where('id', \"!=\", $r->id)\n ->where('email', $r->email)\n ->count();\n if($count_email>0)\n {\n $r->session()->flash('sms1', \"The email '{$r->email}' already exist. Change a new one!\");\n return redirect('/shop-owner/profile/edit');\n }\n $i = DB::table('shop_owners')->where('id', $r->id)->update($data);\n if($i)\n {\n $r->session()->flash('sms', \"Your profile has been saved successfully!\");\n // save user to session\n $user = DB::table('shop_owners')->where('id', $r->id)->first();\n $r->session()->put('shop_owner', $user);\n return redirect('/shop-owner/profile');\n }\n else{\n $r->session()->flash('sms1', \"Fail to save changes. You may not make any changes in your input!\");\n return redirect('/shop-owner/profile/edit');\n }\n }",
"function owners_insert(){\r\n\tglobal $Translation;\r\n\r\n\tif($_GET['insert_x']!=''){$_POST=$_GET;}\r\n\r\n\t// mm: can member insert record?\r\n\t$arrPerm=getTablePermissions('owners');\r\n\tif(!$arrPerm[1]){\r\n\t\treturn false;\r\n\t}\r\n\r\n\t$data['pass'] = makeSafe($_POST['pass']);\r\n\t\tif($data['pass'] == empty_lookup_value){ $data['pass'] = ''; }\r\n\t$data['level'] = makeSafe($_POST['level']);\r\n\t\tif($data['level'] == empty_lookup_value){ $data['level'] = ''; }\r\n\t$data['image'] = PrepareUploadedFile('image', 102400,'jpg|jpeg|gif|png', false, '');\r\n\tif($data['image']) createThumbnail($data['image'], getThumbnailSpecs('owners', 'image', 'tv'));\r\n\tif($data['image']) createThumbnail($data['image'], getThumbnailSpecs('owners', 'image', 'dv'));\r\n\tif($data['level'] == '') $data['level'] = \"1\";\r\n\r\n\t// hook: owners_before_insert\r\n\tif(function_exists('owners_before_insert')){\r\n\t\t$args=array();\r\n\t\tif(!owners_before_insert($data, getMemberInfo(), $args)){ return false; }\r\n\t}\r\n\r\n\t$o=array('silentErrors' => true);\r\n\tsql('insert into `owners` set `pass`=' . (($data['pass'] !== '' && $data['pass'] !== NULL) ? \"'{$data['pass']}'\" : 'NULL') . ', `level`=' . (($data['level'] !== '' && $data['level'] !== NULL) ? \"'{$data['level']}'\" : 'NULL') . ', ' . ($data['image']!='' ? \"`image`='{$data['image']}'\" : ($_POST['image_remove'] != 1 ? '`image`=`image`' : '`image`=NULL')), $o);\r\n\tif($o['error']!=''){\r\n\t\techo $o['error'];\r\n\t\techo \"<a href=\\\"owners_view.php?addNew_x=1\\\">{$Translation['< back']}</a>\";\r\n\t\texit;\r\n\t}\r\n\r\n\t$recID=mysql_insert_id();\r\n\r\n\t// hook: owners_after_insert\r\n\tif(function_exists('owners_after_insert')){\r\n\t\t$res = sql(\"select * from `owners` where `id`='\" . makeSafe($recID) . \"' limit 1\", $eo);\r\n\t\tif($row = mysql_fetch_assoc($res)){\r\n\t\t\t$data = array_map('makeSafe', $row);\r\n\t\t}\r\n\t\t$data['selectedID'] = makeSafe($recID);\r\n\t\t$args=array();\r\n\t\tif(!owners_after_insert($data, getMemberInfo(), $args)){ return (get_magic_quotes_gpc() ? stripslashes($recID) : $recID); }\r\n\t}\r\n\r\n\t// mm: save ownership data\r\n\tsql(\"insert into membership_userrecords set tableName='owners', pkValue='$recID', memberID='\".getLoggedMemberID().\"', dateAdded='\".time().\"', dateUpdated='\".time().\"', groupID='\".getLoggedGroupID().\"'\", $eo);\r\n\r\n\treturn (get_magic_quotes_gpc() ? stripslashes($recID) : $recID);\r\n}",
"public function uploadProfilePic_post()\n {\n \n $user_id = $this->post('user_id');\n $auth_token = $this->post('auth_token');\n \n $record = $this->artists_model->get_auth_token($user_id);\n if(isset($record[0]['auth_token']) && $record[0]['auth_token'] == $auth_token)\n {\n if($_FILES['uploadImage']['name'] != \"\")\n {\n $upload_path = 'uploads/profile_picture/';\n $data = $this->do_upload($upload_path);\n\n if(isset($data['success']) && $data['success'] == \"True\")\n {\n $image_data['file_location'] = base_url().'uploads/profile_picture/'.$data['file_name'];\n\n //update profile picture url\n $data_arr = array('profile_picture'=>$image_data['file_location']);\n $this->artists_model->update_user($user_id,$data_arr);\n \n $message = [\n 'status' => TRUE,\n 'message' => 'Image uploaded successfully',\n 'profile_picture'=> $image_data,\n 'status_code' => 200\n ];\n\n $this->set_response($message, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code\n }\n else\n {\n $message = [\n 'status' => FALSE,\n 'message' => $data['error'],\n 'status_code'=> 400\n ];\n\n $this->set_response($message, REST_Controller::HTTP_BAD_REQUEST);\n }\t\t\n }\n else\n {\n $message = [\n 'status' => FALSE,\n 'message' => 'File not selected',\n 'status_code'=> 400\n ];\n $this->set_response($message, REST_Controller::HTTP_BAD_REQUEST); \n }\n \n }\n else\n {\n //redirect to login\n $this->response([\n 'status' => FALSE,\n 'message' =>'Unauthorize user,please login again',\n 'status_code'=> 401\n ], REST_Controller::HTTP_UNAUTHORIZED); // HTTP_UNAUTHORIZED (401) being the HTTP response code\n }\n }",
"public function updateWorkAgreement()\n {\n $tenant = Tenant::where('idPerson', '=', \\Auth::user()->idPerson)->first();\n if (\\Input::file('picture')) {\n\n $image = \\Input::file('picture');\n $filename = \\Auth::user()->idPerson . '.' . $image->getClientOriginalExtension();\n echo 'hey';\n $path = public_path(\"WorkAgreement/\" . $filename);\n Image::make($image->getRealPath())->save($path);\n $tenant->work_Agreement = $filename;\n $tenant->save();\n }\n return \\Redirect::to('tenant');\n }",
"public function register(string $username, string $password, string $passwordConfirm, string $firstName, string $lastName, int $age, string $gender, string $location, string $icon){\n\t\tif (REGISTER_ALLOWED) {\t// if registering is allowed\n\t\t\tif (isset($username, $password, $passwordConfirm, $firstName, $lastName, $age, $gender, $location, $icon)) {\t// check if all fields filled\n\t\t\t\t// Sanatize all the post data\n\t\t\t\t$username = filter_var($username, FILTER_SANITIZE_STRING);\n\t\t\t\t$password = filter_var($password, FILTER_SANITIZE_STRING);\n\t\t\t\t$passwordConfirm = filter_var($passwordConfirm, FILTER_SANITIZE_STRING);\n\t\t\t\t$firstName = ucfirst(strtolower(filter_var($firstName, FILTER_SANITIZE_STRING)));\n\t\t\t\t$lastName = ucfirst(strtolower(filter_var($lastName, FILTER_SANITIZE_STRING)));\n\t\t\t\t$age = filter_var($age, FILTER_SANITIZE_NUMBER_INT);\n\t\t\t\t$gender = filter_var($gender, FILTER_SANITIZE_STRING);\n\t\t\t\t$location = ucwords(strtolower(filter_var($location, FILTER_SANITIZE_STRING)));\n\t\t\t\t$icon = filter_var($icon, FILTER_SANITIZE_STRING);\n\n\t\t\t\tif($this->username_check($username) && $this->pass_check($password, $passwordConfirm)){\t// check if username is valid and unique, and if password is valid\n\t\t\t\t\t$pass = password_hash($password, PASSWORD_BCRYPT);\t\t\t\t\t\t\t\t\t// hash password\n\t\t\t\t\t$password = $passwordConfirm = NULL;\t\t\t\t\t\t\t\t\t\t\t\t// free password and passwordConfirm\n\t\t\t\t\tif($stmt = $this->Mysqli->prepare(\"INSERT INTO players(username, password, first_name, last_name, age, gender, location, icon) VALUES(?, ?, ?, ?, ?, ?, ?, ?)\")){ // prepare mysqli insert query\n\t\t\t\t\t\t$stmt->bind_param('ssssisss', $username, $pass, $firstName, $lastName, $age, $gender, $location, $icon);\t// bind params\n\t\t\t\t\t\t$res = !$stmt->execute();\n\t\t\t\t\t\t$stmt->close();\n\t\t\t\t\t\tif($res){\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// if not execute\n\t\t\t\t\t\t\t$this->error .= \"Failed to connect to server. Try again.\\n\";\t\t\t\t// error\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\treturn true;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// succesfully registered\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->error .= \"There was a error connecting to the server. Try again.\\n\";\t\t// error preparing query\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->error .= \"One or more field is empty\\n\";\t\t\t\t\t\t\t\t\t\t\t// error not all fields filled out\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->error .= \"Registration is not available at this time, please try again later.\\n\";\t// error preping query\n\t\t\treturn false;\n\t\t}\n\t}",
"function guardar_imagen($id_sponsor){\r\n \t$this->erkana_auth->required();\r\n \t$this->firephp->info($_FILES);\r\n \t$config['file_name'] = $id_sponsor.'.jpg';\r\n \t$config['upload_path'] = './imagenes/sponsors/';\r\n $config['allowed_types'] = 'gif|jpg|png';\r\n $config['max_size'] = '2000';\r\n $config['overwrite'] = TRUE;\r\n \r\n \t$this->load->library('firephp');\r\n \t$this->load->library('upload', $config);\r\n \t\r\n \tif ($_FILES['imagen']['size']>0) {\r\n \r\n if ( $this->upload->do_upload('imagen') == FALSE){ \r\n \t$this->firephp->info($this->upload->display_errors());\r\n\t\t\t\treturn FALSE; \r\n }\r\n else { \r\n \t$result = $this->upload->data();\r\n \t$this->firephp->info($result);\r\n \t$this->image_thumbs($id_sponsor);\r\n return TRUE;\r\n } \r\n } else {\r\n \treturn FALSE;\r\n }\r\n }",
"public function updateUserProfilePicture(Request $request)\n {\n $data= Validator::make($request->all(), [\n 'id' => 'required',\n 'avatar' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n ]);\n\n if ($data->fails()) {\n return response()->json([\n 'status' => 400,\n 'message' => 'All fields are required',\n 'data'=> []\n ], 400);\n }\n\n if($request->id != $request->userID){\n return response()->json([\n 'status' => 400,\n 'message' => 'Not authorized to carry out this action',\n 'data'=> []\n ], 400);\n }\n\n $name = $request->id.\".jpg\";\n $path = Storage::disk('public')->putFileAs('avatars', $request->file('avatar'), $name, 'public');\n\n User::find($request->id)->update([\n 'pictureUrl' => Storage::disk('public')->url('avatars/'.$name)\n ]);\n $user = User::find($request->id);\n $user->followers = Follow::where('userId', $user->id)->count();\n $user->following = Follow::where('followedBy', $user->id)->count();\n $user->recipes = Recipe::where('userId', $user->id)->count();\n $user->saveCount = Favorite::where('userId', $user->id)->where('commentId', null)->count();\n return response()->json([\n 'status' => 200,\n 'message' => 'User account has been updated',\n 'data' => [\n // User::find($request->id)->only('id', 'name', 'email', 'phoneNumber','bio', 'pictureUrl'),\n $user\n ]\n ], 200);\n }",
"function storePicture($picType,$actorsName) {\n include ('config.php');\n\n $temp = explode(\".\", $_FILES[$picType][\"name\"]);\n $extension = end($temp);\n if ((($_FILES[$picType][\"type\"] == \"image/gif\")\n || ($_FILES[$picType][\"type\"] == \"image/jpeg\")\n || ($_FILES[$picType][\"type\"] == \"image/jpg\")\n || ($_FILES[$picType][\"type\"] == \"image/pjpeg\")\n || ($_FILES[$picType][\"type\"] == \"image/x-png\")\n || ($_FILES[$picType][\"type\"] == \"image/png\"))\n && ($_FILES[$picType][\"size\"] < $maxPicSize)\n && in_array($extension, $picExtensions))\n {\n if ($_FILES[$picType][\"error\"] > 0) {\n\t echo \"Return Code: \" . $_FILES[$picType][\"error\"] . \"<br>\";\n\t}\n else\n {\n //echo \"Upload: \" . $_FILES[$picType][\"name\"] . \"<br>\";\n //echo \"Type: \" . $_FILES[$picType][\"type\"] . \"<br>\";\n //echo \"Size: \" . ($_FILES[$picType][\"size\"] / 1024) . \" kB<br>\";\n //echo \"Temp file: \" . $_FILES[$picType][\"tmp_name\"] . \"<br>\";\n\n $newPic = ($actorsName . \"-\" . $picType . \"-\" . $_FILES[$picType][\"name\"]);\n $newPic = preg_replace('/[^a-zA-Z0-9%\\[\\]\\.\\(\\)%&-]/s', '_', $newPic);\n $newPic = ($picDir . \"/\" . $actorsPicDir . \"/\" . $newPic);\n\n if (file_exists($newPic = ($newPic))) {\n echo $_FILES[$picType][\"name\"] . \" already exists. \";\n } else {\n move_uploaded_file($_FILES[$picType][\"tmp_name\"],$newPic);\n //echo \"Stored in: \" . $picDir . \"/\" . $actorsPicDir . \"/\" . $_FILES[$picType][\"name\"] . \"<br>\\n\";\n //echo '<img src=\"' . $newPic . '\" width=\"200\">';\n\treturn ($newPic);\n }\n }\n }\nelse\n {\n echo \"Invalid file\";\n }\n}",
"public function registerUser() {\n\t\t\t\t//check for email id existence\n\t\t\t\t$userExistence = $this->checkUserExistence();\n\t\t\t\tif(!$userExistence) {\n\t\t\t\t\t$this->response['status'] = 0;\n\t\t\t\t\t$this->response['message'] = 'Email id already exists. Please try different email id!';\n\t\t\t\t\treturn false;\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t$sql = \"insert into register(name, email, password, orig_password, address, mobile, landline, logo, photo, licence_aggrement,token, create_time) \";\n\t\t\t\t$sql .= \" values('$this->name', '$this->email', '$this->crypPwd', '$this->password', '$this->addr', '$this->mobile', '$this->landline', '$this->logoPath', '$this->photoPath', $this->licence, '$this->token', NOW())\";\n\t\t\t\t\n\t\t\t\t//store it in db now\n\t\t\t\t$result = returnQueryResult($sql);\n\t\t\t\tif($result == false) {\n\t\t\t\t\t$this->response['status'] = 0;\n\t\t\t\t\t$this->response['message'] = 'Sorry! Something went wrong. Try Again';\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t//create user directory\n\t\t\t\t$dir = \"../registered_users/$this->email\";\n\t\t\t\tmkdir($dir, 0777, true);\n\t\t\t\tchmod($dir, 0777);\n\n\t\t\t\t//now move files to user directory\n\t\t\t\tmove_uploaded_file($this->logo['tmp_name'], $this->logoPath); //logo\n\t\t\t\tmove_uploaded_file($this->yourPhoto['tmp_name'], $this->photoPath); //your photo\n\n\t\t\t\t//now send confirmation mail to user\n\t\t\t\t$this->sendConfirmationMail();\n\t\t\t}",
"public function only_person(CreateVisitorRequest $request){\n \n $person = Person::create([\n 'type_dni' => $request->type_dni,\n 'dni' => $request->dni,\n 'name' => $request->name,\n 'lastname' => $request->lastname,\n 'address' => $request->address,\n 'phone' => $request->phone,\n 'email' => $request->email,\n 'branch_id' => 1,\n ]);\n\n /**\n * Registro de la fotografia \n */\n if ($request->file('file') != null) {\n $photo = $request->file('file');\n $path = $photo->store('persons');\n $image = new Image;\n $image->path = $path;\n $image->imageable_type = \"App\\Person\";\n $image->imageable_id = $person->id;\n $image->save();\n }\n\n return response()->json([\n 'message' => 'Registrado correctamente',\n ]);\n }",
"public function updateProfile($userbio){ \n\n if ($_FILES['profilephoto']['error'] == 0) {\n # start file upload\n $filesize = $_FILES['profilephoto']['size'];\n $filename = $_FILES['profilephoto']['name'];\n $filetype = $_FILES['profilephoto']['type'];\n $filetempname = $_FILES['profilephoto']['tmp_name'];\n\n //specify the destination folder to upload files to \n $folder = \"profilephotos/\";\n\n //limit file size, check file type (extensions)\n if($filesize > 2097152){\n $error[] = 'File size must be exactly or less than 2MB!';\n }\n //GET FILE EXTENSION\n $file_ext = explode('.', $filename);\n $file_ext = strtolower(end($file_ext)); // to get last element in an array and to lowercase\n\n //specify the extensions allowed\n\n $extensions = array('png', 'jpeg', 'gif', 'jpg', 'bmp', 'svg', );\n\n if (in_array($file_ext , $extensions) === false){\n $error[] = 'Extension not allowed';\n }\n\n //change the filename\n $filename = time().\"_\";\n $destination = $folder.$filename.\".\". $file_ext;\n\n // var_dump($destination);\n\n //now check if there is no error and upload the file\n if(!empty($error)){\n var_dump($error);\n }\n else{\n //otherwise, upload profile picture\n move_uploaded_file($filetempname, $destination);\n\n // update photograph column in users based on userid\n $userid = $_SESSION['myuserid'];\n //write query to update the table column\n $sql = \"UPDATE users SET user_biography = '$userbio', photo = '$destination' WHERE user_id = '$userid';\";\n $result = $this->dbobj->dbcon->query($sql);\n\n if ($this->dbobj->dbcon->affected_rows == 1) { \n //create session variable\n \n $result = \"<div class='alert alert-success'> Image uploaded!</div>\";\n\n }\n else{\n $result = \"<div class='alert alert-danger'> No image uploaded!</div>\". $this->dbobj->dbcon->error;\n\n }\n\n }\n\n \n }\n else {\n $result = \"<div class='alert alert-danger'> You have not uploaded any image!</div>\";\n }\n\n\n return $result;\n }",
"public function uploadpicture()\n { \n // calling the Model with upload functionality\n $this->uploadfile($picture = true);\n }",
"protected function register(MembreRequest $data)\n {\n\t\t\t//check if is Avatar img exist\n\t\t$custom_file_name =\"\";\n\t\t/*if ($request->hasFile('image')) {\n\t\t\t$file = $request->file('image');\n\t\t\t$custom_file_name = time().'-'.$request->file('image')->getClientOriginalName(); // customer the name of img uploded \n\t\t\t$file->move('avatar_membre/', $custom_file_name); // save img ine the folder Public/Avatars\n\t\t\t\n\t\t}*/\t\n\t $membre=Membre::create([\n 'nom' => $data['nom'],\n 'email' => $data['email'],\n\t\t\t'prenom' => $data['prenom'],\n\t\t\t'tel' => $data['tel'],\n\t\t\t'state_id' => $data['state_id'],\n\t\t\t'address' => $data['address'],\n\t\t\t'nbr_annonce_autorise' => 5,\n 'password' => Hash::make($data['password']),\n ]);\n\t\t\n\t \n\t\t$this->guard()->login($membre);\n\t\treturn redirect()->intended( 'membre' ); \n }",
"public function updateProfile(Request $request)\n{\n // Form validation\n $request->validate([\n //'firstname'=> 'required',\n //'lastname'=> 'required',\n 'profile_image' =>'|image|mimes:jpeg,png,jpg|max:2048'\n ]);\n\n // Get current user\n $user =User::findOrFail(auth()->user()->id);\n // Set user name\n //$user->firstname = $request->input('firstname');\n //$user->lastname = $request->input('lastname');\n \n\n // Check if a profile image has been uploaded\n if ($request->has('profile_image')) {\n // Get image file\n $image = $request->file('profile_image');\n // Make a image name based on user name and current timestamp\n $name = Str::slug($request->input('lastname')).'_'.time();\n // Define folder path\n $folder = '/uploads/pictures/';\n // Make a file path where image will be stored [ folder path + file name + file extension]\n $filePath = $folder . $name. '.' . $image->getClientOriginalExtension();\n // Upload image\n $this->uploadOne($image, $folder, 'public', $name);\n // Set user profile image path in database to filePath\n $user->profile_image = $filePath;\n }\n // Persist user record to database\n $user->save();\n\n // Return user back and show a flash message\n return redirect()->back()->with(['success' => 'Signature ajoutée avec succès.']);\n}",
"public function setUser($email,$name,$firstname,$password,$repass,$role){\n\n\t\t$this->_email = htmlspecialchars($email);\n\t\t$this->_name = htmlspecialchars(ucfirst($name));\n\t\t$this->_firstname = htmlspecialchars(ucfirst($firstname));\n\t\t$this->_longname = $this->_firstname.' '.$this->_name;\n\t\t$this->_lastAction = time();\n\t\t$this->_password = htmlspecialchars(sha1($password));\n\t\t$this->_repass = htmlspecialchars(sha1($repass));\n\t\t$this->_role = $role;\n\t\t$this->_ip = $_SERVER['REMOTE_ADDR'];\n\t\t$this->_identifiant = sha1($this->_ip);\n\t\t$this->_registerBy = $_SESSION['id'];\n\n\n\t\tif(filter_var($this->_email, FILTER_VALIDATE_EMAIL)){\n\t\t\t$select=$this->_bdd->prepare('SELECT email FROM user WHERE email=:email');\n\t\t\t$select->execute(array('email'=>$this->_email));\n\t\t\t$result=$select->fetch();\n\t\t\t$emailBdd = $result['email'];\n\n\t\t\tif($this->_email == $emailBdd){\n\t\t\t\treturn 'Cet email est déjà utilisé.';\n\t\t\t\t}else{\n\t\t\t\t\tif($this->_password == $this->_repass){\n\t\t\t\t\t$insert = $this->_bdd->prepare('INSERT INTO user (email,name,firstname,longname,lastAction,role,ip,identifiant,password,registerBy,registerDate)\n\t\t\t\t \tVALUES (:email,:name,:firstname,:longname,:lastAction,:role,:ip,:identifiant,:password,:registerBy,NOW())');\n\t\t\t\t\t$insert->execute(array('email'=>$this->_email,\n\t\t\t\t\t\t\t\t\t\t'name'=>$this->_name,\n\t\t\t\t\t\t\t\t\t\t'firstname'=>$this->_firstname,\n\t\t\t\t\t\t\t\t\t\t'longname'=>$this->_longname,\n\t\t\t\t\t\t\t\t\t\t'lastAction'=>$this->_lastAction,\n\t\t\t\t\t\t\t\t\t\t'role'=>$this->_role,\n\t\t\t\t\t\t\t\t\t\t'ip'=>$this->_ip,\n\t\t\t\t\t\t\t\t\t\t'identifiant'=>$this->_identifiant,\n\t\t\t\t\t\t\t\t\t\t'password'=>$this->_password,\n\t\t\t\t\t\t\t\t\t\t'registerBy'=>$this->_registerBy));\n\n\t\t\t\t\t\treturn 'Utilisateur enregistré avec succès';\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn 'Les mots de passe ne sont pas identiques';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}else{\n\t\t\treturn \"Ceci n'est pas une adresse email valide<br />\";\t\n\t\t}\n\t}",
"public function postSaveMember() {\n\t\t$data = Request::all();\n\n\t\t$user = User::find($data['id']);\n\n\t\tif (empty($user)) {\n\t\t\treturn redirect('/admin/members')\n\t\t\t\t->with('error', 'Kullanıcı bulanamdı.');\n\t\t}\n\n\t\tif (isset($data['email']) and filter_var($data['email'], FILTER_VALIDATE_EMAIL)) {\n\t\t\t$user->email = $data['email'];\n\t\t\t$user->is_verified = 0;\n\t\t}\n\n\t\t#lets figure out the location.\n\t\t$location_parts = explode(\",\", $data['location']);\n\t\t$hood = false;\n\t\tif (count($location_parts) === 3) {\n\t\t\t$hood = Hood::fromLocation($data['location']);\n\t\t}\n\n\t\tif (isset($hood) and isset($hood->id)) {\n\t\t\t$user->hood_id = $hood->id;\n\t\t}\n\n\t\tif (isset($data['username']) and !empty($data['username'])) {\n\t\t\t$data['username'] = Str::slug($data['username']);\n\t\t\t$check_slug = (int) DB::table('users')\n\t\t\t\t->where('username', $data['username'])\n\t\t\t\t->where('id', '<>', $data['id'])\n\t\t\t\t->count();\n\t\t\tif ($check_slug === 0) {\n\t\t\t\t$user->username = $data['username'];\n\t\t\t}\n\t\t}\n\n\t\tif (isset($data['first_name']) and !empty($data['first_name'])) {\n\t\t\t$user->first_name = $data['first_name'];\n\t\t}\n\t\tif (isset($data['last_name']) and !empty($data['last_name'])) {\n\t\t\t$user->last_name = $data['last_name'];\n\t\t}\n\t\tif (isset($data['location']) and !empty($data['location'])) {\n\t\t\t$user->location = $data['location'];\n\n\t\t}\n\n\t\tif (!empty($data['image']) and is_array($data['image'])) {\n\t\t\ttry {\n\t\t\t\t$name = str_replace('.', '', microtime(true));\n\t\t\t\tStorage::put('users/' . $name, base64_decode($data['image']));\n\t\t\t\t$user->picture = $name;\n\t\t\t} catch (Exception $e) {\n\t\t\t\tLog::error('AdminController/postSaveMember/SavingTheImage', (array) $e);\n\t\t\t}\n\t\t}\n\n\t\ttry {\n\t\t\t$user->save();\n\t\t} catch (Exception $e) {\n\t\t\tLog::error('AdminController/postSaveMember', (array) $e);\n\n\t\t\treturn redirect('/admin/edit-member/' . $data['id'])\n\t\t\t\t->with('error', 'Profili güncellerken bir hata meydana geldi.');\n\t\t}\n\n\t\treturn redirect('/admin/view-member/' . $data['id'])\n\t\t\t->with('success', 'Profiliniz güncellendi.');\n\n\t}",
"protected function handleAvatar() : void // image\n {\n // something happened in the last years: those textures do not include tiny icons\n $sizes = [/* 'tiny' => 15, */'small' => 18, 'medium' => 36, 'large' => 56];\n $aPath = 'uploads/avatars/%d.jpg';\n $s = $this->_get['size'] ?: 'medium';\n\n if (!$this->_get['id'] || !preg_match('/^([0-9]+)\\.(jpg|gif)$/', $this->_get['id'][0], $matches) || !in_array($s, array_keys($sizes)))\n {\n trigger_error('AjaxProfile::handleAvatar - malformed request received', E_USER_ERROR);\n return;\n }\n\n $this->contentType = $matches[2] == 'png' ? MIME_TYPE_PNG : MIME_TYPE_JPEG;\n\n $id = $matches[1];\n $dest = imageCreateTruecolor($sizes[$s], $sizes[$s]);\n\n if (file_exists(sprintf($aPath, $id)))\n {\n $offsetX = $offsetY = 0;\n\n switch ($s)\n {\n case 'tiny':\n $offsetX += $sizes['small'];\n case 'small':\n $offsetY += $sizes['medium'];\n case 'medium':\n $offsetX += $sizes['large'];\n }\n\n $src = imageCreateFromJpeg(printf($aPath, $id));\n imagecopymerge($dest, $src, 0, 0, $offsetX, $offsetY, $sizes[$s], $sizes[$s], 100);\n }\n else\n trigger_error('AjaxProfile::handleAvatar - avatar file #'.$id.' not found', E_USER_ERROR);\n\n if ($matches[2] == 'gif')\n imageGif($dest);\n else\n imageJpeg($dest);\n }",
"function facebook_user_register_post(){\n\t\t$fb_id=$this->post('fb_id');\n\t\t$fullname=$this->post('fullname');\n\t\t$email=$this->post('email');\n\t\t$username=$this->post('username');\n\t\t$this->load->model('users_model');\n\t\t$data=$this->users_model->get_by_exact_email($email);\n\t\tif($data!=null){\n\t\t\t$this->response(array('ok'=>'0'));\n\t\t}\n\t\t$data=null;\n\t\t$data=$this->users_model->get_by_exact_name($username);\n\t\tif($data!=null){\n\t\t\t$this->response(array('ok'=>'1'));\n\t\t}\n\n\t\t$data=array(\n\t\t\t'fb_id'=>$fb_id,\n\t\t\t'user_name'=>$username,\n\t\t\t'email'=>$email,\n\t\t\t'full_name'=>$fullname,\n\t\t\t'avt'=> get_facebook_avt($fb_id, 200, 200),\n\t\t\t'perm'=>USER\n\t\t\t);\n\t\t$insert_id = $this->users_model->insert($data);\n\t\tif($insert_id!=0){\n\t\t\t$this->response($this->users_model->get_by_fb_id($fb_id));\n\t\t}else{\n\t\t\t$this->response(array('ok'=>'2'));\n\t\t}\n\t\t$this->response(array('ok'=>'2'));\n\t}",
"function modificationCompte() {\n\t\tif (isset($_POST['name']) || isset($_POST['email']) || isset($_POST['birthday'])) {\n\t\t\tif ($this -> modele -> verifExist($_POST['email']) && $_SESSION['id'] != $this -> modele -> getId($_POST['email']))\n\t\t\t\t$this -> compte($this -> vue -> existeDeja($_POST['email']));\n\t\t\telse {\n\t\t\t\t$valide = 1;\n\t\t\t\t// Image\n\t\t\t\tif ($_FILES['photo']['name'] == '')\n\t\t\t\t\t$dir = $this -> modele -> getCompte($_SESSION['id'])[6];\n\t\t\t\telse {\n\t\t\t\t\t$target_chemin = \"img/profil/\";\n\t\t\t\t\t$target_fichier = $target_chemin . basename($_FILES['photo']['name']);\n\t\t\t\t\t$imageType = strtolower(pathinfo($target_fichier, PATHINFO_EXTENSION));\n\t\t\t\t\t$dir = $target_chemin . \"profil_\" . $_SESSION['id'] . \".png\";\n\n\t\t\t\t\tif (isset($_POST[\"submit\"])) {\n\t\t\t\t\t\tif (!getimagesize($_FILES['photo']['tmp_name'])) {\n\t\t\t\t\t\t\t$this -> compte($this -> vue -> photoEchec());\n\t\t\t\t\t\t\t$valide = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($imageType != \"jpg\" && $imageType != \"png\" && $imageType != \"jpeg\" && $imageType != null) {\n\t\t\t\t\t\t$this -> compte($this -> vue -> photoMauvaisFormat());\n\t\t\t\t\t\t$valide = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($_FILES['photo']['size'] > 2097152 || $_FILES['photo']['size'] == 0) {\n\t\t\t\t\t\t$this -> compte($this -> vue -> photoVolumineux());\n\t\t\t\t\t\t$valide = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($valide == 1) {\n\t\t\t\t\t\tif (move_uploaded_file($_FILES['photo']['tmp_name'], $target_fichier))\n\t\t\t\t\t\t\trename($target_fichier, $dir);\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$this -> compte($this -> vue -> photoEchec());\n\t\t\t\t\t\t\t$valide = 0;\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\tif ($valide == 1) {\n\t\t\t\t\tif ($_POST['birthday'] == $this -> modele -> getCompte($_SESSION['id'])[4] && $_POST['name'] == '' && $_POST['email'] == '' && $_FILES['photo']['name'] == '')\n\t\t\t\t\t\t$this -> compte($this -> vue -> aucuneModification());\n\t\t\t\t\telse {\n\t\t\t\t\t\tif ($this -> modele -> update($this -> modele -> getCompte($_SESSION['id']), $_POST['name'] != '' ? $_POST['name'] : $this -> modele -> getCompte($_SESSION['id'])[1], $_POST['email'] != '' ? $_POST['email'] : $this -> modele -> getCompte($_SESSION['id'])[2], $_POST['birthday'], $dir)) {\n\t\t\t\t\t\t\tif ($_POST['email'] != '') {\n\t\t\t\t\t\t\t\tunset($_SESSION['id']);\n\t\t\t\t\t\t\t\tsession_destroy();\n\t\t\t\t\t\t\t\tsession_start();\n\t\t\t\t\t\t\t\t$_SESSION['id'] = $this -> modele -> getId($_POST['email']);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$this -> compte($this -> vue -> modificationFaite());\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$this -> compte($this -> vue -> erreurModification());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\telse\n\t\t\t$this -> compte($this -> vue -> erreurModification());\n\t}",
"public function addpictureAction()\n {\n\t\t$auth = Zend_Auth::getInstance();\n\t\tif($auth->hasIdentity())\n\t\t{\n\t\t\t$identity = $auth->getIdentity();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_redirect('/default/pss/pages');\t\t\t\n\t\t}\n\n\t\t//INSTANTIATE\n\t\t$u = new Model_My_Utility();\n\t\t$this->v['t']['pss'] = new Zend_Db_Table('pss');\n\t\t$this->v['t']['pss_picture'] = new Zend_Db_Table('pss_picture');\n\t\t$this->v['t']['pss_type'] = new Zend_Db_Table('pss_type');\n\t\t$this->v['t']['pss_type_sub'] = new Zend_Db_Table('pss_type_sub');\n\t\t$recaptcha = new Model_Recaptcha();\n\n\t\t//INITIALIZE FLAGS\n\t\t$flags = new stdClass();\n\t\t$flags->isError = false;\n\t\t$flags->formCaption = 'All fields are required';\n\t\t$flags->setBreeds = false;\n\t\t//MISC INITIALIZERS\n\t\t$this->view->initialPetTypeVal = 6;\n\t\t$types = Zend_Json::encode($this->v['t']['pss_type']->fetchAll()->toArray());\n\t\t$this->view->types = $types;\n\t\t$breeds = Zend_Json::encode($this->v['t']['pss_type_sub']->fetchAll()->toArray());\n\t\t$this->view->breeds = $breeds;\n\t\t\n\t\t//CHECK TO SEE IF USER IS THE OWNER\n\t\t$this->_row['pss'] = $this->v['t']['pss']->fetchRow('id = ' . $this->v['params']['page_id']);\n\t\tif($this->_row['pss']->user_id != $this->v['params']['user_id'])\n\t\t{\n\t\t\t$this->_helper->FlashMessenger()\n\t\t\t\t\t->setNamespace('error')\n\t\t\t\t\t->addMessage('An internal error occured...please continue from here.');\n\t\t\t$this->_redirect('default/pss/pages');\n\t\t}\n\t\t//CHECK TO SEE IF MAX PICTURES HAVE BEEN REACHED\n\t\t$select = $this->v['t']['pss_picture']->select()->where('pss_id = ?', $this->v['params']['page_id']);\n\t\t$this->_rows['pss_picture'] = $this->v['t']['pss_picture']->fetchAll($select);\n\t\t$count = $this->_rows['pss_picture']->count();\n\t\tif($count >= 10)\n\t\t{\n\t\t\t$this->_helper->FlashMessenger()\n\t\t\t\t\t->setNamespace('notice')\n\t\t\t\t\t->addMessage('You Have reached the maximum number of pictures that you can post for this pet page. \n\t\t\t\t\t\t\t\t\tIf you want to add this a new picture you must delete one that you have already uploaed.');\n\t\t\t$this->_redirect('default/pss/pages/user_id/' . $this->v['params']['user_id'] .'/page_id/'. $this->v['params']['page_id']);\n\t\t}\n\t\tif($this->_request->isPost())\n\t\t{\n\t\t\tif(array_key_exists('submit',$_POST))\n\t\t\t{\n\t\t\t\t//CHECK RECAPTCHA\n\t\t\t\tif ($recaptcha->_isError($_SERVER[\"REMOTE_ADDR\"],$_POST[\"recaptcha_challenge_field\"],$_POST[\"recaptcha_response_field\"]) == false)\n\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$flags->formCaption = 'Please fill out ReCaptcha Field to prove you are human!!!';\n\t\t\t\t\t$flags->isError = true;\n\t\t\t\t}\n\t\t\t\t//CHECK IMAGE UPLOAD OK\n\t\t\t\t$fileManage = new Class_Filemanage1($_FILES);\n\t\t\t\tif ($fileManage->_restrictionsCheckOut() == false)\n\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$flags->formCaption = 'ERROR: PLEASE START OVER';\n\t\t\t\t\t$flags->isError = true;\n\t\t\t\t}\n\t\t\t\t//CHECK To SEE IF USER_ID/PAGE_ID CHECK OUT\n\t\t\t\t$select = $this->v['t']['pss']->select()->where('user_id = ' . $identity->id )->where('id = ' . $this->v['params']['page_id']);\n\t\t\t\t$row = $this->v['t']['pss']->fetchRow($select);\n\t\t\t\tif($row)\n\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$flags->formCaption = 'ERROR: PLEASE START OVER';\n\t\t\t\t\t$flags->isError = true;\n\t\t\t\t}\n\t\t\t\tif ($fileManage->_restrictionsCheckOut() == false)\n\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$flags->formCaption = 'ERROR: PLEASE START OVER';\n\t\t\t\t\t$flags->isError = true;\n\t\t\t\t}\n\t\t\t\tif($flags->isError == false)\n\t\t\t\t{\n\t\t\t\t\t$data = array(); $data['directory'] = 'pss'; $data['max_file_size'] = 5000000; $fileManage->_setPictureData($data);\n\t\t\t\t\t$data = array();\n\t\t\t\t\t$data['pss_id'] = $this->v['params']['page_id']; $data['orientation'] = 0; $data['extension'] = $fileManage->_getFileExtension(); $data['created'] = date(\"Y-m-d H:i:s\", time());\n\t\t\t\t\t$picture_number = $this->v['t']['pss_picture']->insert($data);\n\t\t\t\t\tif($picture_number)\n\t\t\t\t\t{\n\t\t\t\t\t\t$fileManage->_setPictureNumber($picture_number);\n\t\t\t\t\t\t$fileManage->_saveImage();\n\t\t\t\t\t\t$this->view->flags = $flags;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$flags->formCaption = 'Error please start over';\n\t\t\t\t\t\t$flags->isError = true;\n\t\t\t\t\t\t$this->view->flags = $flags;\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->view->formVariables = Zend_Json::encode($_POST);\n\t\t\t\t\t$this->view->flags = $flags;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->view->formVariables = 0;\n\t\t\t$this->view->flags = $flags;\n\t\t}\n }",
"function unlinkPersonPicture($personId,$unlink=false) {\n $person=$this->getPersonByID($personId);\n if ($person==null)\n return false;\n $person[\"picture\"]=null;\n return $this->savePerson($person);\n }",
"function save_user() {\n\t\t$this->load->helper('form');\n//\t\tvar_dump($_FILES); exit;\n\t\tif(!empty($_FILES['profile_picture']['name'])) {\n\t\t\t\n\t\t\t$config_file['upload_path'] = 'assets/media/photo/';\n\t\t\t$config_file['encrypt_name'] = TRUE;\n\t\t\t$config_file['max_size'] = 20000;\n\t\t\t$config_file['allowed_types'] = 'jpg|jpeg|png';\n\t\t\t$this->load->library('upload', $config_file);\n\t\t\tif (!$this->upload->do_upload('profile_picture')) {\n\n\t\t\t\tset_error_message($this->upload->display_errors());\n\t\t\t} else {\n\t\t\t\t$file = $this->upload->data();\n\t\t\t\t\n\t\t\t\t$config['image_library'] = 'gd2';\n\t\t\t\t$config['source_image'] = $file['full_path'];\n\t\t\t\t$config['create_thumb'] = TRUE;\n\t\t\t\t$config['maintain_ratio'] = TRUE;\n\t\t\t\t$config['width'] = 100;\n\t\t\t\t\n\t\t\t\t$this->load->library('image_lib', $config);\n\t\t\t\t\n\t\t\t\t$this->image_lib->resize();\n\t\t\t\t\n\t\t\t\t$_POST['profile_picture'] = '/lx_media/photo/' . $file['file_name'];\n//\t\t\t\t$this->db->insert('users', array('profile_picture' => $url_path . '/profile/' . $file['file_name']), array('user_id' => $user_id));\n\t\t\t}\n\t\t}\n\t\tunset($_POST['data_state']);\n\n\t\t$this->load->library('form_validation');\n\t\t\n\t\t$this->form_validation->set_rules('user_name', 'User Name', 'trim|required');\n\t\t$this->form_validation->set_rules('email', 'Email', 'trim|required');\n\t\t$this->form_validation->set_rules('role_id', 'Role_id', 'trim|required');\n\t\t\n\t\tswitch ($_POST['mode']) {\n\t\t\tcase 'add':\n\t\t\t\tunset($_POST['mode']);\n\t\t\t\t$orig_password = $_POST['password'];\n\t\t\t\t$this->form_validation->set_rules('password', 'Password', 'trim|required|md5');\n\t\t\t\t$this->form_validation->set_rules('conf_password', 'Confirm Password', 'trim|required|matches[password]|md5');\n// \t\t\t\t$this->form_validation->set_rules('external_id', 'Employee ID', 'trim|required|callback_id_exist_check');\n\t\t\t\t$this->db->query('SET search_path TO system_security');\n//\t\t\t\t$this->form_validation->set_rules('external_id', 'Employee ID', 'trim|required|is_unique[users.external_id]');\n\t\t\t\t\n\t\t\t\tif ($this->form_validation->run($this) != FALSE) {//\techo 'valid';\n\t\t\t\t\t\n\t\t\t\t\tif(isset($_POST['btnSave'])) {\n\t\t\t\t\t\tunset($_POST['btnSave']);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(isset($_POST['conf_password'])) {\n\t\t\t\t\t\tunset($_POST['conf_password']);\n\t\t\t\t\t}\n\t\t\t\t\t$_POST['created_id'] = get_user_id();\n\t\t\t\t\t$activation_code = $this->_suggest_password();\n\t\t\t\t\t$_POST['active'] = 0;\n\t\t\t\t\t$_POST['activation_code'] = $activation_code;\n\t\t\t\t\t\n\t\t\t\t\t$_POST['user_id'] = $user_id = generate_unique_id();\n\t\t\t\t\t$users = $_POST;\n\n\t\t\t\t\t$this->db->insert('system_security.users', $users);\n\n\t\t\t\t\t$subject = 'Account Activation';\n\t\t\t\t\t$body = 'Your login account name is <strong>' . ($_POST['user_name']) . '</strong><br>\n\t\t\t\t\t\t\tand your temporary password is \\'<strong>' . $orig_password . '</strong>\\'\n\t\t\t\t\t\t\tPlease activate your account here <a href=\"' . site_url('login/activation/' . $activation_code) . '\">' . $activation_code . '</a>, and click \"Change Password\" to change your password and \"Update\" accordingly';\n\t\t\t\t\t\t\n\t\t\t\t\t$this->_send_mail_notification($_POST['email'], $subject, $body, array());\n\t\t\t\t\t\n\t\t\t\t\tset_success_message('Successfully Add User');\n \t\t\t\tredirect('auth/user/user_edit/' . $user_id);\n\t\t\t\t\texit;\n\t\t\t\t} else {\n\t\t\t\t\tset_error_message(validation_errors());\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\tcase 'edit':\n\t\t\t\tunset($_POST['mode']);\n\t\t\t\tunset($_POST['password']);\n\t\t\t\tunset($_POST['conf_password']);\n\t\t\t\tif ($this->form_validation->run() != FALSE){//\techo 'valid';\n\t\t\t\t\t\n\t\t\t\t\tif(isset($_POST['btnSave'])) {\n\t\t\t\t\t\tunset($_POST['btnSave']);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(!isset($_POST['active'])) {\n\t\t\t\t\t\t$_POST['active'] = 0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$user_id = $_POST['user_id'];\n\t\t\t\t\t$this->db->where('user_id', $user_id);\n\t\t\t\t\tunset($_POST['user_id']);\n\t\t\t\t\t$_POST['modified_id'] = get_user_id();\n\t\t\t\t\t$_POST['modified_time'] = date('Y-m-d H:i:s');\n\t\t\t\n\t\t\t\t\t$users = $_POST;\n\t\t\t\t\t$this->db->update('system_security.users', $users);\n\t\t\t\t\t\n\t\t\t\t\tset_success_message('Successfully Update User');\n \t\t\t\tredirect('auth/user/user_edit/' . $user_id);\n\t\t\t\t\texit;\n\t\t\t\t} else {\n\t\t\t\t\tset_error_message(validation_errors());\n\t\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}",
"public function register_fingerprint() {\n\t\t$status = $_GET['status'];\n\n\t\tif ($status === 'success') {\n\t\t\t$finger_data = array(\n\t\t\t\t'finger_id' => $_GET['finger_id'],\n\t\t\t\t'finger_data' => $_GET['finger_data'],\n\t\t\t\t'member_id' => (int)$_GET['member_id']\n\t\t\t);\n\t\t\t$this->session->set_userdata('current_finger_data', $finger_data);\n\t\t}\n\n\t\techo \"<script>window.close();</script>\";\n\t}",
"public function addSignature(Request $request)\n{\n // Form validation\n $request->validate([\n \n 'profile_image' =>'|image|mimes:jpeg,png,jpg,gif|max:2048'\n ]);\n\n // Get current user\n $user =User::findOrFail(2);\n // Set user name\n \n \n\n // Check if a profile image has been uploaded\n if ($request->has('profile_image')) {\n // Get image file\n $image = $request->file('profile_image');\n // Make a image name based on user name and current timestamp\n $name = Str::slug($request->input('lastname')).'_'.time();\n // Define folder path\n $folder = '/uploads/pictures/';\n // Make a file path where image will be stored [ folder path + file name + file extension]\n $filePath = $folder . $name. '.' . $image->getClientOriginalExtension();\n // Upload image\n $this->uploadOne($image, $folder, 'public', $name);\n // Set user profile image path in database to filePath\n $user->profile_image = $filePath;\n }\n // Persist user record to database\n $user->save();\n\n // Return user back and show a flash message\n return redirect()->back()->with(['success' => 'Signature ajoutée avec succès.']); \n}",
"function upload(){\r\nif(is_uploaded_file($_FILES['pic']['tmp_name']) && getimagesize($_FILES['pic']['tmp_name']) != false)\r\n {\r\n /*** get the image info. ***/\r\n $size = getimagesize($_FILES['pic']['tmp_name']);\r\n /*** assign our variables ***/\r\n $type = $size['mime'];\r\n $imgfp = fopen($_FILES['pic']['tmp_name'], 'rb');\r\n $size = $size[3];\r\n $name = $_FILES['pic']['name'];\r\n $maxsize = 99999999;\r\n\r\n\r\n /*** check the file is less than the maximum file size ***/\r\n if($_FILES['pic']['size'] < $maxsize )\r\n {\r\n /*** connect to db ***/\r\n $dbh = new PDO(\"mysql:host=localhost;dbname=dummy\", 'root', '');\r\n\r\n /*** set the error mode ***/\r\n $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n\r\n /*** our sql query ***/\r\n $stmt = $dbh->prepare(\"INSERT INTO volunteer (username,email,contact_no,adhaar_no,gender,Latitude,Longitude,Password,Confirm_password,pic)\r\n VALUES (? ,?,?,?,?, ?,?,?,?,?)\");\r\n\r\n /*** bind the params ***/\r\n $stmt->bindParam(1, $_POST['usrname']);\r\n $stmt->bindParam(2, $_POST['email']);\r\n $stmt->bindParam(3, $_POST['cno']);\r\n $stmt->bindParam(4, $_POST['adhaar']);\r\n $stmt->bindParam(5, $_POST['gen']);\r\n $stmt->bindParam(6, $_POST['lat']);\r\n $stmt->bindParam(7, $_POST['lon']);\r\n $stmt->bindParam(8, $_POST['pass']);\r\n $stmt->bindParam(9, $_POST['rpass']);\r\n $stmt->bindParam(10, $imgfp, PDO::PARAM_LOB);\r\n \r\n /*** execute the query ***/\r\n $stmt->execute();\r\n }\r\n else\r\n {\r\n /*** throw an exception is image is not of type ***/\r\n throw new Exception(\"File Size Error\");\r\n }\r\n }\r\nelse\r\n {\r\n // if the file is not less than the maximum allowed, print an error\r\n throw new Exception(\"Unsupported Image Format!\");\r\n }\r\n}",
"function uploadCorpProfilePic($arrArgs = array()) {\r\n $_SESSION ['profilepic']=\"\";\r\n $valid_file = true;\r\n print_r($_FILES);\r\n if ($_FILES ['myfile'] ['name']) {\r\n $allowedExts = array (\r\n \"gif\",\r\n \"jpg\",\r\n \"png\",\r\n \"jpeg\"\r\n );\r\n $namess = \"name\";\r\n $extension = end ( explode ( \".\", @$_FILES [\"myfile\"] [\"name\"] ) );\r\n if (in_array ( $extension, $allowedExts )) {\r\n if (! $_FILES ['myfile'] ['error']) {\r\n $new_file_name = strtolower ( $_FILES ['myfile'] ['tmp_name'] ); // rename\r\n // file\r\n if ($_FILES ['myfile'] ['size'] > (1024000)) // can't be larger\r\n // than 1 MB\r\n {\r\n $valid_file = false;\r\n $_SESSION ['profilepic'] .= 'Oops! Your file\\'s size is to large.';\r\n }\r\n if ($valid_file) {\r\n \r\n $target_path = \"data/photo/profilepic/\";\r\n \r\n $target_path = $target_path . \"profile\" . $_SESSION ['id'] . basename ( $_FILES ['myfile'] ['name'] );\r\n \r\n if (move_uploaded_file ( $_FILES ['myfile'] ['tmp_name'], $target_path )) {\r\n $data = array (\r\n 'user_id' => strip_tags ( $_SESSION ['id'] ),\r\n 'photo_name' => \"profilePic\",\r\n 'path' => $target_path\r\n );\r\n $result = $this->db->insert ( \"photo\", $data );\r\n if ($result && $result->rowCount () > 0) {\r\n $lastId = $this->db->lastInsertId ();\r\n $data=array(\"profile_pic_id\"=>$lastId);\r\n $condition=array(\"user_id\"=>$_SESSION['id']);\r\n $result = $this->db->update ( \"personal_profile\", $data,$condition );\r\n $result = $this->db->update ( \"corporate_profile\", $data,$condition );\r\n echo \"Updated\";\r\n } else {\r\n return false;\r\n }\r\n $_SESSION ['profilepic'] .= \"Your Profile Pic is Changed Sucessfully\";\r\n } else {\r\n $_SESSION ['profilepic'] .= \"There was an error uploading the file, please try again!\";\r\n }\r\n }\r\n }\r\n \r\n else {\r\n // set that to be the returned message\r\n $message = 'Ooops! Your upload error';\r\n }\r\n } else {\r\n $_SESSION ['profilepic'] .= \"Please Put a valid Extension\";\r\n }\r\n }\r\n }",
"public function changeuserpicture(){\n\t\t$this->load->model('front/customer_model');\n\t\t$id=$this->input->get('id');\n\t\t$data=$this->customer_model->edit_userpicture($id);\n\t\t$this->load->view('front/change_userpicture',$data);\n\t}",
"public function updatePicture($newPictureName, $newPictureExtension)\n {\n $result = 1; \n $oldprofilePictureName = $this->profilePicture;\n $oldprofilePictureExtension = $this->profilePictureExtension;\n $transaction = $this->dbConnection->beginTransaction();\n \n try\n { \n $this->profilePicture = $newPictureName;\n $this->profilePictureExtension = $newPictureExtension;\n if(!$this->save())\n throw new CDbException(null); \n \n $result = $this->addPicture($newPictureName, $newPictureExtension,$oldprofilePictureName,$oldprofilePictureExtension);\n if($result !== 1)\n {\n $this->addError('pictureUploader',$result);\n throw new CException(null); \n } \n \n $transaction->commit();\n }\n catch(Exception $e)\n {\n if($e !== null)\n $this->addError('pictureUploader',\"Problem during file transfer\");\n $transaction->rollBack();\n $result = 0;\n } \n\n return $result;\n }",
"public function postUserAccount(){\n\t\t$this->_loader();\n\n\t\t// get email and password from sign_in form\n\t\t$fname = $this->input->post('fname');\n\t\t$lname = $this->input->post('lname');\n\t\t$image = $_FILES['user_image']['name'];\n\n\t\t// change image name\n\t\t$new_name=str_replace(' ', '_', $image);\n\n\t\t/*\n\t\t*\n\t\t* Check the validation of submitting form\n\t\t* Server side validation is need since\n\t\t*\t\t Client side validation can be modified by {Hacker}\n\t\t*\n\t\t*/\n\t\t$this->form_validation->set_rules('fname','First Name','required|min_length[1]');\n\t\t$this->form_validation->set_rules('lname','Last Name','required|min_length[1]');\n\t\t\n\t\t// update users table of db\n\t\t$data = $this->user->find($this->user());\n\t\t$data->fname = $fname;\n\t\t$data->lname = $lname;\n\t\t$data->image = $new_name;\n\t\t$this->parser->parse('pages/account',['title'=>'Social Site | Account','data'=>(array)$data]);\n\n\n\t\t// upload image in asset/img file\n\t\t$this->do_upload($new_name);\n\n\t\tif($this->user->update($this->user(), $data)){\n\t\t\t$this->session->set_flashdata('successmessage', 'Account has been updated!!');\n\t\t\treturn redirect('account');\n\t\t}else{\n\t\t\t$this->session->set_flashdata('errormessage', 'Something went wrong!!');\n\t\t\treturn redirect('account');\n\t\t}\n\n\t}",
"public function update():void\n {\n $id = $this->id;\n $first_name = $this->first_name;\n $last_name = $this->last_name;\n $image = $this->image;\n $user_type = $this->user_type;\n $address = $this->address;\n\t\t$phone = $this->phone;\n $this->fetch(\n 'UPDATE user\n SET first_name = ?,\n last_name = ?,\n image = ?,\n user_type = ?,\n address=?,\n phone=?\n WHERE id = ?;',\n [$first_name, $last_name,$image, $user_type,$address ,$phone , $id]\n );\n }",
"function save() {\n\t\t// Error-checking should already be complete\n\t\tif(person::exists($this->id)) {\n\t\t\t// UPDATE an existing database entry\n\t\t\t$query = \"UPDATE people set \"\n\t\t\t\t\t.\"firstname = \".$this->firstname.\", \"\n\t\t\t\t\t.\"lastname = \".$this->lastname.\", \"\n\t\t\t\t\t.\"address_home_street_1 = \".$this->address_home_street_1.\", \"\n\t\t\t\t\t.\"address_home_street_2 = \".$this->address_home_street_2.\", \"\n\t\t\t\t\t.\"address_home_city = \".$this->address_home_city.\", \"\n\t\t\t\t\t.\"address_home_state = \".$this->address_home_state.\", \"\n\t\t\t\t\t.\"address_home_zip = \".$this->address_home_zip.\", \"\n\t\t\t\t\t.\"address_work_street_1 = \".$this->address_work_street_1.\", \"\n\t\t\t\t\t.\"address_work_street_2 = \".$this->address_work_street_2.\", \"\n\t\t\t\t\t.\"address_work_city = \".$this->address_work_city.\", \"\n\t\t\t\t\t.\"address_work_state = \".$this->address_work_state.\", \"\n\t\t\t\t\t.\"address_work_zip = \".$this->address_work_zip.\", \"\n\t\t\t\t\t.\"email = \".$this->email.\", \"\n\t\t\t\t\t.\"phone_personal_cell = \".$this->phone_personal_cell.\", \"\n\t\t\t\t\t.\"phone_work = \".$this->phone_work.\", \"\n\t\t\t\t\t.\"phone_work_cell = \".$this->phone_work_cell.\", \"\n\t\t\t\t\t.\"phone_home = \".$this->phone_home.\", \"\n\t\t\t\t\t.\"fax = \".$this->fax.\", \"\n\t\t\t\t\t.\"gender = \".$this->gender.\", \"\n\t\t\t\t\t.\"birthdate = \".$this->birthdate.\", \"\n\t\t\t\t\t.\"facebook_username = \".$this->facebook_username.\", \"\n\t\t\t\t\t.\"username = \".$this->username.\", \"\n\t\t\t\t\t.\"headshot_filename = \".$this->headshot_filename\n\t\t\t\t\t.\" WHERE id = \".$this->id;\n\t\t\t\t\t\n\t\t\t$result = mydb::cxn()->query($query);\n\t\t\tif(mydb::cxn()->error != '') throw new Exception('There was a problem updating '.$this->firstname.' '.$this->lastname.'\\'s database entry.');\n\t\t}\n\t\telse {\n\t\t\t// INSERT a new database entry\n\t\t\t$query = \"INSERT INTO people (\"\n\t\t\t\t\t.\"firstname, \"\n\t\t\t\t\t.\"lastname, \"\n\t\t\t\t\t.\"address_home_street_1, \"\n\t\t\t\t\t.\"address_home_street_2, \"\n\t\t\t\t\t.\"address_home_city, \"\n\t\t\t\t\t.\"address_home_state, \"\n\t\t\t\t\t.\"address_home_zip, \"\n\t\t\t\t\t.\"address_work_street_1, \"\n\t\t\t\t\t.\"address_work_street_2, \"\n\t\t\t\t\t.\"address_work_city, \"\n\t\t\t\t\t.\"address_work_state, \"\n\t\t\t\t\t.\"address_work_zip, \"\n\t\t\t\t\t.\"email, \"\n\t\t\t\t\t.\"phone_personal_cell, \"\n\t\t\t\t\t.\"phone_home, \"\n\t\t\t\t\t.\"phone_work, \"\n\t\t\t\t\t.\"phone_work_cell, \"\n\t\t\t\t\t.\"fax, \"\n\t\t\t\t\t.\"gender, \"\n\t\t\t\t\t.\"birthdate, \"\n\t\t\t\t\t.\"facebook_username, \"\n\t\t\t\t\t.\"username, \"\n\t\t\t\t\t.\"headshot_filename) \"\n\t\t\t\t\t.\"VALUES (\"\n\t\t\t\t\t.\"'\".$this->firstname.\"', \"\n\t\t\t\t\t.\"'\".$this->lastname.\"', \"\n\t\t\t\t\t.\"'\".$this->address_home_.\"', \"\n\t\t\t\t\t.\"'\".$this->address_home_.\"', \"\n\t\t\t\t\t.\"'\".$this->address_home_.\"', \"\n\t\t\t\t\t.\"'\".$this->address_home_.\"', \"\n\t\t\t\t\t.\"'\".$this->address_home_.\"', \"\n\t\t\t\t\t.\"'\".$this->address_work_.\"', \"\n\t\t\t\t\t.\"'\".$this->address_work_.\"', \"\n\t\t\t\t\t.\"'\".$this->address_work_.\"', \"\n\t\t\t\t\t.\"'\".$this->address_work_.\"', \"\n\t\t\t\t\t.\"'\".$this->address_work_.\"', \"\n\t\t\t\t\t.\"'\".$this->email.\"', \"\n\t\t\t\t\t.\"'\".$this->phone_personal_cell.\"', \"\n\t\t\t\t\t.\"'\".$this->phone_home.\"', \"\n\t\t\t\t\t.\"'\".$this->phone_work.\"', \"\n\t\t\t\t\t.\"'\".$this->phone_work_cell.\"', \"\n\t\t\t\t\t.\"'\".$this->fax.\"', \"\n\t\t\t\t\t.\"'\".$this->gender.\"', \"\n\t\t\t\t\t.\"'\".$this->birthdate->format('Y-m-d').\"', \"\n\t\t\t\t\t.\"'\".$this->facebook_username.\"', \"\n\t\t\t\t\t.\"'\".$this->username.\"', \"\n\t\t\t\t\t.\"'\".$this->headshot_filename.\"')\";\n\t\t\t$result = mydb::cxn()->query($query);\n\t\t\tif(mydb::cxn()->error != '') throw new Exception('There was a problem inserting '.$this->firstname.' '.$this->lastname.'\\'s database entry.');\n\t\t}\n\t\t\n\t}",
"function UpdateAnimalWithImage($db,$animal_ID,$aName,$aSpecies,$aBreed,$aGender,$aImage,$rDate,$aInjuries,$aTreatments){\r\n\t\t\t\r\n\t\t//sql to update new inspector\r\n\t\t$sql = \"UPDATE tbl_Animals\r\n\t\t\t\tSET \r\n\t\t\t\tanimal_Name = '$aName',\r\n\t\t\t\tanimal_Type = '$aSpecies',\r\n\t\t\t\tanimal_Breed = '$aBreed',\r\n\t\t\t\tanimal_Gender = '$aGender',\r\n\t\t\t\tanimal_Image = '$aImage',\r\n\t\t\t\tanimal_RescueDate = '$rDate',\r\n\t\t\t\tanimal_Injuries = '$aInjuries',\r\n\t\t\t\tanimal_Treatments = '$aTreatments'\r\n\t\t\t\tWHERE animal_ID = $animal_ID\";\r\n\t\t\t\t\r\n\t\t//runs the insert and displays an error if the insert is unsuccessful\r\n\t\tif(!$result = $db->query($sql)){\r\n\t\t\t$GLOBALS['Error'] = 'There was an error running the query['.$db->error.']';\r\n\t\t}\r\n\t\t//if the user was added successfully then display a success message\r\n\t\telse{\r\n\t\t\t//check if euthenized\r\n\t\t\tif(isset($_POST['euth'])){\r\n\t\t\t$insertEuthSQL = \"INSERT INTO tbl_Euthenasias VALUES(NULL,'$animal_ID',(SELECT CURDATE()))\" ;\r\n\t\t\t\tif(!$result = $db->query($insertEuthSQL)){\r\n\t\t\t\t$GLOBALS['Error'] = ' There was an error running the query['.$db->error.']';\r\n\t\t\t\t}\t\r\n\t\t}\r\n\t\t//---------------------\t \r\n\t\r\n\t\t//check if sterilized\r\n\t\t\tif(isset($_POST['sterl'])){\r\n\t\t\t$insertSterSQL = \"INSERT INTO tbl_Sterilizations VALUES(NULL,'$animal_ID',(SELECT CURDATE()))\" ;\r\n\t\t\t\tif(!$result = $db->query($insertSterSQL)){\r\n\t\t\t\t$GLOBALS['Error'] = ' There was an error running the query['.$db->error.']';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$GLOBALS['Success'] = ' Animal details updated';\r\n\t\t}\t\t\r\n}",
"public function save_teacher_profile_picture($uploadData,$teacher_id)\n\t{\n\t\t$this->db->where('tchr_id', $teacher_id);\n\t\t$this->db->update('cms_teachers', $uploadData);\n\t\treturn $teacher_id;\n\t}",
"function imageUpdate( $path, $uid ) {\n global $db;\n $sql_query = \"UPDATE users SET profileimg = ? WHERE uid = ? \";\n $stmt = mysqli_prepare( $db , $sql_query);\n mysqli_stmt_bind_param($stmt, \"si\", $path, $uid ) ;\n mysqli_stmt_execute ( $stmt );\n if (mysqli_affected_rows( $db ) ) {\n return true ;\n }\n return false ;\n\n }",
"public function registerAction() {\n $captcha = new Zend_Captcha_Image(array( \n 'captcha' => 'Image', 'wordLen' => 4, 'timeout' => 300, 'font' => 'NewtonC.ttf', 'width' => 100, 'height' => 40,\n 'dotNoiseLevel' => 0, 'lineNoiseLevel' => 0\n ));\n $captcha->setName('captcha');\n \n $values = array();\n \n if($this->getRequest()->isPost()) {\n $values = $this->getRequest()->getPost();\n if(!$captcha->isValid($_POST['captcha'], $_POST)) {\n $this->view->captcha_error = true;\n } else {\n //dump($this->getRequest()->getPost());\n //проверить имя пользователя\n $user_model = new Model_Users();\n $error = false;\n\n $error = Model_Users::register($values);\n if(!$error) {\n $this->view->user_error = Vida_Helpers_Text::_T(\"Пользователь с таким именем или email уже зарегистрирован в системе\");\n } else {\n $this->_helper->redirector('success', 'index');\n }\n }\n }\n \n $this->view->values = json_encode($values);\n $this->view->captcha_id = $captcha->generate();\n $this->view->captcha = $captcha->render($this->view);\n }",
"public function insertRecond($name, $email, $dob, $hobbies, $tel, $gender, $image)\r\n\t\t{\r\n\t\t\t$sql = \"INSERT INTO $this->customerTable (name, email, dob, hobbies, tel, gender, image) VALUES('$name','$email', '$dob', '$hobbies', '$tel', '$gender', '$image')\";\r\n\t\t\t$query = $this->con->query($sql);\r\n\t\t\tif ($query) {\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}",
"public function update_user_profile($user_data, $user_id) {\r\n\r\n // Start Backend Validation\r\n if (empty($user_data['name'])) {\r\n $this->errors['name'] = 'رجاء لا تترك هذا الحقل فارغا';\r\n } elseif (strlen($user_data['name']) < 5) {\r\n $this->errors['name'] = 'يجب على اسم المستخدم أن يتكون من 5 أحرف فأكثر';\r\n }\r\n\r\n if (str_word_count($user_data['bio']) > 150) {\r\n $this->errors['bio'] = 'يسمح فقط بـ 150 كلمة أو أقل في النبذة الخاصة بك';\r\n }\r\n\r\n if (!filter_var($user_data['email'], FILTER_VALIDATE_EMAIL)) {\r\n $this->errors['email'] = 'رجاء أدخل بريدا إلكترونيا صالحا';\r\n }\r\n\r\n if (empty($this->errors)) { // If There is No Error\r\n // Sanitize Data\r\n $name = filter_var($user_data['name'], FILTER_SANITIZE_STRING);\r\n $bio = filter_var($user_data['bio'], FILTER_SANITIZE_STRING);\r\n $email = filter_var($user_data['email'], FILTER_SANITIZE_EMAIL);\r\n\r\n // Get Old User Pictures\r\n $avatar = $this->get_user_info('avatar', $user_id);\r\n $cover = $this->get_user_info('cover', $user_id);\r\n\r\n // If The User Uploaded a New Avatar\r\n if (!empty($_FILES['avatar']['tmp_name'])) {\r\n // Get The Avatar\r\n $image = $_FILES['avatar'];\r\n $ext = pathinfo($image['name'], PATHINFO_EXTENSION);\r\n\r\n // If The User Has Not an Image Folder Before\r\n if (in_array($avatar, ['male.png', 'female.png'])) {\r\n // Create a New One\r\n $user_dir = str_replace(' ', '_', $name) . '_' . time() . '/';\r\n } else { // If Not\r\n // Use The Old One\r\n $user_dir = pathinfo($avatar, PATHINFO_DIRNAME) . '/';\r\n }\r\n\r\n // Fill Important Properties\r\n $this->extensions = ['png', 'jpg', 'jpeg', 'gif'];\r\n $this->upload_dir = 'assets/images/profile/' . $user_dir;\r\n $this->upload_name = 'profile.' . $ext;\r\n\r\n // Upload The New Image\r\n if ($this->upload($image)) {\r\n $avatar = $user_dir . $this->upload_name;\r\n }\r\n }\r\n\r\n // If The User Uploaded a New Cover Photo\r\n if (!empty($_FILES['cover']['tmp_name'])) {\r\n // Get The Image\r\n $image = $_FILES['cover'];\r\n $ext = pathinfo($image['name'], PATHINFO_EXTENSION);\r\n\r\n // If The User Has Not an Image Folder Before\r\n if (in_array($avatar, ['male.png', 'female.png'])) {\r\n // Create a New One\r\n $user_dir = str_replace(' ', '_', $name) . '_' . time() . '/';\r\n } else { // If Not\r\n // Use The Old One\r\n $user_dir = pathinfo($avatar, PATHINFO_DIRNAME) . '/';\r\n }\r\n\r\n // Fill Important Properties\r\n $this->extensions = ['png', 'jpg', 'jpeg', 'gif'];\r\n $this->upload_dir = 'assets/images/profile/' . $user_dir;\r\n $this->upload_name = 'cover.' . $ext;\r\n\r\n // Upload The New Image\r\n if ($this->upload($image)) {\r\n $cover = $user_dir . $this->upload_name;\r\n }\r\n }\r\n\r\n // Connect To DB\r\n $connection = DB::connect();\r\n\r\n // Update users Table\r\n $stmt = \"UPDATE users SET\r\n name = '$name',\r\n email = '$email',\r\n bio = '$bio',\r\n avatar = '$avatar',\r\n cover = '$cover' WHERE id = '$user_id'\";\r\n\r\n // If The User Profile Wans't Updated SuccessFully\r\n if ($connection->query($stmt) === false) {\r\n echo '<script>alert(\"لا نستطيع تحديث معلوماتك الآن، يمكنك الإتصال بفريق الدعم أو المحاولة لاحقا\")</script>';\r\n return;\r\n }\r\n\r\n // Redirect To Profile Page\r\n $profile_url = DB::MAIN_URL . 'profile.php';\r\n //header('location: ' . $profile_url);\r\n\r\n }\r\n }",
"function registrasi($data) {\n global $conn;\n\n $nama = htmlspecialchars($data['nama']);\n $username = htmlspecialchars($data['username']);\n $password = htmlspecialchars($data['password']);\n $created_at = htmlspecialchars($data['created_at']);\n $akses = htmlspecialchars($data['akses']);\n $photo = uploadFoto();\n\n if( !$photo ) {\n return false;\n }\n\n $cekusername = mysqli_query($conn, \"SELECT * FROM admin WHERE username = '$username'\");\n\n if(mysqli_fetch_assoc($cekusername)) {\n echo \"<script>Swal.fire({\n title: 'Failed!',\n text: 'Username already exists',\n icon: 'error',\n confirmButtonText: 'OK'\n });</script>\";\n return false;\n }\n\n $password = password_hash($password, PASSWORD_DEFAULT);\n\n $query = \"INSERT INTO admin VALUES('', '$nama', '$username', '$password', '$photo', $akses, '$created_at', null)\";\n mysqli_query($conn, $query);\n\n return mysqli_affected_rows($conn);\n }",
"public function register(Request $request)\n {\n $operator = Auth::user();\n $raffle = Raffle::find($request->raffle_id);\n $user = User::find($request->user_id);\n\n if(($raffle->legalAgeReq == 1) && (time() - $user->birthday) < 567648000){\n return redirect()->back()->with('msg', 'Die Teilnahme an der Aktion ist ab 18 Jahren freigegeben.')->with('msgState', 'alert');\n }\n elseif($raffle->expired()){\n return redirect()->back()->with('msg', 'Die Aktion ist bereits beendet.')->with('msgState', 'alert');\n }\n elseif( $user->hasRaffle($raffle->id) ){\n return redirect()->back()->with('msg', 'Der Benutzer nimms bereits an dieser Aktion teil.')->with('msgState', 'alert');\n }\n else{\n // Error, if Profile Picture is required and User has none\n if($raffle->imageReq == 1 && (!isset($request->nopic) || $request->nopic == null)){\n if($user->files()->where('slug','profile_img')->first() == null){\n return view('operator.no-picture',compact('raffle','user'));\n }\n }\n\n do{\n $pCode = strtoupper(str_random(6));\n $check = DB::table('raffle_user')->where('code', '=', $pCode)->get();\n } while($check != null);\n\n $user->raffles()->attach($raffle->id);\n $user->raffles()->updateExistingPivot($raffle->id, ['code' => $pCode, 'participated_at' => time()]);\n $confirmed = false;\n\n if($operator->hasPermission('is_admin')){\n $this->participationSucceed($user, $raffle, $confirmed);\n }\n\n return redirect('operator/'.$user->id)->with('msg', 'Der User wurde erfolgreich für die Aktion ' . $raffle->title . ' registriert.')->with('msgState', 'success');\n }\n }",
"public function update_profile_pic(Request $request) {\n \t$base64_encoded_image = $request->imagebase64;\n \t//get the base64 code\n \t$data = explode(';', $base64_encoded_image)[1];\n $data = explode(',', $data)[1];\n $profile_pictures_path = public_path() . '/images/profile_pictures/';\n $image_name = time() . strtolower(Auth::user()->first_name . '_' . Auth::user()->last_name) . '.png';\n\n //decode the data\n $data = base64_decode($data);\n //save the data\n $total_path = $profile_pictures_path . $image_name;\n file_put_contents($total_path, $data);\n\n //update the user model\n Auth::user()->image = $image_name;\n Auth::user()->save();\n\n return redirect()->back();\n }",
"public function editAvatar(EditUserForm $request){\n if(Auth::check()){\n $valid = User::select('id')\n ->where('email', $request->email)\n ->where('id', '<>' , $request->id)\n ->get();\n if(count($valid) <= 0){\n\n $user = User::find($request->id);\n $oldAvatar = $user->avatar; \n\n if ($request->avatar == $oldAvatar){\n\n $fileName = $request->avatar;\n }\n else{\n\n if ( $oldAvatar =='img/img_profile_users/default-avatar2.jpg') {\n\n $idUnique = time();\n list(, $request->avatar) = explode(';', $request->avatar);\n list(, $request->avatar) = explode(',', $request->avatar);\n //Decodificamos $request->avatar codificada en base64.\n $avatar = base64_decode($request->avatar);\n $fileName = \"img/img_profile_users/\" . $idUnique . \"-\" . $request->name .\".jpg\";\n //escribimos la información obtenida en un archivo llamado \n //$idUnico = time().jpg para que se cree la imagen correctamente\n file_put_contents($fileName, $avatar); //se crea la imagen en la ruta \n }\n else{\n \n $idUnique = time();\n list(, $request->avatar) = explode(';', $request->avatar);\n list(, $request->avatar) = explode(',', $request->avatar);\n //Decodificamos $request->avatar codificada en base64.\n $avatar = base64_decode($request->avatar);\n $fileName = \"img/img_profile_users/\" . $idUnique . \"-\" . $request->name .\".jpg\";\n unlink($oldAvatar);\n //escribimos la información obtenida en un archivo llamado \n //$idUnico = time().jpg para que se cree la imagen correctamente\n file_put_contents($fileName, $avatar); //se crea la imagen en la ruta \n };\n } \n\n $sessionUser = Auth::user()->name;\n //$user = User::find($request->id);\n $user->name = $request->name;\n $user->email = $request->email;\n $user->telephone = $request->telephone;\n $user->dependence = $request->dependence;\n $user->role = $request->role;\n $user->avatar = $fileName;\n $user->save();\n $audi_users = new Audi_Users;\n $audi_users->name = $request->name;\n $audi_users->email = $request->email;\n $audi_users->telephone = $request->telephone;\n $audi_users->dependence = $request->dependence;\n $audi_users->role = $request->role;\n $audi_users->avatar = $fileName;\n $audi_users->id_user = Auth::user()->id;\n $audi_users->tipo_audi = 2;\n $audi_users->save();\n return ['success'=>'ok'];\n }else{\n return ['error'=>'Este correo ya esta asignado a otro usuario'];\n }\n }\n else{\n return ['error'=>'no se pudo completar la operacion'];\n }\n }",
"public function update_person() {\n $fdata = $this->input->post();\n unset($fdata['submit']);\n $where = array(\"admin_id\" => $this->admin_lib->admin_id, \"person_id\" => $fdata['person_id']);\n $this->person_db->update_person($where, $fdata);\n redirect(\"p_list/index\");\n }",
"public function actionAvatar()\n {\n $players=Player::find()->active()->all();\n foreach($players as $player)\n {\n $robohash=new \\app\\models\\Robohash($player->profile->id,'set1');\n $image=$robohash->generate_image();\n if(get_resource_type($image)=== 'gd')\n {\n $dst_img=\\Yii::getAlias('@app/web/images/avatars/'.$player->profile->id.'.png');\n imagepng($image,$dst_img);\n imagedestroy($image);\n $player->profile->avatar=$player->profile->id.'.png';\n $player->profile->save(false);\n }\n }\n }",
"public function regAction(Request $request, Response $response): Response\n {\n\n\n try {\n // This method decodes the received json\n $data = $request->getParsedBody();\n\n /** @var PDORepository $repository**/\n $repository = $this->container->get('user_repo');\n\n //Validamos los campos y guardamos los errores\n $errors = $this->validate($data, $request, false);\n\n //Control de los campos opcionales que son unos hijos de puta\n if(empty($data['birthdate'])){\n $aux= new DateTime(\"1000-01-01 00:00:00\");\n $data['birthdate'] = $aux->format('Y-m-d H:i:s');\n }\n\n $uploadedFiles = $request->getUploadedFiles();\n\n\n if(empty($uploadedFiles['profile']->getClientFilename())){\n\n $data['profile'] = 'defaultProfile.png';\n }else{\n $name = $uploadedFiles['profile']->getClientFilename();\n $fileInfo = pathinfo($name);\n $format = $fileInfo['extension'];\n $data['profile'] = $data['username'].'.'.$format;\n }\n\n if(empty($errors)){\n //Como la seda\n $user = new User(\n $data['name'],\n $data['username'],\n $data['email'],\n $data['birthdate'],\n $data['phonenumber'],\n $data['password'],\n $data['profile'],\n 1,\n 0,//enabled, a 0 de saque\n new DateTime(),\n new DateTime()\n );\n\n $repository->save($user);\n }else{\n //Algo ha ido mal\n\n throw new \\Exception('The validation went wrong');\n }\n\n } catch (\\Exception $e) {\n\n //Si algo va mal al validar, mostramos la ventana de error\n\n //$response->getBody()->write('Unexpected error: ' . $e->getMessage());\n $this->container->get('view')->render($response, 'registration.twig', [\n 'errors' => $errors,\n ]);\n return $response->withStatus(400);\n }\n\n\n //Enviamos el correo de verificacion\n $e = $this->container->get('email');\n $e->sendEmail($data['email']);\n\n\n\n $_SESSION['reg_ok'] = 1;\n\n\n return $response->withRedirect('/login',303); //303 EL BUENO\n\n\n\n }"
] | [
"0.62993103",
"0.629556",
"0.6226211",
"0.61999524",
"0.6063384",
"0.60218364",
"0.6018093",
"0.59605837",
"0.5935695",
"0.5927818",
"0.5925713",
"0.5890542",
"0.58744764",
"0.5847104",
"0.5827953",
"0.58162713",
"0.58145404",
"0.5795447",
"0.57699376",
"0.57687724",
"0.5757614",
"0.5745722",
"0.57160723",
"0.5707082",
"0.56952983",
"0.5691288",
"0.5654909",
"0.5648761",
"0.564521",
"0.56398046",
"0.56371725",
"0.5633489",
"0.56213075",
"0.5619866",
"0.56192183",
"0.560969",
"0.56070745",
"0.56031513",
"0.5595678",
"0.55820525",
"0.5579994",
"0.5577489",
"0.55747813",
"0.55506134",
"0.5547516",
"0.55406415",
"0.55344826",
"0.55142796",
"0.55109096",
"0.5506782",
"0.55063045",
"0.5503766",
"0.54950184",
"0.5485409",
"0.548413",
"0.5474304",
"0.54644674",
"0.5462299",
"0.5452991",
"0.544816",
"0.5442763",
"0.54393905",
"0.5438208",
"0.5432846",
"0.543281",
"0.54322696",
"0.5423385",
"0.5418927",
"0.54186225",
"0.54143506",
"0.54101104",
"0.5402659",
"0.5401559",
"0.54002935",
"0.5397244",
"0.5394376",
"0.5394181",
"0.5390816",
"0.5390042",
"0.53895414",
"0.5382241",
"0.5379939",
"0.53724134",
"0.53708565",
"0.5370167",
"0.5365382",
"0.5363387",
"0.53577435",
"0.5354836",
"0.53484786",
"0.5347487",
"0.53346795",
"0.5325805",
"0.5323802",
"0.53212905",
"0.53096986",
"0.5309684",
"0.53037393",
"0.53029597",
"0.53027743"
] | 0.62716323 | 2 |
retorna los saldos de todos los bancos | public function getSaldoBancos(){
$bancos = $this->getList(new UIBancoCriteria());
$saldos = 0;
foreach ($bancos as $banco) {
$saldos += $banco->getSaldo();
}
return $saldos;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function buscarSalas($sala){\n $listado = [];\n \n #Consulto el tipo de servicio...\n $id = new MongoDB\\BSON\\ObjectId($sala);\n //'eliminado'=>false,'status'=>true,\n $res_servicios = $this->mongo_db->order_by(array('_id' => 'DESC'))->where(array(\"_id\"=>$id))->get(\"servicios\");\n\n foreach ($res_servicios as $claves => $valor) {\n $valor[\"id_salas\"] = (string)$valor[\"_id\"]->{'$id'};\n $valor[\"monto\"] = number_format($valor[\"monto\"],2);\n $listado[] = $valor; \n }\n return $listado;\n }",
"public function cargaSalon(Request $request){\n \t$id_sesion=$request->id;\n \t\n \t$salon=[];\n\n\t\t//butacas resevadas en esa sesion (directo el seiosn id)\n\t\t$butacas_reservadas=Butaca::whereHas('sesion', function ($query) use ($id_sesion) {\n \t\t$query->where('sesion_id', $id_sesion);\n\t\t})->get()->toArray();\n\t\t \n\t\t\n\n\t\t//butacas bloqueadas por esa sesion\t\t(sacar las reservas con sesion_id)\n\t\t$butacas_bloqueadas=Butaca::where(\"sesion_id\",$id_sesion)->get()->toArray();\n\t\t\n\n\t\t$butacas_ocupadas = array_merge($butacas_reservadas, $butacas_bloqueadas);\n\t\t\n\t\tfor($i=1;$i<=Config('constants.options.filas_sala');$i++){\n\t\t\tfor($j=1;$j<=Config('constants.options.columnas_sala');$j++){\n\t\t\t\t$ocupada=\"false\";\n\t\t\t\tfor ($b=0;$b<count($butacas_ocupadas);$b++) {\n\t\t\t\t\tif($butacas_ocupadas[$b][\"fila\"]==$i and $butacas_ocupadas[$b][\"columna\"]==$j){\n\t\t\t\t\t\t$ocupada=\"true\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$salon[]=[\"fila\"=>$i,\"columna\"=>$j,\"ocupada\"=>$ocupada];\n\t\t\t}\n\t\t}\n//\t\tdd($salon);\n\n\n \treturn json_encode($salon);\n\n }",
"public function getSalons()\r\n {\r\n return $this->salons;\r\n }",
"public function obtenerSaldo();",
"public function getSalones(){\n\t\t$filasPagina = 7;//registros mostrados por página\n\n\t\tif(isset($_GET['pagina'])){//si le pasamos el valor \"pagina\" de la url (si el usuario da click en la paginación)\n\t\t\t\tif($_GET['pagina']==1){\n\t\t\t\t$pagina=1; \n\t\t\t\theader(\"Location: principal.php?c=controlador&a=muestraSalones\");\n\t\t\t\t}else{\n\t\t\t\t\t$pagina=$_GET['pagina'];//índice que indica página actual\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$pagina=1;//índice que indica página actual\n\t\t\t}\n\n\t\t\t$empezarDesde = ($pagina-1) * $filasPagina;\n\n\t\t\t$sql = \" SELECT * FROM salones \";\n\n\t\t\t$resultado = $this->db->query($sql);\n\n\t\t\t$resultado->execute(array());\n\n\t\t\t$numFilas = $resultado->rowCount();//número de registos totales de la consulta\n\n\t\t\t//ceil — Redondear fracciones hacia arriba\n\t\t\t$totalPaginas = ceil($numFilas / $filasPagina);//calcula cuántas páginas serán en total para mostrar todos los registros\n\n\t\t\t$resultado->closeCursor();\n\n\t\t//------------------------- Consulta para mostrar los resultados ---------------------------\n\n\t\t\t$sql_limite = \" SELECT * FROM salones LIMIT $empezarDesde , $filasPagina \";\n\n\t\t\t$resultado = $this->db->query($sql_limite);//ejecutando la consulta con la conexión establecida\n\n\t\t\twhile($row = $resultado->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t$this->objeto[] = $row;//llenando array con valores de la consulta\n\t\t\t}\n\n\t\treturn $this->objeto;\n\t}",
"public function ListarSalas()\n{\n\tself::SetNames();\n\t$sql = \" select * from salas\";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n}",
"private function getSaldo()\n {\n return $this->saldo;\n }",
"public function getSabores(){\n $sabores = TcSabor::where('id_estado','=',1)->get();\n return $sabores;\n }",
"public function GetSaldoTotalProveedores()\n {\n \t\n \n \t// No mostrar Insumos a contabilizar, exite otro procedimiento para tratarlas\n \t// Insumos a contabilizar\n \t$CONST_InsumosAContabilizarId = 5;\n \t\n \t$q\t=\tDoctrine_Query::create()\n \t->from('Proveedor c')\n \t->innerJoin('c.FacturasCompra f')\n \t->andWhere('f.TipoGastoId <> ?', $CONST_InsumosAContabilizarId)\n \t->groupBy('c.Id');\n //echo $q->getSqlQuery();\n \t$cli\t=\t$q->execute();\n \t$total=0;\n \tforeach ($cli as $c)\n \t{\n \t\t\t$saldoActual\t=\t$c->GetSaldo();\n \t\t\t$c->SaldoActual\t=\t$saldoActual;\n \t\t\t$c->save();\n\t\t\t\t\t// sumar saldo total de cada cliente\n \t\t\t$total\t+= $saldoActual;\n \t}\n \n \treturn $total;\n }",
"public function get_saldo_caja($sucursal){\n\t$conectar= parent::conexion();\n\tparent::set_names();\n \n\t$sql=\"select saldo from caja_chica where sucursal=?;\";\n\t$sql=$conectar->prepare($sql);\n\t$sql->bindValue(1,$sucursal);\n\t$sql->execute();\n\treturn $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}",
"function getCreditosComprometidos(){ return $this->getOEstats()->getTotalCreditosSaldo(); }",
"public function getSaldo()\n {\n return $this->saldo;\n }",
"public function getSaldo()\n {\n return $this->saldo;\n }",
"public function getSaldoBanco(UIBancoCriteria $criteria){\n\n\t\t$bancos = $this->getList($criteria);\n\t\t$saldos = 0;\n\t\tforeach ($bancos as $banco) {\n\t\t\t$saldos += $banco->getSaldo();\n\t\t}\n\t\treturn $saldos;\n\t}",
"function salida_por_traspaso(){\n\t\t$e= new Salida();\n\t\t$e->usuario_id=$GLOBALS['usuarioid'];\n\t\t$e->empresas_id=$GLOBALS['empresaid'];\n\t\t$related = $e->from_array($_POST);\n\t\t//if($e->costo_unitario=='undefined') $e->costo_unitario=0;\n\t\t$e->espacios_fisicos_id=$GLOBALS['espacios_fisicos_id'];\n\t\t$e->costo_total=($e->cantidad * $e->costo_unitario);\n\t\t$e->cclientes_id=1;\n\t\t$e->fecha=date(\"Y-m-d H:i:s\");\n\t\tif($e->id==0)\n\t\t\tunset($e->id);\n\t\tif($e->save($related)) {\n\t\t\techo $e->id;\n\t\t} else\n\t\t\techo 0;\n\t}",
"public function cadastrarHabilidade($dados){\n \n return $this->salvar($dados);\n\t}",
"public function salvar() {\n\n if (!db_utils::inTransaction()) {\n throw new Exception(_M('patrimonial.patrimonio.Bem.sem_transacao'));\n }\n\n /**\n * Realizamos algumas validações básicas\n */\n if ($this->oPlaca == null || !$this->oPlaca instanceof PlacaBem) {\n throw new Exception(_M('patrimonial.patrimonio.Bem.placa_nao_definida'));\n }\n if (!$this->getFornecedor() instanceof CgmBase) {\n throw new Exception(_M('patrimonial.patrimonio.Bem.informe_fornecedor'));\n }\n if (!$this->getClassificacao() instanceof BemClassificacao) {\n throw new Exception(_M('patrimonial.patrimonio.Bem.informe_classificacao'));\n }\n /**\n * Dados da tabela bens\n */\n $oDaoBens = new cl_bens();\n $oDaoBens->t52_bensmarca = \"{$this->getMarca()}\";\n $oDaoBens->t52_bensmedida = \"{$this->getMedida()}\";\n $oDaoBens->t52_bensmodelo = \"{$this->getModelo()}\";\n $oDaoBens->t52_codcla = $this->getClassificacao()->getCodigo();\n $oDaoBens->t52_depart = $this->getDepartamento();\n $oDaoBens->t52_descr = $this->getDescricao();\n $oDaoBens->t52_dtaqu = $this->getDataAquisicao();\n $oDaoBens->t52_instit = $this->getInstituicao();\n $oDaoBens->t52_numcgm = $this->getFornecedor()->getCodigo();\n $oDaoBens->t52_obs = $this->getObservacao();\n $oDaoBens->t52_valaqu = \"{$this->getValorAquisicao()}\";\n\n /**\n * Inclusao - busca placa\n */\n if (empty($this->iCodigoBem)) {\n $oDaoBens->t52_ident = $this->getPlaca()->getNumeroPlaca();\n }\n\n $lIncorporacaoBem = false;\n if (!empty($this->iCodigoBem)) {\n\n $oDaoBens->t52_bem = $this->iCodigoBem;\n $oDaoBens->alterar($this->iCodigoBem);\n $sHistoricoBem = 'Alteração de dados do Bem';\n } else {\n\n $sHistoricoBem = 'Inclusão do Bem';\n $oDaoBens->incluir(null);\n $this->iCodigoBem = $oDaoBens->t52_bem;\n $lIncorporacaoBem = true;\n }\n\n if ($oDaoBens->erro_status == 0) {\n throw new Exception(_M('patrimonial.patrimonio.Bem.erro_salvar', (object)array(\"erro_msg\" => $oDaoBens->erro_msg)));\n }\n\n $lRealizarEscrituracao = $this->criaVinculoBemNotas();\n\n $oDataAtual = new DBDate(date('Y-m-d', db_getsession(\"DB_datausu\")));\n $oInstit = new Instituicao(db_getsession(\"DB_instit\"));\n $lIntegracaoFinanceiro = ParametroIntegracaoPatrimonial::possuiIntegracaoPatrimonio($oDataAtual, $oInstit);\n\n $lRealizouLancamento = false;\n if ($lRealizarEscrituracao && $lIntegracaoFinanceiro && $lIncorporacaoBem) {\n $lRealizouLancamento = $this->processaLancamentoContabil();\n }\n\n /**\n * Salva os dados da depreciacao do bem\n */\n $this->salvarDepreciacao();\n\n $this->oPlaca->setCodigoBem($this->iCodigoBem);\n $this->oPlaca->salvar();\n\n /**\n * Salvamos o Historico do bem\n */\n $oHistoricoBem = new BemHistoricoMovimentacao();\n $oHistoricoBem->setData(date(\"Y-m-d\", db_getsession(\"DB_datausu\")));\n $oHistoricoBem->setDepartamento(db_getsession(\"DB_coddepto\"));\n $oHistoricoBem->setHistorico($sHistoricoBem);\n $oHistoricoBem->setCodigoSituacao($this->getSituacaoBem());\n $oHistoricoBem->salvar($this->iCodigoBem);\n\n $this->salvarDadosDivisao();\n $this->salvarDadosCedente();\n if ($this->getDadosImovel() instanceof BemDadosImovel) {\n\n $this->getDadosImovel()->setBem($this->iCodigoBem);\n $this->getDadosImovel()->salvar();\n }\n\n if ($this->getDadosCompra() instanceof BemDadosMaterial) {\n\n $this->getDadosCompra()->setBem($this->iCodigoBem);\n $this->getDadosCompra()->salvar();\n }\n\n if ($this->getTipoAquisicao() instanceof BemTipoAquisicao) {\n /**\n * Só executa se bem for uma inclusão manual ($lRealizouLancamento == false)\n */\n \tif ($lIncorporacaoBem == true && !$lRealizouLancamento && USE_PCASP && $lIntegracaoFinanceiro) {\n\n $oLancamentoauxiliarBem = new LancamentoAuxiliarBem();\n $oEventoContabil = new EventoContabil(700, db_getsession('DB_anousu'));\n $oLancamentoauxiliarBem->setValorTotal($this->getValorAquisicao());\n $oLancamentoauxiliarBem->setBem($this);\n $oLancamentoauxiliarBem->setObservacaoHistorico(\"{$this->getObservacao()} | Código do Bem: {$this->iCodigoBem}.\");\n\n $aLancamentos = $oEventoContabil->getEventoContabilLancamento();\n $oLancamentoauxiliarBem->setHistorico($aLancamentos[0]->getHistorico());\n $oEventoContabil->executaLancamento($oLancamentoauxiliarBem);\n \t}\n }\n }",
"function buscarUtlimaSalidaDAO(){\n $conexion = Conexion::crearConexion();\n try {\n $conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $stm = $conexion->prepare(\"SELECT * FROM salidas ORDER BY id_venta DESC LIMIT 1\");\n $stm->execute();\n $exito = $stm->fetch();\n } catch (Exception $ex) {\n throw new Exception(\"Error al buscar la ultima salida en bd\");\n }\n return $exito;\n }",
"public function costo_bancos($proceso) {\n\n $sql = \"SELECT * from bancos where status = 'A' and nombre like '%\" . $proceso . \"%' limit 1\";\n\n $query = $this->db->prepare($sql);\n $query->execute();\n\n $result = array();\n\n while ($row = $query->fetch(PDO::FETCH_ASSOC)) {\n\n $result[] = $row;\n }\n\n return $result;\n }",
"public function testSaldoDeRecursosExtraOrcamentariosIgualAoSaldoDoPassivoARecolherMenosOAtivoACompensarDeduzidosDosSequestros() {\n $filter = function (array $line): bool {\n if (\n str_starts_with($line['conta_contabil'], '1.1.1.1.1.') && $line['escrituracao'] === 'S' && $line['recurso_vinculado'] >= 8000 && $line['recurso_vinculado'] <= 8999\n ) {\n return true;\n }\n return false;\n };\n $saldoDevedorDisp = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_debito', $filter);\n $saldoCredorDisp = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_credito', $filter);\n\n $filter = function (array $line): bool {\n if (\n (\n str_starts_with($line['conta_contabil'], '1.') && !str_starts_with($line['conta_contabil'], '1.1.1.1.1.')\n ) && $line['escrituracao'] === 'S' && $line['recurso_vinculado'] >= 8000 && $line['recurso_vinculado'] <= 8999\n ) {\n return true;\n }\n return false;\n };\n $saldoDevedorAtivo = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_debito', $filter);\n $saldoCredorAtivo = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_credito', $filter);\n\n $filter = function (array $line): bool {\n if (\n str_starts_with($line['conta_contabil'], '1.1.3.5.1.05.') && $line['escrituracao'] === 'S') {\n return true;\n }\n return false;\n };\n $saldoDevedorAtivoSequestro = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_debito', $filter);\n $saldoCredorAtivoSequestro = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_credito', $filter);\n\n $filter = function (array $line): bool {\n if (\n str_starts_with($line['conta_contabil'], '2.') && $line['escrituracao'] === 'S' && $line['recurso_vinculado'] >= 8000 && $line['recurso_vinculado'] <= 8999\n ) {\n return true;\n }\n return false;\n };\n $saldoDevedorPassivo = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_debito', $filter);\n $saldoCredorPassivo = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_credito', $filter);\n\n $this->comparar(($saldoDevedorDisp - $saldoCredorDisp) + ($saldoDevedorAtivoSequestro - $saldoCredorAtivoSequestro), ($saldoCredorPassivo - $saldoDevedorPassivo) - ($saldoDevedorAtivo - $saldoCredorAtivo));\n }",
"public function indexListaSobrantes($id){\n // viene id de ingreso_b3\n\n $dataArray = array();\n\n $listado = IngresosDetalleB3::where('id_ingresos_b3', $id)->orderBy('nombre')->get();\n\n foreach ($listado as $l){\n\n // obtener cantidad verificada\n $listave = VerificadoIngresoDetalleB3::where('id_ingresos_detalle_b3', $l->id)->get();\n $totalve = collect($listave)->sum('cantidad');\n $l->cantiverificada = $totalve;\n\n // obtener cantidad retirada\n $listare = RetiroBodegaDetalleB3::where('id_ingresos_detalle_b3', $l->id)->get();\n $totalre = collect($listare)->sum('cantidad');\n $l->cantiretirada = $totalre;\n\n $resta = $totalve - $totalre;\n // $l->sobrante = $resta;\n\n if($rem = RegistroExtraMaterialDetalleB3::where('id_ingresos_detalle_b3', $l->id)->first()){\n // si lo encuentra es un material extra agregado\n // obtener fecha cuando se agrego\n\n $infodeta = RegistroExtraMaterialB3::where('id', $rem->id_reg_ex_mate_b3)->first();\n\n // meter la fecha\n $fecha = date(\"d-m-Y\", strtotime($infodeta->fecha));\n\n $dataArray[] = [\n 'fecha' => $fecha,\n 'nombre' => $l->nombre,\n 'preciounitario' => $l->preciounitario,\n 'cantidad' => $l->cantidad,\n 'cantiverificada' => $totalve,\n 'cantiretirada' => $totalre,\n 'sobrante' => $resta\n ];\n\n }else{\n // es un material agregado al crear el proyecto\n $daa = IngresosB3::where('id', $l->id_ingresos_b3)->first();\n\n $fecha = date(\"d-m-Y\", strtotime($daa->fecha));\n\n $dataArray[] = [\n 'fecha' => $fecha,\n 'nombre' => $l->nombre,\n 'preciounitario' => $l->preciounitario,\n 'cantidad' => $l->cantidad,\n 'cantiverificada' => $totalve,\n 'cantiretirada' => $totalre,\n 'sobrante' => $resta\n ];\n }\n }\n\n // metodos para ordenar el array\n usort($dataArray, array( $this, 'sortDate' ));\n\n return view('backend.bodega3.verificacion.sobrante.index', compact('dataArray'));\n }",
"static Public function MdlMostrarSalidas($tabla, $campo, $valor, $fechaSel){\n\n$where='1=1';\n\n$idtec = (int) $valor;\n$where.=($idtec>0)? ' AND id_cliente=\"'.$idtec.'\" ' : \"\";\n\n$tabla = (int) $tabla;\n$where.=($tabla>0)? ' AND id_almacen=\"'.$tabla.'\"' : \"\";\n\n$where.=(!empty($fechaSel))? ' AND fecha_salida=\"'.$fechaSel.'\"' : \"\";\n\n$where.=' GROUP by num_salida,fecha_salida,id_almacen,id_cliente';\n\nif($tabla>0 || $idtec>0 || !empty($fechaSel)){\t\t\t//QUE ALMACEN MOSTRAR SALIDAS\n\t$sql=\"SELECT `id_cliente`, t.nombre AS nombrecliente, `num_salida`, `fecha_salida`, SUM(`cantidad`) AS salio, \n\tSUM(IF(`es_promo` = 0, `cantidad`*`precio_venta`,0)) AS sinpromo, \n\tSUM(IF(`es_promo` = 1, `precio_venta`,0)) AS promo, id_tipovta,\n\t`id_almacen`,a.nombre AS almacen FROM `hist_salidas` INNER JOIN clientes t ON id_cliente=t.id \n\tINNER JOIN almacenes a ON id_almacen=a.id WHERE \".$where;\n\t\n}else{ // TODOS LOS ALMACENES\n\n\t$sql=\"SELECT `id_cliente`, t.nombre AS nombrecliente, `num_salida`, `fecha_salida`, SUM(`cantidad`) AS salio, id_tipovta, `id_almacen`,a.nombre AS almacen FROM `hist_salidas` INNER JOIN clientes t ON id_cliente=t.id \n\tINNER JOIN almacenes a ON id_almacen=a.id\n\tGROUP by `num_salida`,`fecha_salida`,`id_almacen`,`id_cliente`\";\n}\n\n $stmt=Conexion::conectar()->prepare($sql);\n\t\t\n //$stmt->bindParam(\":\".$campo, $valor, PDO::PARAM_STR);\n \n if($stmt->execute()){;\n \n return $stmt->fetchAll();\n \n //if ( $stmt->rowCount() > 0 ) { do something here }\n \n \t }else{\n\n\t\t\treturn false;\n\n\t } \n \n \n $stmt=null;\n }",
"function s_d_salarii_platit()\n{\n // selecteaza datele platite deja din salarii\n $submission_date = format_data_out_db('submission_date');\n $query_sal = \"SELECT DISTINCT $submission_date AS date_db\n FROM cozagro_db.work_days \n WHERE work_days.deleted = 0 AND completed = 0\n ORDER BY submission_date DESC \";\n $result_sal = Database::getInstance()->getConnection()->query($query_sal);\n if (!$result_sal) {\n die(\"Nu s-a reusit conexiunea la DB selectarea salariilor platite\" . Database::getInstance()->getConnection()->error);\n }\n $salary = [];\n while ($sal = $result_sal->fetch_assoc()) {\n $salary[] = [remove_day_from_date_and_format($sal['date_db']), translate_date_to_ro($sal['date_db'])];\n }\n $result_sal->free_result();\n return $salary;\n}",
"public function salvar()\n {\n $data = Input::all();\n $contato = Contato::newInstance($data);\n $contato = $this->contatoBO->salvar($contato);\n\n return $this->toJson($contato);\n }",
"public function salvar() {\n\n if (!db_utils::inTransaction()) {\n throw new Exception(_M('patrimonial.patrimonio.PlanilhaCalculo.nao_existe_transacao'));\n }\n if (count($this->getCalculos()) == 0) {\n throw new Exception(_M('patrimonial.patrimonio.PlanilhaCalculo.planilha_sem_calculos'));\n }\n\n if (empty($this->iMes)) {\n throw new Exception(_M('patrimonial.patrimonio.PlanilhaCalculo.planilha_sem_mes_de_processamento'));\n }\n\n if (empty($this->iAno)) {\n throw new Exception(_M('patrimonial.patrimonio.PlanilhaCalculo.planilha_sem_ano_de_processamento'));\n }\n $oDaoBensHistoricoCalculo = db_utils::getDao(\"benshistoricocalculo\");\n $oDaoBensHistoricoCalculo->t57_ano = $this->getAno();\n $oDaoBensHistoricoCalculo->t57_mes = $this->getMes();\n $oDaoBensHistoricoCalculo->t57_ativo = $this->isAtiva()?\"true\":\"false\";\n $oDaoBensHistoricoCalculo->t57_datacalculo = date(\"Y-m-d\", db_getsession(\"DB_datausu\"));\n $oDaoBensHistoricoCalculo->t57_instituicao = db_getsession(\"DB_instit\");\n $oDaoBensHistoricoCalculo->t57_processado = $this->isProcessado()?\"true\":\"false\";\n $oDaoBensHistoricoCalculo->t57_tipocalculo = $this->getTipoCalculo();\n $oDaoBensHistoricoCalculo->t57_tipoprocessamento = $this->getTipoProcessamento();\n $oDaoBensHistoricoCalculo->t57_usuario = db_getsession(\"DB_id_usuario\");\n if (empty($this->iPlanilha)) {\n\n $oDaoBensHistoricoCalculo->incluir(null);\n $this->iPlanilha = $oDaoBensHistoricoCalculo->t57_sequencial;\n\n /**\n * Salvamos os dados dos calculos na planilha\n */\n $aCalculos = $this->getCalculos();\n foreach ($aCalculos as $oCalculo) {\n $oCalculo->salvar($this->iPlanilha);\n }\n } else {\n\n $oDaoBensHistoricoCalculo->t57_sequencial = $this->iPlanilha;\n $oDaoBensHistoricoCalculo->alterar($this->iPlanilha);\n }\n\n if ($oDaoBensHistoricoCalculo->erro_status == 0) {\n throw new Exception(_M('patrimonial.patrimonio.PlanilhaCalculo.planilha_sem_ano_de_processamento',$oDaoBensHistoricoCalculo));\n }\n }",
"public function getSalutations()\n {\n $salutations = ['', 'Mr.', 'Ms.', 'Dr.', 'Rev.', 'Prof.'];\n\n return array_combine($salutations, $salutations);\n }",
"public function salvarDepreciacao() {\n\n $oDaoBensDepreciacao = new cl_bensdepreciacao();\n $oDaoBensDepreciacao->t44_benstipoaquisicao = $this->getTipoAquisicao()->getCodigo();\n $oDaoBensDepreciacao->t44_benstipodepreciacao = $this->getTipoDepreciacao()->getCodigo();\n $oDaoBensDepreciacao->t44_valoratual = \"{$this->getValorDepreciavel()}\";\n $oDaoBensDepreciacao->t44_valorresidual = \"{$this->getValorResidual()}\";\n $oDaoBensDepreciacao->t44_vidautil = \"{$this->getVidaUtil()}\";\n\n if (!empty($this->iCodigoBemDepreciacao)) {\n\n $oDaoBensDepreciacao->t44_sequencial = $this->iCodigoBemDepreciacao;\n $oDaoBensDepreciacao->alterar($this->iCodigoBemDepreciacao);\n\n } else {\n\n $oDaoBensDepreciacao->t44_ultimaavaliacao = date(\"Y-m-d\", db_getsession(\"DB_datausu\"));\n $oDaoBensDepreciacao->t44_bens = $this->iCodigoBem;\n $oDaoBensDepreciacao->incluir(null);\n $this->iCodigoBemDepreciacao = $oDaoBensDepreciacao->t44_sequencial;\n }\n\n if ($oDaoBensDepreciacao->erro_status == \"0\") {\n $sMsg = _M('patrimonial.patrimonio.Bem.erro_salvar_calculo', (object)array(\"erro_msg\" => $oDaoBensDepreciacao->erro_msg));\n throw new Exception($sMsg);\n }\n return true;\n }",
"public function saldoExist($insumos){\n\n\t\t$errores = [];\n\n\t \tforeach ($insumos as $key => $insumo){\n\n\t \t\tif(!isset($insumo['lote']) || empty($insumo['lote']))\n\t \t\t\tcontinue;\n\n\t \t\t$loteRegister = Lote::where('insumo', $insumo['id'])\n\t\t\t\t\t\t \t->where('codigo', $insumo['lote'])\n\t\t\t\t\t\t \t->where('deposito', Auth::user()->deposito)\n\t\t\t\t\t\t \t->orderBy('id', 'desc')\n\t\t\t\t\t\t \t->first();\n\n if( ($loteRegister->cantidad - $insumo['despachado']) < 0){\n array_push($errores, ['insumo' => $insumo['id'], 'lote' => $insumo['lote']]);\n }\n }\n\n\t return $errores;\n\t}",
"public function testSaldo() {\n $tiempo = new TiempoFalso();\n $tarjeta = new Tarjeta( $tiempo );\n $tarjeta->recargar(100.0);\n $saldo=100.0;\n $boleto = new Boleto(NULL, NULL, $tarjeta, NULL, NULL, NULL, NULL, NULL, NULL);\n\n $this->assertEquals($boleto->obtenersaldo(), $saldo);\n }",
"public function getAll(){\r\n $sql=\"SELECT * FROM salas\";\r\n try{\r\n //creo la instancia de conexion\r\n $this->connection= Connection::getInstance();\r\n $result = $this->connection->execute($sql);\r\n }catch(\\PDOException $ex){\r\n throw $ex;\r\n } \r\n //hay que mapear de un arreglo asociativo a objetos\r\n if(!empty($result)){\r\n return $this->mapeo($result);\r\n }else{\r\n return false;\r\n }\r\n\r\n }",
"public function buscar() {\n $buscarUsuario = new SqlQuery(); //instancio la clase\n (string) $tabla = get_class($this); //uso el nombre de la clase que debe coincidir con la BD \n try {\n $this->refControladorPersistencia->get_conexion()->beginTransaction(); //comienza la transacción\n $statement = $this->refControladorPersistencia->ejecutarSentencia(\n $buscarUsuario->buscar($tabla)); //senencia armada desde la clase SqlQuery sirve para comenzar la busqueda\n $arrayUsuario = $statement->fetchAll(PDO::FETCH_ASSOC); //retorna un array asociativo para no duplicar datos\n $this->refControladorPersistencia->get_conexion()->commit(); //si todo salió bien hace el commit\n return $arrayUsuario; //regreso el array para poder mostrar los datos en la vista... con Ajax... y dataTable de JavaScript\n } catch (PDOException $excepcionPDO) {\n echo \"<br>Error PDO: \" . $excepcionPDO->getTraceAsString() . '<br>';\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n }\n }",
"public function SalasPorId()\n{\n\tself::SetNames();\n\t$sql = \" select salas.codsala, salas.nombresala, salas.salacreada, mesas.codmesa, mesas.nombremesa, mesas.mesacreada, mesas.statusmesa FROM salas LEFT JOIN mesas ON salas.codsala = mesas.codsala where salas.codsala = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codsala\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}",
"public function encuentra_saldo($codigo_tar){\n require_once('../procesos/auditoria.php');\n $auditar = new auditoria();\n require_once('../conexion_bd/conexion.php');\n $this->usuario=$_SESSION['usuarios'];//'[email protected]';\n $conectado = new conexion();\n $con_res = $conectado->conectar();\n if (strcmp($con_res, \"ok\") == 0) {\n echo 'Conexion exitosa todo bien ';\n \n $var = \"select a.saldo from tarjetas_recibidas a, tarjetas_por_usuarios b\n where b.codigo_targeta=a.codigo_targeta and a.codigo_targeta=\".$codigo_tar . \"and a.registrada_sistema=TRUE\";\n \n $result = mysql_query( $var );\n $auditar->insertar_auditoria($_SESSION['usuarios'], \n \"Consulta\", \"tarjetas_por_usuarios\", \"Consultando saldo de la tarjeta\");\n if ($row = mysql_fetch_array($result)) {\n $retornasaldo= $row['saldo'];\n } else {\n $retornasaldo=''; \n }\n\n mysql_free_result($result);\n $conectado->desconectar();\n return $retornasaldo;\n \n } else {\n $auditar->insertar_auditoria($_SESSION['usuarios'], \n \"Conexion\", \"Base de datos\", \"Problemas de conexion\");\n echo 'Algo anda mal';\n } \n }",
"public function GetSaldoTotalClientes()\n {\n \t$q\t=\tDoctrine_Query::create()\n \t->from('Cliente c');\n \t\n \t$cli\t=\t$q->execute();\n \t$total = 0;\n \tforeach ($cli as $c)\n \t{\n \t\t\t$saldoActual\t=\t$c->GetSaldo();\n \t\t\t$c->SaldoActual\t=\t$saldoActual;\n \t\t\t$c->save();\n\t\t\t\t\t// sumar saldo total de cada cliente\n \t\t\t$total\t+= $saldoActual;\n \t}\n \t\n \treturn $total;\n }",
"public function dameCuentas()\n\t{\n\n\t\t// if (!$mvc_bd_conexion) {\n\t\t// \tdie('No ha sido posible realizar la conexión con la base de datos: ' . mysql_error());\n\t\t// }\n\t\t// mysql_select_db(\"rhsys\", $mvc_bd_conexion);\n\n\t\t// mysql_set_charset('utf8');\n\n\t\t// $conexion2 = $mvc_bd_conexion;\n\n\t\t$sql = \"SELECT SUM(e.su_sem_efectivo ) efectivo , SUM(e.su_sem_fiscal) fiscal , p.cuenta_contable num_cuenta,p.cuenta_contable_alt num_cuenta_alt,p.cuenta_contable_nombre num_cuenta_nom, p.concepto concepto, p.centro_costos centro_costos\n\t\tFROM empleados e, puestos p\n\t\tWHERE e.puesto = p.clave AND p.cuenta_contable <> '' \n\t\tGROUP BY p.cuenta_contable\";\n\t\t$result = mysql_query($sql, $this->conexion);\n\t\t$cuentas = array();\n\t\twhile ($row = mysql_fetch_assoc($result))\n\t\t{\n\t\t $cuentas[] = $row;\n\t\t}\n\n\t\treturn $cuentas;\n\t}",
"function alta_salidas(){\n\t\t$varP=$_POST;\n\t\t$line=$this->uri->segment(4);\n\t\t$pr= new Salida();\n\t\t$pr->usuario_id=$GLOBALS['usuarioid'];\n\t\t$pr->empresas_id=$GLOBALS['empresaid'];\n\t\t$pr->espacios_fisicos_id=$GLOBALS['espacios_fisicos_id'];\n\t\t$pr->cl_facturas_id=$varP['cl_facturas_id'.$line];\n\t\t$pr->cproductos_id=$varP['producto'.$line];\n\t\t$pr->cantidad=$varP['unidades'.$line];\n\t\t$pr->costo_unitario=$varP['precio_u'.$line];\n\t\t$pr->tasa_impuesto=$varP['iva'.$line];\n\t\t//\t $pr->costo_total=($pr->cantidad * $pr->costo_unitario) * ((100+$pr->tasa_impuesto)/100);\n\t\t$pr->costo_total=$pr->cantidad * $pr->costo_unitario;\n\t\t$pr->ctipo_salida_id=1;\n\t\t$pr->estatus_general_id=2;\n\t\t$pr->cclientes_id=$this->cl_factura->get_cl_factura_salida($varP['cl_facturas_id'.$line]);\n\t\t$pr->fecha=date(\"Y-m-d H:i:s\");\n\t\tif(isset($varP['id'.$line])==true){\n\t\t\t$pr->id=$varP['id'.$line];\n\t\t}\n\t\tif($pr->save()) {\n\t\t\techo form_hidden('id'.$line, \"$pr->id\"); echo form_hidden('cl_facturas_id'.$line, \"$pr->cl_facturas_id\"); echo \"<img src=\\\"\".base_url().\"images/ok.png\\\" width=\\\"20px\\\" title=\\\"Guardado\\\"/>\";\n\t\t} else\n\t\t\tshow_error(\"\".$u->error->string);\n\n\t}",
"private function listado_obras(){\n \treturn Sesion::where(\"inicio\",\">\",Carbon::now())->distinct()->get(['nombre_obra']);\n }",
"public function Actualiza_saldo($codigo_tar,$montoTotalCompra,$saldoTarjeta){\n require_once('../conexion_bd/conexion.php');\n $this->usuario='[email protected]';\n $conectado = new conexion();\n $con_res = $conectado->conectar();\n if (strcmp($con_res, \"ok\") == 0) {\n echo 'Conexion exitosa todo bien ';\n $saldo_reemplazar= $montoTotalCompra-$saldoTarjeta;\n \n $varActualiza = \" Update tarjetas_recibidas SET saldo=\".$saldo_reemplazar.\" where codigo_targeta \".$codigo_tar .\" registrada_sistema =TRUE\";\n \n $result = mysql_query( $varActualiza );\n if ($row = mysql_fetch_array($result)) {\n $retornar= 'Listo';\n } else {\n $retornar=''; \n }\n\n mysql_free_result($result);\n $conectado->desconectar();\n return $retornar;\n \n } else {\n echo 'Algo anda mal';\n } \n }",
"public function get_list_saldo()\n\t{\n\t\t$nik = $this->input->post('nik');\n\t\t$data = $this->model_transaction->get_list_saldo($nik);\n\t\techo json_encode($data);\n\t}",
"public function BuscaAbonosCreditos() \n{\n\tself::SetNames();\n $sql = \" SELECT clientes.codcliente, clientes.cedcliente, clientes.nomcliente, ventas.idventa, ventas.codventa, ventas.totalpago, ventas.statusventa, abonoscreditos.codventa as codigo, abonoscreditos.fechaabono, SUM(montoabono) AS abonototal FROM (clientes INNER JOIN ventas ON clientes.codcliente = ventas.codcliente) LEFT JOIN abonoscreditos ON ventas.codventa = abonoscreditos.codventa WHERE clientes.cedcliente = ? AND ventas.codventa = ? AND ventas.tipopagove ='CREDITO'\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim(base64_decode($_GET['cedcliente'])));\n\t$stmt->bindValue(2, trim(base64_decode($_GET['codventa'])));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}",
"public function somarValores()\n {\n return $this->bd->sum($this->tabela, \"valor\");\n }",
"private function getTotalVendas()\n {\n return $vendas = DB::table('vendas')->where('confirmado', '=' ,'S')->sum('valor_total');\n }",
"function salva($vls){\n//sleep(2)tempo de espera de enivio da requisição;\n$mensagens = [];\n$contem_erros = false;\nif ($vls['descri'] == '') {\n\t$contem_erros = true;\n\t$mensagens['descri'] = 'A descrição está em branco';\n}\n\nif ($vls['marca'] == '') {\n\t$contem_erros = true;\n\t$mensagens['marca'] = 'A marca está em branco';\n}\nif ($vls['modelo'] == '') {\n $erros = true;\n $mensagens['modelo'] = \"O modelo esta em branco\";\n}\nif ($vls['tipov'] == '') {\n\t$contem_erros = true;\n\t$mensagens['tipov'] = 'O tipo de veículo está em branco';\n}\n\nif ($vls['quantp'] == '') {\n\t$contem_erros = true;\n\t$mensagens['quantp'] = 'A quantidade de passageiros está em branco';\n}\nif ($vls['vlvenda'] == '') {\n $erros = true;\n $mensagens['vlvenda'] = \"O valor de venda está em branco\";\n}\nif ($vls['vlcompra'] == '') {\n\t$contem_erros = true;\n\t$mensagens['vlcompra'] = 'O valor de compra está em branco';\n}\n\nif ($vls['dtcompra'] == '') {\n\t$contem_erros = true;\n\t$mensagens['dtcompra'] = 'A data de compra está em branco';\n}\nif ($vls['estato'] == '') {\n $erros = true;\n $mensagens['estato'] = \"O status do veículo esta em branco\";\n}\n if (! $contem_erros) {//se não conter erros executara o inserir\n $id = null;\n $campos = \"`id_car`, `descricao`, `marca`, `modelo`, `tipov`, `qntpass`, `vlvenda`, `vlcompra`, `datcompra`, `estato`\";\n $sql = \"INSERT INTO `carro` ($campos) VALUES (:id, :descri, :marca, :modelo, :tipov, :quantp, :vlvenda, :vlcompra, :dtcompra, :estato)\";\n $rs = $this->db->prepare($sql);\n$rs->bindParam(':id', $id , PDO::PARAM_INT);\n$rs->bindParam(':descri', $vls['descri'] , PDO::PARAM_STR);\n$rs->bindParam(':marca', $vls['marca'] , PDO::PARAM_STR);\n$rs->bindParam(':modelo', $vls['modelo'] , PDO::PARAM_STR);\n$rs->bindParam(':tipov', $vls['tipov'] , PDO::PARAM_STR);\n$rs->bindParam(':quantp', $vls['quantp'] , PDO::PARAM_STR);\n$rs->bindParam(':vlvenda', $vls['vlvenda'] , PDO::PARAM_STR);\n$rs->bindParam(':vlcompra', $vls['vlcompra'] , PDO::PARAM_STR);\n$rs->bindParam(':dtcompra', $vls['dtcompra'] , PDO::PARAM_STR);\n$rs->bindParam(':estato', $vls['estato'] , PDO::PARAM_STR);\n\n$result = $rs->execute();\n\n\nif ($result) {\n //passando vetor em forma de json\n $mensagens['sv'] = \"salvo com sucesso!\";\n \t echo json_encode([\n \t 'mensagens' => $mensagens,\n \t 'contem_erros' => false\n \t ]);//chama a funçaõ inserir na pagina acao.php\n\n }\n }else {\n\t// temos erros a corrigir\n\techo json_encode([\n\t\t'contem_erros' => true,\n\t\t'mensagens' => $mensagens\n\t]);\n}\n}",
"function leerCreditos(){\n \n try{\n $stmt = $this->dbh->prepare(\"SELECT c.idcredito, t.NombreCte,c.tipoContrato, c.montoTotal, c.plazo,c.mensualidad, c.interes,\"\n . \" c.metodoPago, c.observaciones, c.status FROM tarjetas_clientes t join credito c on t.idClienteTg=c.cteId where c.status=1 or c.status=3\");\n // Especificamos el fetch mode antes de llamar a fetch()\n $stmt->execute();\n $clientes = $stmt->fetchAll(PDO::FETCH_NUM);\n } catch (PDOException $e){\n $clientes=array(\"status\"=>\"0\",\"mensaje\"=>$e->getMessage());\n }\n \n return $clientes;\n }",
"function get_puestos(){\r\n\r\n $salida=array();\r\n if($this->controlador()->dep('datos')->tabla('cargo')->esta_cargada()){\r\n $datos = $this->controlador()->dep('datos')->tabla('cargo')->get();\r\n //recupera el nodo al que pertenece el cargo\r\n $id_nodo=$this->controlador()->dep('datos')->tabla('cargo')->get_nodo($datos['id_cargo']); \r\n if($id_nodo<>0){\r\n $salida=$this->controlador()->dep('datos')->tabla('puesto')->get_puestos($id_nodo);\r\n }\r\n }\r\n return $salida;\r\n }",
"function totalboaralla(){\n\n\t$crud = new CRUD();\n\t$crud->disconnect();\n\n\t$crud -> sql(\"select SUM(native_boar) as totalboaralla from farmers_tbl\");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['totalboaralla'];\n\t}\n\t$crud->disconnect();\n}",
"public function obtenerBeneficiados(){\n \n //obtener datos de service\n return IncorporacionService::beneficiados();\n\n }",
"public function calcSaldo($conta = null)\n {\n $saldoAnterior = 0;\n $lancamentosTable = new LancamentosTable();\n\n $whereConta = isset($conta) ? \"conta_id = {$conta}\" : \"1=1\";\n $dados = $lancamentosTable->listLancamentos(array(\n \"group\" => \" \n l.id,\n c.id,\n cc.id,\n f.id,\n f.codigo,\n l.tipo,\n l.data_lancamento, \n l.descricao,\n l.valor,\n l.saldo, \n c.conta,\n b.numero,\n c.agencia,\n cc.descricao,\n f.descricao\",\n \"order\" => \"data_lancamento,id asc\",\n \"where\" => \"{$whereConta}\",\n ));\n\n $contaLinhaAnterior = null;\n foreach ($dados as $key => $value) {\n\n\n\n $saldo = $saldoAnterior + $value['valor'];\n $saldoAnterior = $saldo;\n\n\n $dados[$key]['saldo'] = $saldo;\n\n\n #retira os alias\n unset($dados[$key]['agencia']);\n unset($dados[$key]['fluxo_codigo']);\n unset($dados[$key]['conta']);\n unset($dados[$key]['banco']);\n unset($dados[$key]['centrocusto']);\n unset($dados[$key]['fluxo']);\n\n $lancamentosTable->save($dados[$key]);\n }\n }",
"public function getCalculos() {\n\n if (count($this->aCalculos) == 0 && !empty($this->iPlanilha)) {\n\n $oDaoBensCalculo = new cl_benshistoricocalculobem();\n $sWhereCalculos = \"t58_benshistoricocalculo = {$this->iPlanilha}\";\n $sSqlBensCalculo = $oDaoBensCalculo->sql_query(null, \"benshistoricocalculobem.*, bens.*, bensdepreciacao.*\", \"t58_sequencial\", $sWhereCalculos);\n $rsBensCaculo = $oDaoBensCalculo->sql_record($sSqlBensCalculo);\n\n if ($oDaoBensCalculo->numrows > 0) {\n\n for ($iCalculo = 0; $iCalculo < $oDaoBensCalculo->numrows; $iCalculo++) {\n\n $oDadosCalculo = db_utils::fieldsMemory($rsBensCaculo, $iCalculo);\n\n $oCalculo = new CalculoBem();\n $oCalculo->setHistoricoCalculo($oDadosCalculo->t58_benshistoricocalculo);\n $oCalculo->setPercentualDepreciado($oDadosCalculo->t58_percentualdepreciado);\n $oCalculo->setSequencial($oDadosCalculo->t58_sequencial);\n $oCalculo->setTipoDepreciacao($oDadosCalculo->t58_benstipodepreciacao);\n $oCalculo->setValorAnterior($oDadosCalculo->t58_valoranterior);\n $oCalculo->setValorAtual($oDadosCalculo->t58_valoratual);\n $oCalculo->setValorCalculado($oDadosCalculo->t58_valorcalculado);\n $oCalculo->setValorResidual($oDadosCalculo->t58_valorresidual);\n $oCalculo->setValorResidualAnterior($oDadosCalculo->t58_valorresidualanterior);\n\n $oBem = new Bem();\n $oBem->setCodigoBem($oDadosCalculo->t52_bem);\n $oBem->setCodigoBemDepreciacao($oDadosCalculo->t44_sequencial);\n $oBem->setTipoDepreciacao( BemTipoDepreciacaoRepository::getPorCodigo($oDadosCalculo->t44_benstipodepreciacao) );\n $oBem->setTipoAquisicao( BemTipoAquisicaoRepository::getPorCodigo($oDadosCalculo->t44_benstipoaquisicao) );\n $oBem->setClassificacao(BemClassificacaoRepository::getPorCodigo($oDadosCalculo->t52_codcla));\n $oBem->setVidaUtil($oDadosCalculo->t44_vidautil);\n $oBem->setValorAquisicao($oDadosCalculo->t52_valaqu);\n $oBem->setValorResidual($oDadosCalculo->t44_valorresidual);\n $oBem->setValorDepreciavel($oDadosCalculo->t44_valoratual);\n $oBem->setVidaUtil($oDadosCalculo->t44_vidautil);\n $oBem->setDescricao($oDadosCalculo->t52_descr);\n\n $oCalculo->setBem($oBem);\n\n array_push($this->aCalculos, $oCalculo);\n }\n }\n\n unset($oDaoBensCalculo);\n unset($rsBensCaculo);\n }\n return $this->aCalculos;\n }",
"public function listarDocumentosSalida($CONTRATO){\n try{\n $lista=[];\n $dao=new DocumentoSalidaDAO();\n $rec1=$dao->mostrarDocumentosSalida($CONTRATO);\n $rec2=$dao->mostrarDocumentosSalidaSinFolio($CONTRATO);\n $contador=0;\n foreach($rec1 as $key => $value)\n {\n $lista[$contador]=$value;\n $contador++;\n }\n foreach($rec2 as $key => $value)\n {\n $lista[$contador]=$value;\n $contador++;\n }\n return $lista;\n } catch (Exception $e){\n throw $e;\n return -1;\n }\n }",
"public function buscar(Request $request){\n /*Listados de combobox*/\n $invernaderos= invernaderoPlantula::select('id','nombre')->orderBy('nombre', 'asc')->get();\n /*Ahi se guardaran los resultados de la busqueda*/\n $salidas=null;\n\n\n $validator = Validator::make($request->all(), [\n 'fechaInicio' => 'date_format:d/m/Y',\n 'fechaFin' => 'date_format:d/m/Y',\n //'invernadero' => 'exists:invernadero_plantula,id'\n ]);\n\n /*Si validador no falla se pueden realizar busquedas*/\n if ($validator->fails()) {\n }\n else{\n /*Busqueda sin parametros*/\n if ($request->fechaFin == \"\" && $request->fechaInicio == \"\" && $request->invernadero == \"\") {\n $salidas = salidaPlanta::orderBy('fecha', 'desc')->paginate(15);;\n\n }\n /*Pregunta si se mandaron fechas, para calcular busquedas con fechas*/\n if ( $request->fechaFin != \"\" && $request->fechaInicio !=\"\") {\n\n /*Transforma fechas en formato adecuado*/\n\n $fecha = $request->fechaInicio . \" 00:00:00\";\n $fechaInf = Carbon::createFromFormat(\"d/m/Y H:i:s\", $fecha);\n $fecha = $request->fechaFin . \" 23:59:59\";\n $fechaSup = Carbon::createFromFormat(\"d/m/Y H:i:s\", $fecha);\n\n /*Hay cuatro posibles casos de busqueda con fechas, cada if se basa en un caso */\n\n /*Solo con fechas*/\n\n $salidas = salidaPlanta::whereBetween('fecha', array($fechaInf, $fechaSup))->orderBy('fecha', 'desc')->paginate(15);;\n\n }\n }\n\n\n if($salidas!=null){\n /*Adapta el formato de fecha para poder imprimirlo en la vista adecuadamente*/\n $this->adaptaFechas($salidas);\n\n /*Si no es nulo puede contar los resultados*/\n $num = $salidas->total();\n }\n else{\n $num=0;\n }\n\n\n if($num<=0){\n Session::flash('error', 'No se encontraron resultados');\n }\n else{\n Session::flash('message', 'Se encontraron '.$num.' resultados');\n }\n /*Regresa la vista*/\n return view('Plantula/SalidaPlanta/buscar')->with([\n 'salidas'=>$salidas\n ]);\n }",
"public function getAllSbus()\n {\n $sbus = sbu::get(['id']);\n\n return $sbus;\n }",
"function mbuscar_productos_x_salida($sal_id_salida) {\n\t\t$list = array();\n\t\t$i = 0;\n\t\t$query = $this->db->query(\"\n\t\t\tSELECT \n\t\t\t sad.sad_id_salida_detalle, \n\t\t\t sad.pro_id_producto, \n\t\t\t sad.sal_id_salida, \n\t\t\t sad.sad_cantidad, \n\t\t\t sad.sad_valor, \n\t\t\t sad.sad_valor_total, \n\t\t\t p.pro_nombre, \n\t\t\t um.unm_nombre_corto \n\t\t\tFROM salida_detalle sad \n\t\t\t LEFT JOIN producto p \n\t\t\t ON sad.pro_id_producto=p.pro_id_producto \n\t\t\t LEFT JOIN unidad_medida um \n\t\t\t ON p.unm_id_unidad_medida=um.unm_id_unidad_medida \n\t\t\tWHERE sad.sal_id_salida=$sal_id_salida \n\t\t\torder by sad.sad_id_salida_detalle desc\");\n\t\tforeach ($query->result() as $row)\n\t\t{\n\t\t\t$i++;\n\t\t\t$row->nro = $i;\n\t\t\t$list[] = $row;\n\t\t}\n\t\treturn $list;\n\t}",
"public function compensablesdisponibles($cuadrante){\n $empleados = $cuadrante->empleados;\n #ver si los empleados tienes compensables pendientes.\n\n //TO DO: el objetivo sera llegar a un array con key el código de empleado y value el primer día compensable (mas adelante habrá que hacer que salgan todos los días compensables y que se pueda elegir)\n $compensablesdisponibles = [];\n\n // $compensablesdisponibles = DB::table('compensables')\n // ->join()\n\n}",
"function listarCuentaBancaria(){\n\t\t$this->procedimiento='sigep.ft_cuenta_bancaria_sel';\n\t\t$this->transaccion='SIGEP_CUEN_BAN_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cuenta_bancaria','int4');\n\t\t$this->captura('id_cuenta_bancaria_boa','int4');\n\t\t$this->captura('banco','int4');\n\t\t$this->captura('cuenta','varchar');\n\t\t$this->captura('desc_cuenta','varchar');\n\t\t$this->captura('moneda','int4');\n\t\t$this->captura('tipo_cuenta','bpchar');\n\t\t$this->captura('estado_cuenta','bpchar');\n\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('desc_cuenta_banco','varchar');\n\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}",
"public function salons()\n {\n return $this->hasMany(Salon::class);\n }",
"static public function mdlMostrarSalidasCabecera($valor){\n\n\t\tif($valor == null){\n\n\t\t\t$sql=\"SELECT\n\t\t\t\tt.id,\n\t\t\t\tt.codigo,\n\t\t\t\tc.codigo AS cod_cli,\n\t\t\t\tc.nombre,\n\t\t\t\tc.tipo_documento,\n\t\t\t\tc.documento,\n\t\t\t\tt.lista,\n\t\t\t\tt.vendedor,\n\t\t\t\tt.op_gravada,\n\t\t\t\tt.descuento_total,\n\t\t\t\tt.sub_total,\n\t\t\t\tt.igv,\n\t\t\t\tt.total,\n\t\t\t\tROUND(\n\t\t\t\tt.descuento_total / t.op_gravada * 100,\n\t\t\t\t2\n\t\t\t\t) AS dscto,\n\t\t\t\tt.condicion_venta,\n\t\t\t\tcv.descripcion,\n\t\t\t\tt.estado,\n\t\t\t\tt.usuario,\n\t\t\t\tt.agencia,\n\t\t\t\tu.nombre AS nom_usu,\n\t\t\t\tDATE(t.fecha) AS fecha,\n\t\t\t\tcv.dias,\n\t\t\t\tDATE_ADD(DATE(t.fecha), INTERVAL cv.dias DAY) AS fecha_ven\n\t\t\tFROM\n\t\t\t\ting_sal t\n\t\t\t\tLEFT JOIN clientesjf c\n\t\t\t\tON t.cliente = c.id\n\t\t\t\tLEFT JOIN condiciones_ventajf cv\n\t\t\t\tON t.condicion_venta = cv.id\n\t\t\t\tLEFT JOIN usuariosjf u\n\t\t\t\tON t.usuario = u.id\n\t\t\tWHERE t.estado = 'generado'\n\t\t\tORDER BY fecha DESC\";\n\n\t\t$stmt=Conexion::conectar()->prepare($sql);\n\n\t\t$stmt->execute();\n\n\t\treturn $stmt->fetchAll();\n\n\t\t}else{\n\n\t\t\t$sql=\"SELECT\n\t\t\t\t\tt.id,\n\t\t\t\t\tt.codigo,\n\t\t\t\t\tc.codigo AS cod_cli,\n\t\t\t\t\tc.nombre,\n\t\t\t\t\tc.tipo_documento,\n\t\t\t\t\tc.documento,\n\t\t\t\t\tt.lista,\n\t\t\t\t\tt.vendedor,\n\t\t\t\t\tt.op_gravada,\n\t\t\t\t\tt.descuento_total,\n\t\t\t\t\tt.sub_total,\n\t\t\t\t\tt.igv,\n\t\t\t\t\tt.total,\n\t\t\t\t\tROUND(\n\t\t\t\t\tt.descuento_total / t.op_gravada * 100,\n\t\t\t\t\t2\n\t\t\t\t\t) AS dscto,\n\t\t\t\t\tt.condicion_venta,\n\t\t\t\t\tcv.descripcion,\n\t\t\t\t\tt.estado,\n\t\t\t\t\tt.usuario,\n\t\t\t\t\tt.agencia,\n\t\t\t\t\tu.nombre AS nom_usu,\n\t\t\t\t\tDATE(t.fecha) AS fecha,\n\t\t\t\t\tcv.dias,\n\t\t\t\t\tDATE_ADD(DATE(t.fecha), INTERVAL cv.dias DAY) AS fecha_ven\n\t\t\t\tFROM\n\t\t\t\t\ting_sal t\n\t\t\t\t\tLEFT JOIN clientesjf c\n\t\t\t\t\tON t.cliente = c.id\n\t\t\t\t\tLEFT JOIN condiciones_ventajf cv\n\t\t\t\t\tON t.condicion_venta = cv.id\n\t\t\t\t\tLEFT JOIN usuariosjf u\n\t\t\t\t\tON t.usuario = u.id\n\t\t\t\tWHERE t.codigo = $valor\";\n\n\t\t$stmt=Conexion::conectar()->prepare($sql);\n\n\t\t$stmt->execute();\n\n\t\treturn $stmt->fetch();\n\n\t\t}\n\n\t\t$stmt=null;\n\n\t}",
"public function getSalts(): array\n {\n $generator = new Generator(new Factory);\n $salts['AUTH_KEY'] = $generator->salt();\n $salts['SECURE_AUTH_KEY'] = $generator->salt();\n $salts['LOGGED_IN_KEY'] = $generator->salt();\n $salts['NONCE_KEY'] = $generator->salt();\n $salts['AUTH_SALT'] = $generator->salt();\n $salts['SECURE_AUTH_SALT'] = $generator->salt();\n $salts['LOGGED_IN_SALT'] = $generator->salt();\n $salts['NONCE_SALT'] = $generator->salt();\n return $salts;\n }",
"function getTipoEditalBolsa($tipoBolsa,$anoBolsa){\r\n\t\t$fOferta= new fachada_oferta();\r\n\t\t$vetDados=$fOferta->getTipoEditalBolsa($tipoBolsa,$anoBolsa);\r\n\t\treturn $vetDados;\r\n\t}",
"public function busca_alunos(){\n\n\t\t\t$sql = \"SELECT * FROM aluno\";\n\n\t\t\t/*\n\t\t\t*isntrução que realiza a consulta de animes\n\t\t\t*PDO::FETCH_CLASS serve para perdir o retorno no modelo de uma classe\n\t\t\t*PDO::FETCH_PROPS_LATE serve para preencher os valores depois de executar o contrutor\n\t\t\t*/\n\n\t\t\t$resultado = $this->conexao->query($sql, PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, 'Aluno');\n\n $alunos = [];\n\n foreach($resultado as $aluno){\n $alunos[] = $aluno;\n }\n\n \t\t\treturn $alunos;\n\t\t}",
"function listarCuentaBancaria(){\n\t\t$this->procedimiento='tes.f_cuenta_bancaria_sel';\n\t\t$this->transaccion='TES_CTABAN_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cuenta_bancaria','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('fecha_baja','date');\n\t\t$this->captura('nro_cuenta','varchar');\n\t\t$this->captura('fecha_alta','date');\n\t\t$this->captura('id_institucion','int4');\n\t\t$this->captura('nombre_institucion','varchar');\n\t\t$this->captura('doc_id','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('id_moneda','integer');\n\t\t$this->captura('codigo_moneda','varchar');\n\t\t$this->captura('denominacion','varchar');\n\t\t$this->captura('centro','varchar');\n\t\t\n\t\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}",
"public function gerarDados() {\n \n if (empty($this->sDataInicial)) {\n throw new Exception(\"Data inicial nao informada!\");\n }\n \n if (empty($this->sDataFinal)) {\n throw new Exception(\"Data final não informada!\");\n }\n /**\n * Separamos a data do em ano, mes, dia\n */\n list($iAno, $iMes, $iDia) = explode(\"-\",$this->sDataFinal);\n \n $oInstituicao = db_stdClass::getDadosInstit(db_getsession(\"DB_instit\"));\n $sListaInstit = db_getsession(\"DB_instit\");\n $sWhere = \"o70_instit in ({$sListaInstit})\";\n $iAnoUsu = (db_getsession(\"DB_anousu\")-1);\n $sDataIni = $iAnoUsu.\"-01-01\";\n $sDataFim = $iAnoUsu.\"-12-31\";\n $sSqlBalAnterior = db_receitasaldo(11, 1, 3, true, $sWhere, $iAnoUsu, $sDataIni, $sDataFim, true);\n \n $sSqlAgrupado = \"select case when fc_conplano_grupo($iAnoUsu, substr(o57_fonte,1,1) || '%', 9000 ) is false \"; \n $sSqlAgrupado .= \" then substr(o57_fonte,2,14) else substr(o57_fonte,1,15) end as o57_fonte, \";\n $sSqlAgrupado .= \" o57_descr, \";\n $sSqlAgrupado .= \" saldo_inicial, \";\n $sSqlAgrupado .= \" saldo_arrecadado_acumulado, \"; \n $sSqlAgrupado .= \" x.o70_codigo, \";\n $sSqlAgrupado .= \" x.o70_codrec, \";\n $sSqlAgrupado .= \" coalesce(o70_instit,0) as o70_instit, \";\n $sSqlAgrupado .= \" fc_nivel_plano2005(x.o57_fonte) as nivel \"; \n $sSqlAgrupado .= \" from ({$sSqlBalAnterior}) as x \";\n $sSqlAgrupado .= \" left join orcreceita on orcreceita.o70_codrec = x.o70_codrec and o70_anousu={$iAnoUsu} \";\n $sSqlAgrupado .= \" order by o57_fonte \"; \n $rsBalancete = db_query($sSqlAgrupado);\n $iTotalLinhas = pg_num_rows($rsBalancete);\n for ($i = 1; $i < $iTotalLinhas; $i++) {\n \n $oReceita = db_utils::fieldsMemory($rsBalancete, $i);\n $sDiaMesAno = \"{$iAno}-\".str_pad($iMes, 2, \"0\", STR_PAD_LEFT).\"-\".str_pad($iDia, 2, \"0\", STR_PAD_LEFT);\n \n $oReceitaRetorno = new stdClass();\n \n $oReceitaRetorno->braCodigoEntidade = str_pad($this->iCodigoTCE, 4, \"0\", STR_PAD_LEFT);\n $oReceitaRetorno->braMesAnoMovimento = $sDiaMesAno;\n $oReceitaRetorno->braContaReceita = str_pad($oReceita->o57_fonte, 20, 0, STR_PAD_RIGHT);\n $oReceitaRetorno->braCodigoOrgaoUnidadeOrcamentaria = str_pad($oInstituicao->codtrib, 4, \"0\", STR_PAD_LEFT);\n $nSaldoInicial = $oReceita->saldo_inicial;\n $oReceita->saldo_inicial = str_pad(number_format(abs($oReceita->saldo_inicial),2,\".\",\"\"), 13,'0', STR_PAD_LEFT);\n $oReceitaRetorno->braValorReceitaOrcada = $oReceita->saldo_inicial;\n $oReceita->saldo_arrecadado_acumulado = str_pad(number_format(abs($oReceita->saldo_arrecadado_acumulado) \n ,2,\".\",\"\"), 12,'0', STR_PAD_LEFT);\n $oReceitaRetorno->braValorReceitaRealizada = $oReceita->saldo_arrecadado_acumulado;\n $oReceitaRetorno->braCodigoRecursoVinculado = str_pad($oReceita->o70_codigo, 4, \"0\", STR_PAD_LEFT); \n $oReceitaRetorno->braDescricaoContaReceita = substr($oReceita->o57_descr, 0, 255); \n $oReceitaRetorno->braTipoNivelConta = ($oReceita->o70_codrec==0?'S':'A'); \n $oReceitaRetorno->braNumeroNivelContaReceita = $oReceita->nivel;\n $this->aDados[] = $oReceitaRetorno; \n }\n return true;\n }",
"public function GuardarListaProductosPedido($arrayDataProductos){\r\n DB::beginTransaction();\r\n try {\r\n $precioTotal = 0;\r\n $cantidadTotal = 0;\r\n $descuentoTotal = 0;\r\n if($arrayDataProductos[0]->EsEditar == 'true')// se pregunta si lo que se va a guardar es desde la vista de la edición\r\n {\r\n Detalle::where('Factura_id','=',$arrayDataProductos[0]->Factura_id)->delete();\r\n }\r\n foreach ($arrayDataProductos as $productoDetalle){\r\n $producto= Producto::find($productoDetalle->Producto_id);\r\n $esPrincipal = $this->productoRepositorio->EsProductoPrincipal($productoDetalle->Producto_id);\r\n if($esPrincipal)\r\n {\r\n $cantidadDisponible =$this->productoRepositorio->ObtenerProductoProveedorIdproducto($productoDetalle->Producto_id)->Cantidad;\r\n if($cantidadDisponible < $productoDetalle->Cantidad)\r\n {\r\n return [\"SinExistencia\"=>true,\"producto\"=>$producto->Nombre,\"cantidad\"=>$cantidadDisponible];\r\n }\r\n\r\n $cantidadInventario = ($cantidadDisponible-$productoDetalle->Cantidad);\r\n ProductoPorProveedor::where('Producto_id','=',$productoDetalle->Producto_id)->update(array('Cantidad' => $cantidadInventario));\r\n }\r\n else\r\n {\r\n $productoPrincipalId = $this->productoRepositorio->ObtenerProductoEquivalencia($productoDetalle->Producto_id)->ProductoPrincipal_id;\r\n $cantidadEquivalencia = $this->productoRepositorio->ObtenerProductoEquivalencia($productoDetalle->Producto_id)->Cantidad;\r\n $cantidadDisponible =$this->productoRepositorio->ObtenerProductoProveedorIdproducto($productoPrincipalId)->Cantidad;\r\n $cantidadDisponibleEquivalente = ($productoDetalle->Cantidad * $cantidadEquivalencia);\r\n if($cantidadDisponible < $cantidadDisponibleEquivalente)\r\n {\r\n return [\"SinExistencia\"=>true,\"producto\"=>$producto->Nombre,\"cantidad\"=>($cantidadDisponible/$cantidadEquivalencia)];\r\n }\r\n\r\n $cantidadInventario = ($cantidadDisponible - $cantidadDisponibleEquivalente);\r\n ProductoPorProveedor::where('Producto_id','=',$productoPrincipalId)->update(array('Cantidad' => $cantidadInventario));\r\n $cantidadDisponibleSecundario =$this->productoRepositorio->ObtenerProductoProveedorIdproducto($productoDetalle->Producto_id)->Cantidad;\r\n $cantidadInventarioSecundario = ($cantidadDisponibleSecundario-$productoDetalle->Cantidad);\r\n ProductoPorProveedor::where('Producto_id','=',$productoDetalle->Producto_id)->update(array('Cantidad' => $cantidadInventarioSecundario));\r\n }\r\n\r\n $productoPedido = new Detalle();\r\n $productoPedido->Producto_id = $productoDetalle->Producto_id;\r\n $productoPedido->Factura_id = $productoDetalle->Factura_id;\r\n $productoPedido->Cantidad = $productoDetalle->Cantidad;\r\n $productoPedido->Comentario = $productoDetalle->Comentario;\r\n $productoPedido->Descuento = 0;\r\n $productoPedido ->SubTotal = $productoDetalle->Cantidad * $producto->Precio;\r\n $productoPedido->save();\r\n $precioTotal = $precioTotal + $productoPedido->SubTotal;\r\n $cantidadTotal = $cantidadTotal + $productoPedido->Cantidad;\r\n $descuentoTotal = $descuentoTotal + $productoPedido->Descuento;\r\n\r\n\r\n }\r\n DB::commit();\r\n Factura::where('id','=',$productoDetalle->Factura_id)->update(array('VentaTotal' => $precioTotal, 'CantidadTotal' => $cantidadTotal ));\r\n return [\"Respuesta\"=>true,\"PrecioTotal\"=>$precioTotal];\r\n } catch (\\Exception $e) {\r\n $error = $e->getMessage();\r\n DB::rollback();\r\n return $error;\r\n }\r\n }",
"public function get_Banco(){\r\n $conectar=parent::conexion();\r\n parent::set_names();\r\n $sql=\"select * from banco;\";\r\n $sql=$conectar->prepare($sql);\r\n $sql->execute();\r\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\r\n }",
"public static function getSaldo($id , $format=true){\r\n\t\t\t$sum = Yii::app()->db->createCommand(\"SELECT IFNULL(SUM(total),0) as total FROM tbl_balance WHERE user_id=\".$id \r\n .\" and tipo not in (5, 7, 8)\")->queryScalar();\r\n\t\t\t//$sum= Yii::app()->numberFormatter->formatCurrency($sum, '');\r\n\t\t\treturn $sum;\r\n\t}",
"public function SumarCarteraCreditos() \n{\n\tself::SetNames();\n\t$sql = \"select\n(select SUM(totalpago) from ventas WHERE tipopagove = 'CREDITO') as totaldebe,\n(select SUM(montoabono) from abonoscreditos) as totalabono\";\n//$sql =\"SELECT SUM(ventas.totalpago) as totaldebe, SUM(abonoscreditos.montoabono) FROM ventas, abonoscreditos WHERE ventas.tipopagove = 'CREDITO'\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}",
"public function getSaldo()\n {\n return number_format(floatval($this->saldo),2);\n }",
"private function fefo($insumo, $insumoMovimientos){\n\n\t\t$lotes = Lote::where('insumo', $insumo)\n\t\t\t\t\t\t ->where('deposito', Auth::user()->deposito)\n\t\t\t\t\t\t ->where('cantidad', '>', 0)\n\t\t\t\t\t\t ->orderBy('vencimiento')\n\t\t\t\t\t\t ->orderBy('id')\n\t\t\t\t\t\t ->get();\n\t\t$movimientos = [];\n\n\t\t$withLotes = $this->filterInsumosLote($insumoMovimientos);\n\t\t$withoutLotes = $this->filterInsumosLote($insumoMovimientos,false);\n\n\n\t\tif( !empty($withLotes) ){\n\n\t\t\tforeach ($withLotes as $movimiento) {\n\n\t\t\t\t$lotes = $lotes->each(function ($lote) use ($movimiento){\n\n\t\t\t\t if ($lote->codigo == $movimiento['lote']) {\n\t\t\t\t $lote->cantidad -= $movimiento['despachado'];\n\t\t\t\t \tfalse;\n\t\t\t\t }\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t$movimientos = $withLotes;\n\t\t}\n\n\t\tforeach ($withoutLotes as $movimiento)\n\t\t{\n\t\t\t$cantidad = $movimiento['despachado'];\n\n\t\t\twhile( $cantidad > 0){\n\n\t\t\t\t$lote = $lotes->first(function ($key,$lote) {\n\t\t\t\t return $lote['cantidad'] > 0;\n\t\t\t\t});\n\n\t\t\t\tif( $lote->cantidad < $cantidad ){\n\n\t\t\t\t\t$cantidad -= $lote->cantidad;\n\t\t\t\t\t$saldo = $lote->cantidad;\n\t\t\t\t\t$lote->cantidad = 0;\n\t\t\t\t}\n\t\t\t\telse{\n\n\t\t\t\t\t$lote->cantidad -= $cantidad;\n\t\t\t\t\t$saldo = $cantidad;\n\t\t\t\t\t$cantidad = 0;\n\t\t\t\t}\n\n\t\t\t\t$movimiento['lote'] = $lote->codigo;\n\t\t\t\t$movimiento['despachado'] = $saldo;\n\n\t\t\t\tarray_push($movimientos, $movimiento);\n\t\t\t}\n\t\t}\n\n\t\treturn $movimientos;\n\t}",
"function sobreMeSalvar() {\n \n $usuario = new Estado_pessoal();\n $api = new ApiUsuario();\n $usuario->codgusuario = $_SESSION['unia']->codgusario;\n $this->dados = $api->Listar_detalhe_usuario($usuario);\n if (empty($this->dados->codgusuario) && $this->dados->codgusuario == NULL) {\n \n $this->dados = array('dados'=>$api->Insert_sobreMe(new Estado_pessoal ('POST')) );\n header(\"Location:\" .APP_ADMIN.'usuario/detalhe_usuario');\n } else {\n $this->dados = array('dados'=>$api->Actualizar_sobreMe(new Estado_pessoal ('POST')) );\n header(\"Location:\" .APP_ADMIN.'usuario/detalhe_usuario');\n }\n \n }",
"public function _listTotalBoleta2Date() {\n $db = new SuperDataBase();\n $pkEmpresa = UserLogin::get_pkSucursal();\n $query = \"CALL sp_get_listboleta('$this->dateGO','$this->dateEnd','$pkEmpresa')\";\n $resul = $db->executeQuery($query);\n\n $array = array();\n $total = 0;\n\n while ($row = $db->fecth_array($resul)) {\n $array[] = array(\"pkComprobante\" => $row['ncomprobante'],\n \"total\" => $row['total'],\n \"ruc\" => $row['ruc'],\n \"subTotal\" => $row['subTotal'],\n \"impuesto\" => $row['impuesto'],\n \"totalEfectivo\" => $row['totalEfectivo'],\n \"totalTarjeta\" => $row['totalTarjeta'],\n \"nombreTarjeta\" => $row['nombreTarjeta'],\n \"fecha\" => $row['fecha'],\n \"pkCajero\" => $row['pkCajero'],\n \"descuento\" => $row['descuento'],\n \"pkCliente\" => $row['pkCliente'],\n \"Nombre_Trabajador\" => $row['Nombre_Trabajador'],\n );\n// $total=$total+$row['total_venta'];\n }\n// $array[]= array('Total')\n// echo $query;\n echo json_encode($array);\n }",
"public function falarComSabedoria($palavras){\n\t\techo $palavras;\n\t}",
"protected function salvarDadosCedente() {\n\n $oDaoBensCedente = new cl_benscedente();\n if (!empty($this->oCedente)) {\n\n $oDaoBensCedente->excluir(null, \" t09_bem = {$this->iCodigoBem} \");\n $oDaoBensCedente->t09_bem = $this->iCodigoBem;\n $oDaoBensCedente->t09_benscadcedente = $this->oCedente->getCodigo();\n $oDaoBensCedente->incluir(null);\n if ($oDaoBensCedente->erro_status == 0) {\n throw new Exception(_M('patrimonial.patrimonio.Bem.erro_salvar_dados_cedente'));\n }\n }\n }",
"function contarCreditos($espacios){\r\n $creditos=0;\r\n if(is_array($espacios)){\r\n foreach ($espacios as $espacio) {\r\n $creditos = $creditos + $espacio['CREDITOS'];\r\n }\r\n }\r\n return $creditos;\r\n }",
"public function devuelve_secciones(){\n \n $sql = \"SELECT * FROM secciones ORDER BY nombre\";\n $resultado = $this -> db -> query($sql); \n return $resultado -> result_array(); // Obtener el array\n }",
"public function costo_suaje($proceso) {\n\n $sql = \"SELECT * from proc_suaje where status = 'A' and nombre = '\" . $proceso . \"'\";\n\n $query = $this->db->prepare($sql);\n $query->execute();\n\n $result = array();\n\n while ($row = $query->fetch(PDO::FETCH_ASSOC)) {\n\n $result[] = $row;\n }\n\n return $result;\n }",
"function bancos($periodo,$ejer,$moneda){\n\t\t\t$sql=$this->query(\"select m.IdPoliza,m.Cuenta,sum(m.Importe) importe,m.TipoMovto,c.description,p.relacionExt,p.concepto\n\t\t\tfrom cont_movimientos m,cont_polizas p,cont_accounts c,cont_config conf\n\t\t\twhere m.cuenta=c.account_id and c.currency_id=\".$moneda.\" and p.idejercicio=\".$ejer.\" and c.`main_father`=conf.CuentaBancos and p.idtipopoliza!=3\n\t\t\tand m.IdPoliza=p.id and p.idperiodo in (\".$periodo.\",\".($periodo-=1).\") and p.activo=1 and m.Activo=1\n\t\t\tgroup by m.Cuenta,m.TipoMovto\");\n\t\t\treturn $sql;\n\t\t}",
"public function todos(){\n $salon = salon::select(\"id\",\"nombre\",\"precio\")->where(\"estado\",\"=\",\"activo\")->get();\n return ['data' => $salon];\n }",
"function ObtenerTotales($id_factura) {\n $query=\"SELECT SUM(total) total, SUM(valorseguro) total_seguro\nFROM \".Guia::$table.\" WHERE idfactura=$id_factura\";\n return DBManager::execute($query);\n }",
"public static function Consultar( $sabor, $tipo )\n {\n $retorno = NULL;\n\n $hay = FALSE;\n $haySaborSolo = FALSE;\n $hayTipoSolo = FALSE;\n\n //Leo el archivo guardado.\n $listado = Helado::LeerArchivo();\n\n //Recorro el listado.\n foreach( $listado as $key=>$helado )\n {\n //Comparo sabor y tipo.\n if( strcmp( $sabor, $helado[0])==0 && strcmp( $tipo, $helado[1] )==0)\n {\n $hay = TRUE;\n $retorno = $helado;\n $retorno[] = $key;\n break;\n }\n\n //Comparo sabor solo.\n if( strcmp( $sabor, $helado[0])==0 )\n {\n $haySaborSolo = TRUE;\n }\n\n //Comparo tipo solo.\n if( strcmp( $tipo, $helado[1] )==0 )\n {\n $hayTipoSolo = TRUE;\n }\n }\n\n //\n if( $hay )\n {\n echo \"Si hay ese sabor y gusto\\r\\n\";\n }\n else\n {\n if( $haySaborSolo )\n {\n echo \"Hay helado del sabor \".$sabor.\" pero no del tipo \".$tipo.\"\\r\\n\";\n }\n else\n {\n if( $hayTipoSolo )\n {\n echo \"Hay helado del tipo \".$tipo.\" pero no del sabor \".$sabor.\"\\r\\n\";\n }\n else\n {\n echo \"No hay ese sabor ni ese tipo\\r\\n\";\n }\n }\n }\n\n return $retorno;\n \n }",
"public function testSaldoFinalDeSuprimentosDeFundosDoAtivoIgualAosControlesAComprovarEAAprovar() {\n $filterAtivo = function (array $line): bool {\n if (str_starts_with($line['conta_contabil'], '1.1.3.1.1.02') && $line['escrituracao'] === 'S') {\n return true;\n }\n return false;\n };\n $saldoDevedorAtivo = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_debito', $filterAtivo);\n $saldoCredorAtivo = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_credito', $filterAtivo);\n\n $filterAComprovar = function (array $line): bool {\n if (str_starts_with($line['conta_contabil'], '8.9.1.2.1.01') && $line['escrituracao'] === 'S') {\n return true;\n }\n return false;\n };\n $saldoDevedorAComprovar = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_debito', $filterAComprovar);\n $saldoCredorAComprovar = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_credito', $filterAComprovar);\n\n $filterAAprovar = function (array $line): bool {\n if (str_starts_with($line['conta_contabil'], '8.9.1.2.1.02') && $line['escrituracao'] === 'S') {\n return true;\n }\n return false;\n };\n $saldoDevedorAAprovar = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_debito', $filterAAprovar);\n $saldoCredorAAprovar = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_credito', $filterAAprovar);\n\n $this->comparar(($saldoDevedorAtivo - $saldoCredorAtivo), (($saldoCredorAComprovar - $saldoDevedorAComprovar) + ($saldoCredorAAprovar - $saldoDevedorAAprovar)));\n\n $this->saldoVerificado(__METHOD__, '1.1.3.1.1.02', '8.9.1.2.1.01', '8.9.1.2.1.02');\n }",
"function get_all_produto_solicitacao_baixa_estoque()\n {\n \n $this->db->select('baixa.di,baixa.quantidade, u.nome_usuario,produto.nome as produto');\n $this->db->join('usuario u ','u.id = baixa.usuario_id');\n $this->db->join('produto','produto.id = baixa.produto_id');\n\n return $this->db->get('produto_solicitacao_baixa_estoque baixa')->result_array();\n }",
"public function BuscarCreditosFechas() \n{\n\tself::SetNames();\n\t$sql =\"SELECT \n\tventas.idventa, ventas.codventa, ventas.totalpago, ventas.fechavencecredito, ventas.statusventa, ventas.fechaventa, abonoscreditos.fechaabono, SUM(abonoscreditos.montoabono) as abonototal, clientes.codcliente, clientes.cedcliente, clientes.nomcliente, clientes.tlfcliente, clientes.emailcliente, cajas.nrocaja\n\tFROM\n\t(ventas LEFT JOIN abonoscreditos ON ventas.codventa=abonoscreditos.codventa) LEFT JOIN clientes ON \n\tclientes.codcliente=ventas.codcliente LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja WHERE DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') >= ? AND DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') <= ? AND ventas.tipopagove ='CREDITO' GROUP BY ventas.codventa\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim(date(\"Y-m-d\",strtotime($_GET['desde']))));\n\t$stmt->bindValue(2, trim(date(\"Y-m-d\",strtotime($_GET['hasta']))));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"<div class='alert alert-danger'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>\";\n\t\techo \"<center><span class='fa fa-info-circle'></span> NO EXISTEN CREDITOS DE VENTAS PARA EL RANGO DE FECHA INGRESADO</center>\";\n\t\techo \"</div>\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}",
"function listarCuentaBancariaUsuario(){\n\t\t$this->procedimiento='tes.f_cuenta_bancaria_sel';\n\t\t$this->transaccion='TES_USRCTABAN_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('permiso','permiso','varchar');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cuenta_bancaria','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('fecha_baja','date');\n\t\t$this->captura('nro_cuenta','varchar');\n\t\t$this->captura('fecha_alta','date');\n\t\t$this->captura('id_institucion','int4');\n\t\t$this->captura('nombre_institucion','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('id_moneda','integer');\n\t\t$this->captura('codigo_moneda','varchar');\n\t\t$this->captura('denominacion','varchar');\n\t\t$this->captura('centro','varchar');\n\t\t$this->captura('id_finalidads','varchar');\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}",
"public function buscarInstrucoesDoBoleto($arrDados)\n {\n\n\t\t$db = new Database();\n\t\t$arrRetorno = array();\n\t\t$strSQL = '';\n\t\t$this->instrucoes = array('');\n\t\tif($this->status != 'Atrasado'){\n\t\t \n\t\t $desc = $this->desconto;\n\t\t $desc = str_replace(',','.',$desc);\n\t\t \n\t\t // if((float)$desc > 0){\n\t\t // $this->instrucoes[] = 'At� o vencimento, desconto de '.String::formataMoeda($this->desconto); \n\t\t // }\n\t\t\t\n\t\t\t//$this->instrucoes[] = utf8_decode('Em qualquer banco at� o vencimento');\n\t\t\t\n\t\t\t$strSQL = \"SELECT ecm.PERCENTUAL AS ind_multa,\n\t\t\t\t\t\teci.PROPORCIONAL AS ind_comissao,\n\t\t\t\t\t\teci.DATAVIGOR\n\t\t\t\t\t\tFROM GVDASA.FIN_ESTRUTURCORRECAO ec\n\t\t\t\t\t\tINNER JOIN GVDASA.FIN_TIPOTITULO tti ON tti.CODIGOESTRUTURACORRECAO = ec.CODIGOESTRUTURACORRECAO\n\t\t\t\t\t\tINNER JOIN GVDASA.FIN_TITULO titu ON tti.CODIGOTIPOTITULO = titu.CODIGOTIPOTITULO\n\t\t\t\t\t\tINNER JOIN GVDASA.FIN_ESTRMULTA ecm ON ecm.CODIGOESTRUTURACORRECAO = ec.CODIGOESTRUTURACORRECAO\n\t\t\t\t\t\tINNER JOIN GVDASA.FIN_ESTRINDICE eci ON eci.CODIGOESTRUTURACORRECAO = ec.CODIGOESTRUTURACORRECAO\n\t\t\t\t\t\twhere titu.CODIGOTITULO = \".$arrDados['TITULO'];\n\t\t\t// Executa a consulta\n\t\t\t$arrRetorno = $db->querySqlServer($strSQL,'consultar','fetchRow');\n\n\t\t\t$valorMulta = number_format((($this->valor * (int)$arrRetorno['ind_multa']) / 100),2); \n\t\t\t$jurosDiario = number_format(((((int)$arrRetorno['ind_comissao']/30) * $this->valor)/100),2);\n\t\t\t\n\t\t\t// Monta mensagem a ser enviada\n\t\t\t$msg = \"Após vencimento cobrar multa de R$ \".$valorMulta.\" + juros diário de R$ \".$jurosDiario.\" + IGPM\";\n\t\t\t$msg .= \"<br>\";\n\t\t\t$msg .= \"Este título está disponível no portal acadêmico, acesse https://portal.unilasalle.edu.br\";\n\t\t\t$msg .= \"<br>\";\n\t\t\t$msg .= \"Pelo portal acadêmico efetue a emissão e atualização do boleto. Maiores informações (51) 3476-8500\";\n\t\t\t$msg .= \"<br>\";\n\t\t\t$msg .= \"Sr CAIXA não aceitar este título após \".$arrDados['DATA_LIMITE_PAG'];\n\t\t\t//$msg = utf8_decode($msg);\n\t\t\t// Insere no Array\n\t\t\tarray_push($this->instrucoes,$msg);\n\t\t}\n\n\t\tif($this->status == 'Atrasado'){\n\t\t\t// Monta mensagem a ser enviada\n\t\t\t$msg = \"Não receber após \".$this->dataVencimento->format('d/m/Y');\n\t\t\t$msg .= \"<br>\";\n\t\t\t$msg .= \"Vencimento original: \".$this->vencimentoParcela->format('d/m/Y');\n\t\t\t//$msg = utf8_decode($msg);\n\t\t\t// Insere no Array\n\t\t\tarray_push($this->instrucoes,$msg);\n\t\t}\t\n\t}",
"public function buscarBancos() {\r\n return $this->find(\"b_estatus = 'activa'\");\r\n }",
"public function getSoalByBanksoalAll(Banksoal $banksoal)\n {\n $soal = Soal::with('jawabans')->where('banksoal_id',$banksoal->id)->get();\n return SendResponse::acceptData($soal);\n }",
"public function getDadosBaixa() {\n return $this->oDadosBaixa;\n }",
"function dadosCadastros(){//função geral que será chamada na index\n pegaCadastrosJson();//pega os valores dos cadastros do arquivo JSON e salva em um array\n contaNumeroCadastros();//conta Quantos cadastros existem\n }",
"function listaTodasMembroPorsexoDao($sexo){\r\n require_once (\"conexao.php\");\r\n require_once (\"modelo/objetoMembro.php\");\r\n \r\n $objDao = Connection::getInstance();\r\n \r\n $resultado = mysql_query(\"Select Matricula,Nome from membros where Sexo = '$sexo' order by Nome\") or die (\"Nao foi possivel realizar a busca\".mysql_error());\r\n \r\n $listaMembro = array();\r\n \r\n $i=0;\r\n \r\n \r\n while ($registro = mysql_fetch_assoc($resultado)){\r\n \r\n if($registro[\"Nome\"] != \"\"){\r\n \r\n\t $membro = new objetoMembro();\r\n \r\n $membro->setMatricula($registro['Matricula']);\r\n $membro->setNome($registro['Nome']);\r\n \r\n\t $listaMembro[$i] = $membro;\r\n\t}\r\n $i++;\r\n }\r\n\t\treturn $listaMembro;\r\n\t\tmysql_free_result($resultado);\r\n $objDao->freebanco();\r\n }",
"public function todosLosEstados(){\r\n $arraySolicitudes =$this->controlDelivery->getSolicitudesDelivery();\r\n return $arraySolicitudes;\r\n }",
"function balanceoCanales($canales){\n $id_carga=id_carga::where('estado',1)->where('estado_aprobado',1)->where('ejecucion',1)->get();\n if ($id_carga->count() > 1) {\n $total_canales = 0;\n foreach ($id_carga as $k) {\n echo \"\\nid_carga \" . $k->id_carga;\n $total_canales = $total_canales + $k->canales;\n if ($total_canales > $canales->canales) {\n $k->canales = 0;\n $k->save();\n }\n }\n\n echo \"\\ntotal canales de los id_carga: \" . $total_canales;\n echo \"\\ntotal canales disponibles para ivrs: \" . $canales->canales;\n echo \"\\ntotal id_carga: \" . $id_carga->count();\n\n\n //comentar solo para peru desde ecuador\n foreach ($id_carga as $k) {\n if (intval($k->canales) > 0 && intval($k->canales) < 10) {\n $k->canales = 0;\n $k->save();\n }\n }\n //comentar solo para peru desde ecuador\n\n if ($total_canales == $canales->canales) {\n $total_canales = $total_canales - 1;\n }\n\n if ($total_canales < $canales->canales) {\n echo \"\\nentro al if total canales <= canales\";\n $total_canales = intval($canales->canales);\n\n //sirve para dividir los canales para todas las campañas activas -> sirve para Perú desde ecuador\n //$acanales=intval(floor($canales->canales/$id_carga->count()));\n\n //comentar solo para peru desde ecuador\n //valida que el total de canales a distribuir sea igual o mayor a 10 canales por campaña\n $total_campanias = $id_carga->count();\n do {\n $acanales = intval(floor($canales->canales / $total_campanias));\n $total_campanias = $total_campanias - 1;\n echo \"\\nacanales: \" . $acanales;\n } while ($acanales < 10);\n //comentar solo para peru desde ecuador\n\n foreach ($id_carga as $k) {\n if ($acanales <= $total_canales) {\n echo \"\\nid carga por recibir canales: \" . $k->id_carga;\n echo \" - canales a recibir : \" . $acanales;\n $k->canales = $acanales;\n $k->save();\n }\n $total_canales = $total_canales - $acanales;\n echo \"\\ntotal_canales: \" . $total_canales;\n }\n\n //Si sobran canales le sumo a la primera campaña de la lista\n if ($total_canales > 0) {\n $id_final = $id_carga->first();\n $id_final->canales = $id_final->canales + $total_canales;\n $id_final->save();\n }\n }\n\n } elseif ($id_carga->count() == 1) {\n echo \"\\nentro al else\";\n $icarga = id_carga::where('estado', 1)->where('estado_aprobado', 1)->where('ejecucion', 1)->first();\n $icarga->canales = $canales->canales;\n $icarga->save();\n }\n //Fin balanceo de canales\n}",
"private function _getMCScaricoSalita()\n {\n $mc = 0;\n foreach ($this->lista_arredi as $arredo)\n {\n $mc+=$arredo->getMCScaricoSalita();\n }\n //TODO arrotondamento\n return $mc;\n }",
"public function BuscarIngredientesVendidos() \n{\n\tself::SetNames();\n\t$sql = \"SELECT productos.codproducto, productos.producto, productos.codcategoria, productos.precioventa, productos.existencia, ingredientes.costoingrediente, ingredientes.codingrediente, ingredientes.nomingrediente, ingredientes.cantingrediente, productosvsingredientes.cantracion, detalleventas.cantventa, SUM(productosvsingredientes.cantracion*detalleventas.cantventa) as cantidades FROM productos INNER JOIN detalleventas ON productos.codproducto=detalleventas.codproducto INNER JOIN productosvsingredientes ON productos.codproducto=productosvsingredientes.codproducto LEFT JOIN ingredientes ON productosvsingredientes.codingrediente = ingredientes.codingrediente WHERE DATE_FORMAT(detalleventas.fechadetalleventa,'%Y-%m-%d') >= ? AND DATE_FORMAT(detalleventas.fechadetalleventa,'%Y-%m-%d') <= ? GROUP BY ingredientes.codingrediente\";\n\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim(date(\"Y-m-d\",strtotime($_GET['desde']))));\n\t$stmt->bindValue(2, trim(date(\"Y-m-d\",strtotime($_GET['hasta']))));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"<div class='alert alert-danger'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>\";\n\t\techo \"<center><span class='fa fa-info-circle'></span> NO EXISTEN INGREDIENTES FACTURADOS PARA EL RANGO DE FECHAS SELECCIONADAS</center>\";\n\t\techo \"</div>\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}",
"public static function traerTodas()\n {\n $query = \"SELECT * FROM nivel\";\n $stmt = DBConnection::getStatement($query);\n $stmt->execute();\n\n $salida = [];\n\n while($datosNiv = $stmt->fetch()) {\n $niv = new Nivel();\n $niv->cargarDatos($datosNiv);\n\n $salida[] = $niv;\n }\n\n return $salida;\n }",
"function calcular_cotizacion(){\n\t\t$producto=$_POST['producto'];\n\t\t$plan=$_POST['plan'];\n\t\t$temporada=$_POST['temp'];\n\t\t$fecha_llegada=$_POST['llegada'];\n\t\t\t$this->desde=$_POST['llegada'];\n\t\t$fecha_salida=$_POST['salida'];\n\t\t\t$this->hasta=$_POST['salida'];\n\t\t\n\t\t$sql=\"SELECT * FROM producto, temporadas2, habitaciones2 WHERE id_pro='$producto' AND temporadas2.id_alojamiento='$producto' AND temporadas2.id='$temporada' AND temporadas2.id=habitaciones2.id_temporada AND habitaciones2.id='$plan'\";\n\t\t\n\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t$resultado = mysql_fetch_array($consulta);\n\t\t\n\t\t//echo \"Noches: \".$noches;\n\t\t$arreglo_datos=\"\";\n\t\t$adultos=\"\"; $infantes=\"\"; $ninos=\"\";\n\t\t$i=1;\n\t\t$temp=\"\";\n\t\t$adultos+=$_POST['numero_adultos'.$i];\n\t\t\t$temp[]=$_POST['numero_adultos'.$i];\n\t\t$infantes+=$_POST['ninos_a'.$i];\n\t\t\t$temp[]=$_POST['ninos_a'.$i];\n\t\t$ninos+=$_POST['ninos_b'.$i];\n\t\t\t$temp[]=$_POST['ninos_b'.$i];\n\t\t$temp[]=$resultado['precio'];\n\t\t$temp[]=$resultado['precio_ninos'];\n\t\t$temp[]=$resultado['precio_ninos2'];\n\t\t$arreglo_dato[]=$temp;\n\t\t\n\t\t$this->listado=$arreglo_dato;\n\t\t$_SESSION['personas']=$arreglo_dato;\n\t\t//print_r($this->listado);\n\t\t\n\t\t$numero_personas=$adultos+$infantes+$ninos;\n\t\t$fee=1000;\n\t\n\t\t\t//cotizamos con precio completo\n\t\t\t$total_adulto=($resultado['precio']*$adultos);\n\t\t\t$total_infantes=($resultado['precio_ninos']*$infantes);\n\t\t\t$total_ninos=($resultado['precio_ninos2']*$ninos);\n\t\t\t\n\t\t\t$subtotal=$total_adulto+$total_infantes+$total_ninos;\n\t\t\t\t$this->subtotal=$subtotal;\n\t\t\t$comision=$fee;\n\t\t\t\t$this->comision=$comision;\n\t\t\t$total=$subtotal+$comision;\n\t\t\t\t$this->total=$total;\n\t\t\t\n\t\t\t/*echo \"Monto Adulto: \".$total_adulto.\"<br />\";\n\t\t\techo \"Monto Infantes: \".$total_infantes.\"<br />\";\n\t\t\techo \"Monto Niños: \".$total_ninos.\"<br />\";\n\t\t\techo \"Subtotal: \".$subtotal.\"<br />\";\n\t\t\techo \"Comision: \".$comision.\"<br />\";\n\t\t\techo \"Total: \".$total.\"<br /><br />\";*/\n\n\t\t\n\t\t$observaciones=$_POST['comentario'];\n\t\t$this->condiciones=$_POST['comentario'];\n\t\t$this->mensaje2=\"si\";\n\t}",
"public function getProdSteelEtapa($Dados) {\n $dia = date('d', strtotime($Dados->mes));\n $mes = date('m', strtotime($Dados->mes));\n $ano = date('Y', strtotime($Dados->mes));\n\n //primeiro dia\n $dataParam = $Dados->mes; //\"$dia/$mes/$ano\";\n //classe gerenProd\n $oDadosProdSteel = Fabrica::FabricarController('STEEL_PCP_GerenProd');\n //apontamento por etapa diário\n $aDadosParam = array();\n $aDadosParam['busca'] = 'ProdTotal';\n $aDadosParam['dataini'] = $dataParam;\n $aDadosParam['datafin'] = $dataParam;\n // $aDadosParam['tipoOp'] = 'F';\n $aDadosEtapa = $oDadosProdSteel->Persistencia->geraProdEtapas($aDadosParam);\n\n $aRetornoDados = array();\n $aDados = array();\n\n foreach ($aDadosEtapa as $key => $value) {\n $aDados['etapa'] = $key;\n $aDados['peso'] = number_format($value, '2', ',', '.');\n $aRetornoDados[] = $aDados;\n }\n\n\n\n /* while ($row = $result->fetch(PDO::FETCH_OBJ)){\n $aDados['data'] = $row->dataconv;\n $aDados['peso'] = number_format($row->pesototal,'2',',','.');\n $aRetorno[]=$aDados;\n } */\n\n return $aRetorno['etapas'] = $aRetornoDados;\n }",
"public function SumarAbonos() \n{\n\tself::SetNames();\n\t$sql = \"select sum(montoabono) as totalabonos from abonoscreditos where DATE_FORMAT(fechaabono,'%Y-%m-%d') >= ? AND DATE_FORMAT(fechaabono,'%Y-%m-%d') <= ?\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim(date(\"Y-m-d\",strtotime($_GET['desde']))));\n\t$stmt->bindValue(2, trim(date(\"Y-m-d\",strtotime($_GET['hasta']))));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}",
"public function getDistribusiData()\n {\n $pendapatan = $this->getRekeningPendapatan();\n $rekening_tabungan = $this->getRekening(\"TABUNGAN\");\n $rekening_deposito = $this->getRekening(\"DEPOSITO\");\n \n $data_rekening = array();\n $total_rata_rata = array();\n\n\n foreach($rekening_tabungan as $tab)\n {\n $rata_rata_product_tabungan = 0.0;\n $tabungan = $this->tabunganReporsitory->getTabungan($tab->nama_rekening);\n foreach($tabungan as $user_tabungan) {\n $temporarySaldo = $this->getSaldoAverageTabunganAnggota($user_tabungan->id_user, $user_tabungan->id);\n $rata_rata_product_tabungan = $rata_rata_product_tabungan + $temporarySaldo;\n }\n Session::put($user_tabungan->jenis_tabungan, $rata_rata_product_tabungan);\n array_push($total_rata_rata, $rata_rata_product_tabungan);\n }\n\n foreach($rekening_deposito as $dep)\n {\n $rata_rata_product_deposito = 0.0;\n $deposito = $this->depositoReporsitory->getDepositoDistribusi($dep->nama_rekening);\n foreach($deposito as $user_deposito) {\n if ($user_deposito->type == 'jatuhtempo'){\n $tanggal = $user_deposito->tempo;\n }\n else if($user_deposito->type == 'pencairanawal')\n {\n $tanggal = $user_deposito->tanggal_pencairan;\n }\n else if($user_deposito->type == 'active')\n {\n $tanggal = Carbon::parse('first day of January 1970');\n }\n $temporarySaldo = $this->getSaldoAverageDepositoAnggota($user_deposito->id_user, $user_deposito->id, $tanggal);\n $rata_rata_product_deposito = $rata_rata_product_deposito + $temporarySaldo ;\n }\n Session::put($dep->nama_rekening, $rata_rata_product_deposito);\n array_push($total_rata_rata, $rata_rata_product_deposito);\n }\n\n $total_rata_rata = $this->getTotalProductAverage($total_rata_rata);\n Session::put(\"total_rata_rata\", $total_rata_rata);\n $total_pendapatan = $this->getRekeningPendapatan(\"saldo\");\n $total_pendapatan_product = 0;\n\n $total_porsi_anggota = 0;\n $total_porsi_bmt = 0;\n\n\n foreach($rekening_tabungan as $tab)\n {\n $rata_rata = Session::get($tab->nama_rekening);\n $nisbah_anggota = json_decode($tab->detail)->nisbah_anggota;\n $nisbah_bmt = 100 - json_decode($tab->detail)->nisbah_anggota;\n $pendapatan_product = $this->getPendapatanProduk($rata_rata, $total_rata_rata, $total_pendapatan);\n\n $total_porsi_anggota += $this->getPorsiPendapatanProduct($nisbah_anggota, $pendapatan_product);\n $total_porsi_bmt += $this->getPorsiPendapatanProduct($nisbah_bmt, $pendapatan_product);\n\n }\n\n foreach($rekening_deposito as $dep)\n {\n $rata_rata = Session::get($dep->nama_rekening);\n $nisbah_anggota = json_decode($dep->detail)->nisbah_anggota;\n $nisbah_bmt = 100 - json_decode($dep->detail)->nisbah_anggota;\n $pendapatan_product = $this->getPendapatanProduk($rata_rata, $total_rata_rata, $total_pendapatan);\n\n $total_porsi_anggota += $this->getPorsiPendapatanProduct($nisbah_anggota, $pendapatan_product);\n $total_porsi_bmt += $this->getPorsiPendapatanProduct($nisbah_bmt, $pendapatan_product);\n }\n\n $shuBerjalan = BMT::where('nama', 'SHU BERJALAN')->select('saldo')->first();\n $selisihBMTAnggota = $shuBerjalan->saldo - $total_porsi_anggota;\n\n\n foreach($rekening_tabungan as $tab)\n {\n $tabungan = $this->tabunganReporsitory->getTabungan($tab->nama_rekening);\n $rata_rata = Session::get($tab->nama_rekening);\n $nisbah_anggota = json_decode($tab->detail)->nisbah_anggota;\n $nisbah_bmt = 100 - json_decode($tab->detail)->nisbah_anggota;\n $pendapatan_product = $this->getPendapatanProduk($rata_rata, $total_rata_rata, $total_pendapatan);\n\n $total_pendapatan_product += $pendapatan_product;\n\n if ($total_porsi_bmt == 0)\n {\n $porsi_bmt = 0;\n }\n else\n {\n// $porsi_bmt = $this->getPorsiPendapatanProduct($nisbah_bmt, $pendapatan_product) / $total_porsi_bmt * $selisihBMTAnggota;\n $porsi_bmt = $this->getPorsiPendapatanProduct($nisbah_bmt, $pendapatan_product);\n\n }\n\n array_push($data_rekening, [ \n \"jenis_rekening\" => $tab->nama_rekening,\n \"jumlah\" => count($tabungan),\n \"rata_rata\" => $rata_rata,\n \"nisbah_anggota\" => $nisbah_anggota,\n \"nisbah_bmt\" => $nisbah_bmt,\n \"total_rata_rata\" => $total_rata_rata,\n \"total_pendapatan\" => $total_pendapatan,\n \"pendapatan_product\" => $pendapatan_product,\n \"porsi_anggota\" => $this->getPorsiPendapatanProduct($nisbah_anggota, $pendapatan_product),\n \"porsi_bmt\" => $porsi_bmt,\n \"percentage_anggota\" => $total_pendapatan > 0 ?$this->getPorsiPendapatanProduct($nisbah_anggota, $pendapatan_product) / $total_pendapatan : 0\n ]);\n }\n\n foreach($rekening_deposito as $dep)\n {\n $deposito = $this->depositoReporsitory->getDepositoDistribusi($dep->nama_rekening);\n $rata_rata = Session::get($dep->nama_rekening);\n $nisbah_anggota = json_decode($dep->detail)->nisbah_anggota;\n $nisbah_bmt = 100 - json_decode($dep->detail)->nisbah_anggota;\n $pendapatan_product = $this->getPendapatanProduk($rata_rata, $total_rata_rata, $total_pendapatan);\n\n $total_pendapatan_product += $pendapatan_product;\n if ($total_porsi_bmt == 0)\n {\n $porsi_bmt = 0;\n }\n else\n {\n// $porsi_bmt = $this->getPorsiPendapatanProduct($nisbah_bmt, $pendapatan_product) / $total_porsi_bmt * $selisihBMTAnggota;\n $porsi_bmt = $this->getPorsiPendapatanProduct($nisbah_bmt, $pendapatan_product);\n\n }\n array_push($data_rekening, [\n \"jenis_rekening\" => $dep->nama_rekening,\n \"jumlah\" => count($deposito),\n \"rata_rata\" => $rata_rata,\n \"nisbah_anggota\" => $nisbah_anggota,\n \"nisbah_bmt\" => $nisbah_bmt,\n \"total_rata_rata\" => $total_rata_rata,\n \"total_pendapatan\" => $total_pendapatan,\n \"pendapatan_product\" => $pendapatan_product,\n \"porsi_anggota\" => $this->getPorsiPendapatanProduct($nisbah_anggota, $pendapatan_product),\n \"porsi_bmt\" => $porsi_bmt\n ]);\n }\n\n return $data_rekening;\n }",
"public function cambioEstado($servicios) {\n $hoy = getdate();\n $fecha = $hoy['year'] . '-' . $hoy['mon'] . '-' . $hoy['mday'] . ' ' . $hoy['hours'] . ':' . $hoy['minutes'] . ':' . $hoy['seconds'];\n $fecha = strtotime($fecha);\n $servicios_por_recoger = collect([]);\n if (count($servicios) > 0) {\n foreach ($servicios as $item) {\n $fecha_servicio = strtotime($item->fechafin);\n if ($fecha >= $fecha_servicio) {\n if ($item->estado == 'ENTREGADO') {\n $item->estado = \"RECOGER\";\n $item->save();\n }\n\n $horas = abs(($fecha - strtotime($item->fechafin)) / 3600);\n $operacion = $horas / 24;\n $dia = floor($operacion);\n $operacion = ($operacion - $dia) * 24;\n $horas = floor($operacion);\n $operacion = ($operacion - $horas) * 60;\n $minutos = floor($operacion);\n $str = '';\n if ($dia > 0) {\n $str = '<strong>' . $dia . '</strong> Dia(s) </br>';\n }\n\n if ($horas > 0) {\n $str .= '<strong>' . $horas . '</strong> Hora(s)</br>';\n }\n if ($minutos > 0) {\n $str .= '<strong>' . $minutos . '</strong> Minuto(s)</br>';\n }\n\n $item->tiempo = $str;\n\n $servicios_por_recoger[] = $item;\n } elseif ($item->estado == \"RECOGER\") {\n// $horas = abs(($fecha - strtotime($item->fechafin)) / 3600);\n// $minutos = '0.' . explode(\".\", $horas)[1];\n// $horas = floor($horas);\n// $minutos = floor($minutos * 60);\n $item->tiempo = \"Tiene permiso para recoger antes de tiempo\";\n $servicios_por_recoger[] = $item;\n }\n }\n }\n return $servicios_por_recoger;\n }",
"public function get_resumen_ventas_cobros($fecha,$sucursal){\n\t$conectar= parent::conexion();\n\tparent::set_names(); \n\t$fecha_corte = $fecha.\"%\";\n\t$sql=\"select * from corte_diario where fecha_ingreso like ? and (sucursal_venta=? or sucursal_cobro=?);\";\n\t$sql=$conectar->prepare($sql);\n\t$sql->bindValue(1,$fecha_corte);\n\t$sql->bindValue(2,$sucursal);\n\t$sql->bindValue(3,$sucursal);\n\t$sql->execute();\n\treturn $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}"
] | [
"0.69366264",
"0.6667662",
"0.6523915",
"0.63235855",
"0.63079447",
"0.6089488",
"0.60707694",
"0.6013067",
"0.5995885",
"0.5995085",
"0.5968853",
"0.59546",
"0.59546",
"0.58985096",
"0.58831257",
"0.5863881",
"0.58619416",
"0.58089036",
"0.5788279",
"0.5738757",
"0.5696751",
"0.56796384",
"0.56448686",
"0.5636843",
"0.5625235",
"0.56173587",
"0.56167424",
"0.56149095",
"0.56069833",
"0.5605612",
"0.55937266",
"0.5593551",
"0.55874914",
"0.5581407",
"0.5574119",
"0.55652094",
"0.5564138",
"0.5560819",
"0.5543923",
"0.55414534",
"0.5532184",
"0.55213445",
"0.5513547",
"0.55029994",
"0.54969853",
"0.54912925",
"0.54879415",
"0.54661804",
"0.54558206",
"0.54453635",
"0.5440045",
"0.5427751",
"0.5415387",
"0.54002815",
"0.5398048",
"0.5396936",
"0.5377697",
"0.53693855",
"0.53655547",
"0.53576404",
"0.5348965",
"0.5348647",
"0.5346074",
"0.5344698",
"0.53404576",
"0.53396684",
"0.53330404",
"0.53325737",
"0.5331614",
"0.5331152",
"0.5316701",
"0.53157455",
"0.5315682",
"0.5314363",
"0.53141606",
"0.53020453",
"0.52994806",
"0.5296004",
"0.5293766",
"0.5292143",
"0.5292046",
"0.52908677",
"0.52854043",
"0.5283683",
"0.52831477",
"0.5264585",
"0.5262822",
"0.5261122",
"0.52550673",
"0.52539",
"0.52520627",
"0.5251244",
"0.5250772",
"0.52497065",
"0.52464825",
"0.5241191",
"0.52395135",
"0.5238141",
"0.52374125",
"0.523473"
] | 0.8077642 | 0 |
retorna los saldos de todos los bancos | public function getSaldoBanco(UIBancoCriteria $criteria){
$bancos = $this->getList($criteria);
$saldos = 0;
foreach ($bancos as $banco) {
$saldos += $banco->getSaldo();
}
return $saldos;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getSaldoBancos(){\n\n\t\t$bancos = $this->getList(new UIBancoCriteria());\n\t\t$saldos = 0;\n\t\tforeach ($bancos as $banco) {\n\t\t\t$saldos += $banco->getSaldo();\n\t\t}\n\t\treturn $saldos;\n\t}",
"public function buscarSalas($sala){\n $listado = [];\n \n #Consulto el tipo de servicio...\n $id = new MongoDB\\BSON\\ObjectId($sala);\n //'eliminado'=>false,'status'=>true,\n $res_servicios = $this->mongo_db->order_by(array('_id' => 'DESC'))->where(array(\"_id\"=>$id))->get(\"servicios\");\n\n foreach ($res_servicios as $claves => $valor) {\n $valor[\"id_salas\"] = (string)$valor[\"_id\"]->{'$id'};\n $valor[\"monto\"] = number_format($valor[\"monto\"],2);\n $listado[] = $valor; \n }\n return $listado;\n }",
"public function cargaSalon(Request $request){\n \t$id_sesion=$request->id;\n \t\n \t$salon=[];\n\n\t\t//butacas resevadas en esa sesion (directo el seiosn id)\n\t\t$butacas_reservadas=Butaca::whereHas('sesion', function ($query) use ($id_sesion) {\n \t\t$query->where('sesion_id', $id_sesion);\n\t\t})->get()->toArray();\n\t\t \n\t\t\n\n\t\t//butacas bloqueadas por esa sesion\t\t(sacar las reservas con sesion_id)\n\t\t$butacas_bloqueadas=Butaca::where(\"sesion_id\",$id_sesion)->get()->toArray();\n\t\t\n\n\t\t$butacas_ocupadas = array_merge($butacas_reservadas, $butacas_bloqueadas);\n\t\t\n\t\tfor($i=1;$i<=Config('constants.options.filas_sala');$i++){\n\t\t\tfor($j=1;$j<=Config('constants.options.columnas_sala');$j++){\n\t\t\t\t$ocupada=\"false\";\n\t\t\t\tfor ($b=0;$b<count($butacas_ocupadas);$b++) {\n\t\t\t\t\tif($butacas_ocupadas[$b][\"fila\"]==$i and $butacas_ocupadas[$b][\"columna\"]==$j){\n\t\t\t\t\t\t$ocupada=\"true\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$salon[]=[\"fila\"=>$i,\"columna\"=>$j,\"ocupada\"=>$ocupada];\n\t\t\t}\n\t\t}\n//\t\tdd($salon);\n\n\n \treturn json_encode($salon);\n\n }",
"public function getSalons()\r\n {\r\n return $this->salons;\r\n }",
"public function obtenerSaldo();",
"public function getSalones(){\n\t\t$filasPagina = 7;//registros mostrados por página\n\n\t\tif(isset($_GET['pagina'])){//si le pasamos el valor \"pagina\" de la url (si el usuario da click en la paginación)\n\t\t\t\tif($_GET['pagina']==1){\n\t\t\t\t$pagina=1; \n\t\t\t\theader(\"Location: principal.php?c=controlador&a=muestraSalones\");\n\t\t\t\t}else{\n\t\t\t\t\t$pagina=$_GET['pagina'];//índice que indica página actual\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$pagina=1;//índice que indica página actual\n\t\t\t}\n\n\t\t\t$empezarDesde = ($pagina-1) * $filasPagina;\n\n\t\t\t$sql = \" SELECT * FROM salones \";\n\n\t\t\t$resultado = $this->db->query($sql);\n\n\t\t\t$resultado->execute(array());\n\n\t\t\t$numFilas = $resultado->rowCount();//número de registos totales de la consulta\n\n\t\t\t//ceil — Redondear fracciones hacia arriba\n\t\t\t$totalPaginas = ceil($numFilas / $filasPagina);//calcula cuántas páginas serán en total para mostrar todos los registros\n\n\t\t\t$resultado->closeCursor();\n\n\t\t//------------------------- Consulta para mostrar los resultados ---------------------------\n\n\t\t\t$sql_limite = \" SELECT * FROM salones LIMIT $empezarDesde , $filasPagina \";\n\n\t\t\t$resultado = $this->db->query($sql_limite);//ejecutando la consulta con la conexión establecida\n\n\t\t\twhile($row = $resultado->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t$this->objeto[] = $row;//llenando array con valores de la consulta\n\t\t\t}\n\n\t\treturn $this->objeto;\n\t}",
"public function ListarSalas()\n{\n\tself::SetNames();\n\t$sql = \" select * from salas\";\n\tforeach ($this->dbh->query($sql) as $row)\n\t{\n\t\t$this->p[] = $row;\n\t}\n\treturn $this->p;\n\t$this->dbh=null;\n}",
"private function getSaldo()\n {\n return $this->saldo;\n }",
"public function getSabores(){\n $sabores = TcSabor::where('id_estado','=',1)->get();\n return $sabores;\n }",
"public function GetSaldoTotalProveedores()\n {\n \t\n \n \t// No mostrar Insumos a contabilizar, exite otro procedimiento para tratarlas\n \t// Insumos a contabilizar\n \t$CONST_InsumosAContabilizarId = 5;\n \t\n \t$q\t=\tDoctrine_Query::create()\n \t->from('Proveedor c')\n \t->innerJoin('c.FacturasCompra f')\n \t->andWhere('f.TipoGastoId <> ?', $CONST_InsumosAContabilizarId)\n \t->groupBy('c.Id');\n //echo $q->getSqlQuery();\n \t$cli\t=\t$q->execute();\n \t$total=0;\n \tforeach ($cli as $c)\n \t{\n \t\t\t$saldoActual\t=\t$c->GetSaldo();\n \t\t\t$c->SaldoActual\t=\t$saldoActual;\n \t\t\t$c->save();\n\t\t\t\t\t// sumar saldo total de cada cliente\n \t\t\t$total\t+= $saldoActual;\n \t}\n \n \treturn $total;\n }",
"public function get_saldo_caja($sucursal){\n\t$conectar= parent::conexion();\n\tparent::set_names();\n \n\t$sql=\"select saldo from caja_chica where sucursal=?;\";\n\t$sql=$conectar->prepare($sql);\n\t$sql->bindValue(1,$sucursal);\n\t$sql->execute();\n\treturn $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}",
"function getCreditosComprometidos(){ return $this->getOEstats()->getTotalCreditosSaldo(); }",
"public function getSaldo()\n {\n return $this->saldo;\n }",
"public function getSaldo()\n {\n return $this->saldo;\n }",
"function salida_por_traspaso(){\n\t\t$e= new Salida();\n\t\t$e->usuario_id=$GLOBALS['usuarioid'];\n\t\t$e->empresas_id=$GLOBALS['empresaid'];\n\t\t$related = $e->from_array($_POST);\n\t\t//if($e->costo_unitario=='undefined') $e->costo_unitario=0;\n\t\t$e->espacios_fisicos_id=$GLOBALS['espacios_fisicos_id'];\n\t\t$e->costo_total=($e->cantidad * $e->costo_unitario);\n\t\t$e->cclientes_id=1;\n\t\t$e->fecha=date(\"Y-m-d H:i:s\");\n\t\tif($e->id==0)\n\t\t\tunset($e->id);\n\t\tif($e->save($related)) {\n\t\t\techo $e->id;\n\t\t} else\n\t\t\techo 0;\n\t}",
"public function cadastrarHabilidade($dados){\n \n return $this->salvar($dados);\n\t}",
"public function salvar() {\n\n if (!db_utils::inTransaction()) {\n throw new Exception(_M('patrimonial.patrimonio.Bem.sem_transacao'));\n }\n\n /**\n * Realizamos algumas validações básicas\n */\n if ($this->oPlaca == null || !$this->oPlaca instanceof PlacaBem) {\n throw new Exception(_M('patrimonial.patrimonio.Bem.placa_nao_definida'));\n }\n if (!$this->getFornecedor() instanceof CgmBase) {\n throw new Exception(_M('patrimonial.patrimonio.Bem.informe_fornecedor'));\n }\n if (!$this->getClassificacao() instanceof BemClassificacao) {\n throw new Exception(_M('patrimonial.patrimonio.Bem.informe_classificacao'));\n }\n /**\n * Dados da tabela bens\n */\n $oDaoBens = new cl_bens();\n $oDaoBens->t52_bensmarca = \"{$this->getMarca()}\";\n $oDaoBens->t52_bensmedida = \"{$this->getMedida()}\";\n $oDaoBens->t52_bensmodelo = \"{$this->getModelo()}\";\n $oDaoBens->t52_codcla = $this->getClassificacao()->getCodigo();\n $oDaoBens->t52_depart = $this->getDepartamento();\n $oDaoBens->t52_descr = $this->getDescricao();\n $oDaoBens->t52_dtaqu = $this->getDataAquisicao();\n $oDaoBens->t52_instit = $this->getInstituicao();\n $oDaoBens->t52_numcgm = $this->getFornecedor()->getCodigo();\n $oDaoBens->t52_obs = $this->getObservacao();\n $oDaoBens->t52_valaqu = \"{$this->getValorAquisicao()}\";\n\n /**\n * Inclusao - busca placa\n */\n if (empty($this->iCodigoBem)) {\n $oDaoBens->t52_ident = $this->getPlaca()->getNumeroPlaca();\n }\n\n $lIncorporacaoBem = false;\n if (!empty($this->iCodigoBem)) {\n\n $oDaoBens->t52_bem = $this->iCodigoBem;\n $oDaoBens->alterar($this->iCodigoBem);\n $sHistoricoBem = 'Alteração de dados do Bem';\n } else {\n\n $sHistoricoBem = 'Inclusão do Bem';\n $oDaoBens->incluir(null);\n $this->iCodigoBem = $oDaoBens->t52_bem;\n $lIncorporacaoBem = true;\n }\n\n if ($oDaoBens->erro_status == 0) {\n throw new Exception(_M('patrimonial.patrimonio.Bem.erro_salvar', (object)array(\"erro_msg\" => $oDaoBens->erro_msg)));\n }\n\n $lRealizarEscrituracao = $this->criaVinculoBemNotas();\n\n $oDataAtual = new DBDate(date('Y-m-d', db_getsession(\"DB_datausu\")));\n $oInstit = new Instituicao(db_getsession(\"DB_instit\"));\n $lIntegracaoFinanceiro = ParametroIntegracaoPatrimonial::possuiIntegracaoPatrimonio($oDataAtual, $oInstit);\n\n $lRealizouLancamento = false;\n if ($lRealizarEscrituracao && $lIntegracaoFinanceiro && $lIncorporacaoBem) {\n $lRealizouLancamento = $this->processaLancamentoContabil();\n }\n\n /**\n * Salva os dados da depreciacao do bem\n */\n $this->salvarDepreciacao();\n\n $this->oPlaca->setCodigoBem($this->iCodigoBem);\n $this->oPlaca->salvar();\n\n /**\n * Salvamos o Historico do bem\n */\n $oHistoricoBem = new BemHistoricoMovimentacao();\n $oHistoricoBem->setData(date(\"Y-m-d\", db_getsession(\"DB_datausu\")));\n $oHistoricoBem->setDepartamento(db_getsession(\"DB_coddepto\"));\n $oHistoricoBem->setHistorico($sHistoricoBem);\n $oHistoricoBem->setCodigoSituacao($this->getSituacaoBem());\n $oHistoricoBem->salvar($this->iCodigoBem);\n\n $this->salvarDadosDivisao();\n $this->salvarDadosCedente();\n if ($this->getDadosImovel() instanceof BemDadosImovel) {\n\n $this->getDadosImovel()->setBem($this->iCodigoBem);\n $this->getDadosImovel()->salvar();\n }\n\n if ($this->getDadosCompra() instanceof BemDadosMaterial) {\n\n $this->getDadosCompra()->setBem($this->iCodigoBem);\n $this->getDadosCompra()->salvar();\n }\n\n if ($this->getTipoAquisicao() instanceof BemTipoAquisicao) {\n /**\n * Só executa se bem for uma inclusão manual ($lRealizouLancamento == false)\n */\n \tif ($lIncorporacaoBem == true && !$lRealizouLancamento && USE_PCASP && $lIntegracaoFinanceiro) {\n\n $oLancamentoauxiliarBem = new LancamentoAuxiliarBem();\n $oEventoContabil = new EventoContabil(700, db_getsession('DB_anousu'));\n $oLancamentoauxiliarBem->setValorTotal($this->getValorAquisicao());\n $oLancamentoauxiliarBem->setBem($this);\n $oLancamentoauxiliarBem->setObservacaoHistorico(\"{$this->getObservacao()} | Código do Bem: {$this->iCodigoBem}.\");\n\n $aLancamentos = $oEventoContabil->getEventoContabilLancamento();\n $oLancamentoauxiliarBem->setHistorico($aLancamentos[0]->getHistorico());\n $oEventoContabil->executaLancamento($oLancamentoauxiliarBem);\n \t}\n }\n }",
"function buscarUtlimaSalidaDAO(){\n $conexion = Conexion::crearConexion();\n try {\n $conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $stm = $conexion->prepare(\"SELECT * FROM salidas ORDER BY id_venta DESC LIMIT 1\");\n $stm->execute();\n $exito = $stm->fetch();\n } catch (Exception $ex) {\n throw new Exception(\"Error al buscar la ultima salida en bd\");\n }\n return $exito;\n }",
"public function costo_bancos($proceso) {\n\n $sql = \"SELECT * from bancos where status = 'A' and nombre like '%\" . $proceso . \"%' limit 1\";\n\n $query = $this->db->prepare($sql);\n $query->execute();\n\n $result = array();\n\n while ($row = $query->fetch(PDO::FETCH_ASSOC)) {\n\n $result[] = $row;\n }\n\n return $result;\n }",
"public function testSaldoDeRecursosExtraOrcamentariosIgualAoSaldoDoPassivoARecolherMenosOAtivoACompensarDeduzidosDosSequestros() {\n $filter = function (array $line): bool {\n if (\n str_starts_with($line['conta_contabil'], '1.1.1.1.1.') && $line['escrituracao'] === 'S' && $line['recurso_vinculado'] >= 8000 && $line['recurso_vinculado'] <= 8999\n ) {\n return true;\n }\n return false;\n };\n $saldoDevedorDisp = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_debito', $filter);\n $saldoCredorDisp = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_credito', $filter);\n\n $filter = function (array $line): bool {\n if (\n (\n str_starts_with($line['conta_contabil'], '1.') && !str_starts_with($line['conta_contabil'], '1.1.1.1.1.')\n ) && $line['escrituracao'] === 'S' && $line['recurso_vinculado'] >= 8000 && $line['recurso_vinculado'] <= 8999\n ) {\n return true;\n }\n return false;\n };\n $saldoDevedorAtivo = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_debito', $filter);\n $saldoCredorAtivo = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_credito', $filter);\n\n $filter = function (array $line): bool {\n if (\n str_starts_with($line['conta_contabil'], '1.1.3.5.1.05.') && $line['escrituracao'] === 'S') {\n return true;\n }\n return false;\n };\n $saldoDevedorAtivoSequestro = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_debito', $filter);\n $saldoCredorAtivoSequestro = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_credito', $filter);\n\n $filter = function (array $line): bool {\n if (\n str_starts_with($line['conta_contabil'], '2.') && $line['escrituracao'] === 'S' && $line['recurso_vinculado'] >= 8000 && $line['recurso_vinculado'] <= 8999\n ) {\n return true;\n }\n return false;\n };\n $saldoDevedorPassivo = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_debito', $filter);\n $saldoCredorPassivo = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_credito', $filter);\n\n $this->comparar(($saldoDevedorDisp - $saldoCredorDisp) + ($saldoDevedorAtivoSequestro - $saldoCredorAtivoSequestro), ($saldoCredorPassivo - $saldoDevedorPassivo) - ($saldoDevedorAtivo - $saldoCredorAtivo));\n }",
"public function indexListaSobrantes($id){\n // viene id de ingreso_b3\n\n $dataArray = array();\n\n $listado = IngresosDetalleB3::where('id_ingresos_b3', $id)->orderBy('nombre')->get();\n\n foreach ($listado as $l){\n\n // obtener cantidad verificada\n $listave = VerificadoIngresoDetalleB3::where('id_ingresos_detalle_b3', $l->id)->get();\n $totalve = collect($listave)->sum('cantidad');\n $l->cantiverificada = $totalve;\n\n // obtener cantidad retirada\n $listare = RetiroBodegaDetalleB3::where('id_ingresos_detalle_b3', $l->id)->get();\n $totalre = collect($listare)->sum('cantidad');\n $l->cantiretirada = $totalre;\n\n $resta = $totalve - $totalre;\n // $l->sobrante = $resta;\n\n if($rem = RegistroExtraMaterialDetalleB3::where('id_ingresos_detalle_b3', $l->id)->first()){\n // si lo encuentra es un material extra agregado\n // obtener fecha cuando se agrego\n\n $infodeta = RegistroExtraMaterialB3::where('id', $rem->id_reg_ex_mate_b3)->first();\n\n // meter la fecha\n $fecha = date(\"d-m-Y\", strtotime($infodeta->fecha));\n\n $dataArray[] = [\n 'fecha' => $fecha,\n 'nombre' => $l->nombre,\n 'preciounitario' => $l->preciounitario,\n 'cantidad' => $l->cantidad,\n 'cantiverificada' => $totalve,\n 'cantiretirada' => $totalre,\n 'sobrante' => $resta\n ];\n\n }else{\n // es un material agregado al crear el proyecto\n $daa = IngresosB3::where('id', $l->id_ingresos_b3)->first();\n\n $fecha = date(\"d-m-Y\", strtotime($daa->fecha));\n\n $dataArray[] = [\n 'fecha' => $fecha,\n 'nombre' => $l->nombre,\n 'preciounitario' => $l->preciounitario,\n 'cantidad' => $l->cantidad,\n 'cantiverificada' => $totalve,\n 'cantiretirada' => $totalre,\n 'sobrante' => $resta\n ];\n }\n }\n\n // metodos para ordenar el array\n usort($dataArray, array( $this, 'sortDate' ));\n\n return view('backend.bodega3.verificacion.sobrante.index', compact('dataArray'));\n }",
"static Public function MdlMostrarSalidas($tabla, $campo, $valor, $fechaSel){\n\n$where='1=1';\n\n$idtec = (int) $valor;\n$where.=($idtec>0)? ' AND id_cliente=\"'.$idtec.'\" ' : \"\";\n\n$tabla = (int) $tabla;\n$where.=($tabla>0)? ' AND id_almacen=\"'.$tabla.'\"' : \"\";\n\n$where.=(!empty($fechaSel))? ' AND fecha_salida=\"'.$fechaSel.'\"' : \"\";\n\n$where.=' GROUP by num_salida,fecha_salida,id_almacen,id_cliente';\n\nif($tabla>0 || $idtec>0 || !empty($fechaSel)){\t\t\t//QUE ALMACEN MOSTRAR SALIDAS\n\t$sql=\"SELECT `id_cliente`, t.nombre AS nombrecliente, `num_salida`, `fecha_salida`, SUM(`cantidad`) AS salio, \n\tSUM(IF(`es_promo` = 0, `cantidad`*`precio_venta`,0)) AS sinpromo, \n\tSUM(IF(`es_promo` = 1, `precio_venta`,0)) AS promo, id_tipovta,\n\t`id_almacen`,a.nombre AS almacen FROM `hist_salidas` INNER JOIN clientes t ON id_cliente=t.id \n\tINNER JOIN almacenes a ON id_almacen=a.id WHERE \".$where;\n\t\n}else{ // TODOS LOS ALMACENES\n\n\t$sql=\"SELECT `id_cliente`, t.nombre AS nombrecliente, `num_salida`, `fecha_salida`, SUM(`cantidad`) AS salio, id_tipovta, `id_almacen`,a.nombre AS almacen FROM `hist_salidas` INNER JOIN clientes t ON id_cliente=t.id \n\tINNER JOIN almacenes a ON id_almacen=a.id\n\tGROUP by `num_salida`,`fecha_salida`,`id_almacen`,`id_cliente`\";\n}\n\n $stmt=Conexion::conectar()->prepare($sql);\n\t\t\n //$stmt->bindParam(\":\".$campo, $valor, PDO::PARAM_STR);\n \n if($stmt->execute()){;\n \n return $stmt->fetchAll();\n \n //if ( $stmt->rowCount() > 0 ) { do something here }\n \n \t }else{\n\n\t\t\treturn false;\n\n\t } \n \n \n $stmt=null;\n }",
"function s_d_salarii_platit()\n{\n // selecteaza datele platite deja din salarii\n $submission_date = format_data_out_db('submission_date');\n $query_sal = \"SELECT DISTINCT $submission_date AS date_db\n FROM cozagro_db.work_days \n WHERE work_days.deleted = 0 AND completed = 0\n ORDER BY submission_date DESC \";\n $result_sal = Database::getInstance()->getConnection()->query($query_sal);\n if (!$result_sal) {\n die(\"Nu s-a reusit conexiunea la DB selectarea salariilor platite\" . Database::getInstance()->getConnection()->error);\n }\n $salary = [];\n while ($sal = $result_sal->fetch_assoc()) {\n $salary[] = [remove_day_from_date_and_format($sal['date_db']), translate_date_to_ro($sal['date_db'])];\n }\n $result_sal->free_result();\n return $salary;\n}",
"public function salvar()\n {\n $data = Input::all();\n $contato = Contato::newInstance($data);\n $contato = $this->contatoBO->salvar($contato);\n\n return $this->toJson($contato);\n }",
"public function salvar() {\n\n if (!db_utils::inTransaction()) {\n throw new Exception(_M('patrimonial.patrimonio.PlanilhaCalculo.nao_existe_transacao'));\n }\n if (count($this->getCalculos()) == 0) {\n throw new Exception(_M('patrimonial.patrimonio.PlanilhaCalculo.planilha_sem_calculos'));\n }\n\n if (empty($this->iMes)) {\n throw new Exception(_M('patrimonial.patrimonio.PlanilhaCalculo.planilha_sem_mes_de_processamento'));\n }\n\n if (empty($this->iAno)) {\n throw new Exception(_M('patrimonial.patrimonio.PlanilhaCalculo.planilha_sem_ano_de_processamento'));\n }\n $oDaoBensHistoricoCalculo = db_utils::getDao(\"benshistoricocalculo\");\n $oDaoBensHistoricoCalculo->t57_ano = $this->getAno();\n $oDaoBensHistoricoCalculo->t57_mes = $this->getMes();\n $oDaoBensHistoricoCalculo->t57_ativo = $this->isAtiva()?\"true\":\"false\";\n $oDaoBensHistoricoCalculo->t57_datacalculo = date(\"Y-m-d\", db_getsession(\"DB_datausu\"));\n $oDaoBensHistoricoCalculo->t57_instituicao = db_getsession(\"DB_instit\");\n $oDaoBensHistoricoCalculo->t57_processado = $this->isProcessado()?\"true\":\"false\";\n $oDaoBensHistoricoCalculo->t57_tipocalculo = $this->getTipoCalculo();\n $oDaoBensHistoricoCalculo->t57_tipoprocessamento = $this->getTipoProcessamento();\n $oDaoBensHistoricoCalculo->t57_usuario = db_getsession(\"DB_id_usuario\");\n if (empty($this->iPlanilha)) {\n\n $oDaoBensHistoricoCalculo->incluir(null);\n $this->iPlanilha = $oDaoBensHistoricoCalculo->t57_sequencial;\n\n /**\n * Salvamos os dados dos calculos na planilha\n */\n $aCalculos = $this->getCalculos();\n foreach ($aCalculos as $oCalculo) {\n $oCalculo->salvar($this->iPlanilha);\n }\n } else {\n\n $oDaoBensHistoricoCalculo->t57_sequencial = $this->iPlanilha;\n $oDaoBensHistoricoCalculo->alterar($this->iPlanilha);\n }\n\n if ($oDaoBensHistoricoCalculo->erro_status == 0) {\n throw new Exception(_M('patrimonial.patrimonio.PlanilhaCalculo.planilha_sem_ano_de_processamento',$oDaoBensHistoricoCalculo));\n }\n }",
"public function getSalutations()\n {\n $salutations = ['', 'Mr.', 'Ms.', 'Dr.', 'Rev.', 'Prof.'];\n\n return array_combine($salutations, $salutations);\n }",
"public function salvarDepreciacao() {\n\n $oDaoBensDepreciacao = new cl_bensdepreciacao();\n $oDaoBensDepreciacao->t44_benstipoaquisicao = $this->getTipoAquisicao()->getCodigo();\n $oDaoBensDepreciacao->t44_benstipodepreciacao = $this->getTipoDepreciacao()->getCodigo();\n $oDaoBensDepreciacao->t44_valoratual = \"{$this->getValorDepreciavel()}\";\n $oDaoBensDepreciacao->t44_valorresidual = \"{$this->getValorResidual()}\";\n $oDaoBensDepreciacao->t44_vidautil = \"{$this->getVidaUtil()}\";\n\n if (!empty($this->iCodigoBemDepreciacao)) {\n\n $oDaoBensDepreciacao->t44_sequencial = $this->iCodigoBemDepreciacao;\n $oDaoBensDepreciacao->alterar($this->iCodigoBemDepreciacao);\n\n } else {\n\n $oDaoBensDepreciacao->t44_ultimaavaliacao = date(\"Y-m-d\", db_getsession(\"DB_datausu\"));\n $oDaoBensDepreciacao->t44_bens = $this->iCodigoBem;\n $oDaoBensDepreciacao->incluir(null);\n $this->iCodigoBemDepreciacao = $oDaoBensDepreciacao->t44_sequencial;\n }\n\n if ($oDaoBensDepreciacao->erro_status == \"0\") {\n $sMsg = _M('patrimonial.patrimonio.Bem.erro_salvar_calculo', (object)array(\"erro_msg\" => $oDaoBensDepreciacao->erro_msg));\n throw new Exception($sMsg);\n }\n return true;\n }",
"public function saldoExist($insumos){\n\n\t\t$errores = [];\n\n\t \tforeach ($insumos as $key => $insumo){\n\n\t \t\tif(!isset($insumo['lote']) || empty($insumo['lote']))\n\t \t\t\tcontinue;\n\n\t \t\t$loteRegister = Lote::where('insumo', $insumo['id'])\n\t\t\t\t\t\t \t->where('codigo', $insumo['lote'])\n\t\t\t\t\t\t \t->where('deposito', Auth::user()->deposito)\n\t\t\t\t\t\t \t->orderBy('id', 'desc')\n\t\t\t\t\t\t \t->first();\n\n if( ($loteRegister->cantidad - $insumo['despachado']) < 0){\n array_push($errores, ['insumo' => $insumo['id'], 'lote' => $insumo['lote']]);\n }\n }\n\n\t return $errores;\n\t}",
"public function testSaldo() {\n $tiempo = new TiempoFalso();\n $tarjeta = new Tarjeta( $tiempo );\n $tarjeta->recargar(100.0);\n $saldo=100.0;\n $boleto = new Boleto(NULL, NULL, $tarjeta, NULL, NULL, NULL, NULL, NULL, NULL);\n\n $this->assertEquals($boleto->obtenersaldo(), $saldo);\n }",
"public function getAll(){\r\n $sql=\"SELECT * FROM salas\";\r\n try{\r\n //creo la instancia de conexion\r\n $this->connection= Connection::getInstance();\r\n $result = $this->connection->execute($sql);\r\n }catch(\\PDOException $ex){\r\n throw $ex;\r\n } \r\n //hay que mapear de un arreglo asociativo a objetos\r\n if(!empty($result)){\r\n return $this->mapeo($result);\r\n }else{\r\n return false;\r\n }\r\n\r\n }",
"public function buscar() {\n $buscarUsuario = new SqlQuery(); //instancio la clase\n (string) $tabla = get_class($this); //uso el nombre de la clase que debe coincidir con la BD \n try {\n $this->refControladorPersistencia->get_conexion()->beginTransaction(); //comienza la transacción\n $statement = $this->refControladorPersistencia->ejecutarSentencia(\n $buscarUsuario->buscar($tabla)); //senencia armada desde la clase SqlQuery sirve para comenzar la busqueda\n $arrayUsuario = $statement->fetchAll(PDO::FETCH_ASSOC); //retorna un array asociativo para no duplicar datos\n $this->refControladorPersistencia->get_conexion()->commit(); //si todo salió bien hace el commit\n return $arrayUsuario; //regreso el array para poder mostrar los datos en la vista... con Ajax... y dataTable de JavaScript\n } catch (PDOException $excepcionPDO) {\n echo \"<br>Error PDO: \" . $excepcionPDO->getTraceAsString() . '<br>';\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n }\n }",
"public function SalasPorId()\n{\n\tself::SetNames();\n\t$sql = \" select salas.codsala, salas.nombresala, salas.salacreada, mesas.codmesa, mesas.nombremesa, mesas.mesacreada, mesas.statusmesa FROM salas LEFT JOIN mesas ON salas.codsala = mesas.codsala where salas.codsala = ? \";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute( array(base64_decode($_GET[\"codsala\"])) );\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}",
"public function encuentra_saldo($codigo_tar){\n require_once('../procesos/auditoria.php');\n $auditar = new auditoria();\n require_once('../conexion_bd/conexion.php');\n $this->usuario=$_SESSION['usuarios'];//'[email protected]';\n $conectado = new conexion();\n $con_res = $conectado->conectar();\n if (strcmp($con_res, \"ok\") == 0) {\n echo 'Conexion exitosa todo bien ';\n \n $var = \"select a.saldo from tarjetas_recibidas a, tarjetas_por_usuarios b\n where b.codigo_targeta=a.codigo_targeta and a.codigo_targeta=\".$codigo_tar . \"and a.registrada_sistema=TRUE\";\n \n $result = mysql_query( $var );\n $auditar->insertar_auditoria($_SESSION['usuarios'], \n \"Consulta\", \"tarjetas_por_usuarios\", \"Consultando saldo de la tarjeta\");\n if ($row = mysql_fetch_array($result)) {\n $retornasaldo= $row['saldo'];\n } else {\n $retornasaldo=''; \n }\n\n mysql_free_result($result);\n $conectado->desconectar();\n return $retornasaldo;\n \n } else {\n $auditar->insertar_auditoria($_SESSION['usuarios'], \n \"Conexion\", \"Base de datos\", \"Problemas de conexion\");\n echo 'Algo anda mal';\n } \n }",
"public function GetSaldoTotalClientes()\n {\n \t$q\t=\tDoctrine_Query::create()\n \t->from('Cliente c');\n \t\n \t$cli\t=\t$q->execute();\n \t$total = 0;\n \tforeach ($cli as $c)\n \t{\n \t\t\t$saldoActual\t=\t$c->GetSaldo();\n \t\t\t$c->SaldoActual\t=\t$saldoActual;\n \t\t\t$c->save();\n\t\t\t\t\t// sumar saldo total de cada cliente\n \t\t\t$total\t+= $saldoActual;\n \t}\n \t\n \treturn $total;\n }",
"public function dameCuentas()\n\t{\n\n\t\t// if (!$mvc_bd_conexion) {\n\t\t// \tdie('No ha sido posible realizar la conexión con la base de datos: ' . mysql_error());\n\t\t// }\n\t\t// mysql_select_db(\"rhsys\", $mvc_bd_conexion);\n\n\t\t// mysql_set_charset('utf8');\n\n\t\t// $conexion2 = $mvc_bd_conexion;\n\n\t\t$sql = \"SELECT SUM(e.su_sem_efectivo ) efectivo , SUM(e.su_sem_fiscal) fiscal , p.cuenta_contable num_cuenta,p.cuenta_contable_alt num_cuenta_alt,p.cuenta_contable_nombre num_cuenta_nom, p.concepto concepto, p.centro_costos centro_costos\n\t\tFROM empleados e, puestos p\n\t\tWHERE e.puesto = p.clave AND p.cuenta_contable <> '' \n\t\tGROUP BY p.cuenta_contable\";\n\t\t$result = mysql_query($sql, $this->conexion);\n\t\t$cuentas = array();\n\t\twhile ($row = mysql_fetch_assoc($result))\n\t\t{\n\t\t $cuentas[] = $row;\n\t\t}\n\n\t\treturn $cuentas;\n\t}",
"function alta_salidas(){\n\t\t$varP=$_POST;\n\t\t$line=$this->uri->segment(4);\n\t\t$pr= new Salida();\n\t\t$pr->usuario_id=$GLOBALS['usuarioid'];\n\t\t$pr->empresas_id=$GLOBALS['empresaid'];\n\t\t$pr->espacios_fisicos_id=$GLOBALS['espacios_fisicos_id'];\n\t\t$pr->cl_facturas_id=$varP['cl_facturas_id'.$line];\n\t\t$pr->cproductos_id=$varP['producto'.$line];\n\t\t$pr->cantidad=$varP['unidades'.$line];\n\t\t$pr->costo_unitario=$varP['precio_u'.$line];\n\t\t$pr->tasa_impuesto=$varP['iva'.$line];\n\t\t//\t $pr->costo_total=($pr->cantidad * $pr->costo_unitario) * ((100+$pr->tasa_impuesto)/100);\n\t\t$pr->costo_total=$pr->cantidad * $pr->costo_unitario;\n\t\t$pr->ctipo_salida_id=1;\n\t\t$pr->estatus_general_id=2;\n\t\t$pr->cclientes_id=$this->cl_factura->get_cl_factura_salida($varP['cl_facturas_id'.$line]);\n\t\t$pr->fecha=date(\"Y-m-d H:i:s\");\n\t\tif(isset($varP['id'.$line])==true){\n\t\t\t$pr->id=$varP['id'.$line];\n\t\t}\n\t\tif($pr->save()) {\n\t\t\techo form_hidden('id'.$line, \"$pr->id\"); echo form_hidden('cl_facturas_id'.$line, \"$pr->cl_facturas_id\"); echo \"<img src=\\\"\".base_url().\"images/ok.png\\\" width=\\\"20px\\\" title=\\\"Guardado\\\"/>\";\n\t\t} else\n\t\t\tshow_error(\"\".$u->error->string);\n\n\t}",
"private function listado_obras(){\n \treturn Sesion::where(\"inicio\",\">\",Carbon::now())->distinct()->get(['nombre_obra']);\n }",
"public function Actualiza_saldo($codigo_tar,$montoTotalCompra,$saldoTarjeta){\n require_once('../conexion_bd/conexion.php');\n $this->usuario='[email protected]';\n $conectado = new conexion();\n $con_res = $conectado->conectar();\n if (strcmp($con_res, \"ok\") == 0) {\n echo 'Conexion exitosa todo bien ';\n $saldo_reemplazar= $montoTotalCompra-$saldoTarjeta;\n \n $varActualiza = \" Update tarjetas_recibidas SET saldo=\".$saldo_reemplazar.\" where codigo_targeta \".$codigo_tar .\" registrada_sistema =TRUE\";\n \n $result = mysql_query( $varActualiza );\n if ($row = mysql_fetch_array($result)) {\n $retornar= 'Listo';\n } else {\n $retornar=''; \n }\n\n mysql_free_result($result);\n $conectado->desconectar();\n return $retornar;\n \n } else {\n echo 'Algo anda mal';\n } \n }",
"public function get_list_saldo()\n\t{\n\t\t$nik = $this->input->post('nik');\n\t\t$data = $this->model_transaction->get_list_saldo($nik);\n\t\techo json_encode($data);\n\t}",
"public function BuscaAbonosCreditos() \n{\n\tself::SetNames();\n $sql = \" SELECT clientes.codcliente, clientes.cedcliente, clientes.nomcliente, ventas.idventa, ventas.codventa, ventas.totalpago, ventas.statusventa, abonoscreditos.codventa as codigo, abonoscreditos.fechaabono, SUM(montoabono) AS abonototal FROM (clientes INNER JOIN ventas ON clientes.codcliente = ventas.codcliente) LEFT JOIN abonoscreditos ON ventas.codventa = abonoscreditos.codventa WHERE clientes.cedcliente = ? AND ventas.codventa = ? AND ventas.tipopagove ='CREDITO'\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim(base64_decode($_GET['cedcliente'])));\n\t$stmt->bindValue(2, trim(base64_decode($_GET['codventa'])));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}",
"public function somarValores()\n {\n return $this->bd->sum($this->tabela, \"valor\");\n }",
"private function getTotalVendas()\n {\n return $vendas = DB::table('vendas')->where('confirmado', '=' ,'S')->sum('valor_total');\n }",
"function salva($vls){\n//sleep(2)tempo de espera de enivio da requisição;\n$mensagens = [];\n$contem_erros = false;\nif ($vls['descri'] == '') {\n\t$contem_erros = true;\n\t$mensagens['descri'] = 'A descrição está em branco';\n}\n\nif ($vls['marca'] == '') {\n\t$contem_erros = true;\n\t$mensagens['marca'] = 'A marca está em branco';\n}\nif ($vls['modelo'] == '') {\n $erros = true;\n $mensagens['modelo'] = \"O modelo esta em branco\";\n}\nif ($vls['tipov'] == '') {\n\t$contem_erros = true;\n\t$mensagens['tipov'] = 'O tipo de veículo está em branco';\n}\n\nif ($vls['quantp'] == '') {\n\t$contem_erros = true;\n\t$mensagens['quantp'] = 'A quantidade de passageiros está em branco';\n}\nif ($vls['vlvenda'] == '') {\n $erros = true;\n $mensagens['vlvenda'] = \"O valor de venda está em branco\";\n}\nif ($vls['vlcompra'] == '') {\n\t$contem_erros = true;\n\t$mensagens['vlcompra'] = 'O valor de compra está em branco';\n}\n\nif ($vls['dtcompra'] == '') {\n\t$contem_erros = true;\n\t$mensagens['dtcompra'] = 'A data de compra está em branco';\n}\nif ($vls['estato'] == '') {\n $erros = true;\n $mensagens['estato'] = \"O status do veículo esta em branco\";\n}\n if (! $contem_erros) {//se não conter erros executara o inserir\n $id = null;\n $campos = \"`id_car`, `descricao`, `marca`, `modelo`, `tipov`, `qntpass`, `vlvenda`, `vlcompra`, `datcompra`, `estato`\";\n $sql = \"INSERT INTO `carro` ($campos) VALUES (:id, :descri, :marca, :modelo, :tipov, :quantp, :vlvenda, :vlcompra, :dtcompra, :estato)\";\n $rs = $this->db->prepare($sql);\n$rs->bindParam(':id', $id , PDO::PARAM_INT);\n$rs->bindParam(':descri', $vls['descri'] , PDO::PARAM_STR);\n$rs->bindParam(':marca', $vls['marca'] , PDO::PARAM_STR);\n$rs->bindParam(':modelo', $vls['modelo'] , PDO::PARAM_STR);\n$rs->bindParam(':tipov', $vls['tipov'] , PDO::PARAM_STR);\n$rs->bindParam(':quantp', $vls['quantp'] , PDO::PARAM_STR);\n$rs->bindParam(':vlvenda', $vls['vlvenda'] , PDO::PARAM_STR);\n$rs->bindParam(':vlcompra', $vls['vlcompra'] , PDO::PARAM_STR);\n$rs->bindParam(':dtcompra', $vls['dtcompra'] , PDO::PARAM_STR);\n$rs->bindParam(':estato', $vls['estato'] , PDO::PARAM_STR);\n\n$result = $rs->execute();\n\n\nif ($result) {\n //passando vetor em forma de json\n $mensagens['sv'] = \"salvo com sucesso!\";\n \t echo json_encode([\n \t 'mensagens' => $mensagens,\n \t 'contem_erros' => false\n \t ]);//chama a funçaõ inserir na pagina acao.php\n\n }\n }else {\n\t// temos erros a corrigir\n\techo json_encode([\n\t\t'contem_erros' => true,\n\t\t'mensagens' => $mensagens\n\t]);\n}\n}",
"function leerCreditos(){\n \n try{\n $stmt = $this->dbh->prepare(\"SELECT c.idcredito, t.NombreCte,c.tipoContrato, c.montoTotal, c.plazo,c.mensualidad, c.interes,\"\n . \" c.metodoPago, c.observaciones, c.status FROM tarjetas_clientes t join credito c on t.idClienteTg=c.cteId where c.status=1 or c.status=3\");\n // Especificamos el fetch mode antes de llamar a fetch()\n $stmt->execute();\n $clientes = $stmt->fetchAll(PDO::FETCH_NUM);\n } catch (PDOException $e){\n $clientes=array(\"status\"=>\"0\",\"mensaje\"=>$e->getMessage());\n }\n \n return $clientes;\n }",
"function get_puestos(){\r\n\r\n $salida=array();\r\n if($this->controlador()->dep('datos')->tabla('cargo')->esta_cargada()){\r\n $datos = $this->controlador()->dep('datos')->tabla('cargo')->get();\r\n //recupera el nodo al que pertenece el cargo\r\n $id_nodo=$this->controlador()->dep('datos')->tabla('cargo')->get_nodo($datos['id_cargo']); \r\n if($id_nodo<>0){\r\n $salida=$this->controlador()->dep('datos')->tabla('puesto')->get_puestos($id_nodo);\r\n }\r\n }\r\n return $salida;\r\n }",
"function totalboaralla(){\n\n\t$crud = new CRUD();\n\t$crud->disconnect();\n\n\t$crud -> sql(\"select SUM(native_boar) as totalboaralla from farmers_tbl\");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['totalboaralla'];\n\t}\n\t$crud->disconnect();\n}",
"public function obtenerBeneficiados(){\n \n //obtener datos de service\n return IncorporacionService::beneficiados();\n\n }",
"public function calcSaldo($conta = null)\n {\n $saldoAnterior = 0;\n $lancamentosTable = new LancamentosTable();\n\n $whereConta = isset($conta) ? \"conta_id = {$conta}\" : \"1=1\";\n $dados = $lancamentosTable->listLancamentos(array(\n \"group\" => \" \n l.id,\n c.id,\n cc.id,\n f.id,\n f.codigo,\n l.tipo,\n l.data_lancamento, \n l.descricao,\n l.valor,\n l.saldo, \n c.conta,\n b.numero,\n c.agencia,\n cc.descricao,\n f.descricao\",\n \"order\" => \"data_lancamento,id asc\",\n \"where\" => \"{$whereConta}\",\n ));\n\n $contaLinhaAnterior = null;\n foreach ($dados as $key => $value) {\n\n\n\n $saldo = $saldoAnterior + $value['valor'];\n $saldoAnterior = $saldo;\n\n\n $dados[$key]['saldo'] = $saldo;\n\n\n #retira os alias\n unset($dados[$key]['agencia']);\n unset($dados[$key]['fluxo_codigo']);\n unset($dados[$key]['conta']);\n unset($dados[$key]['banco']);\n unset($dados[$key]['centrocusto']);\n unset($dados[$key]['fluxo']);\n\n $lancamentosTable->save($dados[$key]);\n }\n }",
"public function getCalculos() {\n\n if (count($this->aCalculos) == 0 && !empty($this->iPlanilha)) {\n\n $oDaoBensCalculo = new cl_benshistoricocalculobem();\n $sWhereCalculos = \"t58_benshistoricocalculo = {$this->iPlanilha}\";\n $sSqlBensCalculo = $oDaoBensCalculo->sql_query(null, \"benshistoricocalculobem.*, bens.*, bensdepreciacao.*\", \"t58_sequencial\", $sWhereCalculos);\n $rsBensCaculo = $oDaoBensCalculo->sql_record($sSqlBensCalculo);\n\n if ($oDaoBensCalculo->numrows > 0) {\n\n for ($iCalculo = 0; $iCalculo < $oDaoBensCalculo->numrows; $iCalculo++) {\n\n $oDadosCalculo = db_utils::fieldsMemory($rsBensCaculo, $iCalculo);\n\n $oCalculo = new CalculoBem();\n $oCalculo->setHistoricoCalculo($oDadosCalculo->t58_benshistoricocalculo);\n $oCalculo->setPercentualDepreciado($oDadosCalculo->t58_percentualdepreciado);\n $oCalculo->setSequencial($oDadosCalculo->t58_sequencial);\n $oCalculo->setTipoDepreciacao($oDadosCalculo->t58_benstipodepreciacao);\n $oCalculo->setValorAnterior($oDadosCalculo->t58_valoranterior);\n $oCalculo->setValorAtual($oDadosCalculo->t58_valoratual);\n $oCalculo->setValorCalculado($oDadosCalculo->t58_valorcalculado);\n $oCalculo->setValorResidual($oDadosCalculo->t58_valorresidual);\n $oCalculo->setValorResidualAnterior($oDadosCalculo->t58_valorresidualanterior);\n\n $oBem = new Bem();\n $oBem->setCodigoBem($oDadosCalculo->t52_bem);\n $oBem->setCodigoBemDepreciacao($oDadosCalculo->t44_sequencial);\n $oBem->setTipoDepreciacao( BemTipoDepreciacaoRepository::getPorCodigo($oDadosCalculo->t44_benstipodepreciacao) );\n $oBem->setTipoAquisicao( BemTipoAquisicaoRepository::getPorCodigo($oDadosCalculo->t44_benstipoaquisicao) );\n $oBem->setClassificacao(BemClassificacaoRepository::getPorCodigo($oDadosCalculo->t52_codcla));\n $oBem->setVidaUtil($oDadosCalculo->t44_vidautil);\n $oBem->setValorAquisicao($oDadosCalculo->t52_valaqu);\n $oBem->setValorResidual($oDadosCalculo->t44_valorresidual);\n $oBem->setValorDepreciavel($oDadosCalculo->t44_valoratual);\n $oBem->setVidaUtil($oDadosCalculo->t44_vidautil);\n $oBem->setDescricao($oDadosCalculo->t52_descr);\n\n $oCalculo->setBem($oBem);\n\n array_push($this->aCalculos, $oCalculo);\n }\n }\n\n unset($oDaoBensCalculo);\n unset($rsBensCaculo);\n }\n return $this->aCalculos;\n }",
"public function listarDocumentosSalida($CONTRATO){\n try{\n $lista=[];\n $dao=new DocumentoSalidaDAO();\n $rec1=$dao->mostrarDocumentosSalida($CONTRATO);\n $rec2=$dao->mostrarDocumentosSalidaSinFolio($CONTRATO);\n $contador=0;\n foreach($rec1 as $key => $value)\n {\n $lista[$contador]=$value;\n $contador++;\n }\n foreach($rec2 as $key => $value)\n {\n $lista[$contador]=$value;\n $contador++;\n }\n return $lista;\n } catch (Exception $e){\n throw $e;\n return -1;\n }\n }",
"public function buscar(Request $request){\n /*Listados de combobox*/\n $invernaderos= invernaderoPlantula::select('id','nombre')->orderBy('nombre', 'asc')->get();\n /*Ahi se guardaran los resultados de la busqueda*/\n $salidas=null;\n\n\n $validator = Validator::make($request->all(), [\n 'fechaInicio' => 'date_format:d/m/Y',\n 'fechaFin' => 'date_format:d/m/Y',\n //'invernadero' => 'exists:invernadero_plantula,id'\n ]);\n\n /*Si validador no falla se pueden realizar busquedas*/\n if ($validator->fails()) {\n }\n else{\n /*Busqueda sin parametros*/\n if ($request->fechaFin == \"\" && $request->fechaInicio == \"\" && $request->invernadero == \"\") {\n $salidas = salidaPlanta::orderBy('fecha', 'desc')->paginate(15);;\n\n }\n /*Pregunta si se mandaron fechas, para calcular busquedas con fechas*/\n if ( $request->fechaFin != \"\" && $request->fechaInicio !=\"\") {\n\n /*Transforma fechas en formato adecuado*/\n\n $fecha = $request->fechaInicio . \" 00:00:00\";\n $fechaInf = Carbon::createFromFormat(\"d/m/Y H:i:s\", $fecha);\n $fecha = $request->fechaFin . \" 23:59:59\";\n $fechaSup = Carbon::createFromFormat(\"d/m/Y H:i:s\", $fecha);\n\n /*Hay cuatro posibles casos de busqueda con fechas, cada if se basa en un caso */\n\n /*Solo con fechas*/\n\n $salidas = salidaPlanta::whereBetween('fecha', array($fechaInf, $fechaSup))->orderBy('fecha', 'desc')->paginate(15);;\n\n }\n }\n\n\n if($salidas!=null){\n /*Adapta el formato de fecha para poder imprimirlo en la vista adecuadamente*/\n $this->adaptaFechas($salidas);\n\n /*Si no es nulo puede contar los resultados*/\n $num = $salidas->total();\n }\n else{\n $num=0;\n }\n\n\n if($num<=0){\n Session::flash('error', 'No se encontraron resultados');\n }\n else{\n Session::flash('message', 'Se encontraron '.$num.' resultados');\n }\n /*Regresa la vista*/\n return view('Plantula/SalidaPlanta/buscar')->with([\n 'salidas'=>$salidas\n ]);\n }",
"public function getAllSbus()\n {\n $sbus = sbu::get(['id']);\n\n return $sbus;\n }",
"function mbuscar_productos_x_salida($sal_id_salida) {\n\t\t$list = array();\n\t\t$i = 0;\n\t\t$query = $this->db->query(\"\n\t\t\tSELECT \n\t\t\t sad.sad_id_salida_detalle, \n\t\t\t sad.pro_id_producto, \n\t\t\t sad.sal_id_salida, \n\t\t\t sad.sad_cantidad, \n\t\t\t sad.sad_valor, \n\t\t\t sad.sad_valor_total, \n\t\t\t p.pro_nombre, \n\t\t\t um.unm_nombre_corto \n\t\t\tFROM salida_detalle sad \n\t\t\t LEFT JOIN producto p \n\t\t\t ON sad.pro_id_producto=p.pro_id_producto \n\t\t\t LEFT JOIN unidad_medida um \n\t\t\t ON p.unm_id_unidad_medida=um.unm_id_unidad_medida \n\t\t\tWHERE sad.sal_id_salida=$sal_id_salida \n\t\t\torder by sad.sad_id_salida_detalle desc\");\n\t\tforeach ($query->result() as $row)\n\t\t{\n\t\t\t$i++;\n\t\t\t$row->nro = $i;\n\t\t\t$list[] = $row;\n\t\t}\n\t\treturn $list;\n\t}",
"public function compensablesdisponibles($cuadrante){\n $empleados = $cuadrante->empleados;\n #ver si los empleados tienes compensables pendientes.\n\n //TO DO: el objetivo sera llegar a un array con key el código de empleado y value el primer día compensable (mas adelante habrá que hacer que salgan todos los días compensables y que se pueda elegir)\n $compensablesdisponibles = [];\n\n // $compensablesdisponibles = DB::table('compensables')\n // ->join()\n\n}",
"function listarCuentaBancaria(){\n\t\t$this->procedimiento='sigep.ft_cuenta_bancaria_sel';\n\t\t$this->transaccion='SIGEP_CUEN_BAN_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cuenta_bancaria','int4');\n\t\t$this->captura('id_cuenta_bancaria_boa','int4');\n\t\t$this->captura('banco','int4');\n\t\t$this->captura('cuenta','varchar');\n\t\t$this->captura('desc_cuenta','varchar');\n\t\t$this->captura('moneda','int4');\n\t\t$this->captura('tipo_cuenta','bpchar');\n\t\t$this->captura('estado_cuenta','bpchar');\n\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('desc_cuenta_banco','varchar');\n\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}",
"public function salons()\n {\n return $this->hasMany(Salon::class);\n }",
"static public function mdlMostrarSalidasCabecera($valor){\n\n\t\tif($valor == null){\n\n\t\t\t$sql=\"SELECT\n\t\t\t\tt.id,\n\t\t\t\tt.codigo,\n\t\t\t\tc.codigo AS cod_cli,\n\t\t\t\tc.nombre,\n\t\t\t\tc.tipo_documento,\n\t\t\t\tc.documento,\n\t\t\t\tt.lista,\n\t\t\t\tt.vendedor,\n\t\t\t\tt.op_gravada,\n\t\t\t\tt.descuento_total,\n\t\t\t\tt.sub_total,\n\t\t\t\tt.igv,\n\t\t\t\tt.total,\n\t\t\t\tROUND(\n\t\t\t\tt.descuento_total / t.op_gravada * 100,\n\t\t\t\t2\n\t\t\t\t) AS dscto,\n\t\t\t\tt.condicion_venta,\n\t\t\t\tcv.descripcion,\n\t\t\t\tt.estado,\n\t\t\t\tt.usuario,\n\t\t\t\tt.agencia,\n\t\t\t\tu.nombre AS nom_usu,\n\t\t\t\tDATE(t.fecha) AS fecha,\n\t\t\t\tcv.dias,\n\t\t\t\tDATE_ADD(DATE(t.fecha), INTERVAL cv.dias DAY) AS fecha_ven\n\t\t\tFROM\n\t\t\t\ting_sal t\n\t\t\t\tLEFT JOIN clientesjf c\n\t\t\t\tON t.cliente = c.id\n\t\t\t\tLEFT JOIN condiciones_ventajf cv\n\t\t\t\tON t.condicion_venta = cv.id\n\t\t\t\tLEFT JOIN usuariosjf u\n\t\t\t\tON t.usuario = u.id\n\t\t\tWHERE t.estado = 'generado'\n\t\t\tORDER BY fecha DESC\";\n\n\t\t$stmt=Conexion::conectar()->prepare($sql);\n\n\t\t$stmt->execute();\n\n\t\treturn $stmt->fetchAll();\n\n\t\t}else{\n\n\t\t\t$sql=\"SELECT\n\t\t\t\t\tt.id,\n\t\t\t\t\tt.codigo,\n\t\t\t\t\tc.codigo AS cod_cli,\n\t\t\t\t\tc.nombre,\n\t\t\t\t\tc.tipo_documento,\n\t\t\t\t\tc.documento,\n\t\t\t\t\tt.lista,\n\t\t\t\t\tt.vendedor,\n\t\t\t\t\tt.op_gravada,\n\t\t\t\t\tt.descuento_total,\n\t\t\t\t\tt.sub_total,\n\t\t\t\t\tt.igv,\n\t\t\t\t\tt.total,\n\t\t\t\t\tROUND(\n\t\t\t\t\tt.descuento_total / t.op_gravada * 100,\n\t\t\t\t\t2\n\t\t\t\t\t) AS dscto,\n\t\t\t\t\tt.condicion_venta,\n\t\t\t\t\tcv.descripcion,\n\t\t\t\t\tt.estado,\n\t\t\t\t\tt.usuario,\n\t\t\t\t\tt.agencia,\n\t\t\t\t\tu.nombre AS nom_usu,\n\t\t\t\t\tDATE(t.fecha) AS fecha,\n\t\t\t\t\tcv.dias,\n\t\t\t\t\tDATE_ADD(DATE(t.fecha), INTERVAL cv.dias DAY) AS fecha_ven\n\t\t\t\tFROM\n\t\t\t\t\ting_sal t\n\t\t\t\t\tLEFT JOIN clientesjf c\n\t\t\t\t\tON t.cliente = c.id\n\t\t\t\t\tLEFT JOIN condiciones_ventajf cv\n\t\t\t\t\tON t.condicion_venta = cv.id\n\t\t\t\t\tLEFT JOIN usuariosjf u\n\t\t\t\t\tON t.usuario = u.id\n\t\t\t\tWHERE t.codigo = $valor\";\n\n\t\t$stmt=Conexion::conectar()->prepare($sql);\n\n\t\t$stmt->execute();\n\n\t\treturn $stmt->fetch();\n\n\t\t}\n\n\t\t$stmt=null;\n\n\t}",
"public function getSalts(): array\n {\n $generator = new Generator(new Factory);\n $salts['AUTH_KEY'] = $generator->salt();\n $salts['SECURE_AUTH_KEY'] = $generator->salt();\n $salts['LOGGED_IN_KEY'] = $generator->salt();\n $salts['NONCE_KEY'] = $generator->salt();\n $salts['AUTH_SALT'] = $generator->salt();\n $salts['SECURE_AUTH_SALT'] = $generator->salt();\n $salts['LOGGED_IN_SALT'] = $generator->salt();\n $salts['NONCE_SALT'] = $generator->salt();\n return $salts;\n }",
"function getTipoEditalBolsa($tipoBolsa,$anoBolsa){\r\n\t\t$fOferta= new fachada_oferta();\r\n\t\t$vetDados=$fOferta->getTipoEditalBolsa($tipoBolsa,$anoBolsa);\r\n\t\treturn $vetDados;\r\n\t}",
"public function busca_alunos(){\n\n\t\t\t$sql = \"SELECT * FROM aluno\";\n\n\t\t\t/*\n\t\t\t*isntrução que realiza a consulta de animes\n\t\t\t*PDO::FETCH_CLASS serve para perdir o retorno no modelo de uma classe\n\t\t\t*PDO::FETCH_PROPS_LATE serve para preencher os valores depois de executar o contrutor\n\t\t\t*/\n\n\t\t\t$resultado = $this->conexao->query($sql, PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, 'Aluno');\n\n $alunos = [];\n\n foreach($resultado as $aluno){\n $alunos[] = $aluno;\n }\n\n \t\t\treturn $alunos;\n\t\t}",
"function listarCuentaBancaria(){\n\t\t$this->procedimiento='tes.f_cuenta_bancaria_sel';\n\t\t$this->transaccion='TES_CTABAN_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cuenta_bancaria','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('fecha_baja','date');\n\t\t$this->captura('nro_cuenta','varchar');\n\t\t$this->captura('fecha_alta','date');\n\t\t$this->captura('id_institucion','int4');\n\t\t$this->captura('nombre_institucion','varchar');\n\t\t$this->captura('doc_id','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('id_moneda','integer');\n\t\t$this->captura('codigo_moneda','varchar');\n\t\t$this->captura('denominacion','varchar');\n\t\t$this->captura('centro','varchar');\n\t\t\n\t\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}",
"public function gerarDados() {\n \n if (empty($this->sDataInicial)) {\n throw new Exception(\"Data inicial nao informada!\");\n }\n \n if (empty($this->sDataFinal)) {\n throw new Exception(\"Data final não informada!\");\n }\n /**\n * Separamos a data do em ano, mes, dia\n */\n list($iAno, $iMes, $iDia) = explode(\"-\",$this->sDataFinal);\n \n $oInstituicao = db_stdClass::getDadosInstit(db_getsession(\"DB_instit\"));\n $sListaInstit = db_getsession(\"DB_instit\");\n $sWhere = \"o70_instit in ({$sListaInstit})\";\n $iAnoUsu = (db_getsession(\"DB_anousu\")-1);\n $sDataIni = $iAnoUsu.\"-01-01\";\n $sDataFim = $iAnoUsu.\"-12-31\";\n $sSqlBalAnterior = db_receitasaldo(11, 1, 3, true, $sWhere, $iAnoUsu, $sDataIni, $sDataFim, true);\n \n $sSqlAgrupado = \"select case when fc_conplano_grupo($iAnoUsu, substr(o57_fonte,1,1) || '%', 9000 ) is false \"; \n $sSqlAgrupado .= \" then substr(o57_fonte,2,14) else substr(o57_fonte,1,15) end as o57_fonte, \";\n $sSqlAgrupado .= \" o57_descr, \";\n $sSqlAgrupado .= \" saldo_inicial, \";\n $sSqlAgrupado .= \" saldo_arrecadado_acumulado, \"; \n $sSqlAgrupado .= \" x.o70_codigo, \";\n $sSqlAgrupado .= \" x.o70_codrec, \";\n $sSqlAgrupado .= \" coalesce(o70_instit,0) as o70_instit, \";\n $sSqlAgrupado .= \" fc_nivel_plano2005(x.o57_fonte) as nivel \"; \n $sSqlAgrupado .= \" from ({$sSqlBalAnterior}) as x \";\n $sSqlAgrupado .= \" left join orcreceita on orcreceita.o70_codrec = x.o70_codrec and o70_anousu={$iAnoUsu} \";\n $sSqlAgrupado .= \" order by o57_fonte \"; \n $rsBalancete = db_query($sSqlAgrupado);\n $iTotalLinhas = pg_num_rows($rsBalancete);\n for ($i = 1; $i < $iTotalLinhas; $i++) {\n \n $oReceita = db_utils::fieldsMemory($rsBalancete, $i);\n $sDiaMesAno = \"{$iAno}-\".str_pad($iMes, 2, \"0\", STR_PAD_LEFT).\"-\".str_pad($iDia, 2, \"0\", STR_PAD_LEFT);\n \n $oReceitaRetorno = new stdClass();\n \n $oReceitaRetorno->braCodigoEntidade = str_pad($this->iCodigoTCE, 4, \"0\", STR_PAD_LEFT);\n $oReceitaRetorno->braMesAnoMovimento = $sDiaMesAno;\n $oReceitaRetorno->braContaReceita = str_pad($oReceita->o57_fonte, 20, 0, STR_PAD_RIGHT);\n $oReceitaRetorno->braCodigoOrgaoUnidadeOrcamentaria = str_pad($oInstituicao->codtrib, 4, \"0\", STR_PAD_LEFT);\n $nSaldoInicial = $oReceita->saldo_inicial;\n $oReceita->saldo_inicial = str_pad(number_format(abs($oReceita->saldo_inicial),2,\".\",\"\"), 13,'0', STR_PAD_LEFT);\n $oReceitaRetorno->braValorReceitaOrcada = $oReceita->saldo_inicial;\n $oReceita->saldo_arrecadado_acumulado = str_pad(number_format(abs($oReceita->saldo_arrecadado_acumulado) \n ,2,\".\",\"\"), 12,'0', STR_PAD_LEFT);\n $oReceitaRetorno->braValorReceitaRealizada = $oReceita->saldo_arrecadado_acumulado;\n $oReceitaRetorno->braCodigoRecursoVinculado = str_pad($oReceita->o70_codigo, 4, \"0\", STR_PAD_LEFT); \n $oReceitaRetorno->braDescricaoContaReceita = substr($oReceita->o57_descr, 0, 255); \n $oReceitaRetorno->braTipoNivelConta = ($oReceita->o70_codrec==0?'S':'A'); \n $oReceitaRetorno->braNumeroNivelContaReceita = $oReceita->nivel;\n $this->aDados[] = $oReceitaRetorno; \n }\n return true;\n }",
"public function GuardarListaProductosPedido($arrayDataProductos){\r\n DB::beginTransaction();\r\n try {\r\n $precioTotal = 0;\r\n $cantidadTotal = 0;\r\n $descuentoTotal = 0;\r\n if($arrayDataProductos[0]->EsEditar == 'true')// se pregunta si lo que se va a guardar es desde la vista de la edición\r\n {\r\n Detalle::where('Factura_id','=',$arrayDataProductos[0]->Factura_id)->delete();\r\n }\r\n foreach ($arrayDataProductos as $productoDetalle){\r\n $producto= Producto::find($productoDetalle->Producto_id);\r\n $esPrincipal = $this->productoRepositorio->EsProductoPrincipal($productoDetalle->Producto_id);\r\n if($esPrincipal)\r\n {\r\n $cantidadDisponible =$this->productoRepositorio->ObtenerProductoProveedorIdproducto($productoDetalle->Producto_id)->Cantidad;\r\n if($cantidadDisponible < $productoDetalle->Cantidad)\r\n {\r\n return [\"SinExistencia\"=>true,\"producto\"=>$producto->Nombre,\"cantidad\"=>$cantidadDisponible];\r\n }\r\n\r\n $cantidadInventario = ($cantidadDisponible-$productoDetalle->Cantidad);\r\n ProductoPorProveedor::where('Producto_id','=',$productoDetalle->Producto_id)->update(array('Cantidad' => $cantidadInventario));\r\n }\r\n else\r\n {\r\n $productoPrincipalId = $this->productoRepositorio->ObtenerProductoEquivalencia($productoDetalle->Producto_id)->ProductoPrincipal_id;\r\n $cantidadEquivalencia = $this->productoRepositorio->ObtenerProductoEquivalencia($productoDetalle->Producto_id)->Cantidad;\r\n $cantidadDisponible =$this->productoRepositorio->ObtenerProductoProveedorIdproducto($productoPrincipalId)->Cantidad;\r\n $cantidadDisponibleEquivalente = ($productoDetalle->Cantidad * $cantidadEquivalencia);\r\n if($cantidadDisponible < $cantidadDisponibleEquivalente)\r\n {\r\n return [\"SinExistencia\"=>true,\"producto\"=>$producto->Nombre,\"cantidad\"=>($cantidadDisponible/$cantidadEquivalencia)];\r\n }\r\n\r\n $cantidadInventario = ($cantidadDisponible - $cantidadDisponibleEquivalente);\r\n ProductoPorProveedor::where('Producto_id','=',$productoPrincipalId)->update(array('Cantidad' => $cantidadInventario));\r\n $cantidadDisponibleSecundario =$this->productoRepositorio->ObtenerProductoProveedorIdproducto($productoDetalle->Producto_id)->Cantidad;\r\n $cantidadInventarioSecundario = ($cantidadDisponibleSecundario-$productoDetalle->Cantidad);\r\n ProductoPorProveedor::where('Producto_id','=',$productoDetalle->Producto_id)->update(array('Cantidad' => $cantidadInventarioSecundario));\r\n }\r\n\r\n $productoPedido = new Detalle();\r\n $productoPedido->Producto_id = $productoDetalle->Producto_id;\r\n $productoPedido->Factura_id = $productoDetalle->Factura_id;\r\n $productoPedido->Cantidad = $productoDetalle->Cantidad;\r\n $productoPedido->Comentario = $productoDetalle->Comentario;\r\n $productoPedido->Descuento = 0;\r\n $productoPedido ->SubTotal = $productoDetalle->Cantidad * $producto->Precio;\r\n $productoPedido->save();\r\n $precioTotal = $precioTotal + $productoPedido->SubTotal;\r\n $cantidadTotal = $cantidadTotal + $productoPedido->Cantidad;\r\n $descuentoTotal = $descuentoTotal + $productoPedido->Descuento;\r\n\r\n\r\n }\r\n DB::commit();\r\n Factura::where('id','=',$productoDetalle->Factura_id)->update(array('VentaTotal' => $precioTotal, 'CantidadTotal' => $cantidadTotal ));\r\n return [\"Respuesta\"=>true,\"PrecioTotal\"=>$precioTotal];\r\n } catch (\\Exception $e) {\r\n $error = $e->getMessage();\r\n DB::rollback();\r\n return $error;\r\n }\r\n }",
"public function get_Banco(){\r\n $conectar=parent::conexion();\r\n parent::set_names();\r\n $sql=\"select * from banco;\";\r\n $sql=$conectar->prepare($sql);\r\n $sql->execute();\r\n return $resultado=$sql->fetchAll(PDO::FETCH_ASSOC);\r\n }",
"public static function getSaldo($id , $format=true){\r\n\t\t\t$sum = Yii::app()->db->createCommand(\"SELECT IFNULL(SUM(total),0) as total FROM tbl_balance WHERE user_id=\".$id \r\n .\" and tipo not in (5, 7, 8)\")->queryScalar();\r\n\t\t\t//$sum= Yii::app()->numberFormatter->formatCurrency($sum, '');\r\n\t\t\treturn $sum;\r\n\t}",
"public function SumarCarteraCreditos() \n{\n\tself::SetNames();\n\t$sql = \"select\n(select SUM(totalpago) from ventas WHERE tipopagove = 'CREDITO') as totaldebe,\n(select SUM(montoabono) from abonoscreditos) as totalabono\";\n//$sql =\"SELECT SUM(ventas.totalpago) as totaldebe, SUM(abonoscreditos.montoabono) FROM ventas, abonoscreditos WHERE ventas.tipopagove = 'CREDITO'\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}",
"public function getSaldo()\n {\n return number_format(floatval($this->saldo),2);\n }",
"private function fefo($insumo, $insumoMovimientos){\n\n\t\t$lotes = Lote::where('insumo', $insumo)\n\t\t\t\t\t\t ->where('deposito', Auth::user()->deposito)\n\t\t\t\t\t\t ->where('cantidad', '>', 0)\n\t\t\t\t\t\t ->orderBy('vencimiento')\n\t\t\t\t\t\t ->orderBy('id')\n\t\t\t\t\t\t ->get();\n\t\t$movimientos = [];\n\n\t\t$withLotes = $this->filterInsumosLote($insumoMovimientos);\n\t\t$withoutLotes = $this->filterInsumosLote($insumoMovimientos,false);\n\n\n\t\tif( !empty($withLotes) ){\n\n\t\t\tforeach ($withLotes as $movimiento) {\n\n\t\t\t\t$lotes = $lotes->each(function ($lote) use ($movimiento){\n\n\t\t\t\t if ($lote->codigo == $movimiento['lote']) {\n\t\t\t\t $lote->cantidad -= $movimiento['despachado'];\n\t\t\t\t \tfalse;\n\t\t\t\t }\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t$movimientos = $withLotes;\n\t\t}\n\n\t\tforeach ($withoutLotes as $movimiento)\n\t\t{\n\t\t\t$cantidad = $movimiento['despachado'];\n\n\t\t\twhile( $cantidad > 0){\n\n\t\t\t\t$lote = $lotes->first(function ($key,$lote) {\n\t\t\t\t return $lote['cantidad'] > 0;\n\t\t\t\t});\n\n\t\t\t\tif( $lote->cantidad < $cantidad ){\n\n\t\t\t\t\t$cantidad -= $lote->cantidad;\n\t\t\t\t\t$saldo = $lote->cantidad;\n\t\t\t\t\t$lote->cantidad = 0;\n\t\t\t\t}\n\t\t\t\telse{\n\n\t\t\t\t\t$lote->cantidad -= $cantidad;\n\t\t\t\t\t$saldo = $cantidad;\n\t\t\t\t\t$cantidad = 0;\n\t\t\t\t}\n\n\t\t\t\t$movimiento['lote'] = $lote->codigo;\n\t\t\t\t$movimiento['despachado'] = $saldo;\n\n\t\t\t\tarray_push($movimientos, $movimiento);\n\t\t\t}\n\t\t}\n\n\t\treturn $movimientos;\n\t}",
"function sobreMeSalvar() {\n \n $usuario = new Estado_pessoal();\n $api = new ApiUsuario();\n $usuario->codgusuario = $_SESSION['unia']->codgusario;\n $this->dados = $api->Listar_detalhe_usuario($usuario);\n if (empty($this->dados->codgusuario) && $this->dados->codgusuario == NULL) {\n \n $this->dados = array('dados'=>$api->Insert_sobreMe(new Estado_pessoal ('POST')) );\n header(\"Location:\" .APP_ADMIN.'usuario/detalhe_usuario');\n } else {\n $this->dados = array('dados'=>$api->Actualizar_sobreMe(new Estado_pessoal ('POST')) );\n header(\"Location:\" .APP_ADMIN.'usuario/detalhe_usuario');\n }\n \n }",
"public function _listTotalBoleta2Date() {\n $db = new SuperDataBase();\n $pkEmpresa = UserLogin::get_pkSucursal();\n $query = \"CALL sp_get_listboleta('$this->dateGO','$this->dateEnd','$pkEmpresa')\";\n $resul = $db->executeQuery($query);\n\n $array = array();\n $total = 0;\n\n while ($row = $db->fecth_array($resul)) {\n $array[] = array(\"pkComprobante\" => $row['ncomprobante'],\n \"total\" => $row['total'],\n \"ruc\" => $row['ruc'],\n \"subTotal\" => $row['subTotal'],\n \"impuesto\" => $row['impuesto'],\n \"totalEfectivo\" => $row['totalEfectivo'],\n \"totalTarjeta\" => $row['totalTarjeta'],\n \"nombreTarjeta\" => $row['nombreTarjeta'],\n \"fecha\" => $row['fecha'],\n \"pkCajero\" => $row['pkCajero'],\n \"descuento\" => $row['descuento'],\n \"pkCliente\" => $row['pkCliente'],\n \"Nombre_Trabajador\" => $row['Nombre_Trabajador'],\n );\n// $total=$total+$row['total_venta'];\n }\n// $array[]= array('Total')\n// echo $query;\n echo json_encode($array);\n }",
"public function falarComSabedoria($palavras){\n\t\techo $palavras;\n\t}",
"protected function salvarDadosCedente() {\n\n $oDaoBensCedente = new cl_benscedente();\n if (!empty($this->oCedente)) {\n\n $oDaoBensCedente->excluir(null, \" t09_bem = {$this->iCodigoBem} \");\n $oDaoBensCedente->t09_bem = $this->iCodigoBem;\n $oDaoBensCedente->t09_benscadcedente = $this->oCedente->getCodigo();\n $oDaoBensCedente->incluir(null);\n if ($oDaoBensCedente->erro_status == 0) {\n throw new Exception(_M('patrimonial.patrimonio.Bem.erro_salvar_dados_cedente'));\n }\n }\n }",
"function contarCreditos($espacios){\r\n $creditos=0;\r\n if(is_array($espacios)){\r\n foreach ($espacios as $espacio) {\r\n $creditos = $creditos + $espacio['CREDITOS'];\r\n }\r\n }\r\n return $creditos;\r\n }",
"public function devuelve_secciones(){\n \n $sql = \"SELECT * FROM secciones ORDER BY nombre\";\n $resultado = $this -> db -> query($sql); \n return $resultado -> result_array(); // Obtener el array\n }",
"public function costo_suaje($proceso) {\n\n $sql = \"SELECT * from proc_suaje where status = 'A' and nombre = '\" . $proceso . \"'\";\n\n $query = $this->db->prepare($sql);\n $query->execute();\n\n $result = array();\n\n while ($row = $query->fetch(PDO::FETCH_ASSOC)) {\n\n $result[] = $row;\n }\n\n return $result;\n }",
"function bancos($periodo,$ejer,$moneda){\n\t\t\t$sql=$this->query(\"select m.IdPoliza,m.Cuenta,sum(m.Importe) importe,m.TipoMovto,c.description,p.relacionExt,p.concepto\n\t\t\tfrom cont_movimientos m,cont_polizas p,cont_accounts c,cont_config conf\n\t\t\twhere m.cuenta=c.account_id and c.currency_id=\".$moneda.\" and p.idejercicio=\".$ejer.\" and c.`main_father`=conf.CuentaBancos and p.idtipopoliza!=3\n\t\t\tand m.IdPoliza=p.id and p.idperiodo in (\".$periodo.\",\".($periodo-=1).\") and p.activo=1 and m.Activo=1\n\t\t\tgroup by m.Cuenta,m.TipoMovto\");\n\t\t\treturn $sql;\n\t\t}",
"public function todos(){\n $salon = salon::select(\"id\",\"nombre\",\"precio\")->where(\"estado\",\"=\",\"activo\")->get();\n return ['data' => $salon];\n }",
"function ObtenerTotales($id_factura) {\n $query=\"SELECT SUM(total) total, SUM(valorseguro) total_seguro\nFROM \".Guia::$table.\" WHERE idfactura=$id_factura\";\n return DBManager::execute($query);\n }",
"public static function Consultar( $sabor, $tipo )\n {\n $retorno = NULL;\n\n $hay = FALSE;\n $haySaborSolo = FALSE;\n $hayTipoSolo = FALSE;\n\n //Leo el archivo guardado.\n $listado = Helado::LeerArchivo();\n\n //Recorro el listado.\n foreach( $listado as $key=>$helado )\n {\n //Comparo sabor y tipo.\n if( strcmp( $sabor, $helado[0])==0 && strcmp( $tipo, $helado[1] )==0)\n {\n $hay = TRUE;\n $retorno = $helado;\n $retorno[] = $key;\n break;\n }\n\n //Comparo sabor solo.\n if( strcmp( $sabor, $helado[0])==0 )\n {\n $haySaborSolo = TRUE;\n }\n\n //Comparo tipo solo.\n if( strcmp( $tipo, $helado[1] )==0 )\n {\n $hayTipoSolo = TRUE;\n }\n }\n\n //\n if( $hay )\n {\n echo \"Si hay ese sabor y gusto\\r\\n\";\n }\n else\n {\n if( $haySaborSolo )\n {\n echo \"Hay helado del sabor \".$sabor.\" pero no del tipo \".$tipo.\"\\r\\n\";\n }\n else\n {\n if( $hayTipoSolo )\n {\n echo \"Hay helado del tipo \".$tipo.\" pero no del sabor \".$sabor.\"\\r\\n\";\n }\n else\n {\n echo \"No hay ese sabor ni ese tipo\\r\\n\";\n }\n }\n }\n\n return $retorno;\n \n }",
"public function testSaldoFinalDeSuprimentosDeFundosDoAtivoIgualAosControlesAComprovarEAAprovar() {\n $filterAtivo = function (array $line): bool {\n if (str_starts_with($line['conta_contabil'], '1.1.3.1.1.02') && $line['escrituracao'] === 'S') {\n return true;\n }\n return false;\n };\n $saldoDevedorAtivo = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_debito', $filterAtivo);\n $saldoCredorAtivo = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_credito', $filterAtivo);\n\n $filterAComprovar = function (array $line): bool {\n if (str_starts_with($line['conta_contabil'], '8.9.1.2.1.01') && $line['escrituracao'] === 'S') {\n return true;\n }\n return false;\n };\n $saldoDevedorAComprovar = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_debito', $filterAComprovar);\n $saldoCredorAComprovar = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_credito', $filterAComprovar);\n\n $filterAAprovar = function (array $line): bool {\n if (str_starts_with($line['conta_contabil'], '8.9.1.2.1.02') && $line['escrituracao'] === 'S') {\n return true;\n }\n return false;\n };\n $saldoDevedorAAprovar = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_debito', $filterAAprovar);\n $saldoCredorAAprovar = $this->somaColuna($this->getDataFrame('BAL_VER'), 'saldo_atual_credito', $filterAAprovar);\n\n $this->comparar(($saldoDevedorAtivo - $saldoCredorAtivo), (($saldoCredorAComprovar - $saldoDevedorAComprovar) + ($saldoCredorAAprovar - $saldoDevedorAAprovar)));\n\n $this->saldoVerificado(__METHOD__, '1.1.3.1.1.02', '8.9.1.2.1.01', '8.9.1.2.1.02');\n }",
"function get_all_produto_solicitacao_baixa_estoque()\n {\n \n $this->db->select('baixa.di,baixa.quantidade, u.nome_usuario,produto.nome as produto');\n $this->db->join('usuario u ','u.id = baixa.usuario_id');\n $this->db->join('produto','produto.id = baixa.produto_id');\n\n return $this->db->get('produto_solicitacao_baixa_estoque baixa')->result_array();\n }",
"public function BuscarCreditosFechas() \n{\n\tself::SetNames();\n\t$sql =\"SELECT \n\tventas.idventa, ventas.codventa, ventas.totalpago, ventas.fechavencecredito, ventas.statusventa, ventas.fechaventa, abonoscreditos.fechaabono, SUM(abonoscreditos.montoabono) as abonototal, clientes.codcliente, clientes.cedcliente, clientes.nomcliente, clientes.tlfcliente, clientes.emailcliente, cajas.nrocaja\n\tFROM\n\t(ventas LEFT JOIN abonoscreditos ON ventas.codventa=abonoscreditos.codventa) LEFT JOIN clientes ON \n\tclientes.codcliente=ventas.codcliente LEFT JOIN cajas ON ventas.codcaja = cajas.codcaja WHERE DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') >= ? AND DATE_FORMAT(ventas.fechaventa,'%Y-%m-%d') <= ? AND ventas.tipopagove ='CREDITO' GROUP BY ventas.codventa\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim(date(\"Y-m-d\",strtotime($_GET['desde']))));\n\t$stmt->bindValue(2, trim(date(\"Y-m-d\",strtotime($_GET['hasta']))));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"<div class='alert alert-danger'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>\";\n\t\techo \"<center><span class='fa fa-info-circle'></span> NO EXISTEN CREDITOS DE VENTAS PARA EL RANGO DE FECHA INGRESADO</center>\";\n\t\techo \"</div>\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}",
"function listarCuentaBancariaUsuario(){\n\t\t$this->procedimiento='tes.f_cuenta_bancaria_sel';\n\t\t$this->transaccion='TES_USRCTABAN_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('permiso','permiso','varchar');\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_cuenta_bancaria','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('fecha_baja','date');\n\t\t$this->captura('nro_cuenta','varchar');\n\t\t$this->captura('fecha_alta','date');\n\t\t$this->captura('id_institucion','int4');\n\t\t$this->captura('nombre_institucion','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t$this->captura('id_moneda','integer');\n\t\t$this->captura('codigo_moneda','varchar');\n\t\t$this->captura('denominacion','varchar');\n\t\t$this->captura('centro','varchar');\n\t\t$this->captura('id_finalidads','varchar');\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}",
"public function buscarInstrucoesDoBoleto($arrDados)\n {\n\n\t\t$db = new Database();\n\t\t$arrRetorno = array();\n\t\t$strSQL = '';\n\t\t$this->instrucoes = array('');\n\t\tif($this->status != 'Atrasado'){\n\t\t \n\t\t $desc = $this->desconto;\n\t\t $desc = str_replace(',','.',$desc);\n\t\t \n\t\t // if((float)$desc > 0){\n\t\t // $this->instrucoes[] = 'At� o vencimento, desconto de '.String::formataMoeda($this->desconto); \n\t\t // }\n\t\t\t\n\t\t\t//$this->instrucoes[] = utf8_decode('Em qualquer banco at� o vencimento');\n\t\t\t\n\t\t\t$strSQL = \"SELECT ecm.PERCENTUAL AS ind_multa,\n\t\t\t\t\t\teci.PROPORCIONAL AS ind_comissao,\n\t\t\t\t\t\teci.DATAVIGOR\n\t\t\t\t\t\tFROM GVDASA.FIN_ESTRUTURCORRECAO ec\n\t\t\t\t\t\tINNER JOIN GVDASA.FIN_TIPOTITULO tti ON tti.CODIGOESTRUTURACORRECAO = ec.CODIGOESTRUTURACORRECAO\n\t\t\t\t\t\tINNER JOIN GVDASA.FIN_TITULO titu ON tti.CODIGOTIPOTITULO = titu.CODIGOTIPOTITULO\n\t\t\t\t\t\tINNER JOIN GVDASA.FIN_ESTRMULTA ecm ON ecm.CODIGOESTRUTURACORRECAO = ec.CODIGOESTRUTURACORRECAO\n\t\t\t\t\t\tINNER JOIN GVDASA.FIN_ESTRINDICE eci ON eci.CODIGOESTRUTURACORRECAO = ec.CODIGOESTRUTURACORRECAO\n\t\t\t\t\t\twhere titu.CODIGOTITULO = \".$arrDados['TITULO'];\n\t\t\t// Executa a consulta\n\t\t\t$arrRetorno = $db->querySqlServer($strSQL,'consultar','fetchRow');\n\n\t\t\t$valorMulta = number_format((($this->valor * (int)$arrRetorno['ind_multa']) / 100),2); \n\t\t\t$jurosDiario = number_format(((((int)$arrRetorno['ind_comissao']/30) * $this->valor)/100),2);\n\t\t\t\n\t\t\t// Monta mensagem a ser enviada\n\t\t\t$msg = \"Após vencimento cobrar multa de R$ \".$valorMulta.\" + juros diário de R$ \".$jurosDiario.\" + IGPM\";\n\t\t\t$msg .= \"<br>\";\n\t\t\t$msg .= \"Este título está disponível no portal acadêmico, acesse https://portal.unilasalle.edu.br\";\n\t\t\t$msg .= \"<br>\";\n\t\t\t$msg .= \"Pelo portal acadêmico efetue a emissão e atualização do boleto. Maiores informações (51) 3476-8500\";\n\t\t\t$msg .= \"<br>\";\n\t\t\t$msg .= \"Sr CAIXA não aceitar este título após \".$arrDados['DATA_LIMITE_PAG'];\n\t\t\t//$msg = utf8_decode($msg);\n\t\t\t// Insere no Array\n\t\t\tarray_push($this->instrucoes,$msg);\n\t\t}\n\n\t\tif($this->status == 'Atrasado'){\n\t\t\t// Monta mensagem a ser enviada\n\t\t\t$msg = \"Não receber após \".$this->dataVencimento->format('d/m/Y');\n\t\t\t$msg .= \"<br>\";\n\t\t\t$msg .= \"Vencimento original: \".$this->vencimentoParcela->format('d/m/Y');\n\t\t\t//$msg = utf8_decode($msg);\n\t\t\t// Insere no Array\n\t\t\tarray_push($this->instrucoes,$msg);\n\t\t}\t\n\t}",
"public function buscarBancos() {\r\n return $this->find(\"b_estatus = 'activa'\");\r\n }",
"public function getSoalByBanksoalAll(Banksoal $banksoal)\n {\n $soal = Soal::with('jawabans')->where('banksoal_id',$banksoal->id)->get();\n return SendResponse::acceptData($soal);\n }",
"public function getDadosBaixa() {\n return $this->oDadosBaixa;\n }",
"function dadosCadastros(){//função geral que será chamada na index\n pegaCadastrosJson();//pega os valores dos cadastros do arquivo JSON e salva em um array\n contaNumeroCadastros();//conta Quantos cadastros existem\n }",
"function listaTodasMembroPorsexoDao($sexo){\r\n require_once (\"conexao.php\");\r\n require_once (\"modelo/objetoMembro.php\");\r\n \r\n $objDao = Connection::getInstance();\r\n \r\n $resultado = mysql_query(\"Select Matricula,Nome from membros where Sexo = '$sexo' order by Nome\") or die (\"Nao foi possivel realizar a busca\".mysql_error());\r\n \r\n $listaMembro = array();\r\n \r\n $i=0;\r\n \r\n \r\n while ($registro = mysql_fetch_assoc($resultado)){\r\n \r\n if($registro[\"Nome\"] != \"\"){\r\n \r\n\t $membro = new objetoMembro();\r\n \r\n $membro->setMatricula($registro['Matricula']);\r\n $membro->setNome($registro['Nome']);\r\n \r\n\t $listaMembro[$i] = $membro;\r\n\t}\r\n $i++;\r\n }\r\n\t\treturn $listaMembro;\r\n\t\tmysql_free_result($resultado);\r\n $objDao->freebanco();\r\n }",
"public function todosLosEstados(){\r\n $arraySolicitudes =$this->controlDelivery->getSolicitudesDelivery();\r\n return $arraySolicitudes;\r\n }",
"function balanceoCanales($canales){\n $id_carga=id_carga::where('estado',1)->where('estado_aprobado',1)->where('ejecucion',1)->get();\n if ($id_carga->count() > 1) {\n $total_canales = 0;\n foreach ($id_carga as $k) {\n echo \"\\nid_carga \" . $k->id_carga;\n $total_canales = $total_canales + $k->canales;\n if ($total_canales > $canales->canales) {\n $k->canales = 0;\n $k->save();\n }\n }\n\n echo \"\\ntotal canales de los id_carga: \" . $total_canales;\n echo \"\\ntotal canales disponibles para ivrs: \" . $canales->canales;\n echo \"\\ntotal id_carga: \" . $id_carga->count();\n\n\n //comentar solo para peru desde ecuador\n foreach ($id_carga as $k) {\n if (intval($k->canales) > 0 && intval($k->canales) < 10) {\n $k->canales = 0;\n $k->save();\n }\n }\n //comentar solo para peru desde ecuador\n\n if ($total_canales == $canales->canales) {\n $total_canales = $total_canales - 1;\n }\n\n if ($total_canales < $canales->canales) {\n echo \"\\nentro al if total canales <= canales\";\n $total_canales = intval($canales->canales);\n\n //sirve para dividir los canales para todas las campañas activas -> sirve para Perú desde ecuador\n //$acanales=intval(floor($canales->canales/$id_carga->count()));\n\n //comentar solo para peru desde ecuador\n //valida que el total de canales a distribuir sea igual o mayor a 10 canales por campaña\n $total_campanias = $id_carga->count();\n do {\n $acanales = intval(floor($canales->canales / $total_campanias));\n $total_campanias = $total_campanias - 1;\n echo \"\\nacanales: \" . $acanales;\n } while ($acanales < 10);\n //comentar solo para peru desde ecuador\n\n foreach ($id_carga as $k) {\n if ($acanales <= $total_canales) {\n echo \"\\nid carga por recibir canales: \" . $k->id_carga;\n echo \" - canales a recibir : \" . $acanales;\n $k->canales = $acanales;\n $k->save();\n }\n $total_canales = $total_canales - $acanales;\n echo \"\\ntotal_canales: \" . $total_canales;\n }\n\n //Si sobran canales le sumo a la primera campaña de la lista\n if ($total_canales > 0) {\n $id_final = $id_carga->first();\n $id_final->canales = $id_final->canales + $total_canales;\n $id_final->save();\n }\n }\n\n } elseif ($id_carga->count() == 1) {\n echo \"\\nentro al else\";\n $icarga = id_carga::where('estado', 1)->where('estado_aprobado', 1)->where('ejecucion', 1)->first();\n $icarga->canales = $canales->canales;\n $icarga->save();\n }\n //Fin balanceo de canales\n}",
"private function _getMCScaricoSalita()\n {\n $mc = 0;\n foreach ($this->lista_arredi as $arredo)\n {\n $mc+=$arredo->getMCScaricoSalita();\n }\n //TODO arrotondamento\n return $mc;\n }",
"public function BuscarIngredientesVendidos() \n{\n\tself::SetNames();\n\t$sql = \"SELECT productos.codproducto, productos.producto, productos.codcategoria, productos.precioventa, productos.existencia, ingredientes.costoingrediente, ingredientes.codingrediente, ingredientes.nomingrediente, ingredientes.cantingrediente, productosvsingredientes.cantracion, detalleventas.cantventa, SUM(productosvsingredientes.cantracion*detalleventas.cantventa) as cantidades FROM productos INNER JOIN detalleventas ON productos.codproducto=detalleventas.codproducto INNER JOIN productosvsingredientes ON productos.codproducto=productosvsingredientes.codproducto LEFT JOIN ingredientes ON productosvsingredientes.codingrediente = ingredientes.codingrediente WHERE DATE_FORMAT(detalleventas.fechadetalleventa,'%Y-%m-%d') >= ? AND DATE_FORMAT(detalleventas.fechadetalleventa,'%Y-%m-%d') <= ? GROUP BY ingredientes.codingrediente\";\n\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim(date(\"Y-m-d\",strtotime($_GET['desde']))));\n\t$stmt->bindValue(2, trim(date(\"Y-m-d\",strtotime($_GET['hasta']))));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"<div class='alert alert-danger'>\";\n\t\techo \"<button type='button' class='close' data-dismiss='alert' aria-hidden='true'>×</button>\";\n\t\techo \"<center><span class='fa fa-info-circle'></span> NO EXISTEN INGREDIENTES FACTURADOS PARA EL RANGO DE FECHAS SELECCIONADAS</center>\";\n\t\techo \"</div>\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\twhile($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[]=$row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}",
"public static function traerTodas()\n {\n $query = \"SELECT * FROM nivel\";\n $stmt = DBConnection::getStatement($query);\n $stmt->execute();\n\n $salida = [];\n\n while($datosNiv = $stmt->fetch()) {\n $niv = new Nivel();\n $niv->cargarDatos($datosNiv);\n\n $salida[] = $niv;\n }\n\n return $salida;\n }",
"function calcular_cotizacion(){\n\t\t$producto=$_POST['producto'];\n\t\t$plan=$_POST['plan'];\n\t\t$temporada=$_POST['temp'];\n\t\t$fecha_llegada=$_POST['llegada'];\n\t\t\t$this->desde=$_POST['llegada'];\n\t\t$fecha_salida=$_POST['salida'];\n\t\t\t$this->hasta=$_POST['salida'];\n\t\t\n\t\t$sql=\"SELECT * FROM producto, temporadas2, habitaciones2 WHERE id_pro='$producto' AND temporadas2.id_alojamiento='$producto' AND temporadas2.id='$temporada' AND temporadas2.id=habitaciones2.id_temporada AND habitaciones2.id='$plan'\";\n\t\t\n\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t$resultado = mysql_fetch_array($consulta);\n\t\t\n\t\t//echo \"Noches: \".$noches;\n\t\t$arreglo_datos=\"\";\n\t\t$adultos=\"\"; $infantes=\"\"; $ninos=\"\";\n\t\t$i=1;\n\t\t$temp=\"\";\n\t\t$adultos+=$_POST['numero_adultos'.$i];\n\t\t\t$temp[]=$_POST['numero_adultos'.$i];\n\t\t$infantes+=$_POST['ninos_a'.$i];\n\t\t\t$temp[]=$_POST['ninos_a'.$i];\n\t\t$ninos+=$_POST['ninos_b'.$i];\n\t\t\t$temp[]=$_POST['ninos_b'.$i];\n\t\t$temp[]=$resultado['precio'];\n\t\t$temp[]=$resultado['precio_ninos'];\n\t\t$temp[]=$resultado['precio_ninos2'];\n\t\t$arreglo_dato[]=$temp;\n\t\t\n\t\t$this->listado=$arreglo_dato;\n\t\t$_SESSION['personas']=$arreglo_dato;\n\t\t//print_r($this->listado);\n\t\t\n\t\t$numero_personas=$adultos+$infantes+$ninos;\n\t\t$fee=1000;\n\t\n\t\t\t//cotizamos con precio completo\n\t\t\t$total_adulto=($resultado['precio']*$adultos);\n\t\t\t$total_infantes=($resultado['precio_ninos']*$infantes);\n\t\t\t$total_ninos=($resultado['precio_ninos2']*$ninos);\n\t\t\t\n\t\t\t$subtotal=$total_adulto+$total_infantes+$total_ninos;\n\t\t\t\t$this->subtotal=$subtotal;\n\t\t\t$comision=$fee;\n\t\t\t\t$this->comision=$comision;\n\t\t\t$total=$subtotal+$comision;\n\t\t\t\t$this->total=$total;\n\t\t\t\n\t\t\t/*echo \"Monto Adulto: \".$total_adulto.\"<br />\";\n\t\t\techo \"Monto Infantes: \".$total_infantes.\"<br />\";\n\t\t\techo \"Monto Niños: \".$total_ninos.\"<br />\";\n\t\t\techo \"Subtotal: \".$subtotal.\"<br />\";\n\t\t\techo \"Comision: \".$comision.\"<br />\";\n\t\t\techo \"Total: \".$total.\"<br /><br />\";*/\n\n\t\t\n\t\t$observaciones=$_POST['comentario'];\n\t\t$this->condiciones=$_POST['comentario'];\n\t\t$this->mensaje2=\"si\";\n\t}",
"public function getProdSteelEtapa($Dados) {\n $dia = date('d', strtotime($Dados->mes));\n $mes = date('m', strtotime($Dados->mes));\n $ano = date('Y', strtotime($Dados->mes));\n\n //primeiro dia\n $dataParam = $Dados->mes; //\"$dia/$mes/$ano\";\n //classe gerenProd\n $oDadosProdSteel = Fabrica::FabricarController('STEEL_PCP_GerenProd');\n //apontamento por etapa diário\n $aDadosParam = array();\n $aDadosParam['busca'] = 'ProdTotal';\n $aDadosParam['dataini'] = $dataParam;\n $aDadosParam['datafin'] = $dataParam;\n // $aDadosParam['tipoOp'] = 'F';\n $aDadosEtapa = $oDadosProdSteel->Persistencia->geraProdEtapas($aDadosParam);\n\n $aRetornoDados = array();\n $aDados = array();\n\n foreach ($aDadosEtapa as $key => $value) {\n $aDados['etapa'] = $key;\n $aDados['peso'] = number_format($value, '2', ',', '.');\n $aRetornoDados[] = $aDados;\n }\n\n\n\n /* while ($row = $result->fetch(PDO::FETCH_OBJ)){\n $aDados['data'] = $row->dataconv;\n $aDados['peso'] = number_format($row->pesototal,'2',',','.');\n $aRetorno[]=$aDados;\n } */\n\n return $aRetorno['etapas'] = $aRetornoDados;\n }",
"public function SumarAbonos() \n{\n\tself::SetNames();\n\t$sql = \"select sum(montoabono) as totalabonos from abonoscreditos where DATE_FORMAT(fechaabono,'%Y-%m-%d') >= ? AND DATE_FORMAT(fechaabono,'%Y-%m-%d') <= ?\";\n\t$stmt = $this->dbh->prepare($sql);\n\t$stmt->bindValue(1, trim(date(\"Y-m-d\",strtotime($_GET['desde']))));\n\t$stmt->bindValue(2, trim(date(\"Y-m-d\",strtotime($_GET['hasta']))));\n\t$stmt->execute();\n\t$num = $stmt->rowCount();\n\tif($num==0)\n\t{\n\t\techo \"\";\n\t\texit;\n\t}\n\telse\n\t{\n\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$this->p[] = $row;\n\t\t\t}\n\t\t\treturn $this->p;\n\t\t\t$this->dbh=null;\n\t\t}\n\t}",
"public function getDistribusiData()\n {\n $pendapatan = $this->getRekeningPendapatan();\n $rekening_tabungan = $this->getRekening(\"TABUNGAN\");\n $rekening_deposito = $this->getRekening(\"DEPOSITO\");\n \n $data_rekening = array();\n $total_rata_rata = array();\n\n\n foreach($rekening_tabungan as $tab)\n {\n $rata_rata_product_tabungan = 0.0;\n $tabungan = $this->tabunganReporsitory->getTabungan($tab->nama_rekening);\n foreach($tabungan as $user_tabungan) {\n $temporarySaldo = $this->getSaldoAverageTabunganAnggota($user_tabungan->id_user, $user_tabungan->id);\n $rata_rata_product_tabungan = $rata_rata_product_tabungan + $temporarySaldo;\n }\n Session::put($user_tabungan->jenis_tabungan, $rata_rata_product_tabungan);\n array_push($total_rata_rata, $rata_rata_product_tabungan);\n }\n\n foreach($rekening_deposito as $dep)\n {\n $rata_rata_product_deposito = 0.0;\n $deposito = $this->depositoReporsitory->getDepositoDistribusi($dep->nama_rekening);\n foreach($deposito as $user_deposito) {\n if ($user_deposito->type == 'jatuhtempo'){\n $tanggal = $user_deposito->tempo;\n }\n else if($user_deposito->type == 'pencairanawal')\n {\n $tanggal = $user_deposito->tanggal_pencairan;\n }\n else if($user_deposito->type == 'active')\n {\n $tanggal = Carbon::parse('first day of January 1970');\n }\n $temporarySaldo = $this->getSaldoAverageDepositoAnggota($user_deposito->id_user, $user_deposito->id, $tanggal);\n $rata_rata_product_deposito = $rata_rata_product_deposito + $temporarySaldo ;\n }\n Session::put($dep->nama_rekening, $rata_rata_product_deposito);\n array_push($total_rata_rata, $rata_rata_product_deposito);\n }\n\n $total_rata_rata = $this->getTotalProductAverage($total_rata_rata);\n Session::put(\"total_rata_rata\", $total_rata_rata);\n $total_pendapatan = $this->getRekeningPendapatan(\"saldo\");\n $total_pendapatan_product = 0;\n\n $total_porsi_anggota = 0;\n $total_porsi_bmt = 0;\n\n\n foreach($rekening_tabungan as $tab)\n {\n $rata_rata = Session::get($tab->nama_rekening);\n $nisbah_anggota = json_decode($tab->detail)->nisbah_anggota;\n $nisbah_bmt = 100 - json_decode($tab->detail)->nisbah_anggota;\n $pendapatan_product = $this->getPendapatanProduk($rata_rata, $total_rata_rata, $total_pendapatan);\n\n $total_porsi_anggota += $this->getPorsiPendapatanProduct($nisbah_anggota, $pendapatan_product);\n $total_porsi_bmt += $this->getPorsiPendapatanProduct($nisbah_bmt, $pendapatan_product);\n\n }\n\n foreach($rekening_deposito as $dep)\n {\n $rata_rata = Session::get($dep->nama_rekening);\n $nisbah_anggota = json_decode($dep->detail)->nisbah_anggota;\n $nisbah_bmt = 100 - json_decode($dep->detail)->nisbah_anggota;\n $pendapatan_product = $this->getPendapatanProduk($rata_rata, $total_rata_rata, $total_pendapatan);\n\n $total_porsi_anggota += $this->getPorsiPendapatanProduct($nisbah_anggota, $pendapatan_product);\n $total_porsi_bmt += $this->getPorsiPendapatanProduct($nisbah_bmt, $pendapatan_product);\n }\n\n $shuBerjalan = BMT::where('nama', 'SHU BERJALAN')->select('saldo')->first();\n $selisihBMTAnggota = $shuBerjalan->saldo - $total_porsi_anggota;\n\n\n foreach($rekening_tabungan as $tab)\n {\n $tabungan = $this->tabunganReporsitory->getTabungan($tab->nama_rekening);\n $rata_rata = Session::get($tab->nama_rekening);\n $nisbah_anggota = json_decode($tab->detail)->nisbah_anggota;\n $nisbah_bmt = 100 - json_decode($tab->detail)->nisbah_anggota;\n $pendapatan_product = $this->getPendapatanProduk($rata_rata, $total_rata_rata, $total_pendapatan);\n\n $total_pendapatan_product += $pendapatan_product;\n\n if ($total_porsi_bmt == 0)\n {\n $porsi_bmt = 0;\n }\n else\n {\n// $porsi_bmt = $this->getPorsiPendapatanProduct($nisbah_bmt, $pendapatan_product) / $total_porsi_bmt * $selisihBMTAnggota;\n $porsi_bmt = $this->getPorsiPendapatanProduct($nisbah_bmt, $pendapatan_product);\n\n }\n\n array_push($data_rekening, [ \n \"jenis_rekening\" => $tab->nama_rekening,\n \"jumlah\" => count($tabungan),\n \"rata_rata\" => $rata_rata,\n \"nisbah_anggota\" => $nisbah_anggota,\n \"nisbah_bmt\" => $nisbah_bmt,\n \"total_rata_rata\" => $total_rata_rata,\n \"total_pendapatan\" => $total_pendapatan,\n \"pendapatan_product\" => $pendapatan_product,\n \"porsi_anggota\" => $this->getPorsiPendapatanProduct($nisbah_anggota, $pendapatan_product),\n \"porsi_bmt\" => $porsi_bmt,\n \"percentage_anggota\" => $total_pendapatan > 0 ?$this->getPorsiPendapatanProduct($nisbah_anggota, $pendapatan_product) / $total_pendapatan : 0\n ]);\n }\n\n foreach($rekening_deposito as $dep)\n {\n $deposito = $this->depositoReporsitory->getDepositoDistribusi($dep->nama_rekening);\n $rata_rata = Session::get($dep->nama_rekening);\n $nisbah_anggota = json_decode($dep->detail)->nisbah_anggota;\n $nisbah_bmt = 100 - json_decode($dep->detail)->nisbah_anggota;\n $pendapatan_product = $this->getPendapatanProduk($rata_rata, $total_rata_rata, $total_pendapatan);\n\n $total_pendapatan_product += $pendapatan_product;\n if ($total_porsi_bmt == 0)\n {\n $porsi_bmt = 0;\n }\n else\n {\n// $porsi_bmt = $this->getPorsiPendapatanProduct($nisbah_bmt, $pendapatan_product) / $total_porsi_bmt * $selisihBMTAnggota;\n $porsi_bmt = $this->getPorsiPendapatanProduct($nisbah_bmt, $pendapatan_product);\n\n }\n array_push($data_rekening, [\n \"jenis_rekening\" => $dep->nama_rekening,\n \"jumlah\" => count($deposito),\n \"rata_rata\" => $rata_rata,\n \"nisbah_anggota\" => $nisbah_anggota,\n \"nisbah_bmt\" => $nisbah_bmt,\n \"total_rata_rata\" => $total_rata_rata,\n \"total_pendapatan\" => $total_pendapatan,\n \"pendapatan_product\" => $pendapatan_product,\n \"porsi_anggota\" => $this->getPorsiPendapatanProduct($nisbah_anggota, $pendapatan_product),\n \"porsi_bmt\" => $porsi_bmt\n ]);\n }\n\n return $data_rekening;\n }",
"public function cambioEstado($servicios) {\n $hoy = getdate();\n $fecha = $hoy['year'] . '-' . $hoy['mon'] . '-' . $hoy['mday'] . ' ' . $hoy['hours'] . ':' . $hoy['minutes'] . ':' . $hoy['seconds'];\n $fecha = strtotime($fecha);\n $servicios_por_recoger = collect([]);\n if (count($servicios) > 0) {\n foreach ($servicios as $item) {\n $fecha_servicio = strtotime($item->fechafin);\n if ($fecha >= $fecha_servicio) {\n if ($item->estado == 'ENTREGADO') {\n $item->estado = \"RECOGER\";\n $item->save();\n }\n\n $horas = abs(($fecha - strtotime($item->fechafin)) / 3600);\n $operacion = $horas / 24;\n $dia = floor($operacion);\n $operacion = ($operacion - $dia) * 24;\n $horas = floor($operacion);\n $operacion = ($operacion - $horas) * 60;\n $minutos = floor($operacion);\n $str = '';\n if ($dia > 0) {\n $str = '<strong>' . $dia . '</strong> Dia(s) </br>';\n }\n\n if ($horas > 0) {\n $str .= '<strong>' . $horas . '</strong> Hora(s)</br>';\n }\n if ($minutos > 0) {\n $str .= '<strong>' . $minutos . '</strong> Minuto(s)</br>';\n }\n\n $item->tiempo = $str;\n\n $servicios_por_recoger[] = $item;\n } elseif ($item->estado == \"RECOGER\") {\n// $horas = abs(($fecha - strtotime($item->fechafin)) / 3600);\n// $minutos = '0.' . explode(\".\", $horas)[1];\n// $horas = floor($horas);\n// $minutos = floor($minutos * 60);\n $item->tiempo = \"Tiene permiso para recoger antes de tiempo\";\n $servicios_por_recoger[] = $item;\n }\n }\n }\n return $servicios_por_recoger;\n }",
"public function get_resumen_ventas_cobros($fecha,$sucursal){\n\t$conectar= parent::conexion();\n\tparent::set_names(); \n\t$fecha_corte = $fecha.\"%\";\n\t$sql=\"select * from corte_diario where fecha_ingreso like ? and (sucursal_venta=? or sucursal_cobro=?);\";\n\t$sql=$conectar->prepare($sql);\n\t$sql->bindValue(1,$fecha_corte);\n\t$sql->bindValue(2,$sucursal);\n\t$sql->bindValue(3,$sucursal);\n\t$sql->execute();\n\treturn $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}"
] | [
"0.8077642",
"0.69366264",
"0.6667662",
"0.6523915",
"0.63235855",
"0.63079447",
"0.6089488",
"0.60707694",
"0.6013067",
"0.5995885",
"0.5995085",
"0.5968853",
"0.59546",
"0.59546",
"0.58831257",
"0.5863881",
"0.58619416",
"0.58089036",
"0.5788279",
"0.5738757",
"0.5696751",
"0.56796384",
"0.56448686",
"0.5636843",
"0.5625235",
"0.56173587",
"0.56167424",
"0.56149095",
"0.56069833",
"0.5605612",
"0.55937266",
"0.5593551",
"0.55874914",
"0.5581407",
"0.5574119",
"0.55652094",
"0.5564138",
"0.5560819",
"0.5543923",
"0.55414534",
"0.5532184",
"0.55213445",
"0.5513547",
"0.55029994",
"0.54969853",
"0.54912925",
"0.54879415",
"0.54661804",
"0.54558206",
"0.54453635",
"0.5440045",
"0.5427751",
"0.5415387",
"0.54002815",
"0.5398048",
"0.5396936",
"0.5377697",
"0.53693855",
"0.53655547",
"0.53576404",
"0.5348965",
"0.5348647",
"0.5346074",
"0.5344698",
"0.53404576",
"0.53396684",
"0.53330404",
"0.53325737",
"0.5331614",
"0.5331152",
"0.5316701",
"0.53157455",
"0.5315682",
"0.5314363",
"0.53141606",
"0.53020453",
"0.52994806",
"0.5296004",
"0.5293766",
"0.5292143",
"0.5292046",
"0.52908677",
"0.52854043",
"0.5283683",
"0.52831477",
"0.5264585",
"0.5262822",
"0.5261122",
"0.52550673",
"0.52539",
"0.52520627",
"0.5251244",
"0.5250772",
"0.52497065",
"0.52464825",
"0.5241191",
"0.52395135",
"0.5238141",
"0.52374125",
"0.523473"
] | 0.58985096 | 14 |
Create a new notification instance. | public function __construct($checkOutItems)
{
//
$this->checkOutItems = $checkOutItems;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function create($notification){\n }",
"public static function createNotification($type, $eventid){\n\t\t$notification = new Notification; \n\t\t$notification->type = $type;\n\t\t$notification->eventid = $eventid;\n\t\t$notification->time = date('Y-m-d H:i:s');\n\t\t$notification->save();\n\t\treturn $notification;\n\t}",
"public function create($payload)\n {\n return $this->notification->create($payload);\n }",
"public static function create( array $info ) {\n\t\t$obj = new Notification();\n\t\tstatic $validFields = [ 'event', 'user' ];\n\n\t\tforeach ( $validFields as $field ) {\n\t\t\tif ( isset( $info[$field] ) ) {\n\t\t\t\t$obj->$field = $info[$field];\n\t\t\t} else {\n\t\t\t\tthrow new InvalidArgumentException( \"Field $field is required\" );\n\t\t\t}\n\t\t}\n\n\t\tif ( !$obj->user instanceof User ) {\n\t\t\tthrow new InvalidArgumentException( 'Invalid user parameter, expected: User object' );\n\t\t}\n\n\t\tif ( !$obj->event instanceof Event ) {\n\t\t\tthrow new InvalidArgumentException( 'Invalid event parameter, expected: Event object' );\n\t\t}\n\n\t\t// Notification timestamp should be the same as event timestamp\n\t\t$obj->timestamp = $obj->event->getTimestamp();\n\t\t// Safe fallback\n\t\tif ( !$obj->timestamp ) {\n\t\t\t$obj->timestamp = wfTimestampNow();\n\t\t}\n\n\t\t// @Todo - Database insert logic should not be inside the model\n\t\t$obj->insert();\n\n\t\treturn $obj;\n\t}",
"private function createNotification($id, $request)\n {\n $count = Notification::max('count');\n\n $notification = Notification::create([\n 'model_id' => $id,\n 'count' => intval($count) + 1,\n 'type' => $request->get('ntype'),\n 'subject' => $request->get('subject'),\n 'message' => $request->get('message'),\n 'sent_at' => Carbon::now(),\n ]);\n }",
"public function maybe_create_notification() {\n\t\tif ( ! $this->should_show_notification() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! $this->notification_center->get_notification_by_id( self::NOTIFICATION_ID ) ) {\n\t\t\t$notification = $this->notification();\n\t\t\t$this->notification_helper->restore_notification( $notification );\n\t\t\t$this->notification_center->add_notification( $notification );\n\t\t}\n\t}",
"public function __construct(Notification $notification)\n {\n $this->notification = $notification;\n }",
"public function __construct(Notification $notification)\n {\n $this->notification = $notification;\n }",
"public function __construct(Notification $notification)\n {\n $this->notification = $notification;\n }",
"protected function createNotificationInstance($data)\n {\n if ($data === false) {\n return null;\n }\n\n /** @var Notification $model */\n $model = Instance::ensure($this->dataClass, Notification::class);\n\n if (!empty($data['id'])) {\n $model->setId($data['id']);\n }\n\n $model->setType($data['type']);\n $model->setData(is_string($data['data']) ? Json::decode($data['data']) : $data['data']);\n $model->setUserId($data['user_id']);\n $model->setTimestamp($data['created_at']);\n $model->setRead((bool)$data['is_read']);\n $model->setOwner($this->owner);\n\n return $model;\n }",
"public function create()\n\t{\n\t\tlog::info('inside create method of user-notifications controller');\n\t}",
"public function created(Notification $notification)\n {\n $this->sendBroadcast($notification);\n }",
"public function newNotification($event)\n {\n return new ExampleNotification($event);\n }",
"public function create()\n {\n $this->authorize('create', Notification::class);\n\n return view('rb28dett_notifications::create');\n }",
"public function actionCreate()\n {\n $model = new Notification();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->notification_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"private function createMessageObject(string $type, string $message): Notification\n {\n $msg = new Notification();\n\n $msg->setType($type);\n $msg->setMessage($message);\n\n $this->handler->add($msg);\n\n return $msg;\n }",
"public function create() {\n return View::make('notifications.create');\n }",
"protected function create_notification_email_object()\n\t{\n\t\t$category = $this->category();\n\n\t\t$email = new Charcoal_Email;\n\t\t$email->to = $this->get_notified_email_address();\n\t\t$email->reply_to = $this->get_lead_email_address();\n\n\t\tif ( $category ) {\n\t\t\t$email->subject = $category->p('confirmation_email_subject')->text();\n\t\t\t$email->from = $category->p('confirmation_email_from')->text();\n\t\t\t$email->cc = $category->v('confirmation_email_cc');\n\t\t\t$email->bcc = $category->v('confirmation_email_bcc');\n\t\t}\n\n\t\treturn $email;\n\t}",
"public function create()\n {\n return view ('notifications.create');\n }",
"protected function emitNotificationCreated(Notification $notification) {}",
"public function __construct($new_postNotification)\n {\n //\n $this->postNotification = $new_postNotification;\n\n }",
"public static function createFromArray($fields) \n\t{\n\t\t$notification = new Notification();\n\t\tself::populate($notification,$fields);\n\t\treturn $notification;\n\t}",
"public function create()\n {\n return view('admin.notifications.create');\n }",
"public function create()\n {\n return view('admin.notifications.create');\n }",
"function notify($user_id, $message)\n{\n return (new Notification([\n 'user_id' => $user_id,\n 'message' => $message\n ]))->save();\n}",
"public function actionCreate() {\n\t\t$model = new Notification();\n\t\t$model->created_by = Yii::$app->user->identity->id;\n\n\t\tif ($model->load(Yii::$app->request->post())) {\n\n\t\t\tif ($model->send_to != '') {\n\t\t\t\t$model->send_to = implode(',', $model['send_to']);\n\t\t\t}\n\t\t\t$model->sent_time = date('Y-m-d H:i:s');\n\t\t\t$model->save();\n\t\t\t/*if ($model->save()) {\n\t\t\t\t$send_to = explode(',', $model['send_to']);\n\t\t\t\tforeach ($send_to as $key => $value) {\n\t\t\t\t\tif ($value == 'all') {\n\t\t\t\t\t\t$userId = 'allUser';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$user = User::find()->where(['id' => $value])->one();\n\t\t\t\t\t\t$userId = $user['phone'];\n\t\t\t\t\t}\n\t\t\t\t\tYii::$app->Utility->pushNotification($userId, $model['notification_name'], $model['content']);\n\t\t\t\t}\n\t\t\t}*/\n\t\t\tYii::$app->getSession()->setFlash('successStatus', 'Data saved successfully!');\n\n\t\t\treturn $this->redirect(['view', 'id' => $model->id]);\n\t\t}\n\n\t\treturn $this->render('create', [\n\t\t\t'model' => $model,\n\t\t]);\n\t}",
"public function notification(Notification $notification, array $parameters = []);",
"public function create()\n {\n return view('notifications.create');\n }",
"public function __construct($notification)\n {\n parent::__construct($notification);\n }",
"public function notification();",
"public function notification();",
"public function notificationsAction()\n {\n $callback = function ($msg) {\n //check the db before running anything\n if (!$this->isDbConnected('db')) {\n return ;\n }\n\n if ($this->di->has('dblocal')) {\n if (!$this->isDbConnected('dblocal')) {\n return ;\n }\n }\n\n //we get the data from our event trigger and unserialize\n $notification = unserialize($msg->body);\n\n //overwrite the user who is running this process\n if ($notification['from'] instanceof Users) {\n $this->di->setShared('userData', $notification['from']);\n }\n\n if (!$notification['to'] instanceof Users) {\n echo 'Attribute TO has to be a User' . PHP_EOL;\n return;\n }\n\n if (!class_exists($notification['notification'])) {\n echo 'Attribute notification has to be a Notificatoin' . PHP_EOL;\n return;\n }\n $notificationClass = $notification['notification'];\n\n if (!$notification['entity'] instanceof Model) {\n echo 'Attribute entity has to be a Model' . PHP_EOL;\n return;\n }\n\n $user = $notification['to'];\n\n //instance notification and pass the entity\n $notification = new $notification['notification']($notification['entity']);\n //disable the queue so we process it now\n $notification->disableQueue();\n\n //run notify for the specifiy user\n $user->notify($notification);\n\n $this->log->info(\n \"Notification ({$notificationClass}) sent to {$user->email} - Process ID \" . $msg->delivery_info['consumer_tag']\n );\n };\n\n Queue::process(QUEUE::NOTIFICATIONS, $callback);\n }",
"public function create()\n {\n return view('Admin.Notification_Management.notifications');\n }",
"public static function fake()\n {\n static::swap($fake = new NotificationFake);\n\n return $fake;\n }",
"public function new_notification_is_created ($notification) {\n $user = $this->get_session_user();\n $eventdata = new \\core\\message\\message();\n $eventdata->courseid = 1;\n $eventdata->name = 'fake_notification';\n $eventdata->component = 'block_culactivity_stream';\n $eventdata->userfrom = $user;\n $eventdata->subject = $notification;\n $eventdata->fullmessage = $notification;\n $eventdata->fullmessageformat = FORMAT_PLAIN;\n $eventdata->fullmessagehtml = $notification;\n $eventdata->smallmessage = $notification;\n $eventdata->notification = 1;\n $eventdata->userto = $user;\n $messageid = message_send($eventdata);\n\n if (!$messageid) {\n throw new Exception(get_string('messageerror', 'block_culactivity_stream'));\n }\n }",
"public function push($notification, $notifiable);",
"public function __construct() {\r\n $this->setEntity('mst_notification');\r\n }",
"public function create($type, $data, $userId)\n {\n $data = [\n 'type' => $type,\n 'data' => Json::encode($data),\n 'user_id' => $userId,\n 'created_at' => time(),\n 'is_read' => 0\n ];\n\n $notification = $this->createNotificationInstance($data);\n $this->saveNotification($notification);\n return $notification;\n }",
"public function Create()\n {\n parent::Create();\n\n //Properties\n $this->RegisterPropertyInteger('InputTriggerID', 0);\n $this->RegisterPropertyString('NotificationLevels', '[]');\n $this->RegisterPropertyBoolean('TriggerOnChangeOnly', false);\n $this->RegisterPropertyBoolean('AdvancedResponse', false);\n $this->RegisterPropertyString('AdvancedResponseActions', '[]');\n\n //Profiles\n if (!IPS_VariableProfileExists('BN.Actions')) {\n IPS_CreateVariableProfile('BN.Actions', 1);\n IPS_SetVariableProfileIcon('BN.Actions', 'Information');\n IPS_SetVariableProfileValues('BN.Actions', 0, 0, 0);\n }\n\n //Variables\n $this->RegisterVariableInteger('NotificationLevel', $this->Translate('Notification Level'), '');\n $this->RegisterVariableBoolean('Active', $this->Translate('Notifications active'), '~Switch');\n $this->RegisterVariableInteger('ResponseAction', $this->Translate('Response Action'), 'BN.Actions');\n\n //Actions\n $this->EnableAction('ResponseAction');\n\n //Timer\n $this->RegisterTimer('IncreaseTimer', 0, 'BN_IncreaseLevel($_IPS[\\'TARGET\\']);');\n\n $this->EnableAction('Active');\n }",
"public function register_notifications();",
"public function create()\n {\n $notification = DB::table('notifications')\n ->get(); \n return view ('admin/assignBadgeToUser')->with('notification', $notification);\n }",
"public function __construct(protected NotificationRepository $notificationRepository)\n {\n }",
"protected function createNotification($responseData)\n {\n $socketMock = $this->getMock(\n 'RequestStream\\\\Stream\\\\Socket\\\\SocketClient',\n array('create', 'write', 'read', 'selectRead', 'setBlocking', 'is', 'close')\n );\n\n $socketMock->expects($this->once())\n ->method('selectRead')\n ->will($this->returnValue(true));\n\n $socketMock->expects($this->once())\n ->method('read')\n ->with(6)\n ->will($this->returnValue($responseData));\n\n $notification = new Notification;\n $payload = new PayloadFactory;\n $connection = new Connection(__FILE__);\n\n $notification->setConnection($connection);\n $notification->setPayloadFactory($payload);\n\n $ref = new \\ReflectionProperty($connection, 'socketConnection');\n $ref->setAccessible(true);\n $ref->setValue($connection, $socketMock);\n\n return $notification;\n }",
"protected function notification() {\n\t\t$reason = $this->indexing_helper->get_reason();\n\n\t\t$presenter = $this->get_presenter( $reason );\n\n\t\treturn new Yoast_Notification(\n\t\t\t$presenter,\n\t\t\t[\n\t\t\t\t'type' => Yoast_Notification::WARNING,\n\t\t\t\t'id' => self::NOTIFICATION_ID,\n\t\t\t\t'capabilities' => 'wpseo_manage_options',\n\t\t\t\t'priority' => 0.8,\n\t\t\t]\n\t\t);\n\t}",
"function custom_node_create_notification($uid, $title, $message) {\n $creator_uid = 1; // Admin user.\n $node = custom_new_node_create($creator_uid, 'notification', $title, 1);\n \n $node->set('field_user', $uid);\n $node->set('body', $message);\n $node->save();\n \n if (!$node->id()) {\n \\Drupal::logger('custom')->error(t('Notification FAILED to store.'));\n }\n \n return $node;\n}",
"public function store(Request $request)\n {\n return Notification::create($request->input());\n }",
"public static function createFromDiscriminatorValue(ParseNode $parseNode): TrainingReminderNotification {\n return new TrainingReminderNotification();\n }",
"public function __construct(NotificationTrigger $notification_trigger)\n {\n $this->notification_trigger = $notification_trigger;\n }",
"public function setResource($notification)\n {\n return new NotificationResource($notification);\n }",
"public function __construct($notification_id)\n {\n $this->notification_id = $notification_id;\n }",
"public function create()\n {\n return view('Notifications/create');\n }",
"public function getNotification(MessageInstanceInterface $message)\n {\n return new DefaultNotification($message, $this->formatterRegistry->get($message->getType()));\n }",
"public function sendPostCreateNewNotifications(ApiTester $I)\n {\n $data = [\n 'entityClass' => 'user',\n 'entityId' => 1,\n 'category' => 'info',\n 'message' => fake::create()->text(20),\n 'userId' => 1\n ];\n $I->saveNotifications([\n $data['entityClass'], ' ',\n $data['entityId'], ' ',\n $data['category'], ' ',\n $data['message'], ' ',\n $data['userId'], ' '\n ], 'notifications.txt');\n $I->sendPOST($this->route, $data);\n $this->userID = $I->grabDataFromResponseByJsonPath('$.id');\n $I->seeResponseCodeIs(201);\n }",
"public static function createFromArray($fields) \n\t{\n\t\t$notificationType = new NotificationType();\n\t\tself::populate($notificationType,$fields);\n\t\treturn $notificationType;\n\t}",
"public function create()\n\t{\n\t\t$searchTerm = Input::get('searchTerm');\n\n $createNotification = new CreateNotificationCommand($searchTerm);\n\n $result = $createNotification->execute();\n\n $result = $result ? \"You're Signed Up!\" : \"You're Already Signed Up for This Term!\";\n\n return $result;\n\t}",
"#[Route('/notification/create', name: 'create_notification')]\n public function create(NotifierInterface $notifier, EntityManagerInterface $entityManager, Request $request): Response\n {\n $notification = (new Notification('Notification from Duck Tales'))\n ->content('You got some contributions to review. Please look at the Quack #' . $request->get('warned_id'))\n ->importance(Notification::IMPORTANCE_HIGH);\n\n\n $admins = [];\n $admins = array_map(fn ($duck) => $duck->hasRoleAdmin() ? $duck->getEmail() : NULL, $entityManager->getRepository(Duck::class)->findAll());\n\n // foreach ($admins as $admin) {\n // $recipient = new Recipient(\n // $admin\n // );\n // $notifier->send($notification, $recipient);\n // }\n $recipient = new Recipient(\n '[email protected]'\n );\n $notifier->send($notification, $recipient);\n\n\n // Send the notification to the recipient\n\n\n return $this->redirectToRoute('quacks');\n }",
"function wd_notification() {\n return WeDevs_Notification::init();\n}",
"public function notificationsOnCreate(NotificationBuilder $builder)\n {\n $notification = new Notification();\n $notification\n ->setTitle('Nouvelle Reclamation')\n ->setDescription(' A été crée')\n ->setRoute('#')\n // ->setParameters(array('id' => $this->userToClaim))\n ;\n //$notification->setIcon($this->getUserr()->getUsername());\n $notification->setUser1($this->getUser()->getUsername());\n $notification->setUser2($this->getUserToClaim());\n $builder->addNotification($notification);\n\n return $builder;\n }",
"public function create()\n {\n\n $email_id = date('Y-m-d_H-i-s') . '.' . $this->template;\n $email_data = [\n 'title' => $this->template, \n 'data' => serialize($this->data), \n 'email' => $this->to,\n 'id' => $email_id,\n 'date' => date('Y-m-d H:i:s')\n ];\n\n Storage::putYAML('statamify/emails/' . $email_id, $email_data);\n\n }",
"public function create()\n {\n //\n $this->message->sendMessage();\n }",
"public function create()\n {}",
"public function create() {}",
"public function create() {\n\t\t\t//\n\t\t}",
"public static function invalidNotificationType()\n {\n return new static('Notification Type provided is invalid.');\n }",
"public function createNotification($type, $text, $destination)\r\n {\r\n \t$data = $this->call(array(\"notification\"=>array(\"type\"=>$type, \"text\"=>$text, \"destination\"=>$destination)), \"POST\", \"notifications.json\");\r\n \treturn $data;\r\n }",
"public function __construct($title, $sender, $notification)\n {\n $this->title = $title;\n $this->sender = $sender;\n $this->notification = $notification;\n }",
"public function createInstance()\n {\n $mock = $this->mock(static::TEST_SUBJECT_CLASSNAME)\n ->getMessage();\n\n return $mock->new();\n }",
"public function create(){}",
"static function get_notificationById($id) {\r\n global $db;\r\n \r\n $id = $db->escape_string($id);\r\n \r\n $query = \"SELECT * FROM `notification` WHERE Notification_id = ?\";\r\n \r\n $statement = $db->prepare($query);\r\n\t\t\r\n\t\tif ($statement == FALSE) {\r\n\t\t\tdisplay_db_error($db->error);\r\n\t\t}\r\n \r\n $statement->bind_param(\"i\", $id);\r\n \r\n $statement->execute();\r\n \r\n $statement->bind_result($id, $message, $objectReference, $objectId, $seen, $timeStamp);\r\n \r\n $statement->fetch();\r\n \r\n $notification = new notification($id, $message, $objectReference, $objectId, $seen, $timeStamp);\r\n \r\n $statement->close();\r\n \r\n return $notification;\r\n }",
"public function __construct(PushNotification $push)\n {\n $this->push = $push;\n }",
"public function addNotification($id, $message, $type = 'status');",
"public function create( $arrayNotifikasi )\n {\n // return $arrayNotifikasi;\n $notif = new Notifikasi;\n $notif->id_pembuat = $arrayNotifikasi[0];\n $notif->id_penerima = $arrayNotifikasi[1];\n $notif->jenis = $arrayNotifikasi[2];\n $notif->msg = $arrayNotifikasi[3];\n $notif->icon = $arrayNotifikasi[4];\n $notif->bg = $arrayNotifikasi[5];\n $notif->tgl_dibuat = $arrayNotifikasi[6];\n $notif->link = $arrayNotifikasi [7];\n $notif->save();\n }",
"public static function createInstance()\n {\n return new MailMessage('[email protected]');\n }",
"public function testPushNotification(){\n $noti=new Notification();\n $data=' {\n\t \"to\": \"/topics/important\",\n\t \"notification\": {\n\t \t\"title\": \"Hola Mundo\",\n\t\t \"body\": \"Mensaje de prueba\",\n\t\t \"icon\":\"http://www.alabamapublica.com/wp-content/uploads/sites/43/2017/06/cntx170619019-150x150.jpg\"\n\t\t \"click_action\": \"https://critica-xarkamx.c9users.io\"\n\t }\n }';\n $this->assertArrayHasKey(\"message_id\",$noti->sendPushNotification($data));\n }",
"public static function notify($member) {\n $notification = Model_Notification::factory('notification');\n\n if(is_numeric($member)) {\n $notification->to = $member;\n } else if(is_object($member) && $member instanceof Model_Member) {\n $notification->to = $member->id;\n } else if(is_object($member) && $member instanceof Model_Blab) {\n\t\t\t$notification->to = $member->getCommentees();\n\t\t}\n\n\t\t$notification->from = Session::instance()->get('user_id');\n \n $notification->unread = 1;\n\n\t\t$notification->created = date('Y-m-d h:i:s');\n\n return $notification;\n }",
"public function insert(int $toUserID, string $subject, string $message, int $typeId, array $data = [])\n {\n return Notification::create([\n 'user_id' => $toUserID,\n 'subject' => $subject,\n 'message' => $message,\n 'notification_type_id' => $typeId,\n 'data' => $data,\n ]);\n }",
"public function create()\n {\n //TODO\n }",
"public function __construct($notifiable)\n {\n $this->notifiable = $notifiable;\n }",
"public function create()\n {\n //\n return view('admin/notifacation/create');\n }",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function create() {\n\t\t//\n\t}",
"public function __construct(AppNotification $notification, User $user)\n {\n $this->notification = $notification;\n $this->user = $user;\n }",
"public function create() {\r\n }",
"public function __construct($data)\n {\n \n\n $usuario_reserva = User::find($data->id_user);\n $coordinador = User::find($usuario_reserva->departamento->coordinador->id);\n\n $mensaje = new \\stdClass();\n $mensaje->user = $usuario_reserva->name.' '.$usuario_reserva->last_name;\n $mensaje->userid = $usuario_reserva->id;\n $mensaje->recipient = $coordinador->name.' '.$coordinador->last_name;\n $mensaje->recipientid = $coordinador->id;\n $mensaje->reservaid = $data->id;\n $mensaje->datereserva = date('Y-m-d H:i:s');\n $mensaje->text = 'ah generado una reserva';\n $notificacion = new Notificaciontest($mensaje);\n \n $coordinador->notify($notificacion);\n $this->notif = $mensaje;\n }",
"public function createDefaultNotificationRule();",
"protected function getNotification_Type_PostService()\n {\n $instance = new \\phpbb\\notification\\type\\post(${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, ${($_ = isset($this->services['auth']) ? $this->services['auth'] : ($this->services['auth'] = new \\phpbb\\auth\\auth())) && false ?: '_'}, './../', 'php', 'phpbb_user_notifications');\n\n $instance->set_user_loader(${($_ = isset($this->services['user_loader']) ? $this->services['user_loader'] : $this->getUserLoaderService()) && false ?: '_'});\n $instance->set_config(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'});\n\n return $instance;\n }",
"public function create()\n {\n }",
"public function create()\n {\n }",
"public static function create() {}",
"public static function create() {}",
"public static function create() {}"
] | [
"0.8276063",
"0.72309536",
"0.7192113",
"0.71250874",
"0.7123231",
"0.70414555",
"0.6982398",
"0.6982398",
"0.6982398",
"0.69165224",
"0.6844303",
"0.68205667",
"0.6801263",
"0.6776018",
"0.6589725",
"0.6531073",
"0.6507233",
"0.65047646",
"0.6503655",
"0.64437956",
"0.6413495",
"0.63943607",
"0.63801765",
"0.63801765",
"0.63660526",
"0.6356052",
"0.63232195",
"0.6300968",
"0.6284887",
"0.6273382",
"0.6273382",
"0.6221624",
"0.62077844",
"0.619149",
"0.61460197",
"0.6113097",
"0.6109519",
"0.61056155",
"0.6096373",
"0.6080448",
"0.6076801",
"0.6062714",
"0.6056816",
"0.60528165",
"0.6042198",
"0.6041384",
"0.6038984",
"0.5998163",
"0.5980277",
"0.5966818",
"0.5965131",
"0.59510165",
"0.5944954",
"0.5924184",
"0.59172565",
"0.5905665",
"0.5863749",
"0.5857545",
"0.5847215",
"0.58452827",
"0.5823396",
"0.5817765",
"0.5809837",
"0.5806915",
"0.58051187",
"0.57956886",
"0.5786479",
"0.5761696",
"0.5759299",
"0.57588416",
"0.57455844",
"0.5729732",
"0.57241285",
"0.5722245",
"0.571779",
"0.57008874",
"0.56909657",
"0.5688866",
"0.56850773",
"0.5680636",
"0.5680636",
"0.5680636",
"0.5680636",
"0.5680636",
"0.5680636",
"0.5680636",
"0.5680636",
"0.5680636",
"0.5680636",
"0.5680636",
"0.5680636",
"0.56795263",
"0.567875",
"0.5671056",
"0.56691873",
"0.56688094",
"0.5668",
"0.5668",
"0.5666241",
"0.5666241",
"0.5666241"
] | 0.0 | -1 |
Get the notification's delivery channels. | public function via($notifiable)
{
return ['database'];
// return ['mail', 'database']; //ONLY USE WHEN ONLINE
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getNotificationChannels()\n {\n if (array_key_exists(\"notificationChannels\", $this->_propDict)) {\n return $this->_propDict[\"notificationChannels\"];\n } else {\n return null;\n }\n }",
"public function getDistributionChannels();",
"public function getDeliveryChannel() {\n return $this->params[\"original\"][\"delivery_channel\"];\n }",
"public function getChannels()\n {\n return $this->channels;\n }",
"public function getChannels();",
"public function getDistributionChannels()\n {\n return $this->distributionChannels;\n }",
"public function getChannels()\n {\n return $this->Channels;\n }",
"public function getAllChannels()\n {\n return $this->_channel;\n }",
"public function via($notifiable)\n {\n $channels = [];\n if ($notifiable->setting->is_bid_cancelled_notification_enabled) {\n $channels = ['database']; // note: no Messenger yet like the other one's. App is still not approved, and there's the business registration requirement so..\n \n if ($notifiable->fcm_token) {\n $channels[] = FcmChannel::class;\n }\n }\n return $channels;\n }",
"public function viaNotificationChannels()\n {\n return UserNotificationChannel::with('notification_channel')->get()->filter(function ($item) {\n return $item->muted_at == null;\n })->pluck('notification_channel.name');\n }",
"public function channels()\n {\n return $this->send('channels');\n }",
"public function getOrderChannels()\n\t{\n\t\t$request = $this->request('order_channels');\n\n\t\tif (!$request) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$decoded = $request->asArray();\n\t\treturn $decoded['data'];\n\t}",
"public function channels()\n {\n $payloads = [\n 'code' => $this->channelCode,\n ];\n\n return $this->request('get', 'merchant/payment-channel', $payloads);\n }",
"public function all(): array\n {\n return $this->channels;\n }",
"public function getActiveNotificationChannelsOptions()\n {\n \treturn $this->getChannelOptions();\n }",
"public function getAllChannels()\n {\n return Channel::all();\n }",
"public function getSupplyChannels();",
"public function getChannels()\n\t{\n\t\t$channels = App::make('ChannelRepository')->getChannels();\n\t\t\n\t\treturn App::make('Apiv1\\Transformers\\ChannelTransformer')->transformCollection($channels, $this->user);\n\t}",
"public function via($notifiable)\n {\n $channel = ($this->channel == 'sms') ? 'nexmo' : $this->channel;\n return [$channel];\n }",
"public function get_channels()\n {\n }",
"public function getDeliveryChannel($i = 0)\n {\n if (isset($this->destinationList[$i]['DeliveryChannel'])) {\n return $this->destinationList[$i]['DeliveryChannel'];\n } else {\n return false;\n }\n }",
"public function getDeliveries()\n {\n return $this->deliveries;\n }",
"public function channels(){\n return $this->channelCollection->map(function ($item, $key) {\n return ['channel' => $item['channel']];\n });\n }",
"public function getChannel()\n {\n return $this->get(self::_CHANNEL);\n }",
"public function getChannel()\n {\n return $this->get(self::_CHANNEL);\n }",
"public function getChannel()\n {\n return $this->get(self::_CHANNEL);\n }",
"public function getChannel()\n {\n return $this->get(self::_CHANNEL);\n }",
"public function via($notifiable)\n\t{\n\t\tif (!isset($this->notifitable)) {\n\t\t\t$this->notifitable = $notifiable;\n\t\t}\n\t\t$channels = ['db'];\n\t\tif (in_array('esms', $this->data['types'])) {\n\t\t\t$channels[] = 'esms';\n\t\t}\n\t\tif (in_array('email', $this->data['types'])) {\n\t\t\t$channels[] = 'mail';\n\t\t}\n\n\t\treturn $channels;\n\t}",
"public function getChannel()\n {\n return $this->getData(self::CHANNEL);\n }",
"public function broadcastOn()\n {\n return [\n $this->channel\n ];\n }",
"public function broadcastOn()\n {\n return [\n $this->channel\n ];\n }",
"public function via($notifiable)\n {\n return [FcmChannel::class];\n }",
"public function broadcastOn() {\n return [\n new Channel('messages.' . $this->userReceiver->id . '.' . $this->currentUser->email),\n new Channel('messages.' . $this->currentUser->id . '.' . $this->userReceiver->email),\n ];\n }",
"public function broadcastOn()\n {\n return [config('messenger.redis_channel', 'notification')];\n }",
"public function via($notifiable): array\n {\n return [DiscordChannel::class];\n }",
"public function via($notifiable)\n {\n return [WhatsappChannel::class, SmsChannel::class];\n }",
"public function getSupplyChannels()\n {\n return $this->supplyChannels;\n }",
"public function getChannel();",
"public function getAllChannels()\n {\n return Channel::with('subChannel.display')->active()->alive()->get()->toArray();\n }",
"public function getIncludeChannels()\n {\n return $this->include_channels;\n }",
"public function setNotificationChannels($val)\n {\n $this->_propDict[\"notificationChannels\"] = $val;\n return $this;\n }",
"public static function getChannels($aspect)\n {\n return self::getMetaProperty($aspect, 'channel');\n }",
"public function getDelivery()\n {\n return $this->delivery;\n }",
"public function getAll(){\n\t\t$Channels = \\Channel::all();\n\t\treturn $Channels;\n\t}",
"public function broadcastOn()\n {\n return new Channel('notifications');\n }",
"public function via( $notifiable )\n\t{\n\t\treturn [ OneSignalChannel::class ];\n\t}",
"public function via($notifiable)\n {\n return [PushNotificationChannel::class];\n }",
"public function channels(): ChannelsService;",
"public function getNotificationTypes()\n {\n return $this->notifications;\n }",
"public function getChannelList()\n {\n return Channel::with('subChannel.display')->get();\n }",
"public function list_channels($exclude_archived=true) {\n\n $method=\"channels.list\";\n $payload['exclude_archived'] = $exclude_archived;\n\n $result = $this->apicall($method, $payload);\n if (isset($result['channels'])) {\n return $result['channels'];\n } else {\n return false;\n }\n }",
"public function getChannel()\n {\n \treturn $this->_channel;\n }",
"public function getChannel()\n {\n return $this->channel;\n }",
"public function getChannel()\n {\n return $this->channel;\n }",
"function channelInfo()\n\t{\n\t\treturn $this->_channel;\n\t}",
"public function broadcastOn()\n {\n return ['my-channel'];\n }",
"public function via($notifiable)\n {\n return [SendGridChannel::class];\n }",
"public function getChannel()\n {\n return $this->Channel;\n }",
"public function getChannel()\n {\n return $this->Channel;\n }",
"public function getChannel()\n {\n if (! $this->channel) {\n $this->set();\n }\n\n return $this->channel;\n }",
"public function broadcastOn()\n {\n return ['channel-status'];\n }",
"public function broadcastOn()\n {\n return [\n new Channel('sanityDeployment.' . $this->sanityDeployment->id),\n new Channel('sanityMainRepo.' . $this->sanityDeployment->sanityMainRepo->id),\n ];\n }",
"public function via($notifiable)\n {\n return [DiscordChannel::class];\n }",
"public static function getChannels() {\n\t\t$channels = [];\n\t\ttry {\n\t\t\t$mapper = new ObjectMapper();\n\t\t\t$response = self::getResponse();\n\t\t\t$data = json_decode( $response, true );\n\t\t\tif ( count( $data['Channels'] ) > 0 ) {\n\t\t\t\tforeach ( $data['Channels'] as $dataProject ) {\n $channels[] = $mapper->mapJson( json_encode( $dataProject ), Channel::class );\n\t\t\t\t}\n\t\t\t}\n\t\t} catch ( \\Exception $e ) {\n\t\t\tthrow $e;\n\t\t}\n\n\t\treturn $channels;\n\t}",
"public function onChannels(): ?array\n {\n return null;\n }",
"public function getChannel()\n\t{\n\t\treturn $this->channel;\n\t}",
"public function getListDeliveryStatus()\n {\n return $this->client->makeRequest('deliverystatus', 'GET');\n }",
"public function getChannel() {\n return $this->channel;\n }",
"public function via($notifiable): array\n {\n return [TelegramChannel::class];\n }",
"public function getChannels()\n {\n return Channel::with('subChannel.category', 'subChannel.display')->whereNull('parent_channel')->active()->get()->toArray();\n }",
"public function getDestinationChannel();",
"public function getJoinDefaultChannels()\n {\n return $this->joinDefaultChannels;\n }",
"function hpm_channels( $mutations ) {\n $mutation = $mutations[0];\n $object = $mutation->action == 'create' ?\n $mutation->property_value :\n hpm_object( $mutation->object_type, $mutation->object_id );\n $channels = [];\n switch ($mutation->object_type) {\n case 'message':\n case 'resource':\n if ( $object->project_id === NULL ) {\n $channels = ['members'];\n } else {\n $channels[] = 'private-managers';\n $project = hpm_object( 'project', $object->project_id );\n if ( $project->contractor_id !== NULL ) {\n $channels[] = 'private-contractor-' . $project->contractor_id;\n }\n }\n break;\n case 'package':\n $channels = ['private-managers'];\n break;\n case 'person':\n case 'project':\n $channels = ['members'];\n break;\n case 'time':\n $channels = ['private-managers'];\n $worker = hpm_object( 'person', $object->worker_id );\n if ( $worker->role == 'contractor' ) {\n $channels[] = 'private-contractor-' . $object->worker_id;\n }\n break;\n default: break;\n }\n return $channels;\n}",
"private function getChannels()\r\n {\r\n static $channels;\r\n\r\n if (empty($channels)) {\r\n // Store the cache forever.\r\n $cache_key = 'categoryFirst';\r\n $channels = \\SCache::sear($cache_key, function () {\r\n $categories = $this->all();\r\n $channels = [];\r\n foreach ($categories as $category) {\r\n if ($category['bclassid'] == 0) {\r\n $channels[] = $category;\r\n }\r\n }\r\n return $channels;\r\n });\r\n }\r\n\r\n return $channels;\r\n }",
"public function getDistributionChannel()\n {\n return $this->distributionChannel instanceof ChannelReferenceBuilder ? $this->distributionChannel->build() : $this->distributionChannel;\n }",
"public function via($notifiable)\n {\n return [NetgsmChannel::class];\n }",
"public function getChannels()\n {\n $size = $this->getImageSize();\n\n return $size['channels'];\n }",
"public function get($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('get', [$params], NotificationChannel::class);\n }",
"public function notifications()\n {\n $notifications = $this->get(\"/api/v1/conversations?as_user_id=sis_user_id:mtm49\");\n return $notifications;\n }",
"public function via($notifiable)\n {\n return [WebPushChannel::class];\n }",
"public function via($notifiable)\n {\n return [WebPushChannel::class];\n }",
"public function getChannel(): Channel\n {\n return $this->channel;\n }",
"public function getActiveChannels(string $format = 'xml'): array\n {\n $response = $this->prepareHttpClient('/mailer/channel/list', ['format' => $format])\n ->send();\n\n if ($format === 'csv') {\n return $this->parseResponse($response);\n }\n\n $xml = new SimpleXMLElement($this->parseResponse($response));\n\n $channels = [];\n foreach ($xml->children() as $channel) {\n $channels[] = [\n 'date' => new DateTime((string) $channel->attributes()->date),\n 'name' => (string) $channel->attributes()->name,\n 'info' => (string) $channel->attributes()->info,\n ];\n }\n\n return $channels;\n }",
"public function via($notifiable)\n {\n $array = ['database', 'fcm'];\n\n if (setting('twilio_disabled') != true &&\n !blank(setting('twilio_from')) &&\n !blank(setting('twilio_account_sid')) &&\n !blank(setting('twilio_account_sid'))\n ) {\n array_push($array, TwilioChannel::class);\n }\n\n if (setting('mail_disabled') != true &&\n !blank(setting('mail_host')) &&\n !blank(setting('mail_username')) &&\n !blank(setting('mail_password')) &&\n !blank(setting('mail_port')) &&\n !blank(setting('mail_from_name')) &&\n !blank(setting('mail_from_address'))\n ) {\n array_push($array, 'mail');\n }\n\n return $array;\n }",
"public function getChannelNames()\n {\n $array = [];\n\n foreach ($this->channels as $channel) {\n $array[$channel->name] = $channel->name;\n }\n\n return $array;\n }",
"public function via($notifiable) {\n return [OneSignalChannel::class];\n }",
"public function getNotifications()\n {\n return $this->_notifications;\n }",
"public function getChannels(){\n\t\t//TODO: Change query\n\t\t$query = sprintf(\"SELECT idChannel FROM Channels limit 1\");\n\n\t\t$this->dbObj->Query($query);\n\n\t\tif ($this->dbObj->numErr) {\n\t\t\t$this->parent->SetError(5);\n\t\t}\n\n\t\t$out = NULL;\n\t\twhile (!$this->dbObj->EOF) {\n\t \t\t$out[] = $this->dbObj->GetValue(\"idChannel\");\n\t\t\t$this->dbObj->Next();\n\t\t}\n\n\t \treturn $out;\n\t}",
"public function via($notifiable)\n {\n $via = [];\n\n foreach ($this->sendibleTraits() as $trait) {\n $viaNameFromTrait = $this->getViaNameFromTrait($trait);\n\n if ($this->shouldBeSentVia($viaNameFromTrait, $notifiable)) {\n $via[] = $this->{$viaNameFromTrait . 'Channel'}();\n }\n }\n\n return $via;\n }",
"public function via($notifiable)\n {\n return [CustomDbChannel::class, 'mail'];\n }",
"public function getChannels()\n {\n $channels = $this->channels->getAll();\n $channelList = [];\n\n // Cycle through all of the channels and setup data for them\n foreach ($channels as $channel) {\n $message = $this->chat->getLatestByChannel($channel->id);\n\n $channelList[] = [\n 'name' => $channel->name_trim,\n 'messages' => $channel->messages,\n 'last_message' => strtotime($message['created_at']),\n ];\n }\n\n return json_encode(array_reverse($channelList));\n }",
"public function via($notifiable)\n {\n return [FacebookChannel::class];\n }",
"public function getChannel()\n {\n return $this->_access->getChannel();\n }",
"public function getChannel(): string {\n\t\t\treturn $this->channel;\n\t\t}",
"public function getChannel($storeId = null);",
"public function channels()\n {\n return $this->belongsToMany('App\\Channel');\n }",
"public function broadcastOn()\n {\n return ['whatcanido-channel'];\n }",
"public function getNotificationgroups()\n {\n return isset($this->notificationgroups) ? $this->notificationgroups : null;\n }",
"public function broadcastOn()\n {\n return new Channel('doctor-notification');\n }",
"public function via($notifiable)\n {\n return [OneSignalChannel::class];\n }",
"public function via($notifiable)\n {\n return [OneSignalChannel::class];\n }"
] | [
"0.7809712",
"0.7335496",
"0.71270996",
"0.7092808",
"0.7090532",
"0.70319074",
"0.6995895",
"0.69761646",
"0.69517374",
"0.6930005",
"0.6849831",
"0.6780884",
"0.6700248",
"0.6533055",
"0.6512062",
"0.6499328",
"0.64770263",
"0.64500594",
"0.6435022",
"0.6426422",
"0.6422252",
"0.6376652",
"0.63763154",
"0.62803423",
"0.62797815",
"0.62797815",
"0.62797815",
"0.6234852",
"0.62071854",
"0.6180712",
"0.6180712",
"0.6123679",
"0.6117515",
"0.6109182",
"0.6020815",
"0.5995448",
"0.5986973",
"0.59332347",
"0.59194696",
"0.59148633",
"0.5913212",
"0.58959615",
"0.589457",
"0.5889463",
"0.58894604",
"0.5878714",
"0.5865432",
"0.5853086",
"0.5812657",
"0.58082545",
"0.5801219",
"0.5793748",
"0.578974",
"0.578974",
"0.57843316",
"0.57809854",
"0.577121",
"0.577089",
"0.577089",
"0.5769412",
"0.5755599",
"0.5751147",
"0.57430065",
"0.57388574",
"0.57339644",
"0.5731696",
"0.5731486",
"0.57237875",
"0.57225233",
"0.57203776",
"0.57136154",
"0.5695995",
"0.56912583",
"0.5686771",
"0.5685853",
"0.56824523",
"0.5677615",
"0.56650364",
"0.5661129",
"0.5652709",
"0.5652709",
"0.5632951",
"0.5632489",
"0.5630337",
"0.56279117",
"0.562591",
"0.56203675",
"0.56153",
"0.56072915",
"0.56020933",
"0.5585348",
"0.5584896",
"0.557621",
"0.55688536",
"0.555698",
"0.5554522",
"0.55506134",
"0.5546979",
"0.5544996",
"0.5544607",
"0.5544607"
] | 0.0 | -1 |
Get the mail representation of the notification. | public function toMail($notifiable)
{
return (new MailMessage)
->greeting('Hello!')
->subject('Someone just got to the checkout page of your website.')
->line('To see the order and details, follow the link below:')
->action('Dashboard notification', route('notification'))
->line('Thank you for using our application!');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getNotificationEmail() {}",
"public function toMail($notifiable)\n {\n $mailMessage = (new MailMessage())\n ->error()\n ->subject($this->getMessageText())\n ->line($this->getMessageText());\n\n foreach ($this->getMonitorProperties() as $name => $value) {\n $mailMessage->line($name.': '.$value);\n }\n\n return $mailMessage;\n }",
"public function getMail()\n {\n return $this->_transport->getMail();\n }",
"function get () {\n $this->_build_mail();\n\n $mail = 'To: '.$this->xheaders['To'].\"\\n\";\n $mail .= 'Subject: '.$this->xheaders['Subject'].\"\\n\";\n $mail .= $this->headers . \"\\n\";\n $mail .= $this->full_body;\n return $mail;\n }",
"public function toMail($notifiable)\n {\n $url = $this->getNotificationEndpoint($notifiable);\n return $this->buildMailMessage($url);\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('用户举报通知')\n ->line('用户举报了'.$this->report['type'])\n ->line($this->report['reason'].$this->report['other'])\n ->action('查看举报内容', $this->report['link']);\n }",
"public function getMail(): string\n {\n return $this->_mail;\n }",
"public function getPlainMail()\n {\n return $this->get(self::_PLAIN_MAIL);\n }",
"public function getMail()\n {\n return $this->mail;\n }",
"public function getMail()\n {\n return $this->mail;\n }",
"public function getMail()\n {\n return $this->mail;\n }",
"public function getMail()\n {\n return $this->mail;\n }",
"public function getFormatMail()\n {\n return $this->get(self::_FORMAT_MAIL);\n }",
"public function getMailBodyText(Notification $notification) : string;",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->greeting('Hey '. auth()->user()->username)\n ->line('You Just received a new comment.')\n ->from($this->comment->commenter->email)\n ->action('Notification Action', url('http://dejavu.atmkng.de/'))\n ->line('Check out the discussions on DejaVu')\n ;\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function getMail():string\n {\n return $this->mail;\n }",
"public function getMail()\n {\n return $this->_session->getMail();\n }",
"public function getMail()\n\t{\n\n\t\treturn $this->mail;\n\t}",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line($this->message)\n ->action('دیدن سفارش', url(asset('/OrderStatus')))\n ->line('گروه مترجمین صفا');\n }",
"public function getMailBodyHTML(Notification $notification) : string;",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->from('[email protected]', config('app.name'))\n ->subject('Vos billets sont disponibles')\n ->line('Vos billets sont disponibles !')\n ->action('Télécharger les billets ici ', route('show'))\n ->line('Il n\\'est désormais plus absolument nécessaire de les imprimer, vous pouvez soit télécharger votre place sur votre smartphone, soit l\\'imprimer pour présenter le QR code le jour de la représentation.')\n ->line('Nous vous rappelons qu\\'il est en revanche nécessaire d\\'être **présent 20 minutes avant le début du spectacle** et que **le placement est libre**.')\n ->line('Rendez vous le 14, 15 et 16 Décembre au Théâtre Impérial !');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('Bienvenid@!!')\n ->line('En base a la metodología de selección,')\n ->line('Te felicitamos por ser seleccionado');\n ->line('para presentar tu Pitch..s');\n }",
"public function toMail($notifiable)\n {\n $message = new MailMessage;\n $message->greeting('Print On Demand Apparel')->subject('Order: \"'. $this->order->id .'\" updated');\n\n foreach($this->order->getChanges() as $key => $value){\n $message->line($key . \": \" . $value);\n }\n\n $message->action('View', route('front.orders.show', $this->order->id));\n \n return $message;\n }",
"public function routeNotificationForMail()\n {\n return $this->email;\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage())\n ->line('The introduction to the notification.')\n ->action('Notification Action', url('/'))\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n $this->data = str_replace(\"\\n\", \"<br>\", $this->data ?? '');\n\n return (new MailMessage)\n ->subject(__('Custom Exception Notification'))\n ->view('notifications.email.system_report', ['data' => $this->data ?? '']);\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage())\n ->subject(trans('notifications.we_received_new_order'))\n ->line(trans('notifications.we_received_new_order_description'))\n ->line(trans('notifications.customer_name', ['name' => $this->order->user->username]))\n ->line(trans('notifications.total_price', ['price' => $this->order->formatted_total_price]))\n ->action(trans('notifications.show_order'), novaResourceAction('orders', $this->order->id));\n\n }",
"public function notificationEmailAddress()\n {\n $notification_email = $this->getNotificationChannel('mail')['settings']['email'] ?? null;\n\n return $notification_email ?? $this->email;\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->greeting(__('Hello, ').$this->order->owner->name)\n ->subject(__('You Have Some New Attachment About Your Order'))\n ->line(__('For order number #').$this->order->id.__(' some new attachments has been uploaded recently.'))\n ->line(__('You can check the link below to see your files'))\n ->action(__('See attachments'), route('users.orders.show', [app()->getLocale(),\n $this->order->owner, $this->order]));\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->greeting(\"Hello \".$this->userData->name.', ')\n ->line('You have a notification Title '.$this->reminderData->documentTitle)\n ->line('Expire date is '.$this->reminderData->reminderDate)\n ->action('visit website', url('/dvalidator'))\n ->line('Thank you for using Notification validator !');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('[BaabClub]Your Topic Has Been Replied!')\n ->greeting('Hello! '.$notifiable->name.', Your Topic <i>'.$this->reply->communityTopic->title.'</i> has been replied')\n ->line('Replier : '.$this->reply->user->name)\n ->line('Content : '.strip_tags($this->reply->content))\n ->action('VIEW & REPLY', route('showCommunityContent',$this->reply->communityTopic->id).'#reply-'.$this->reply->id)\n ->line('<br>Thank you for your participation in community!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line(\"Olá, {$notifiable->nome},\")\n ->line('')\n ->line([\n 'Você está recebendo este e-mail porque recebemos um pedido de redefinição de senha para a sua conta.',\n 'Clique no botão abaixo para redefinir sua senha:',\n ])\n ->line([\n 'Estes são os dados de onde partiu a solicitação:',\n ])\n ->line(\"Localização: {$this->geo['city']}, {$this->geo['state']}, {$this->geo['country']}.\")\n ->line(\"IP: {$this->geo['ip']}\")\n ->line(\"Dispositivo: {$this->getDevice()}\")\n ->line(\"Plataforma: {$this->agent->platform()} {$this->agent->version($this->agent->platform())}\")\n ->line(\"Navegador: {$this->agent->browser() } {$this->agent->version($this->agent->browser()) }\")\n ->action('Redefinir Senha', panel()->resetPasswordTokenUrl($this->token))\n ->line('Se você não solicitou uma nova senha, não é necessário nenhuma ação. Mas certifique-se de que suas credenciais estejam seguras e atualizadas.');\n }",
"public function toMail( $notifiable )\n\t{\n\t\treturn ( new MailMessage )\n\t\t\t->line( 'The introduction to the notification.' )\n\t\t\t->action( 'Notification Action', url( '/' ) )\n\t\t\t->line( 'Thank you for using our application!' );\n\t}",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('You have been added to ' . $this->entityName)\n ->line(sprintf(\n '%s added you to the %s: %s',\n $this->adder->name,\n $this->entityType,\n $this->entityName\n ));\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('Você foi atribuído a uma nova solicitação!')\n ->greeting('Olá,')\n ->line('Você foi atribuído a uma nova solicitação: '.$this->ticket->title)\n ->action('Visualizar Solicitação', route('admin.tickets.show', $this->ticket->id))\n ->line('Obrigado!')\n ->line(config('app.name') . ' da Prefeitura de Ibema/PR')\n ->salutation(' ');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n // ->subject(Lang::get('Din ordrestatus er ændret'))\n ->line('Vores konsulent har nu verificeret at alt dokumentation er i orden og underskrevet. Vi er derfor glade for at din ordre nu er aktiv. Order Id #' . $this->order->custom_order_id)\n ->line('Følg med i processen på danpanel.dk. Hvis du har spørgsmål kan vi altid træffes på mail, telefon eller i vores online chat, når du er logget ind på vores hjemmeside.')\n ->action('Gå til profil', url('/login'));\n // ->line('Thank you for using our application!');\n }",
"public function getMail()\n {\n return $this->Mail_user;\n }",
"public function toMail($notifiable) {\n var_dump('going to send mail');\n\n // return (new MailMessage)\n // ->line('The introduction to the notification.')\n // ->action('Notification Action', url('/'))\n // ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('Сообщение с сайта Lidz ' . '[' . date('d.m.Y H:i') . ']')\n ->greeting('Сообщение с сайта Lidz')\n ->line('Имя: ' . $this->name)\n ->line('E-mail: ' . $this->email)\n ->line('Телефон: ' . $this->phone)\n ->line('Сообщение: ' . $this->message)\n ->salutation(' ');\n }",
"public function toMail($notifiable)\n\t{\n\t\t$report = $this->notifitable->reports()->create([\n\t\t\t\"user_id\" => $notifiable->id,\n\t\t\t\"scope\" => $this->data['scope'],\n\t\t\t\"channel\" => 'email',\n\t\t\t\"notification_id\" => $this->id,\n\t\t\t\"send_at\" => Carbon::now()\n\t\t]);\n\t\t$mail_message = (new MailMessage)\n\t\t\t->subject($this->data[\"title\"]);\n\t\tif (isset($this->data[\"email_view\"])) {\n\t\t\t$mail_message = $mail_message->view($this->data[\"email_view\"], isset($this->data['custom']) ? $this->data['custom'] : []);\n\t\t} else {\n\t\t\t$mail_message = $mail_message->line($this->data[\"body\"]);\n\t\t}\n\n\t\treturn $mail_message;\n\t}",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('Spacheship has launched!')\n ->markdown('mail.spaceship', [\n 'spaceship' => 'foobar'\n ]);\n }",
"public function toMail($notifiable)\n {\n if(!$this->message->message) {\n \n $this->message->message = 'Após levar em consideração todos os requisitos da vaga e suas qualificações profissionais, decidimos não dar prosseguimento com a sua candidatura.';\n }\n\n return (new MailMessage)\n ->subject('Atualização sobre sua candidatura para vaga de ' . $this->application->job->position->label)\n ->greeting('Atualização sobre candidatura')\n ->line($this->message->message)\n ->line('Seu cadastro ficará no nosso banco de dados e será levado em consideração quando tivermos outras oportunidades que se encaixem no seu perfil.');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('A ticket assign to ' .$this->group_name. 'TT# '.$this->ticket_id)\n ->line('A ticket assign to ' .$this->group_name. 'TT# '.$this->ticket_id);\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->markdown('emails.post_was_updated', [\n 'user' => $notifiable,\n 'post' => $this->post\n ])\n ->subject(\"L'article {$this->post->name} viens d'être mise à ajour!\")\n ->from('[email protected]', 'Larasou')\n ->replyTo('[email protected]', 'Soulouf');\n }",
"public function toMail($notifiable)\n {\n $healthUpdate = $this->healthUpdate;\n \n $message = new MailMessage;\n $message->subject('[INFOMINA ELS] - Medical Leave Applied');\n $message->greeting('Hi '.$healthUpdate['name'].',');\n $message->line('It seems like you are unwell. Thus, we have submitted a medical leave on behalf of you.');\n $message->line('Date : '.$healthUpdate['date_from'].' to '.$healthUpdate['date_to']);\n $message->line('Total Day(s) : '.$healthUpdate['total_days']);\n $message->line('Please contact the HR for any changes in action.');\n $message->line('Take care!');\n\n return $message;\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->from(config('imap.accounts.default.username'), $this->clientMessage->getFromName())\n ->subject($this->clientMessage->getTitle())\n ->greeting($this->clientMessage->getTitle())\n ->line($this->clientMessage->getText());\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject(\"Invoice from \".$data->user.\" on lancers\")\n ->greeting(\"Hello \".$data->name)\n ->line($data->user.\" has sent you an invoice of the sum of NGN\".$data->amount.\" for the project \".$data->project)\n ->line(\"Use the button below to view the invoice and make payment\")\n ->action(\"View Invoice\", $this->data->invoice_url))\n ->line('Ignore this message if you think it is a mistake');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('The introduction to the notification.')\n ->action('Notification Action', 'https://laravel.com')\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line('New contact us submit')\n ->line('Name: '.$this->data[\"name\"])\n ->line('Email: '.$this->data[\"email\"])\n ->line('Subject: '.$this->data[\"subject\"])\n ->line('Message: '.$this->data[\"message\"]);\n }",
"public function getMailSubject(Notification $notification) : string;",
"public function getmail() {\n\t\treturn $this->mail;\n\t}",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('Your request for ' . $this->ticket->form->template->name . ' (Ticket No. ' . $this->ticket->id . ') has been updated!')\n ->line('')\n ->line('Request has been updated:')\n ->line('Cancelled by ' . $this->update->employee->renderFullname())\n ->line('')\n ->line($this->update->description)\n ->line('')\n ->line('For more details you may also view the request by clicking the button below.')\n ->action('View', route('ticket.show', $this->ticket->id)); \n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->from(config('mail.from.address'), config('mail.from.name'))\n ->subject(__('Customer register'))\n ->markdown('mail.customer', ['customer' => $this->customer]);\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->from(env('MAIL_USERNAME'), env('APP_NAME'))\n ->greeting('เรียน '.'คุณ'.$this->name)\n ->subject('การแจ้งเตือนรีเซ็ตรหัสผ่าน')\n ->line('คุณได้รับอีเมลนี้เนื่องจากเราได้รับคำขอรีเซ็ตรหัสผ่านสำหรับบัญชีของคุณ.')\n ->action('รีเซ็ตรหัสผ่าน', url('password/reset', $this->token))\n ->line('หากคุณไม่ได้ร้องขอการรีเซ็ตรหัสผ่านไม่จำเป็นต้องดำเนินการใดๆอีก.');\n }",
"public function toMail($notifiable)\n {\n $order = $this->order;\n\n return (new MailMessage)\n ->subject('Orden de Quick Restaurant EXITOSA!')\n ->line(\"Orden codigo: $order->id\")\n ->line(\"Total pagado: $order->total COP\")\n ->line(\"Gracias por tu compra!\");\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('Nová požiadavka vo Vašej učebni - ' . $this->ticketObj->area->name . ' - PC' . $this->ticketObj->pc )\n ->greeting('Zdravím ' . $notifiable->name)\n ->line('V učebni ' . $this->ticketObj->area->name . ', ktorú spravujete vytvoril užívateľ ' . $this->ticketObj->user->name . ' novú požiadavku.')\n ->action('Detail požiadavky', action('Tickets\\TicketController@show',[$this->ticketObj->id]))\n ->line('O ďalších zmenách stavu požiadavky budete informovaní emailom.')\n ->line('Ďakujeme za používanie ReFa!')\n ->line('V prípade, že nie ste správcom tejto učebne kontaktujte správcu systému.');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('ثبت ملک')\n ->view('emails.sabt', ['estate' => $this->estate]);\n }",
"protected function create_notification_email_object()\n\t{\n\t\t$category = $this->category();\n\n\t\t$email = new Charcoal_Email;\n\t\t$email->to = $this->get_notified_email_address();\n\t\t$email->reply_to = $this->get_lead_email_address();\n\n\t\tif ( $category ) {\n\t\t\t$email->subject = $category->p('confirmation_email_subject')->text();\n\t\t\t$email->from = $category->p('confirmation_email_from')->text();\n\t\t\t$email->cc = $category->v('confirmation_email_cc');\n\t\t\t$email->bcc = $category->v('confirmation_email_bcc');\n\t\t}\n\n\t\treturn $email;\n\t}",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('Accept Resignation')\n ->line('Dear '.$this->employee_info->name.',')\n ->line('Your resignation submitted '.date('M. d, Y',strtotime($this->employee_info->upload_date)).' , effective '.date('M. d, Y',strtotime($this->employee_info->last_day)).' was approved by '.auth()->user()->name.'. A copy of this notice shall be given to Human Resources for clearance preparation.')\n // ->action('(click button)', $this->server->server_ip.'/uploaded-letter')\n ->line('An e-mail indicating the next steps shall be sent to you shortly. ')\n ->line('Please check the Offboarding System and your e-mail regularly for updates. ')\n ->line('This is an auto generated email please do not reply')\n ->line('Thank you for using our application!');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->from('[email protected]')\n ->subject($this->subject)\n ->greeting(\"Olá {$this->user->name},\")\n ->line($this->text)\n ->line(new HtmlString(\"<div align='center' style='margin: auto 60px; background-color: #eee; padding: 30px 15px; font-weight: bold; letter-spacing: 5px; font-size: 1.2rem'>\n {$this->user->validation_code}\n </div>\"))\n ->line(new HtmlString(\"<br><br><br>Obrigado por usar nossa aplicação\"))\n ->salutation('Atenciosamente,');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('ยืนยันอีเมล์')\n ->line('โปรดคลิกปุ่มด้านล่างเพื่อยืนยันอีเมล์')\n ->action('ยืนยันอีเมล์',\n $this->verificationUrl($notifiable)\n )\n ->line('หากท่านไม่ได้สมัครสมาชิกต้องขอภัยมา ณ ที่นี้ด้วย');\n /*\n return (new MailMessage)\n ->subject('ยืนยันอีเมล์')\n ->view('emails.user.verify-email',['url' => $this->verificationUrl($notifiable)]);*/\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject(\"Invitación de participación en proyecto de {$this->project->projectType->type} - Ibis\")\n ->greeting(\"¡Hola {$this->user->name}!\")\n ->line(\"El semillero de investigación {$this->researchTeam->name} de la institución educativa {$this->researchTeam->researchGroup->educationalInstitutionFaculty->educationalInstitution->name} quiere invitarlo para que participe en el desarrollo del proyecto {$this->project->title}. Por favor revise el documento adjunto, si esta de acuerdo firme y posteriormente cargue el documento en pdf en la sección 'Enviar respuesta' haciendo clic en 'Más información del proyecto'.\")\n ->action('Más información del proyecto', route('nodes.explorer.searchProjects.showProject', [$this->node, $this->project]))\n ->line('Gracias y esperamos su pronta respuesta')\n ->attach($this->file);\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->greeting(' ')\n ->line('Новый комментарий пользователя ' . $this->data['commenter'] . ' к статье \"' . $this->data['title'] . '\" :')\n ->line(' …' . $this->data['body'] . '…')\n ->action('Перейти на страницу статьи', url('/posts/' . $this->data['slug'] ))\n ->salutation('С приветом, Я!');\n }",
"public function getNotifyMsg()\n {\n return $this->get(self::_NOTIFY_MSG);\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject(\"A new order #\".$this->order->id.\" has been created\")\n ->greeting('Hello '.$notifiable->name.',')\n ->line(\"A new order #\".$this->order->id.\" has been created By \".$this->order->user->name)\n ->line('Thank you for managing your shop in'.setting('site_name'));\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('News on Laramap.com 🗞️')\n ->greeting('Dear '.$this->user->username)\n ->line($this->data['body'])\n ->line('Please note that laramap is still in development. 👷')\n ->line('Thank you for using Laramap! 😻');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('Reward Checkpoint Reminder')\n ->line('Just a reminder – let us know how frequently you’ve been participating with your students! In exchange for your participation in the survey, you’ll have a chance to win awesome prizes including NBA apparel, tickets to games, and special event experiences. You must complete the form by end-of-day on Friday to qualify!')\n ->action('Share Data', url('/checkpoint'))\n ->line('Thank you!');\n }",
"public function toMail($notifiable)\n {\n if ($this->user->type() == 'cso') {\n $type = \"примател\";\n } else {\n $type = \"донатор\";\n }\n $message = (new MailMessage)->subject('[Сите Сити] Променет е профилот на ' . $type . 'от.')\n ->line('Направени се следниве измени:')\n ->line('Тип: ' . $type)\n ->line('Име: ' . $this->user->first_name)\n ->line('Презиме: ' . $this->user->last_name)\n ->line('Емаил: ' . $this->user->email)\n ->line('Организација: ' . $this->user->organization->name)\n ->line('Адреса: ' . $this->user->address)\n ->line('Телефон: ' . $this->user->phone)\n ->line('Локација: ' . $this->user->location->name);\n return $message;\n }",
"public function mail()\n\t{\n\t\treturn $this->_mail;\n\t}",
"public function toMail($notifiable)\n {\n $link = url(\"/week?id=\" . $this->weekID);\n\n return (new MailMessage)\n ->subject('HSH | Una subasta inscripta ha sido obtenida por un Premium')\n ->greeting('Hola, ' . $notifiable->nombre)\n ->line('Un usuario Premium se ha adjudicado una semana en la que estabas inscripto')\n ->line('Propiedad: ' .$this->propertyName)\n ->line('Semana: ' .$this->date)\n ->action('Ver Semana', $link)\n ->salutation('Home Switch Home - Cadena de Residencias');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->line($this->title)\n ->action('View Achievement', $this->link)\n ->line($this->text);\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->greeting('Hola')\n ->subject('Consulta de Reserva')\n ->line('Tienes una nueva consulta de reserva')\n ->line('Nombre: '.$this->name)\n ->line('Email: '.$this->email)\n ->line('Telefono: '.$this->phone)\n ->line('fecha: '.$this->date)\n ->line('Tipo de evento : '.$this->type_event)\n ->line('Asistentes : '.$this->assistants)\n ->line('Detalles del evento : '.$this->comments);\n }",
"public function toMail($notifiable)\n {\n $url = url('/invoice/'.$this->invoice->id);\n\n return (new MailMessage)\n ->greeting('Olá usuário.')\n ->line('Esse email é referente a sua solicitação para refazer sua senha.')\n ->action('View Invoice', $url)\n ->line('Este email ira expirar em 1 hora.')\n ->line('Caso você não tenha feito a solicitação, desconsidere esse email.')\n ->line('Equipe CoguMais agradece.');\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject(__('Request Received'))\n ->line(__(\n \"Thanks for getting in touch! This is an automatic email just to let you know that we've received your request and your ticket reference is :ticketId.\",\n ['ticketId' => $this->ticket->id]\n ))\n ->line(__('One of our support agents will get back to you shortly. Please do not submit multiple tickets for the same request, as this will not result in a faster response time.'))\n ->action('View Help Center', url('/help-center'));\n }",
"public function toMail($notifiable)\n {\n //$location = $this->vdvk->getProposedLocation;\n return (new MailMessage)\n ->subject('Funds has been released Successfully for VDY ')\n ->line('Dear Sir/Madam,')\n ->line('Greetings!!,')\n ->line($this->messgae)\n ->line('Thanks & Regards')\n ->line('VDY VDIS Admin');\n }",
"public function toMail($notifiable)\n {\n $mail = new MailMessage();\n\n $mail->greeting('Hello, '. $notifiable->username . '!');\n $mail->line('There has a new user registred on webiste.');\n $mail->line('Username: ' . $this->data->username);\n $mail->line('Email: ' . $this->data->email);\n $mail->line('Created At: ' . $this->data->created_at);\n $mail->action('Visit admin panel', admin_url());\n\n return $mail;\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('Votre topic a été supprimé.')\n ->markdown('mails.topic-deleted', [\n 'topic' => $this->topic,\n 'project' => $this->project,\n 'user' => $notifiable\n\n ]);\n }",
"public function getNotification()\n {\n return $this->notification;\n }",
"public function getNewMail()\n {\n return $this->get(self::_NEW_MAIL);\n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('Event Closed')\n ->line(\"An Event titled: {$this->event->title} dated on {$this->event->event_date->format('M jS, Y')} has been closed\")\n ->line(\"For more information about your ticket sales, click on the link below\")\n ->action(\"Event Page\", route('backend.events.details', $this->event->id));\n }",
"public function getMail():string\n { \n return $this->mail;\n }",
"public function toMail($notifiable)\n { \n \n return (new MailMessage)\n ->subject('¡Te han agregado al equipo de un objetivo en Participes!')\n ->markdown('mail.objectives.join', ['user' => $notifiable, 'objective' => $this->objective, 'role' => ($this->role == 'manager' ? 'coordinardor/a' : 'reportero/a')]);\n \n }",
"public function toMail($notifiable)\n {\n return (new MailMessage)\n ->subject('Pemberitahuan Jadwal Pelaksanaan Ikrar')\n ->line('Jadwal ikrar ditetapkan pada tanggal')\n ->line(date('d-m-Y', strtotime($this->tanggal)) . ' Pukul ' . date('H:i', strtotime($this->tanggal)))\n ->line('Tempat: KUA Pulosari')\n ->line('Dimohon untuk wakif mempersiapkan dan membawa nadzir dan saksi saat akan melaksanakan ikrar wakaf')\n ->action('Lihat Status Pengajuan', route('wakif.pengajuan-wakaf.show', $this->berkasWakif->id))\n ->line('Terimakasih');\n }"
] | [
"0.7329682",
"0.73008144",
"0.7279281",
"0.72447264",
"0.7150932",
"0.713269",
"0.71279645",
"0.7124905",
"0.70436907",
"0.70436907",
"0.70436907",
"0.70436907",
"0.70169747",
"0.6981995",
"0.6965215",
"0.69630843",
"0.6962014",
"0.69318545",
"0.692679",
"0.6913696",
"0.6901655",
"0.6891927",
"0.6882121",
"0.6882121",
"0.6882121",
"0.6882121",
"0.6882121",
"0.6882121",
"0.6882121",
"0.6882121",
"0.6882121",
"0.6882121",
"0.6882121",
"0.6874644",
"0.6874644",
"0.6874644",
"0.6874644",
"0.6874644",
"0.6873094",
"0.68712616",
"0.6861968",
"0.68592066",
"0.6855583",
"0.6834309",
"0.68288237",
"0.6827025",
"0.6818496",
"0.6818069",
"0.68166715",
"0.681161",
"0.6810731",
"0.6802911",
"0.6799005",
"0.67923856",
"0.679201",
"0.67880183",
"0.6786402",
"0.6784462",
"0.67844015",
"0.678121",
"0.6771769",
"0.6767643",
"0.6746845",
"0.67418754",
"0.67416346",
"0.67398185",
"0.67343414",
"0.67270494",
"0.6722636",
"0.67166543",
"0.6715651",
"0.6713519",
"0.6710188",
"0.6708883",
"0.6704977",
"0.6704099",
"0.6702548",
"0.6692169",
"0.6691404",
"0.66834474",
"0.6674972",
"0.6672788",
"0.6670916",
"0.6653598",
"0.6645107",
"0.6644927",
"0.6637104",
"0.6635857",
"0.66354716",
"0.6632256",
"0.66166365",
"0.66161466",
"0.6615812",
"0.6606413",
"0.6602531",
"0.6601729",
"0.6601182",
"0.6600807",
"0.6598184",
"0.65979403"
] | 0.6863366 | 40 |
construcrs a new BaseModel | public function __construct()
{
$this->model = new BaseModel;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function __construc()\r\n\t{\r\n\t\tparent::Model();\r\n\t}",
"function __construct()\n {\n // 呼叫模型(Model)的建構函數\n parent::__construct();\n \n }",
"function __construct()\r\n {\r\n parent::Model();\r\n }",
"function __construct() {\r\n parent::Model();\r\n }",
"function __construct()\n {\n parent::Model();\n }",
"protected function createBaseModel()\n {\n $name = $this->qualifyClass('Model');\n $path = $this->getPath($name);\n\n if (!$this->files->exists($path)) {\n $this->files->put(\n $path,\n $this->files->get(__DIR__.'/../../stubs/model.base.stub')\n );\n }\n }",
"public function __construct()\n {\n parent::Model();\n\n }",
"public function __construct()\n {\n $this ->model = $this ->makeModel($this ->model());\n }",
"abstract protected function newModel(): Model;",
"function __construct () {\n\t\t$this->_model = new Model();\n\t}",
"public function __construct() {\n parent::__construct();\n $this->load->model(\"modelo_base\");\n \n }",
"public function __construct() {\n // Call the Model constructor\n parent::__construct();\n }",
"function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }",
"function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }",
"function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }",
"function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }",
"function __construct() {\n // Call the Model constructor \n parent::__construct();\n }",
"public function __construct(Model $model) {\n parent::__construct($model);\n \n }",
"function __construct(){\n\t\tparent::__construct();\n\t\t\t$this->set_model();\n\t}",
"public function __construct($model) \n {\n parent::__construct($model);\n }",
"public function __construct() {\n parent::__construct();\n $this->load->database();\n $this->load->model(\"base_model\");\n }",
"public function __construct()\n {\n parent::__construct('testutils\\mvvm\\TestModel');\n }",
"public function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->model('Model');\n\t}",
"public function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->model('Model');\n\t}",
"function __construct()\n {\n parent::__construct();\n\n //Load model con nombre base\n $this->load->model('Crud_model', 'Rest_model');\n }",
"public function __construct()\n {\n \t parent::__construct();\n \t $this->load->model('Modelo');\n }",
"public function __construct()\n {\n // Call the CI_Model constructor\n parent::__construct();\n }",
"public function __construct()\n {\n // Call the CI_Model constructor\n parent::__construct();\n }",
"public function __construct(){\n\n\t\t$this->types_model = new Types();\n\t}",
"private function __construct($model)\r\n {\r\n\r\n }",
"function\t__construct()\t{\n\t\t\t\t/* contrutor da classe pai */\n\t\t\t\tparent::__construct();\n\t\t\t\t/* abaixo deverão ser carregados helpers, libraries e models utilizados\n\t\t\t\t\t por este model */\n\t\t}",
"public function __construct() {\n\t\t$this->orgModel = new OrgModel(); // TODO: \n\t }",
"public function __construct(){\n parent::__construct();\n $this->load->model(\"Cuartel_model\");\n\n\t}",
"public function __CONSTRUCT(){\n $this->model = new Estadobien();\n }",
"public function __construct()\n {\n parent::__construct();\n //自动加载相对应的数据模型\n if ($this->auto_load_model) {\n $model_name = $this->model_name ? $this->model_name . '_model' : $this->router->fetch_class() . '_model';\n $this->load->model($model_name, 'model');\n }\n $this->_set_user();\n $this->_check_resource();\n }",
"function __construct()\n {\n parent::__construct();\n $this->__resTraitConstruct();\n $this->load->model('VSMModel');\n $this->load->model('TextPreprocessingModel');\n\n }",
"function __construct(Model $model)\n {\n $this->model=$model;\n }",
"public function __construct(){\n\t\tinclude_once(\"model/crews_model.php\");\n\t\t$this->model = new crews_model();\n\t}",
"public function __construct () {\n\t\tparent::__construct ();\n\t\t\n\t\tif ($this->models)\n\t\tforeach ($this->models as $model) {\n\t\t\tunset ($this->models[$model]);\n\t\t\t$this->models[$model] = $this->session->getModel ($model,$this);\n\t\t\t$this->$model = $this->models[$model];\n\t\t}\n\t}",
"public function __construct() {\n $this->porcentajesCursoModel = $this->model('PorcentajesCursoModel');\n $this->tipoModuloModel = $this->model('TipoModuloModel');\n $this->cursoModel = $this->model('CursoModel');\n }",
"public function __construct()\n {\n // All of my models are like this\n parent::__construct(get_class($this));\n // Calling methods to get the relevant data\n $this->generateNewsData();\n $this->generateAnalyticsData();\n $this->generatePostsData();\n }",
"function __construct(){\n parent::__construct();\n $this->check_isvalidated();\n $this->load->model('admin_model');\n $this->load->model('anggota_model');\n $this->load->model('pokok_wajib_model');\n $this->load->model('tabarok_a_model');\n $this->load->model('tarekah_a_model');\n $this->load->model('tarekah_b_model');\t\t\n }",
"public function __construct(){\n require_once 'EntidadBase.php'; // Incluye el archivo EntidadBase\n require_once 'BaseModel.php'; // Incluye el archivo BaseModel\n foreach(glob('Model/*.php') as $file){ // Recorre todos los archivos de la carpeta Model con la extensión PHP.\n require_once($file); // Incluye el archivo\n }\n }",
"public function __construct() {\n parent::__construct('md_rent_car', 'md_order');\n $this->log->log_debug('RentCarAffairModel model be initialized');\n }",
"public function __construct(Model $model)\n {\n parent::__construct();\n\n $this->model = $model;\n }",
"function __construct() {\n\t\t$this->cotizacionModel = new cotizacionModel();\n\t}",
"public function __construct() {\n parent::__construct();\n //setting attribute types.\n settype($this->id, \"integer\");\n settype($this->name, \"string\");\n settype($this->question_type_id, \"integer\");\n }",
"function __construct() {\n parent::__construct();\n $this->load->model('flightModel');\n $this->load->model('flight');\n $this->load->model('wackyModel');\n $this->load->model('fleetModel');\n }",
"public function __construct()\n {\n parent::__construct();\n \t$this->load->model('Common_model');\n }",
"public function __construct()\n {\n parent::__construct();\n $this->instituion_grade = new \\App\\Models\\Institution_grade();\n $this->education_grades = new Education_grade();\n $this->academic_period = new Academic_period();\n $this->institution_students = new Institution_student();\n $this->institutions = new Institution();\n $this->institution_class_students = new Institution_class_student();\n $this->institution_classes = new Institution_class();\n $this->institution_student_admission = new Institution_student_admission();\n }",
"public function __construct()\n {\n parent::__construct();\n\n if (!$this->table) {\n $this->table = strtolower(str_replace('_model','',get_class($this))); //fungsi untuk menentukan nama tabel berdasarkan nama model\n }\n }",
"function __construct()\n {\n parent::__construct();\n $this->load->model(['encuentros_model']);\n }",
"public static function model() {\n //here __CLASS__ or self does not work because these will return coreModel class name but this is an abstract class so php will generate an error.\n //get_called_class() will return the class name where model is called.It may be the child.\n $class = get_called_class();\n return new $class;\n }",
"public function __construct(ScaffoldInputBase $model)\n {\n foreach ($model as $key => $value) {\n $this->{$key} = $value;\n }\n }",
"function __construct()\n {\n parent::__construct();\n // $this->load->model('');\n }",
"public function __construct() {\n parent::__construct();\n $this->load->model('libreta_model');\n }",
"public function __construct() {\n\n parent::__construct();\n\n // Load models\n $this->load->model(\"attributesModel\", \"attributes\");\n\n }",
"public function __construct(){\n\n parent::__construct();\n $this->load->model('User_model','user');\n $this->load->model('Sys_model','sys');\n $this->load->model('Article_model','article');\n $this->load->model('System_model','system');\n }",
"function AccountsModel() {\n\t\tparent::__construct(); \n }",
"public function __contruct()\n {\n parent::__construct();\n }",
"function __construct() {\n parent::__construct();\n $this->load->model('Fontend_model');\n $this->load->model('Package_model');\n }",
"function __construct()\n {\n parent::__construct();\n $this->__resTraitConstruct();\n $this->load->model('ArticelModel');\n\n }",
"function __construct()\n {\n parent::__construct();\n $this->load->model('User');\n $this->load->model('Pesan');\n $this->load->model('Obat');\n }",
"function __construct($model)\n {\n $this->model = $model;\n }",
"public function __construct() {\n\t\t\t$this->modelName = 'concreeeeeete';\n\t\t}",
"public function __construct()\n\t{\n\t\t// \\ladybug_dump($model);\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model('LeBabeModel');\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model('LeBabeModel');\n\t}",
"public function __construct($model)\n {\n //\n $this->model = $model;\n }",
"public function __construct() {\r\n $this->model = new CompanyModel();\r\n }",
"public function __construct() {\r\n parent::__construct();\r\n $this->load->model(array(\r\n 'app_model'\r\n ));\r\n }",
"public function __contruct()\n {\n parent::__construct();\n\n }",
"public function __construct()\n {\n $this->model = app()->make($this->model());\n }",
"public function __construct()\n\t\t{\n\t\t\t// $this->_database_connection = 'special_connection';\n\n\t\t\t// you can disable the use of timestamps. This way, MY_Model won't try to set a created_at and updated_at value on create methods. Also, if you pass it an array as calue, it tells MY_Model, that the first element is a created_at field type, the second element is a updated_at field type (and the third element is a deleted_at field type if $this->soft_deletes is set to TRUE)\n\t\t\t$this->timestamps = FALSE;\n\n\t\t\t// you can enable (TRUE) or disable (FALSE) the \"soft delete\" on records. Default is FALSE, which means that when you delete a row, that one is gone forever\n\t $this->soft_deletes = FALSE;\n\n\t // you can set how the model returns you the result: as 'array' or as 'object'. the default value is 'object'\n\t\t\t$this->return_as = 'object' | 'array';\n\n\n\t\t\t// you can set relationships between tables\n\t\t\t// $this->has_one['room_list'] = array('room_list','rl_id','rl_id');\n\t\t\t// $this->has_one['Sched_day'] = array('sched_day','sd_id','sd_id');\n\t\t\t// $this->has_one['subject'] = array('subjects','subj_id','subj_id');\n\n\t\t\n\t\t\t// you can also use caching. If you want to use the set_cache('...') method, but you want to change the way the caching is made you can use the following properties:\n\n\t\t\t$this->cache_driver = 'file';\n\t\t\t//By default, MY_Model uses the files (CodeIgniter's file driver) to cache result. If you want to change the way it stores the cache, you can change the $cache_driver property to whatever CodeIgniter cache driver you want to use.\n\n\t\t\t$this->cache_prefix = 'currv';\n\t\t\t//With $cache_prefix, you can prefix the name of the caches. By default any cache made by MY_Model starts with 'mm' + _ + \"name chosen for cache\"\n\n\t\t\tparent::__construct();\n\t\t}",
"public function createModel()\n {\n }",
"public function __construct()\n\t{\n\t\tif (!$this->model_name)\n\t\t{\n\t\t\t$this->model_name = str_replace('Model_', '', get_class($this));\n\t\t}\n\t\t$this->model_name = strtolower($this->model_name);\n\t\t\n\t\t$this->_initialize_db();\n\t}",
"public function __construct()\n {\n parent::__construct();\n $this->load->model(['m_voting', 'm_master', 'm_prospects', 'm_factors']);\n }",
"function __construct() {\n $this->loteModel = new loteModel();\n }",
"public function __construct() {\n//to make connection db \n//when you make object from class baseModel Or any child(extends) Class\n\n parent::__construct();\n $this->connecToDB();\n }",
"public function __construct()\n {\n parent::__construct(self::table, self::columns, self::entity_class_name);\n }",
"public function __construct()\n {\n parent::__construct(self::table, self::columns, self::entity_class_name);\n }",
"public function __construct()\n {\n parent::__construct(self::table, self::columns, self::entity_class_name);\n }",
"public function __construct()\n {\n parent::__construct(self::table, self::columns, self::entity_class_name);\n }",
"public function __construct () {\n $this->model = 'App\\\\' . $this->model;\n $this->model = new $this->model();\n\n // Get the column listing for a given table\n $this->table_columns = Schema::getColumnListing( $this->table );\n }",
"public function __construct( Model $model ) {\n\t\t$this->model = $model;\n\t}",
"public function __construct() {\n parent::__construct();\n \n $this->load->model('obj/ordstatus');\n }",
"public function __construct() {\n parent::__construct();\n $this->load->model('M_FluktuasiHarga');\n $this->load->model('M_Komoditas');\n $this->load->model('M_Lokasi');\n }",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model('Cliente_modelo');\n\t}",
"function __construct()\n\t{\n\t\t// this->model = new Producto();\n\t}",
"public function __construct()\n {\n parent::__construct();\n $this->path = __DIR__.'/../';\n\n $this->Model = '';\n $this->model = '';\n $this->Models = '';\n $this->models = '';\n\n $this->schema = '';\n $this->field_names = '';\n $this->table_header = '';\n $this->table_data = '';\n $this->details = '';\n $this->seeder_data = '';\n }",
"function __construct() {\n parent::__construct();\n\t\t$this->load->model('migration_request', 'request');\n }",
"public function __construct()\n {\n $this->imageModel = new ImageModel();\n $this->userModel = new User();\n $this->psychologySupervisorModel = new PsychologySupervisor();\n $this->registerSupervisionModel = new RegisterSupervision();\n $this->updateSupervisionModel = new UpdateSupervisionModel();\n }",
"public function __construct()\n {\n parent::__construct();\n $this->load->model('M_client');\n $this->load->model('M_psy');\n $this->load->model('M_auth');\n $this->load->model('M_appointment');\n\n }",
"public function __construct(){\n parent::__construct();\n $this->authorHasBookModel = $this->model('AuthorHasBook'); \n }",
"function __construct()\n {\n parent::__construct();\n\t\t$this->load->model('common','common');\n }",
"abstract public function model();",
"abstract public function model();",
"abstract public function model();",
"abstract public function model();",
"function __construct()\n {\n parent::__construct();\n $this->load->model('BH');\n\n }"
] | [
"0.78787273",
"0.7385974",
"0.73807234",
"0.73535955",
"0.72769177",
"0.72418636",
"0.7142186",
"0.7119367",
"0.709172",
"0.70602024",
"0.7030872",
"0.7000855",
"0.69489264",
"0.69489264",
"0.69489264",
"0.69489264",
"0.69463074",
"0.6916801",
"0.6860955",
"0.6841091",
"0.67299724",
"0.66861135",
"0.6663715",
"0.6663715",
"0.6653084",
"0.6609644",
"0.6604376",
"0.6604376",
"0.65893847",
"0.6588652",
"0.6587005",
"0.6551123",
"0.6546628",
"0.6503386",
"0.649822",
"0.64964855",
"0.64960057",
"0.64789724",
"0.6471429",
"0.6466081",
"0.64613074",
"0.6451408",
"0.6450414",
"0.6449749",
"0.64447486",
"0.64403063",
"0.6436771",
"0.64348847",
"0.64260185",
"0.6424693",
"0.6422352",
"0.6416494",
"0.6414005",
"0.6407966",
"0.64019924",
"0.6399833",
"0.638929",
"0.6384254",
"0.6378685",
"0.6378322",
"0.6375209",
"0.6371468",
"0.6369273",
"0.63617843",
"0.6358294",
"0.63570166",
"0.63455695",
"0.63455695",
"0.6343221",
"0.63337994",
"0.63331467",
"0.63244",
"0.63226813",
"0.63115233",
"0.6310253",
"0.6309215",
"0.63090044",
"0.6305522",
"0.6303956",
"0.6303391",
"0.6303391",
"0.6303391",
"0.6303391",
"0.6294302",
"0.629316",
"0.62920845",
"0.6290282",
"0.6289377",
"0.62891245",
"0.628549",
"0.6285253",
"0.6277396",
"0.62771267",
"0.6275788",
"0.6266588",
"0.6263711",
"0.6263711",
"0.6263711",
"0.6263711",
"0.62622404"
] | 0.8086582 | 0 |
decides which page to visit based on input | public function showHome()
{
if(!isset($_GET['people']))
{
$arr=$this->model->getList();
include 'view_home.php';
} else
{
$val = $this->model->getPerson($_GET['people']);
include 'view2.php';
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getPageFromRequest() {\n\t\t$oFilter = utilityInputFilter::filterInt();\n\t\t$page = $oFilter->doFilter($this->getActionFromRequest(false, 2));\n\t\t\n\t\tif ( !$page || !is_numeric($page) || $page < 1 ) {\n\t\t\t$page = 1;\n\t\t}\n\n\t\treturn $page;\n\t}",
"function getCurrentPage($where){\n $currentPage = filter_input(INPUT_GET, $where, FILTER_SANITIZE_STRING);\n $currentPage = (empty($currentPage)) ? 'home' : $currentPage;\n return $currentPage;\n}",
"private function setPage(){\n\t if(!empty($_GET['page'])){\n\t if($_GET['page']>0){\n\t if($_GET['page'] > $this->pagenum){\n\t return $this->pagenum;\n\t }else{\n\t return $_GET['page'];\n\t }\n\t }else{\n\t return 1;\n\t }\n\t }else{\n\t return 1;\n\t }\n\t }",
"private function define_page()\n {\n isset($_GET['page']) && !empty($_GET['page']) && is_numeric($_GET['page']) ? $page = (int)$_GET['page'] : $page = 1;\n return $page;\n }",
"public function pageActual(){\n\n\t\tif(isset($_GET['p'])){\n\t\t\t$page = (int)$_GET['p'];\n\t\t\treturn $page;\n\t\t}else{\n\t\t\t$page = 1;\n\t\t\t$this->viewLoad('pages/initial');\n\t\t}\n\t\t\n\t\t\n\t}",
"function identifyPage() {\n//\t\t$req_uri = $_SERVER['REQUEST_URI'];\n//\t\tprint \"init\";\n\t\t$query = new Query();\n\t\tif($query->sql(\"SELECT id, relation, name, url FROM \" . UT_MEN . \" WHERE url LIKE '%\".$this->url.\"%'\")) {\n\t\t\t$item->id = $query->getQueryResult(0, \"id\");\n\t\t\t$item->name = $this->translate($query->getQueryResult(0, \"name\"));\n\n\t\t\t$item->url = str_replace(FRAMEWORK_PATH.\"/admin\", \"\", $this->url);\n\t\t\t$item->url = str_replace(GLOBAL_PATH.\"/admin\", \"\", $item->url);\n\t\t\t$item->url = str_replace(REGIONAL_PATH.\"/admin\", \"\", $item->url);\n\n//\t\t\t$item->url = ereg_replace(FRAMEWORK_PATH.\"/admin|\".GLOBAL_PATH.\"/admin|\".REGIONAL_PATH.\"/admin\", \"\", $query->getQueryResult(0, \"url\"));\n\t\t\tarray_unshift($this->trail, $item);\n\t\t\t$relation = $query->getQueryResult(0, \"relation\");\n\t\t\tif($relation) {\n\t\t\t\t$this->pageTrail($relation);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"function condition() {\n\t\treturn ! empty( $_GET['page'] ) && $this->args['page_slug'] === $_GET['page']; // Input var okay.\n\t}",
"function condition() {\n\t\treturn ! empty( $_GET['page'] ) && $this->page_slug === $_GET['page']; // Input var okay.\n\t}",
"public function getPage() {\n\t\tswitch($_POST['page']){\n\t\t\tcase 'getconfig':\n\t\t\t\t$this->returnConfig();\n\t\t\t\tbreak;\n\t\t\tcase 'save':\n\t\t\t\t$this->saveConfig();\n\t\t\t\tbreak;\n\t\t\tcase 'addkey':\n\t\t\t\t$this->addPresharedkey();\n\t\t\t\tbreak;\n\t\t\tcase 'editkey':\n\t\t\t\t$this->editPreSharedkey();\n\t\t\t\tbreak;\n\t\t\tcase 'deletekey':\n\t\t\t\t$this->removePresharedkey();\n\t\t\t\tbreak;\n\t\t\tcase 'addcertificate':\n\t\t\t\t$this->addCertificate();\n\t\t\t\tbreak;\n\t\t\tcase 'editcertificate':\n\t\t\t\t$this->editCertificate();\n\t\t\t\tbreak;\n\t\t\tcase 'deletecertificate':\n\t\t\t\t$this->removeCertificate();\n\t\t\t\tbreak;\n\t\t\tcase 'addtunnel':\n\t\t\t\t$this->addTunnel();\n\t\t\t\tbreak;\n\t\t\tcase 'edittunnel':\n\t\t\t\t$this->editTunnel();\n\t\t\t\tbreak;\n\t\t\tcase 'deletetunnel':\n\t\t\t\t$this->removeTunnel();\n\t\t\t\tbreak;\n\t\t\tcase 'toggletunnel':\n\t\t\t\t$this->toggleTunnel();\n\t\t}\n\t}",
"function on_page($path, $type = \"name\")\n {\n switch ($type) {\n case \"url\":\n $result = ($path == request()->is($path));\n break;\n\n default:\n $result = ($path == request()->route()->getName());\n }\n\n return $result;\n }",
"abstract protected function determinePageId() ;",
"private function what_page() {\n $query = (isset($_REQUEST['qa']) && $_SERVER['REQUEST_METHOD'] == \"GET\") ? $_REQUEST['qa'] : FALSE;\n if (!$query)\n return false;\n\n return $query;\n }",
"function GetCurrentPage()\n\t{\n\t\t// when list is used from Site and not from CMS\n\t\tif ($this->m_externalParmas && is_array ( $this->m_externalParmas ))\n\t\t{\n\t\t\t// looking for page param\n\t\t\tforeach ( $this->m_externalParmas as $parma )\n\t\t\t{\n\t\t\t\t// if param start with 'page'\n\t\t\t\tif (substr ( $parma, 0, 4 ) == 'page')\n\t\t\t\t{\n\t\t\t\t\t// if afther 'page' is number\n\t\t\t\t\t$pageIndex = intval ( substr ( $parma, 4 ) );\n\t\t\t\t\tif ($pageIndex)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn $pageIndex;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//From CMS\n\t\t$res = DB::REQUEST ( \"page{$this->m_linkIDName}\" );\n\t\t\n\t\tif (! $res)\n\t\t{\n\t\t\t$res = 1;\n\t\t}\n\t\treturn $res;\n\t}",
"public function invoke()\r\n\t{\r\n\t\tif(isset($_GET['page']))\r\n\t\t{\r\n\t\t\t$pageName = $_GET['page'];\r\n\t\t\t$this->loadPage($pageName);\r\n\t\t}\r\n\t\telseif(!isset($_GET['page']))\r\n\t\t{\r\n\t\t\t$this->loadPage('home');\r\n\t\t}\r\n\t}",
"function current_page(){\n return isset($_GET['p']) ? (int)$_GET['p'] : 1;\n}",
"public function index() {\n $exploded = explode(\"/\", $this->_url);\n if (count($exploded) > 1) {\n $this->page(intval($exploded[1]));\n } else {\n $this->page(0);\n }\n }",
"public function get_page();",
"public function set_page($class_model, $input_page) {\n $count = $class_model->count();\n $tmp_page = $count / PAGINATION;\n $tmp_page = ceil($tmp_page);\n $tmp_page1 = $count % PAGINATION;\n $page = $input_page;\n\n if ($tmp_page1 != 0) {\n $tmp_page = $tmp_page + 1;\n }\n if ($tmp_page < $page) {\n $page = $tmp_page;\n }\n return $page;\n }",
"function isAKnownPage($page_name)\n{\n return(isSinglepage($page_name) or isMultipage($page_name) or $page_name==\"_search\");\n}",
"public function default($name_of_page,$action){\r\n\r\n self::get_view($name_of_page,$action);// this function (get_view) talk this parameter and using it to call it in the browser to get main_view page\r\n }",
"function getPage(){\n $current_location = \"index\";\n if($url_part = array_pop(explode(\"/\", $_SERVER[\"REQUEST_URI\"]))){\n $url_part = array_slice(explode(\".php\", $url_part),0,1);\n if(!empty($url_part)){\n return $url_part[0];\n }\n }\n return $current_location;\n}",
"public static function processPageRequest($pagename,$request){\r\n\r\n }",
"public function getCurentPage()\n\t{\n\t\t$pattern = '#[a-z]*.php$#';\n\t\tpreg_match($pattern, $_SERVER['REQUEST_URI'], $current_page);\n\t\tif(isset($current_page) && $current_page){\n\t\t\tforeach($current_page as $cp){\n\t\t\t\tswitch($cp){\n\t\t\t\t\tcase 'index.php': \n\t\t\t\t\treturn 'index';\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'rooms.php':\n\t\t\t\t\treturn 'rooms';\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'chat.php':\n\t\t\t\t\treturn 'chat';\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'contact.php': \n\t\t\t\t\treturn 'contact';\n\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: \t\n\t\t\t\t\treturn 'other';\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t$this->goToIndex();\n\t\t}\n\t}",
"function get_page_id() {\n return isset($_GET['page']) && $_GET['page'] ? $_GET['page'] : 'home';\n}",
"function get_page() {\n\n $page = (isset($_GET['page']) && is_numeric($_GET['page']) ) ? $_GET['page'] : 1;\n return $page;\n\n}",
"public function go() {\n $pageID = $_POST[TOOLKIT_TAG . '_page_id'];\n\n # Get next page id\n if (isset($_POST[TOOLKIT_TAG . '_dir']) && $_POST[TOOLKIT_TAG . '_dir'] === SC_Survey_Flow::DIR_BACK) { // Moving backward\n # Store answers\n if ($this->bool_store_bwd) {\n $questionIDs = $this->process_answers($_POST);\n }\n \n # Revert to last page\n if (count($_SESSION[TOOLKIT_TAG]['pages'])) {\n $lastPage = array_pop($_SESSION[TOOLKIT_TAG]['pages']);\n $next = $lastPage['pageID'];\n \n } else { // Before the first page\n $next = SC_Page_Generator::START;\n }\n\n $_SESSION[TOOLKIT_TAG]['response'] = $this->getResponse();\n \n } else {\n # Store answers\n $questionIDs = $this->process_answers($_POST);\n\n # Store page\n ## Pages array must be numerically indexed, to ensure they are in the correct order.\n $_SESSION[TOOLKIT_TAG]['pages'][] = [\n 'pageID' => $pageID,\n 'questions' => $questionIDs\n ];\n\n $_SESSION[TOOLKIT_TAG]['response'] = $this->getResponse();\n\n \n # Calculate next page\n $next = $this->calculate_next_page($pageID);\n //$_SESSION[TOOLKIT_TAG]['pages'][] = $next;\n }\n \n return $next;\n }",
"function page_map($q = NULL) {\n\tglobal $c, $r;\n\tif ($q != NULL) {\n\t\tif (array_key_exists($q, $c['pageMap'])) {\n\t\t\t$q = $c['pageMap'][$q];\n\t\t\theader(\"Location: /$q\");\n\t\t}\n\t}\n}",
"private function autoRedirectToFirstpage()\n {\n if($this->urlQueryStringName === NULL)\n {\n self::$registry->error->reportError('The Url Query String for Pagination is not defined yet, You can do it by using initURLQueryStringName() method.', __LINE__, __METHOD__, true);\n return 0;\n }\n \n if(false !== ($pageQueryStringNamePosition = array_search($this->urlQueryStringName, $this->URLQueryString)))\n {\n if(!isset($this->URLQueryString[++$pageQueryStringNamePosition]) or !is_numeric($this->URLQueryString[$pageQueryStringNamePosition]) or ($this->URLQueryString[$pageQueryStringNamePosition] <= 0))\n {\n $this->URLQueryString[$pageQueryStringNamePosition] = 1;\n $finalQueryString = implode('/', $this->URLQueryString);\n self::$registry->request->go(null, null, $finalQueryString);\n }\n }\n return; \n }",
"protected function determinePageId() {}",
"protected function determinePageId() {}",
"public function getPage() {\r\n\t\tif (isset ( $_POST ['page'] )) {\r\n\t\t\tswitch ($_POST ['page']) {\r\n\t\t\t\tcase 'getconfig' :\r\n\t\t\t\t\t$this->getConfig();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'save':\r\n\t\t\t\t\t$this->saveConfig();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthrow new Exception('Invalid page request');\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->logger->error ( 'A page was requested without a page identifier' );\r\n\t\t\tthrow new Exception('Invalid page request');\r\n\t\t}\r\n\t}",
"function dispatchPage($utype){\n\n if ( strpos( $_REQUEST['username'] , 'list') !== false) {\n\t\theader(\"location:../compassstatic/student/purpose.php\"); \n\t} else {\n\t\n\tif (($utype&1) == 1)\t\t//go to student's main page\n\t\theader(\"location:./student/purpose.php\"); \n\telse if(($utype&2) == 2)\t//go to teacher's main page\n\t\theader(\"location:./teacher/selectunit.php\"); \n\telse if(($utype&4) == 4)\t//go to researcher's main page\n\t\theader(\"location:./researcher/selectunit.php\"); \n\telse if(($utype&8) == 8)\t//go to admin's main page\n\t\theader(\"location:./admin/panel.php\"); \n\telse\t\t\t\t//go to anonymous user's main page\n\t\theader(\"location:./anonym/panel.php\"); \n }\n}",
"public function getCurrentPage();",
"public function getCurrentPage();",
"public function getCurrentPage();",
"function getpage() {\n global $pages; /* so the included files know about it */\n\n $page = $_GET['page'];\n if ((preg_match('^/[a-z][a-z]/', $page)) && (in_array($page, $pages)))\n return $page;\n else\n return 'news';\n}",
"abstract protected function get_redirect_page();",
"function find_selected_page($public = false) {\r\n\t\tglobal $current_subject;\r\n\t\tglobal $current_page;\r\n\t\t\r\n\t\tif(isset($_GET[\"subject\"])) {\r\n\t\t\t$current_subject = find_subject_by_id($_GET[\"subject\"], $public);\r\n\t\t\tif($current_subject && $public) {\r\n\t\t\t\t$current_page = find_default_page_for_subject($current_subject[\"id\"]);\r\n\t\t\t} else {\r\n\t\t\t\t$current_page = null;\r\n\t\t\t}\r\n\t\t} elseif (isset($_GET[\"page\"])) {\r\n\t\t\t$current_page = find_page_by_id($_GET[\"page\"], $public);\r\n\t\t\t$current_subject = null;\r\n\t\t} else {\r\n\t\t\t$current_subject = null;\r\n\t\t\t$current_page = null;\r\n\t\t}\r\n\t}",
"abstract protected function getPage() ;",
"private function setConditionFromGET(array $input) {\n\t\t\n\t\t// First check if a page type was explicitly requested.\n \t\tif ($input[tx_newspaper::GET_pagetype()]) { \n\t\t\t$this->condition = 'get_var = \\'' . tx_newspaper::GET_pagetype() .\n\t\t\t\t'\\' AND get_value = \\'' . $input[tx_newspaper::GET_pagetype()] . '\\'';\n $this->get_parameters[tx_newspaper::GET_pagetype()] = $input[tx_newspaper::GET_pagetype()];\n \t\t} else {\n \t\t\t\n \t\t\t// Try to deduce the page type from other GET parameters.\n\t\t\tif ($this->find_in_possible_types($input)) {\n throw new tx_newspaper_IllegalUsageException('Could not determine page type from GET: ' . print_r($input, 1));\n }\n\t\t\t\n\t\t\t// If none is set, check if an article is requested.\n\t\t\tif ($input[tx_newspaper::GET_article()]) {\n \t\t\t\t$this->condition = 'get_var = \\'' . tx_newspaper::GET_article() .'\\'';\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t// Only of no other page type could be determined, show the section page.\n\t\t\t\t$this->condition = 'NOT get_var';\n \t\t\t}\n \t\t}\n\t\t\n\t}",
"function getPage()\r\n{\r\n if (isPosted())\r\n {\r\n return getPostVar(\"page\",\"home\"); \r\n } \r\n else \r\n {\r\n return getUrlVar(\"page\",\"home\");\r\n } \r\n}",
"private static final function getPage(\\phpbb\\request\\request $request) {\n\t\t$page = $request->variable(\"page\", ADispatcher::DEFAULT_CONTROLLER);\n\t\treturn str_replace(\"-\", \"_\", strtolower($page));\n\t}",
"function pagina_actual() {\n return isset($_GET['p']) ? (int)$_GET['p'] : 1;\n}",
"function checkpage()\r\n\t{\r\n\tif(!isset($_GET['page']))\r\n\t{\r\n\t$GLOBALS['page']=1;\r\n\t}\r\n\telse\r\n\t{\r\n\t$GLOBALS['page']=$_GET['page'];\r\n\t}\r\n\t}",
"function get_default_page_to_edit()\n {\n }",
"public function getPage() {\r\n\t\t//TODO: Check if user may look at the pages.\r\n\t\t\r\n\r\n\t\tif (isset ( $_POST ['page'] )) {\r\n\t\t\tswitch ($_POST ['page']) {\r\n\t\t\t\tcase 'getPlugins' :\r\n\t\t\t\t\t$this->pageGetPlugins ();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'enabled' :\r\n\t\t\t\t\t$this->pageEnabled ();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'priority' :\r\n\t\t\t\t\t//Change the priority of a plugin\n\t\t\t\t\t//Should not be possible to change using the GUI\n\t\t\t\t\t//Install/uninstall classes should change plugin priority.\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'uninstall' :\r\n\t\t\t\t\t$this->pageUninstall ();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'install' :\r\n\t\t\t\t\t$this->pageInstall ();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault :\r\n\t\t\t\t\tthrow new Exception ( \"page request not valid\" );\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthrow new Exception ( \"page request not valid\" );\r\n\t\t}\r\n\t}",
"function pageGroup() {\n $thisDir = pathinfo($_SERVER['PHP_SELF'], PATHINFO_DIRNAME);\n $thisPage = pathinfo($_SERVER['PHP_SELF'], PATHINFO_BASENAME);\n\n $result = '';\n\n if (($thisDir == '/') && ($thisPage == 'index.php')) {\n $result = 'Home';\n }\n else if ($thisDir == '/why-choose-us') {\n $result = 'Why Choose Us?';\n }\n else if (($thisDir == '/big-button-cell-phone') && ($thisPage == 'index.php')) {\n $result = 'Phone';\n }\n else if ($thisDir == '/senior-cell-phone-plans') {\n $result = 'Plans';\n }\n else if ($thisDir == '/shop') {\n $result = 'Shop';\n }\n else if ($thisDir == '/catalog') {\n $result = 'Shop';\n }\n else if ($thisDir == '/one-call') {\n $result = 'oneCall';\n }\n else if ($thisDir == '/activate') {\n $result = 'Activate Phone';\n }\n\n return $result;\n //error_log(\"result: \" . $result);\n }",
"public function is_page();",
"public static function cPage() {\n return isset($_GET[self::$_page]) ?\n $_GET[self::$_page] : 'index';\n //neu nhu bien page da duoc set thi ten trang chinh la bien page, neu chua duoc set thi la trang chu index\n }",
"protected function getPage() {}",
"protected function getPage() {}",
"private function determine_page_type() {\n\t\tswitch ( true ) {\n\t\t\tcase is_search():\n\t\t\t\t$type = 'SearchResultsPage';\n\t\t\t\tbreak;\n\t\t\tcase is_author():\n\t\t\t\t$type = 'ProfilePage';\n\t\t\t\tbreak;\n\t\t\tcase WPSEO_Frontend_Page_Type::is_posts_page():\n\t\t\tcase WPSEO_Frontend_Page_Type::is_home_posts_page():\n\t\t\tcase is_archive():\n\t\t\t\t$type = 'CollectionPage';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$type = 'WebPage';\n\t\t}\n\n\t\t/**\n\t\t * Filter: 'wpseo_schema_webpage_type' - Allow changing the WebPage type.\n\t\t *\n\t\t * @api string $type The WebPage type.\n\t\t */\n\t\treturn apply_filters( 'wpseo_schema_webpage_type', $type );\n\t}",
"public function getNextPage();",
"public function getCurrentPage(): int;",
"public function getCurrentPage(): int;",
"public function page_by_preset($suburl){\n\n\t\t//echo '<pre>'.h::encode_php($this->us);\n\t\t//echo '<pre>'.h::encode_php($this->us_get('nexus:presetID'));\n\t\t//echo '<pre>'.h::encode_php($this->env_get());die;\n\n\t\t// check if preset route is undefined\n\t\tif(!$this->env_is('preset:routes:'.$suburl)){\n\n\t\t\t// log error\n\t\t\te::logtrigger('DEBUG: Cannot load preset route '.h::encode_php($suburl));\n\n\t\t\t// return error page\n\t\t\treturn $this->load_page('error/500');\n\t\t\t}\n\n\t\t// take page from route\n\t\t$page = $this->env_get('preset:routes:'.$suburl);\n\n\t\t// try to get browser language\n\t\t$lang = isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? strtolower(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2)) : \"null\";\n\n\t\t// prepare data as json for event log\n\t\t$json_data = json_encode(array(\n\t\t 'lang' \t\t\t=> $lang,\n\t\t 'scheme'\t\t=> $this->env_get('preset:scheme:'.$this->us_get('preset_name')),\n\t\t 'page'\t\t\t=> $suburl,\n\t\t 'IP'\t\t\t=> $_SERVER['REMOTE_ADDR']\n\t\t));\n\n\t\t// log event \"tan checked\"\n\t\t$create = event::create([\n\t\t\t\"event\"\t\t=>\t\"visit\",\n\t\t\t\"project\"\t=>\t\"bragiportal\",\n\t\t\t\"data\"\t\t=>\t$json_data,\n\t\t\t]);\n\n\t\tif($create->status != 201) e::logtrigger('Event could not be created: '.h::encode_php($create));\n\n\t\t// temp variable for beta payment version\n\t\t//$this->sms = ($suburl == '/sms') ? true : false;\n\t\t$this->sms = true;\n\t\t$this->us_set(['sms' => ($suburl == '/sms') ? true : false]);\n\n\t\t// get profiles list\n\t\t//$this->get_profiles();\n\n\t\t// Get Gate\n\t\t$res = service::get_smsgate([\n\t\t\t'smsgateID' => $this->env_get('domain:smsgateID')\n\t\t\t]);\n\n\t\t// on error\n\t\tif(!in_array($res->status, [200, 404])){\n\t\t\treturn (object)['status'=>500, 'data'=>'server error, could not load gate.'];\n\t\t\t}\n\n\t\t// not found\n\t\telseif($res->status == 404){\n\t\t\te::logtrigger('smsgate '.h::encode_php($this->env_get('domain:smsgateID')).' could not be found: '.h::encode_php($res));\n\t\t\treturn (object)['status'=>500, 'data'=>'server erro, gate not found.'];\n\t\t\t}\n\n\t\t// assign gate\n\t\t$gate = $res->data;\n\t\t$this->us_set(['smsgateID' => $gate->smsgateID]);\n\t\t$this->us_set(['serviceID' => $gate->serviceID]);\n\n\t\t// load page\n\t\treturn $this->load_page(h::gX($page, 'page'), null, null, (h::gX($page, 'use_wrapper') === false ? false : true));\n\t\t}",
"function get_one_page(){\n\t\t$this->m_n_current_page_number = gf_get_value_n('v_current_page_number');\n\t}",
"public function getStartPage();",
"function getCurrentPage(){\n\t$file = $_SERVER[\"PHP_SELF\"];\n\t$break = Explode('/', $file);\n\t$currentPage = $break[count($break) - 1];\n return $currentPage;\n}",
"private function getPage() {\r\n $page = self::DEFAULT_PAGE;\r\n $this->module = self::DEFAULT_MODULE;\r\n //Check get for page to load, if page exists set page\r\n if (array_key_exists('page', $_GET)) {\r\n $page = $_GET['page'];\r\n }\r\n //Check get for module to load, if module exists set module\r\n if (array_key_exists('module', $_GET)) {\r\n $this->module = $_GET['module'];\r\n }\r\n return $this->checkPage($page);\r\n }",
"function get_page_by_path($page_path, $output = \\OBJECT, $post_type = 'page')\n {\n }",
"function _page($var){\n\t$ext = \"\";\n switch($var):\n \tcase \"flightairticket\":\n \t\treturn get_bloginfo('url').\"/ve-may-bay\".$ext;\n case \"flightresult\":\n return get_bloginfo('url').\"/chon-hanh-trinh\".$ext;\n case \"passenger\":\n return get_bloginfo('url').\"/thong-tin-hanh-khach\".$ext;\n case \"payment\":\n return get_bloginfo('url').\"/thong-tin-thanh-toan\".$ext;\n case \"complete\":\n return get_bloginfo('url').\"/hoan-tat-don-hang\".$ext;\n case \"flightinfo\":\n return get_bloginfo('url').\"/get-flight-info\".$ext;\n case \"flightdetail\":\n return get_bloginfo('url').\"/get-flight-detail\".$ext;\n case \"paymentinfo\":\n return get_bloginfo(\"url\").\"/huong-dan-thanh-toan\".$ext;\n\t\tcase \"bookguideinfo\":\n return get_bloginfo(\"url\").\"/huong-dan-dat-ve\".$ext;\n case \"vnalink\":\n return get_bloginfo(\"url\").\"/resultvietnamairlines\".$ext;\n case \"vjlink\":\n return get_bloginfo(\"url\").\"/resultvietjet\".$ext;\n case \"jslink\":\n return get_bloginfo(\"url\").\"/resultjetstar\".$ext;\n case \"qhlink\":\n return get_bloginfo(\"url\").\"/resultbambooairways\".$ext;\n case \"sabrelink\":\n return get_bloginfo(\"url\").\"/resultsabre\".$ext;\n\t\tcase \"airportlink\":\n return get_bloginfo(\"url\").\"/get-airportcode\".$ext;\n\t\tcase \"checkcaptcha\":\n return get_bloginfo(\"url\").\"/check-captcha\".$ext;\n\t\tcase \"hotelresult\":\n return get_bloginfo(\"url\").\"/core/hotel-search.php\";\t\t\n\t\tcase \"hotelguest\":\n return get_bloginfo(\"url\").\"/dat-phong\";\t\n\t\tcase \"hotelcomplete\":\n return get_bloginfo(\"url\").\"/hoan-tat-dat-phong\";\n\t\t\t\n\t\tcase \"cheapflightsearch\":\n return get_bloginfo(\"url\").\"/ve-re-trong-thang\";\t\n\t\t\t\n endswitch;\n}",
"public static function getPage()\n {\n return ! empty(self::getInstance()->urlParams[self::PARAM_PAGE]) && self::getInstance()->urlParams[self::PARAM_PAGE] > 0 ? self::getInstance()->urlParams[self::PARAM_PAGE] : 1;\n }",
"public function getPageNr(){\n\t\tif(isset($_GET['p'])){\n\t\t\treturn $_GET['p'];\n\t\t}else{\n\t\t\treturn 1;\n\t\t}\n\t}",
"function wti($pagenum) {\n$gamename = \"Voided Alliance\"; //Whatever your heart desires raygoe... :D\n\t\tswitch ($pagenum){\n\t\tCase 0:\n\t\techo \"$gamename - Index\";\n\t\tbreak;\n\t\tCase 1:\n\t\techo \"$gamename - Game\";\n\t\tbreak;\n\t\tCase 2:\n\t\techo \"$gamename - Register\";\n\t\tbreak;\n\t\tCase 3:\n\t\techo \"$gamename - Login\";\n\t\tbreak;\n\t\tCase 4:\n\t\techo \"$gamename - Player\";\n\t\tbreak;\n\t\tCase 5:\n\t\techo \"$gamename - Not Released\";\n\t\tbreak;\n\t\t}\n}",
"protected function makePage() {\n // \n // get the user's constituency\n // \n // get the candidates for this election in this constituency\n // \n // make the page output\n }",
"public function getPage() {\n if (isset($_REQUEST['page'])) {\n return $_REQUEST['page'];\n } else\n return 0;\n }",
"function currentPageIs($location){\n $current_location = getPage();\n return $current_location === $location;\n}",
"function pager_find_page($element = 0) {\n $page = isset($_GET['page']) ? $_GET['page'] : '';\n $page_array = explode(',', $page);\n if (!isset($page_array[$element])) {\n $page_array[$element] = 0;\n }\n return (int) $page_array[$element];\n}",
"public function isSearchPage();",
"abstract protected function getCurrentPageId() ;",
"function go_page_list() {\n\t\tglobal $ROW, $TEMPLATE;\n\t\tLOG_MSG('INFO',\"go_page_list(): START \");\n\t\t// Do we have a search string?\n\t\t// Get all the args from $_GET\n\t\t$name=get_arg($_GET,\"name\");\n\t\t$title=get_arg($_GET,\"title\");\n\t\t$type=get_arg($_GET,\"type\");\n\t\tLOG_MSG('DEBUG',\"go_page_list(): Got args\");\n\t\t// Validate parameters as normal strings \n\t\tLOG_MSG('DEBUG',\"go_page_list(): Validated args\");\n\t\t// Rebuild search string for future pages\n\t\t$search_str=\"name=$name&title=$title&type=$type\";\n\t\t$ROW=$this->admin_model->db_page_select(\n\t\t\t\"\",\n\t\t\t\t$name,\n\t\t\t\t$title,\n\t\t\t\t'',\n\t\t\t\t$type);\n\n\t\tif ( $ROW[0]['STATUS'] != \"OK\" ) {\n\t\t\tadd_msg(\"ERROR\",\"There was an error loading the Pages. Please try again later. \");\n\t\t\treturn;\n\t\t}\n\t\t\t\t$this->data['rows'] = $ROW;\n\t\t\t\t$this->load->view('admin/html/header', $this->data,'');\n\t\t\t\t$this->load->view('admin/html/topbar', $this->data);\n\t\t\t\t$this->load->view('admin/html/leftnav', $this->data);\n\t\t\t\t$this->load->view('admin/page/list', $this->data);\n\t\t\t\t$this->load->view('admin/html/footer', $this->data);\n\t\tLOG_MSG('INFO',\"go_page_list(): END\");\n\t}",
"function workflow_page_handler($page) {\n\n\telgg_load_library('workflow:utilities');\n\n\tif (!isset($page[0])) {\n\t\t$page[0] = 'all';\n\t}\n\n\telgg_push_breadcrumb(elgg_echo('workflow'), 'workflow/all');\n\n\t$base_dir = dirname(__FILE__) . '/pages/workflow';\n\n\tswitch ($page[0]) {\n\t\tdefault:\n\t\tcase 'all':\n\t\t\tinclude \"$base_dir/world.php\";\n\t\t\tbreak;\n\t\tcase 'owner':\n\t\t\tif ($page[3]) {\n\t\t\t\techo \"<script type='text/javascript'>var highlight = '$page[2]-$page[3]';</script>\";\n\t\t\t\telgg_load_js('jquery.scrollTo');\n\t\t\t}\n\t\t\tinclude \"$base_dir/owner.php\";\n\t\t\tbreak;\n\t\tcase 'group':\n\t\t\tif ($page[3]) {\n\t\t\t\techo \"<script type='text/javascript'>var highlight = '$page[2]-$page[3]';</script>\";\n\t\t\t\telgg_load_js('jquery.scrollTo');\n\t\t\t}\n\t\t\tinclude \"$base_dir/group.php\";\n\t\t\tbreak;\n\t\tcase 'assigned-cards':\n\t\t\tswitch ($page[1]) {\n\t\t\t\tdefault:\n\t\t\t\tcase 'all':\n\t\t\t\t\tinclude \"$base_dir/assigned-cards/world.php\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'owner':\n\t\t\t\t\tinclude \"$base_dir/assigned-cards/owner.php\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'friends':\n\t\t\t\t\tinclude \"$base_dir/assigned-cards/owner.php\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t}\n\n\telgg_pop_context();\n\n\treturn true;\n}",
"function pagination( $which ) {\r\n\t\t$save_uri = $_SERVER['REQUEST_URI'];\r\n\t\t$_SERVER['REQUEST_URI'] = add_query_arg( self::mla_submenu_arguments(), $save_uri );\r\n\t\tparent::pagination( $which );\r\n\t\t$_SERVER['REQUEST_URI'] = $save_uri;\r\n\t}",
"function location($page) {\r\n\r\n\t}",
"private function customPageAction($inputAlias){\n\t\tswitch($this->Params['pageName']){\n\t\t\tcase \"posts-loan_application\":\n\t\t\t\t$loanApprovalActivities = [2,3,4];//explode(\",\",Info::APPROVE_ACTIVITIES);\n\t\t\t\t$viewFields = [\"loan_granted\",\"other_information\"]; // FORCING TO EDITABLE\n\t\t\t\tif(in_array($inputAlias,$viewFields) && in_array($this->globalQueueData->activity_id, $loanApprovalActivities)){\n\t\t\t\t\t$this->pageAction = \"\";\n\t\t\t\t}elseif(in_array($this->globalQueueData->activity_id, $loanApprovalActivities)){\n\t\t\t\t\t$this->pageAction = \"view\";\n\t\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}",
"abstract protected function setPreviousPage();",
"public function getPage() {\n if ($this->getParameter('page')) {\n return $this->getParameter('page');\n }\n\n return 1;\n }",
"private function determine_pagenumbering( $request = 'nr' ) {\n\t\tglobal $wp_query, $post;\n\t\t$max_num_pages = null;\n\t\t$page_number = null;\n\n\t\t$max_num_pages = 1;\n\n\t\tif ( ! is_singular() ) {\n\t\t\t$page_number = get_query_var( 'paged' );\n\t\t\tif ( $page_number === 0 || $page_number === '' ) {\n\t\t\t\t$page_number = 1;\n\t\t\t}\n\n\t\t\tif ( ! empty( $wp_query->max_num_pages ) ) {\n\t\t\t\t$max_num_pages = $wp_query->max_num_pages;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$page_number = get_query_var( 'page' );\n\t\t\tif ( $page_number === 0 || $page_number === '' ) {\n\t\t\t\t$page_number = 1;\n\t\t\t}\n\n\t\t\tif ( isset( $post->post_content ) ) {\n\t\t\t\t$max_num_pages = ( substr_count( $post->post_content, '<!--nextpage-->' ) + 1 );\n\t\t\t}\n\t\t}\n\n\t\t$return = null;\n\n\t\tswitch ( $request ) {\n\t\t\tcase 'nr':\n\t\t\t\t$return = $page_number;\n\t\t\t\tbreak;\n\t\t\tcase 'max':\n\t\t\t\t$return = $max_num_pages;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $return;\n\t}",
"public static function isPage();",
"public function getPagerInput();",
"protected function getCurrentPage(){\n \n $request = $this->getRequest();\n $user = $this->getUser(); \n $page = 1;\n // Manage the current page\n if($request->hasParameter('page'))\n {\n $page = $request->getParameter('page');\n $user->setAttribute('page', $page, 'project/list');\n }\n elseif($user->hasAttribute('page', 'project/list'))\n {\n $page = $user->getAttribute('page', $page, 'project/list');\n } \n \n return $page;\n }",
"function _culturefeed_search_ui_get_active_search_page() {\n\n $query = drupal_get_query_parameters(NULL, array('q', 'page'));\n $searchable_types = culturefeed_get_searchable_types();\n\n foreach ($searchable_types as $key => $type) {\n\n // Check if this is the current page.\n if ($type['path'] == $_GET['q'] || $type['path'] . '/nojs' == $_GET['q']) {\n\n // If this page has active facets in the info definition. Check if all the facets matches.\n if (!empty($type['active_facets']) && !empty($query['facet'])) {\n $total_requested = count($type['active_facets']);\n $total_matches = 0;\n // Loop through the requested facets, and check if this is active in current search.\n foreach ($type['active_facets'] as $requested_facet => $requested_values) {\n\n // If the requested facet is active. Calculate the intersection, and check if all requested values are in the current page facets.\n if (isset($query['facet'][$requested_facet])) {\n $matches = array_intersect($requested_values, $query['facet'][$requested_facet]);\n if (count($matches) == count($requested_values)) {\n $total_matches++;\n }\n }\n }\n\n // If all the requested facets are found, this type should be default.\n if ($total_matches == $total_requested) {\n return $key;\n }\n\n }\n else {\n return $key;\n }\n\n }\n }\n\n return NULL;\n\n}",
"function get_page($page, $output = \\OBJECT, $filter = 'raw')\n {\n }",
"static function default_page($_escaped_fragment_ = null);",
"public function __construct(){\r\n $pageRequest ='homepage';\r\n //check if there are parameters\r\n if(isset($_REQUEST['page'])) {\r\n\r\n //load the type of page the request wants into page request\r\n \r\n $pageRequest = $_REQUEST['page'];\r\n }\r\n //instantiate the class that is being requested\r\n $page = new $pageRequest;\r\n\r\n if($_SERVER['REQUEST_METHOD'] == 'GET') {\r\n $page->get();\r\n } else {\r\n $page->post();\r\n }\r\n\r\n\r\n\r\n }",
"function sc_is_page( $page_name ){\n\tglobal $global_options;\n\t$options = (array)$global_options;\n\treturn (int)$options[$page_name] > 0 && is_page((int)$options[$page_name]);\n}",
"function nav () {\n\n//Scan 'pages' directory for existing content\n $dir = \"pages\";\n $pages = (scandir($dir));\n unset($pages[0], $pages[1]);\n\n//Check for 'p'\n if (isset($_GET['p'])) {\n\n $p = $_GET['p'].'.php';\n\n//Is user attempting to locate an existing page in 'pages directory'? If so, serve it. If not, throw error.\n if (in_array($p, $pages)) {\n\n include \"pages/$p\";\n\n } else {\n\n include \"pages/navError.php\";\n }\n\n } else {\n\n//Default to home if 'p' not set.\n include \"pages/home.php\";\n }\n\n}",
"function this_page() {\n if (is_page('home')) { \n echo 'home';\n } elseif (is_category()) {\n echo 'blog';\n } elseif (is_page('about')) {\n echo 'about';\n } elseif (is_single()) {\n echo 'basic';\n } elseif (is_archive('team')) {\n echo 'team';\n } elseif (is_page('solutions')) {\n echo 'solutions';\n } elseif (is_home('blog')) {\n echo 'blog';\n } elseif (is_search()) {\n echo 'blog';\n } else {\n echo 'basic';\n }\n}",
"function activeLink($page){\n\n\t\t/* Compare $page to $_GET */\n\t\tswitch($page){\n\t\tcase 'home':\n\t\t\tif(empty($_GET) || isset($_GET['home'])){\n\t\t\t\techo ' active';\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'about';\n\t\t\tif(isset($_GET['about'])){\n\t\t\t\techo ' active';\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'recent';\n\t\t\tif(isset($_GET['recent'])){\n\t\t\t\techo ' active';\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}",
"public function mainPage() {\r\n\t\t$action = ofaGet::get('action');\r\n\r\n\t\t// IF\t\tcurrent site is a personnel site\t\tonly allow user to edit their profile\r\n\t\t// ELSE\t\t\t\t\t\t\t\t\t\t\t\tallow access to all pages\r\n\t\tif (PERSONNELSITE) {\r\n\t\t\t$this->mainEditPage($action, true);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// Display the right \"page\"\r\n\t\t\tswitch($action) {\r\n\t\t\t\tcase 'new':\r\n\t\t\t\tcase 'edit':\r\n\t\t\t\t\t$this->mainEditPage($action);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'delete':\r\n\t\t\t\tdefault:\r\n\t\t\t\t\t$this->mainListPage();\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function page( $template )\n {\n // Get the current post ID\n $post_id = get_the_ID();\n\n // Get the current post slug\n $slug = get_page_uri($post_id);\n\n // Check pages directory for page\n if( $found = locate_template('templates/page/' . $slug . '.php') )\n {\n return $found;\n }\n\n // Check for generic page template\n if( $found = locate_template('templates/page.php') )\n {\n return $found;\n }\n\n // Use wp default location\n return $template;\n\n }",
"public function intro_tour() {\n\t\tglobal $pagenow;\n\n\t\t$page = preg_replace( '/^(formidable[-]?)/', '', filter_input( INPUT_GET, 'page' ) );\n\n\t\tif ( 'admin.php' === $pagenow && array_key_exists( $page, $this->admin_pages ) ) {\n\t\t\t$this->do_page_pointer( $page );\n\t\t} else {\n\t\t\t$this->start_tour_pointer();\n\t\t}\n\t}",
"protected function getCurrentPage(): int\n {\n if (isset($_GET['page']) and $_GET['page'] !== 0 and $_GET['page'] > 0) {\n $currentPage = (int) $_GET['page'];\n\n if ($currentPage > $this->pages) {\n $this->redirect($_SERVER['PHP_SELF']);\n }\n } else {\n $currentPage = 1;\n }\n\n return $currentPage;\n }",
"function set_pagename($wt) {\n switch ($wt){\n case \"Name\" : $urlname=\"/\"; break;\n case \"Bio\" : $urlname=\"/bio\"; break;\n default :\n $this->page[$wt] = \"unknown page identifier\";\n $this->debug_scalar(\"Unknown page identifier: $wt\");\n return false;\n }\n return $urlname;\n }",
"public function getPage();",
"function active_for($url)\n{\n $url = ltrim(URL::makeRelative($url), '/');\n\n return app()->request->is($url) ? 'selected' : '';\n}",
"protected function setupPage() {}",
"public function currentPageNumber()\n {\n $this->autoRedirectToFirstpage();\n\n if($this->currentPageNumberState === true)\n {\n return $this->currentPageNumber;\n }\n\n /**\n * If it's not defined yet then the user actualy are in the first page, then return 1 as a result.\n */\n if(false === ($queryAnalysisResult = array_search($this->urlQueryStringName, $this->URLQueryString)))\n {\n $this->currentPageNumberState = TRUE;\n $this->currentPageNumber = 1;\n return 1;\n }\n \n $pageNumber = $this->URLQueryString[++$queryAnalysisResult];\n \n /**\n * In paginations the page number must be a Number.\n * If the value is not a number then something is wrong, may be someone wants to hack the system!\n * The the 0 will be returned as false.\n */\n if(!is_numeric($pageNumber))\n {\n return 0;\n }\n \n $this->currentPageNumberState = TRUE;\n $this->currentPageNumber = (int)$pageNumber;\n return (int)$pageNumber;\n }",
"protected function determineRequestedPagePath()\r\n\t{\r\n\t\t$pagePath=$this->getRequest()->getServiceParameter();\r\n\t\tif(empty($pagePath))\r\n\t\t\t$pagePath=$this->getDefaultPage();\r\n\t\treturn $pagePath;\r\n\t}",
"public function getNextPageUrl();"
] | [
"0.63657844",
"0.63301754",
"0.6232465",
"0.61548066",
"0.6151032",
"0.60463786",
"0.60449386",
"0.600483",
"0.59999853",
"0.5946464",
"0.5903889",
"0.58938724",
"0.5865445",
"0.58638704",
"0.5852321",
"0.58426106",
"0.58193564",
"0.58158135",
"0.5813825",
"0.5783977",
"0.57414865",
"0.573906",
"0.5731177",
"0.57304907",
"0.57269186",
"0.57124895",
"0.568359",
"0.5680584",
"0.5674571",
"0.5674571",
"0.56578857",
"0.56501573",
"0.56304455",
"0.56304455",
"0.56304455",
"0.5627385",
"0.56115586",
"0.55738896",
"0.5548156",
"0.5538399",
"0.553681",
"0.5532529",
"0.55276906",
"0.5526671",
"0.55238056",
"0.552093",
"0.55179656",
"0.5512705",
"0.54972225",
"0.54838717",
"0.5483842",
"0.54672086",
"0.5466572",
"0.5465061",
"0.5465061",
"0.5460627",
"0.54546213",
"0.5442573",
"0.54372007",
"0.54315835",
"0.5427244",
"0.542223",
"0.54121286",
"0.5410665",
"0.5409373",
"0.5368173",
"0.5357807",
"0.53564066",
"0.5354268",
"0.53452384",
"0.53431946",
"0.53377676",
"0.5334387",
"0.53341615",
"0.5328624",
"0.5316155",
"0.53084564",
"0.530784",
"0.5307288",
"0.5298636",
"0.52983946",
"0.5296002",
"0.5295796",
"0.5291811",
"0.52820146",
"0.52812093",
"0.5280097",
"0.52782655",
"0.52766186",
"0.5275893",
"0.5267618",
"0.5260309",
"0.5257017",
"0.52404565",
"0.523652",
"0.5216305",
"0.521338",
"0.5204665",
"0.5202483",
"0.51987004",
"0.5195966"
] | 0.0 | -1 |
Creates a chdb file | function chdb_create($pathname, $data)
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function createDatabase() {\n try {\n $pdoObject = new PDOObject();\n $pdoObject->createTables();\n $pdo = $pdoObject->getPDO();\n\n openFile($pdo);\n } catch (PDOException $e) {\n $e->getMessage();\n exit;\n } finally {\n unset($pdo);\n }\n}",
"public function storeFile()\n\t{\n\t\tif (!$this->blnIsModified)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$strFile = trim($this->strTop) . \"\\n\\n\";\n\t\t$strFile .= \"-- LESSON SEGMENT START --\\nCREATE TABLE `tl_cb_lessonsegment` (\\n\";\n\n\t\tforeach ($this->arrData as $k=>$v)\n\t\t{\n\t\t\t$strFile .= \" `$k` $v,\\n\";\n\t\t}\n\n\t\t$strFile .= \") ENGINE=MyISAM DEFAULT CHARSET=utf8;\\n-- LESSON SEGMENT STOP --\\n\\n\";\n\n\t\tif ($this->strBottom != '')\n\t\t{\n\t\t\t$strFile .= trim($this->strBottom) . \"\\n\\n\";\n\t\t}\n\n\t\t$objFile = new File('system/modules/course_builder/config/database.sql');\n\t\t$objFile->write($strFile);\n\t\t$objFile->close();\n\t}",
"public function create() {\n\t\t$db = ConnectionManager::getDataSource('default');\n\t\t$usePrefix = empty($db->config['prefix']) ? '' : $db->config['prefix'];\n\t\t$file = $this->_path() . 'dbdump_' . date(\"Y-m-d--H-i-s\");\n\n\t\t$options = array(\n\t\t\t'--user=' . $db->config['login'],\n\t\t\t'--password=' . $db->config['password'],\n\t\t\t'--default-character-set=' . $db->config['encoding'],\n\t\t\t'--host=' . $db->config['host'],\n\t\t\t'--databases ' . $db->config['database'],\n\t\t);\n\t\t$sources = $db->listSources();\n\t\tif (array_key_exists('tables', $this->params) && empty($this->params['tables'])) {\n\t\t\t// prompt for tables\n\t\t\tforeach ($sources as $key => $source) {\n\t\t\t\t$this->out('[' . $key . '] ' . $source);\n\t\t\t}\n\t\t\t$tables = $this->in('What tables (separated by comma without spaces)', null, null);\n\t\t\t$tables = explode(',', $tables);\n\t\t\t$tableList = array();\n\t\t\tforeach ($tables as $table) {\n\t\t\t\tif (isset($sources[intval($table)])) {\n\t\t\t\t\t$tableList[] = $sources[intval($table)];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$options[] = '--tables ' . implode(' ', $tableList);\n\t\t\t$file .= '_custom';\n\n\t\t} elseif (!empty($this->params['tables'])) {\n\t\t\t$sources = explode(',', $this->params['tables']);\n\t\t\tforeach ($sources as $key => $val) {\n\t\t\t\t$sources[$key] = $usePrefix . $val;\n\t\t\t}\n\t\t\t$options[] = '--tables ' . implode(' ', $sources);\n\t\t\t$file .= '_custom';\n\t\t} elseif ($usePrefix) {\n\t\t\tforeach ($sources as $key => $source) {\n\t\t\t\tif (strpos($source, $usePrefix) !== 0) {\n\t\t\t\t\tunset($sources[$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$options[] = '--tables ' . implode(' ', $sources);\n\t\t\t$file .= '_' . rtrim($usePrefix, '_');\n\t\t}\n\t\t$file .= '.sql';\n\t\tif (!empty($this->params['compress'])) {\n\t\t\t$options[] = '| gzip';\n\t\t\t$file .= '.gz';\n\t\t}\n\t\t$options[] = '> ' . $file;\n\n\t\t$this->out('Backup will be written to:');\n\t\t$this->out(' - ' . $this->_path());\n\t\t$looksGood = $this->in(__d('cake_console', 'Look okay?'), array('y', 'n'), 'y');\n\t\tif ($looksGood !== 'y') {\n\t\t\treturn $this->error('Aborted!');\n\t\t}\n\n\t\tif ($this->_create($options)) {\n\t\t\t$this->out('Done :)');\n\t\t}\n\t}",
"function create_database() \r\n {\r\n \t\t\t$this->tx_cbywebdav_devlog(1,\"create_database\",\"cby_webdav\",\"create_database\");\r\n\r\n // TODO\r\n return false;\r\n }",
"private function make()\n {\n \n $file = database_path().'/migrations/'.$this->fileName.'.php';\n \n $content = $this->blueprint();\n \n $this->file_write( $file, $content );\n \n }",
"public function create(string $database, string $file, array $params): void;",
"public function createMySqlFile($arg) \n\t{\n\t\t$str = \"\";\n\t\t$str .= \"<?php\\n namespace lib\\database;\\n class Connection extends Clauses\\n {\\n\";\n\t\t$str .= \"protected \\$conn; \\n\";\n\t\t$str .= \"private \\$hosts = '\".$arg['database']['host'].\"'; \\n\";\n\t\t$str .= \"private \\$dbname = '\".$arg['database']['db'].\"'; \\n\";\n\t\t$str .= \"private \\$user = '\".$arg['database']['user'].\"'; \\n\";\n\t\t$str .= \"private \\$pass = '\".$arg['database']['pass'].\"'; \\n\";\n\t\t$str .= \"function __construct()\\n{\\n\";\n\t\t$str .=\"try {\\n\";\n\t\t$str .=\"\\t\\$this->conn = new \\PDO('mysql:host='.\\$this->hosts.';dbname='.\\$this->dbname,\n\t\t\t\t\\t\\$this->user,\\$this->pass);\\n\";\n\t\t$str .=\"} catch (\\PDOException \\$e) {\\n\";\n\t\t$str .=\"\\treturn \\$e->getMessage();\\n\";\n\t\t$str .=\"}\\n\";\n\t\t$str .=\"}\\n\";\n\t\t$str .=\"}\\n\";\n\t\treturn $str;\n\t}",
"private function make_db() {\n ee()->load->dbforge();\n $fields = array(\n 'id' => array('type' => 'varchar', 'constraint' => '32'),\n 'access' => array('type' => 'integer', 'constraint' => '10', 'unsigned' => true),\n 'data' => array('type' => 'text')\n );\n ee()->dbforge->add_field($fields);\n ee()->dbforge->add_key('id', true);\n ee()->dbforge->create_table($this->table_name);\n\n return true;\n }",
"public function create()\n {\n $db = XenForo_Application::get('db');\n $db->query('CREATE TABLE `' . self::DB_TABLE . '`\n (`threema_id` CHAR(8) NOT NULL PRIMARY KEY,\n `public_key` CHAR(64) NOT NULL)\n ');\n }",
"protected function createFile() {}",
"public function makeDbDumps()\n {\n foreach ($this->dbKeys as $key) {\n $file = \\yii::getAlias('@storage') . '/backup/dump-' . $key . time() . '.sql';\n $command = $this->extractCommandFromParams($key, $file);\n\n $this->stdout($command . ' \\n ');\n exec($command);\n\n $this->dumpFiles[] = $file;\n $this->folders[] = $file;\n }\n }",
"function createTable() {\n print \"\\nCreate table: \".$dbtable.\"\\n\";\n if (createDB()) {\n print \"OK\\n\";\n }\n interceptExit();\n }",
"private function auto_create(){\n\n if ( $this->firebug ) \\FB::info(get_called_class().\": auto creating file\");\n\n $root = $this->use_codeza_root ? (string)new Code_Alchemy_Root_Path() : '';\n\n $filename = $root . $this->template_file;\n\n if ( file_exists($filename) && ! file_exists($this->file_path)) {\n\n $copier = new Smart_File_Copier($filename,$this->file_path,$this->string_replacements,false);\n\n $copier->copy();\n\n }\n\n\n\n }",
"protected function createDatabaseStructure() {}",
"function CreateDB() {\n $sql = \"CREATE SCHEMA IF NOT EXISTS `mydb`\" .\n \"DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ;\";\n performSQL($sql);\n}",
"function writeData($db, $cnumber, $ctype, $cvv, $cname)\n\t\t\t\t\t{\n\t\t\t\t\t\t$cid = substr($cnumber, 0, 3).$ctype.$cvv;\n\t\t\t\t\t\t$stmt = $db->prepare(\"INSERT INTO businessTransaction (number, type, cvv, name, cid) VALUES (:cnumber,:ctype,:cvv,:cname,:cid)\");\n\t\t\t\t\t\t$stmt->execute(array(':cnumber' => \"$cnumber\", ':ctype' => \"$ctype\", ':cvv' => \"$cvv\", ':cname' => \"$cname\", ':cid' => $cid));\n\t\t\t\t\t}",
"public function createDatabase($name, $charSet = null) {\t\tthrow new RuntimeException(\n\t\t\t\"Creating SQLite databases is not currently supported\"\n\t\t);\n\t}",
"private static function setupDB() {\n\t\t$tbl = self::$table;\n\t\t$dbw = wfGetDB( DB_MASTER );\n\t\twfDebugLog( __METHOD__, \"\\tCreating tables\\n\" );\n\t\t$dbw->query(\n\t\t\t\"CREATE TABLE IF NOT EXISTS $tbl ( pathway varchar(255), day varchar(50) )\", DB_MASTER\n\t\t);\n\t\twfDebugLog( __METHOD__, \"\\tDone!\\n\" );\n\t}",
"function wb_create_database($db_name, $con)\n{ \n\tif( !mysql_query(\"CREATE DATABASE IF NOT EXISTS $db_name\", $con) )\n\t\tdie( 'Could not create database: ' . mysql_error() );\n\tif( !mysql_select_db($db_name, $con) )\n\t\tdie( 'Could not select database: ' . mysql_error() );\n\t\n\twb_create_sitemap_table($con);\n\twb_create_content_table($con);\n\twb_create_users_table($con);\n\twb_create_permissions_table($con);\n\twb_create_comments_table($con);\n}",
"protected function createDatabase()\n {\n\n $databaseFileName = strtolower(str::plural($this->moduleName));\n\n // Create Schema only in monogo database\n $databaseDriver = config('database.default');\n if ($databaseDriver == 'mongodb') {\n $this->createSchema($databaseFileName);\n }\n }",
"private function setupDatabase($database) {\n\n\t\t// Check database directory\n\t\t$dir = rtrim($this->options['dir'], '/\\\\') . DIRECTORY_SEPARATOR;\n\n\t\tif (!is_dir($dir)) {\n\t\t\tthrow new FlintstoneException($dir . ' is not a valid directory');\n\t\t}\n\n\t\t// Set data\n\t\t$ext = $this->options['ext'];\n\t\tif (substr($ext, 0, 1) !== \".\") $ext = \".\" . $ext;\n\t\tif ($this->options['gzip'] === true && substr($ext, -3) !== \".gz\") $ext .= \".gz\";\n\t\t$this->data['file'] = $dir . $database . $ext;\n\t\t$this->data['file_tmp'] = $dir . $database . \"_tmp\" . $ext;\n\t\t$this->data['cache'] = array();\n\n\t\t// Create database file\n\t\tif (!file_exists($this->data['file'])) {\n\t\t\t$this->createFile($this->data['file']);\n\t\t}\n\n\t\t// Check file is readable\n\t\tif (!is_readable($this->data['file'])) {\n\t\t\tthrow new FlintstoneException('Could not read file ' . $this->data['file']);\n\t\t}\n\n\t\t// Check file is writable\n\t\tif (!is_writable($this->data['file'])) {\n\t\t\tthrow new FlintstoneException('Could not write to file ' . $this->data['file']);\n\t\t}\n\t}",
"public function prepareDatabase()\n {\n // If SQLite database does not exist, create it\n if ($this->config->database['connection'] === 'sqlite') {\n $path = $this->config->database['database'];\n if ( ! $this->fileExists($path) && is_dir(dirname($path))) {\n $this->write(\"Creating $path ...\");\n touch($path);\n }\n }\n }",
"public function cr_database( $db_name )\n\t{\n\t\t// SQL String: CREATE DATABASE IF NOT EXISTS Library;\n\t\t$this->dbforge->create_database($db_name, TRUE);\n\t}",
"function createDistributedDB($host, $name, $user='root', $password='', $sqlfile) {\n $dbobj = new DBObj($host, 'information_schema', $user, $password);\n\n if($res = $dbobj->query(\"select * from SCHEMATA where SCHEMA_NAME='$name'\")) {\n if($record = $dbobj->fetch_assoc($res)) {\n //echo \"$name already exists, no need to be created\\n\";\n return true;\n }\n }\n\n // start createing user_history_stat schema\n $sql = \"create database $name\";\n //echo \"createUserHistoryStatDB sql: $sql\\n\";\n if(!$dbobj->query($sql)) {\n return false;\n }\n $script_str = \"mysql -h $host -u$user \";\n if(!empty($password)){\n \t$script_str .= \"-p$password\";\n }\n\n $script_str .= \" $name\";\n $script_str = \"/usr/bin/php \" . __DIR__ . \"/../scripts/mustachize.php \" . __DIR__ . \"/../configs/$sqlfile | $script_str\";\n exec($script_str);\n\n //echo \"exec: \".\"mysql -h $host -u$user $name < \".__DIR__.\"/../configs/user_history_stat.sql\\n\";\n return true;\n}",
"function ccio_appendData($filename, $data) {\r\n\t//$fh = fopen($filename, \"ab\");\r\n\t$fh = fopen($filename, \"at\");\r\n\tfwrite($fh, $data);\t\t\r\n\tfclose($fh);\r\n\treturn TRUE;\r\n}",
"protected function createCacheFile()\n {\n $this->createCacheDir();\n\n $cacheFilePath = $this->getCacheFile();\n\n if ( ! file_exists($cacheFilePath)) {\n touch($cacheFilePath);\n }\n }",
"private function createFile($filename, $content){\n\tfile_put_contents($filename.\".gz\", gzencode($content, 9)) or die(\"\\nCannot write file \".$filename);\t \n\techo \"\\nFilename \" . $filename . \" was successfully written\\n\";\n }",
"function loadFileFromDB() {\n\t\t// If file contents are in bin_data column, fetch data and store in file.\n\t\tif (isset($this->data_array[\"bin_data\"]) && \n\t\t\ttrim($this->data_array[\"bin_data\"]) != \"\") {\n\n\t\t\t// Need to decode the string first.\n\t\t\t$theFileContent = base64_decode($this->data_array[\"bin_data\"]);\n\n\t\t\t$theDir = dirname($this->getFile());\n\t\t\tif (!file_exists($theDir)) {\n\t\t\t\t// Its parent directory does not exist yet. Create it.\n\t\t\t\tmkdir($theDir);\n\t\t\t}\n\n\t\t\t// Create the file for future use.\n\t\t\t$fp = fopen($this->getFile(), \"w+\");\n\t\t\tfwrite($fp, $theFileContent);\n\t\t\tfclose($fp);\n\t\t}\n\t}",
"private static function createTestChatDB()\n {\n $logger = new APILogger();\n\n $logger->debug(\"Creating TestChatDB.\", null);\n\n $testChatDB = new PDO('sqlite::memory:');\n\n if($testChatDB == null)\n {\n throw new PhavaException(\"Creating in-memory database failed!\");\n }\n\n $logger->info(\"Created in-memory database.\",null);\n\n $sql = file_get_contents(\"/app/init.sql\");\n\n if ($testChatDB->exec($sql) != false){\n $logger->info(\"In-memory database ready.\",null);\n self::$testChatDB = $testChatDB;\n }\n else {\n $logger->info(\"Failed to initialize in-memory database.\",null);\n }\n }",
"private function createMainDatabaseRecords()\n {\n // get the .sql file\n $sql = (string) @file_get_contents( $this->plugin->getPath() . \"/Setup/install.sql\" );\n\n // insert it\n $this->db->exec( $sql );\n }",
"private final function _createDbStructure()\n {\n if ($conn = $this->_getConnection()) {\n $installer = new lib_Install('install');\n try {\n $installer->install();\n } catch (Exception $e) {\n app::log($e->getMessage(), app::LOG_LEVEL_ERROR);\n }\n }\n }",
"function create_ROMP_settings_Db_table(){\n\t\tob_start();\n\t\t$table_name = $this->wpdb->prefix . 'romp_settings';\n \t$charset_collate = $this->wpdb->get_charset_collate();\n\n\t\t$sql = \"CREATE TABLE $table_name (\n\t\t\t\t`romp_crm_id` TEXT NOT NULL ,\n\t\t\t\t`romp_cf_link` TEXT NOT NULL\n\t\t\t) $charset_collate;\";\n\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\tdbDelta( $sql );\n\t}",
"static function create_temp_db() {\n\t\t$dbConn = DB::getConn();\n\t\t$dbname = 'tmpdb' . rand(1000000,9999999);\n\t\twhile(!$dbname || $dbConn->databaseExists($dbname)) {\n\t\t\t$dbname = 'tmpdb' . rand(1000000,9999999);\n\t\t}\n\t\t\n\t\t$dbConn->selectDatabase($dbname);\n\t\t$dbConn->createDatabase();\n\n\t\t$dbadmin = new DatabaseAdmin();\n\t\t$dbadmin->doBuild(true, false, true);\n\t\t\n\t\treturn $dbname;\n\t}",
"public function __construct($db){\n $this->conn = $db;\n $temp=$db.$this->table_name.\".json\";\n $this->assesm_db=$temp;\n \n if (!file_exists($temp)) {//If it hasn't been created\n $content = array();\n $fp = fopen($temp, 'w');\n fwrite($fp, json_encode($content));\n fclose($fp);\n }\n }",
"function __construct() {\n if (!file_exists($this->path)) {\n $database = fopen($this->path, 'w');\n fclose($database);\n }\n }",
"private function create_migration(){\n $file = $this->path('migrations') . date('Y_m_d_His') . '_create_slender_table.php';\n $this->write_file($file, static::$migrationCode);\n }",
"private function writeUTF8filename($fn,$c){\n $f=fopen($this->dirs.$fn,\"w+\");\n # Now UTF-8 - Add byte order mark\n fwrite($f, pack(\"CCC\",0xef,0xbb,0xbf));\n fwrite($f,$c);\n fclose($f);\n }",
"function create_db3 () {\n\t\tglobal $wpdb;\n\t\t$create_query = 'CREATE TABLE `duotive_sidebars` (\n\t\t\t\t\t\t\t`ID` INT NOT NULL AUTO_INCREMENT ,\n\t\t\t\t\t\t\t`NAME` TEXT NOT NULL ,\n\t\t\t\t\t\t\t`DESCRIPTION` TEXT NOT NULL,\n\t\t\t\t\t\t\tPRIMARY KEY ( `ID` )\n\t\t\t\t\t\t) ENGINE = MYISAM ;\n\t\t\t\t\t\t';\n\t\t$create = $wpdb->get_results($create_query);\n\t}",
"private function createNewTmpICal()\n\t{\n\n\t\t$config = Factory::getConfig();\n\t\t$path = $config->get('config.tmp_path') ? $config->get('config.tmp_path') : $config->get('tmp_path');\n\t\techo \"create temp CSV conversion file in \" . $path . \"<br/>\";\n\t\t$this->tmpFileName = tempnam($path, \"phpJE\");\n\t\t//$this->tmpFileName = tempnam(\"/tmp\", \"phpJE\");\n\t\t$this->tmpfile = fopen($this->tmpFileName, \"w\");\n\t\tfwrite($this->tmpfile, \"BEGIN:VCALENDAR\\n\");\n\t\tfwrite($this->tmpfile, \"VERSION:2.0\\n\");\n\t\tfwrite($this->tmpfile, \"PRODID:-//jEvents 2.0 for Joomla//EN\\n\");\n\t\tfwrite($this->tmpfile, \"CALSCALE:GREGORIAN\\n\");\n\t\tfwrite($this->tmpfile, \"METHOD:PUBLISH\\n\");\n\n\t}",
"public function createTables()\r\n {\r\n $sql = \"\r\n CREATE TABLE IF NOT EXISTS coins\r\n (\r\n id INT NOT NULL AUTO_INCREMENT,\r\n playername VARCHAR(32) NOT NULL,\r\n coins INT NOT NULL,\r\n ip VARCHAR(32) NOT NULL,\r\n cid VARCHAR(64) NOT NULL,\r\n PRIMARY KEY (id)\r\n );\r\n \";\r\n self::update($sql);\r\n }",
"function createTable($ctx){\r\n\t\t$create =\r\n 'CREATE TABLE IF NOT EXISTS `'.$ctx.'` ('.\r\n '`key` VARCHAR( 60 ) NOT NULL ,'.\r\n '`willExpireAt` int NOT NULL DEFAULT 0 ,'.\r\n\t\t'`lastModified` int NOT NULL DEFAULT 0, '.\r\n '`content` TEXT NULL ,PRIMARY KEY ( `key` ));';\r\n\r\n\t\tif(strlen($this->stm['before_create']) > 0 ){\r\n\t\t\t$this->db->Execute($this->stm['before_create'], array()) or die();\r\n\t\t}\r\n\t\t$dict = NewDataDictionary($this->db);\r\n\t\t$x = $dict->ExecuteSQLArray(array($create)) or die();\r\n\t\treturn $x;\r\n\t}",
"function createCrontab()\n\t{\n\t\t$crontabFilePath = '/tmp/crontab.txt';\n\t\t$file = fopen($crontabFilePath, \"w\") or die(\"Unable to open file!\");\n\t\tglobal $mongo,$python_script_path;\n\t\t$db = $mongo->logsearch;\n\t\t$collection = $db->service_config;\n\t\t$cursor = $collection->find();\n\t\tforeach ($cursor as $doc) {\n\t\t\tif( $doc['state'] == 'Running' && $doc['path'] != '' && $doc['crontab'] != ''){\n\t\t\t\t$txt = '# Index, service:\"'.$doc['service'].'\" system:\"'.$doc['system']\n\t\t\t\t\t\t.'\" node:\"'.$doc['node'].'\" process:\"'.$doc['process'].'\" path:\"'.$doc['path'].'\"'.PHP_EOL;\n\t\t\t\tfwrite($file, $txt); \n\t\t\t\t$txt = $doc['crontab'].' sudo -u logsearch python '\n\t\t\t\t\t\t\t.$python_script_path.'indexScript.py index '.$doc['_id'].PHP_EOL;\n\t\t\t\tfwrite($file, $txt); \n\t\t\t}\n\t\t}\n\t\t//purge data here\n\t\t$keepDataMonth = 3;\n\t\t$txt = '# Purge data at 04:00 everyday, keep data '.$keepDataMonth.' months'.PHP_EOL;\n\t\tfwrite($file, $txt);\n\t\t$txt = '0 4 * * *'.' sudo -u logsearch python '.$python_script_path.'purgeData.py '.$keepDataMonth.' '.PHP_EOL;\n\t\tfwrite($file, $txt); \n\t\tfclose($file);\n\t\t$cmd = \"sudo -u logsearch crontab \".$crontabFilePath;\n\t\texec($cmd);\n\t}",
"public function createFile($file){\n \t\ttry{\n\t \t\t$f=fopen($file,'w'); \n\t \t\t\n\t \t\tfclose($f);\n\t \t\tif(!file_exists($file)) {\n\t \t\t\t$this->log(\"UNBXD_MODULE:Couldn't create the file\");\n\t \t\t\treturn false;\n\t \t\t}\n\t \t\t$this->log(\"UNBXD_MODULE: created the file\");\n\t \t\treturn true;\n \t\t} catch (Exception $ex) {\n\t \t$this->log(\"UNBXD_MODULE:Error while creating the file\");\n\t \t$this->log($ex->getMessage());\n\t \treturn false;\n\t }\n \t}",
"static private function createTables($file)\n\t{\n\t\t$config = Config::instance();\n\t\tforeach($config->sqlite_table AS $t)\n\t\t{\n\t\t\tself::$instance[$file]->exec($t);\n\t\t}\n\t}",
"function cvs_write_file($user_array, $cvs_project){\r\n global $cvs_root;\r\n $cvs_passwd_file = $cvs_root.\"/\".$cvs_project.\"/CVSROOT/passwd\";\r\n\r\n $file_str=\"# Last update on \".date(\"D, M d Y H:i:s T\").\"\\n\\n\";\r\n\r\n foreach($user_array as $name => $pass){\r\n\t$file_str .= \"$name:$pass[0]:$pass[1]\\n\";\r\n }\r\n \r\n $fp = fopen ($cvs_passwd_file, \"w\");\r\n fwrite($fp,$file_str);\r\n fclose($fp);\r\n}",
"function initDB(PDO $db) {\n $db->exec('drop table if exists \"caching\"');\n $db->exec('CREATE TABLE \"caching\" (\"id\" INTEGER PRIMARY KEY AUTOINCREMENT, \"keyword\" VARCHAR UNIQUE, \"object\" BLOB, \"exp\" INTEGER)');\n $db->exec('CREATE UNIQUE INDEX \"cleaup\" ON \"caching\" (\"keyword\",\"exp\")');\n $db->exec('CREATE INDEX \"exp\" ON \"caching\" (\"exp\")');\n $db->exec('CREATE UNIQUE INDEX \"keyword\" ON \"caching\" (\"keyword\")');\n }",
"private static function initialize_db() {\n\t\tif ( ! defined( 'WP_CLI_SNAPSHOT_DB' ) ) {\n\t\t\tdefine( 'WP_CLI_SNAPSHOT_DB', Utils\\trailingslashit( WP_CLI_SNAPSHOT_DIR ) . 'wp_snapshot.db' );\n\t\t}\n\n\t\tif ( ! ( file_exists( WP_CLI_SNAPSHOT_DB ) ) ) {\n\t\t\tself::create_tables();\n\n\t\t\treturn;\n\t\t}\n\n\t\t// phpcs:ignore PHPCompatibility.Extensions.RemovedExtensions.sqliteRemoved -- False positive.\n\t\tself::$dbo = new \\SQLite3( WP_CLI_SNAPSHOT_DB );\n\t}",
"public function create($data) {\n\t\t// Create an ID\n\t\t$id = $this->idCreate();\n\t\t// Write the data file\n\t\tfile_put_contents( $this->init['path']['data'] . $id . $this->init['data']['ext'] );\n\t}",
"function ch8bt_create_table( $prefix ) {\r\n\t// Prepare SQL query to create database table\r\n\t// using received table prefix\r\n\t$creation_query =\r\n\t\t'CREATE TABLE ' . $prefix . 'ch8_bug_data (\r\n\t\t\t`bug_id` int(20) NOT NULL AUTO_INCREMENT,\r\n\t\t\t`bug_description` text,\r\n\t\t\t`bug_version` varchar(10) DEFAULT NULL,\r\n\t\t\t`bug_report_date` date DEFAULT NULL,\r\n\t\t\t`bug_status` int(3) NOT NULL DEFAULT 0,\r\n\t\t\t`bug_title` VARCHAR( 128 ) NULL,\r\n\t\t\tPRIMARY KEY (`bug_id`)\r\n\t\t\t);';\r\n\r\n\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\r\n\tdbDelta( $creation_query );\r\n}",
"protected function createDb(DB $db)\n {\n // Removendo tabelas caso, exista\n $db->getConnection()->query('DROP TABLE IF EXISTS currencies');\n\n // Criando tabela currencies, caso não exista\n $db->getConnection()->query('CREATE TABLE IF NOT EXISTS currencies (\n currency VARCHAR(5) UNIQUE PRIMARY KEY,\n usd_value FLOAT\n )');\n\n // Cadastrando moedas\n $db->getConnection()->query('INSERT INTO currencies (currency, usd_value) VALUES\n (\"USD\", 1), (\"BRL\", 5.59), (\"EUR\", 0.83), (\"BTC\", 0.000016), (\"ETH\", 0.00041)');\n }",
"private function write_data_to_db()\r\n {\r\n $dic_depth = 1;\r\n \r\n for ($dic_depth = 1; $dic_depth < 6; $dic_depth++)\r\n {\r\n foreach ($this->directory_array[$dic_depth] as $id => $dic_node)\r\n {\r\n // create node is not existed, get id when existed\r\n $ret = $this->add_testsuite_node_to_db($dic_depth, $dic_node);\r\n \r\n // create testcase under testsuite\r\n if ($ret)\r\n {\r\n $this->add_testcase_nodes_to_db($dic_depth, $dic_node);\r\n }\r\n }\r\n }\r\n }",
"function newSQLiteDatabase($dbname){\n //Try opening or creating the database.\n if ($db = sqlite_open($dbname, 0666, $errorMsg)) { //If that executes smoothly:\n echo \"Database created successfully or already exists.\";\n }\n else //If that didn't work:\n {\n //Print out the error message and move on.\n echo \"Database could not be created: \" . $errorMsg;\n }\n }",
"public function createDatabase($name) {\n\t\t$this->_connection->createDatabase($name);\n\t}",
"public function write_db_config() {\r\n $template = file_get_contents(MODULES . 'install/assets/config/database.php');\r\n\r\n $replace = array(\r\n '__HOSTNAME__' => $this->hostname,\r\n '__USERNAME__' => $this->username,\r\n '__PASSWORD__' => $this->password,\r\n '__DATABASE__' => $this->database,\r\n '__PORT__' => $this->port,\r\n '__DRIVER__' => $this->driver,\r\n '__PREFIX__' => $this->prefix,\r\n );\r\n\r\n $template = str_replace(array_keys($replace), $replace, $template);\r\n\r\n $handle = @fopen(APPPATH . 'config/database.php', 'w+');\r\n\r\n if ($handle !== FALSE) {\r\n $response = @fwrite($handle, $template);\r\n fclose($handle);\r\n\r\n if ($response) {\r\n return TRUE;\r\n }\r\n }\r\n\r\n throw new Exception('Failed to write to ' . APPPATH . 'config/database.php');\r\n }",
"public function createDatabase($name, $options = []);",
"public function createTable(){\n\t\t\t\n\t\t$sql = \"CREATE TABLE IF NOT EXISTS `biblio_entries_inbook` (\n\t\t`id_publi` int(11) NOT NULL AUTO_INCREMENT,\t\n\t\t`chapter` varchar(150) NOT NULL,\n\t\t`pages` varchar(15) NOT NULL,\t\t\t\t\n\t\t`publisher` int(11) NOT NULL,\n\t\t`volume` int(11) NOT NULL,\t\t\n\t\t`series` varchar(20) NOT NULL,\n\t\t`address` varchar(50) NOT NULL,\n\t\t`edition` varchar(50) NOT NULL,\t\t\t\t\t\t\n\t\tPRIMARY KEY (`id_publi`)\n\t\t);\";\n\t\t$pdo = $this->runRequest($sql);\n\t\treturn $pdo;\n\t}",
"public function open()\n {\n $this->migration_file = fopen(\"/migrations/{date(\"Ymdhis\")}_{$this->table->name()}\", \"w\");\n $this->is_open = true;\n }",
"public function createDatabase($name, $options);",
"function createDB() {\r\n\t\t\r\n\t\tif( $this->state != 1 ) return false;\r\n\t\t\r\n\t\tglobal $dbName;\r\n\t\t$r = mysql_query( \"CREATE DATABASE `$dbName` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;\" );\r\n\t\t$this->connect();\r\n\t\t\r\n\t\treturn $r;\r\n\t}",
"function createDB($db)\n{\n require_once 'Doctrine/lib/Doctrine.php';\n spl_autoload_register(array('Doctrine', 'autoload'));\n\n try {\n $db = Doctrine_Manager::connection(\"sqlite:///$db\");\n $path = '@include_path@/HTTP/Session2/Container/Doctrine';\n$path = '/Applications/xampp/htdocs/phpcvs/pear/HTTP_SESSION2/HTTP/Session2/Container/Doctrine';\n $sql = Doctrine::generateSqlFromModels($path);\n $db->execute($sql);\n } catch (Doctrine_Exception $e) {\n if (!strstr($e->getMessage(), 'already exists')) {\n die(\"createDB sql error: {$e->getMessage()} ({$e->getCode()})\");\n }\n }\n}",
"public function create_db($dbname) {\n $this->dbname = $dbname;\n try {\n $sql = \"CREATE DATABASE \" . $this->dbname;\n $resulr = $this->conn->exec($sql);\n } catch (PDOException $e) {\n die(\"DB ERROR: \".$e->getMessage());\n }\n\n }",
"public function _backup_db_to_file($file, $settings) {\n // Must be overridden.\n }",
"function createDatabase() {\r\n global $db, $_dbhost, $_dbuser, $_dbpw, $_dbname;\r\n $db = new mysqli($_dbhost, $_dbuser, $_dbpw);\r\n if ($db -> connect_error) {\r\n die(\"Connection failed: \" . $conn->connect_error);\r\n return (false);\r\n }\r\n printf(\"Creating database \\\"\".$_dbname.\"\\\"...<br/>\");\r\n $querySQL = \"CREATE DATABASE IF NOT EXISTS \".$_dbname;\r\n printf(\"Database created.<br/>\");\r\n $result = $db -> query($querySQL);\r\n printf(\"Creating tables...<br/>\");\r\n mysqli_select_db($db, $_dbname);\r\n $querySQL = \"CREATE TABLE IF NOT EXISTS `accounts` (\r\n `primary_key` int(11) NOT NULL AUTO_INCREMENT,\r\n `type` text NOT NULL COMMENT 'The cryptocurrency type',\r\n `network` text NOT NULL COMMENT 'Cryptocurrency subnetwork',\r\n `chain` bigint(20) NOT NULL DEFAULT '-1' COMMENT 'HD derivation path first parameter',\r\n `addressIndex` bigint(20) NOT NULL DEFAULT '-1' COMMENT 'HD derivation path second parameter',\r\n `address` text NOT NULL COMMENT 'Account (cryptocurrency) address',\r\n `pwhash` text NOT NULL COMMENT 'SHA256 hash of password',\r\n `balance` text NOT NULL COMMENT 'Account balance in smallest denomination',\r\n `updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Date/Time this row was created.',\r\n PRIMARY KEY (`primary_key`)\r\n ) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=latin1;\";\r\n $result = $db -> query($querySQL);\r\n //Uncomment the following line to see any errors:\r\n //echo(mysqli_error($db).\"<br/>\");\r\n printf(\"Tables created.<br/>\");\r\n }",
"function _createCacheTable(){\n\t\t$res = mysql_query(\"create table IF NOT EXISTS `\".addslashes($this->tableName).\"`(\n\t\t\t`GenID` INT(11) auto_increment,\n\t\t\t`PageID` VARCHAR(64),\n\t\t\t`Language` CHAR(2),\n\t\t\t`UserID` VARCHAR(32),\n\t\t\t`Dependencies` TEXT,\n\t\t\t`LastModified` TIMESTAMP,\n\t\t\t`Expires` DateTime,\n\t\t\t`Data` LONGTEXT,\n\t\t\t`Data_gz` LONGBLOB,\n\t\t\t`Headers` TEXT,\n\t\t\tPRIMARY KEY (`GenID`),\n\t\t\tINDEX `LookupIndex` (`Language`,`UserID`,`PageID`)\n\t\t\t)\", $this->app->db());\n\t\tif ( !$res ){\n\t\t\treturn PEAR::raiseError('Could not create cache table: '.mysql_error($this->app->db()));\n\t\t}\t\n\t\t\n\t}",
"protected function createMigrationTable()\n {\n $migration_table = $this->config_file->getMigrationTable();\n\n $resource = $this->db_adapter->query(\"\n CREATE TABLE $this->migration_table (\n file VARCHAR PRIMARY KEY,\n ran_at TIMESTAMP DEFAULT NOW()\n );\n \");\n }",
"public function create_table() {\n\n\t\tglobal $wpdb;\n\n\t\t$table_name \t = $this->table_name;\n\t\t$charset_collate = $wpdb->get_charset_collate();\n\n\t\t$query = \"CREATE TABLE {$table_name} (\n\t\t\tid bigint(10) NOT NULL AUTO_INCREMENT,\n\t\t\tname text NOT NULL,\n\t\t\tdate_created datetime NOT NULL,\n\t\t\tdate_modified datetime NOT NULL,\n\t\t\tstatus text NOT NULL,\n\t\t\tical_hash text NOT NULL,\n\t\t\tPRIMARY KEY id (id)\n\t\t) {$charset_collate};\";\n\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\tdbDelta( $query );\n\n\t}",
"function Sql_DB_Create($db=\"\")\n {\n $query=$this->DB_Create_Query($db);\n $this->DB_Query($query);\n }",
"public function crear_carpeta_banco(){\n\t\t\t$x = $this->consultar_id();\n\t\t\tif(file_exists(\"../Process/BANCO\")){\n\t\t\t\t$destino = \"../Process/BANCO/\".$x;\n\t\t\t\tmkdir($destino);\n\t\t\t\t$destino = \"../Process/BANCO/\".$x.\"/DOCUMENTOS\";\n\t\t\t\tmkdir($destino);\n\t\t\t}else{\n\t\t\t\t$destino = \"../Process/BANCO\";\n\t\t\t\tmkdir($destino);\n\t\t\t\t$destino = \"../Process/BANCO/\".$x;\n\t\t\t\tmkdir($destino);\n\t\t\t\t$destino = \"../Process/BANCO/\".$x.\"/DOCUMENTOS\";\n\t\t\t\tmkdir($destino);\n\t\t\t}\n\t\t}",
"public function createTable($table, $file){\n if ($result = $this->query(\"SHOW TABLES LIKE '\".$table.\"'\")) {\n if($result->num_rows == 1) {\n // echo \"Table exists. Skipping Creating table. Moving on to insertion\";\n return true;\n }\n }\n\n $file = fopen($file,'r');\n $column = fgetcsv($file);\n for($i=0;$i<sizeof($column);$i++){\n $this->columnName = implode(\" varchar(20),\",$column);\n }\n $createTable = \"CREATE TABLE \".$table.\"(id INT(11) NOT NULL AUTO_INCREMENT ,\".$this->columnName.\" varchar(20), PRIMARY KEY (`id`))\";\n echo $createTable;\n if($this->query($createTable)){\n // echo \"Created \";\n return true;\n } else {\n // echo \"Not Created\".$this->error;\n return false;\n }\n }",
"private function connectDB()\n {\n $this->file_db = new \\PDO('sqlite:bonsaitrial.sqlite3');\n // Set errormode to exceptions\n $this->file_db->setAttribute(\n \\PDO::ATTR_ERRMODE,\n \\PDO::ERRMODE_EXCEPTION\n );\n }",
"public static function create_file($path,$data) {\n\t\t\t\t\n\t\t// Open Empty File\n\t\tif(!$file = fopen($path,\"w+\")) {\n\t\t\tdie(\"Disk::create_file: Cant open File: \".$path);\n\t\t}\n\t\t\n\t\t// Set Content\n\t\tif(fwrite($file,$data) === false) {\n\t\t\tdie(\"Disk::create_file: Cant write to File: \".$path);\n\t\t}\n\t\t\n\t\t// Close\n\t\tfclose($file);\n\t}",
"function backup() {\n global $host, $user, $pwd, $base, $path;\n $file = 'backup_' . date(\"Y-m-d-H:i:s\") . '.gz';\n\n system(\"mysqldump --add-drop-table --create-options --skip-lock-tables --extended-insert --quick --set-charset --host=$host --user=$user --password=$pwd $base | gzip > $path/backup/$file\");\n }",
"function crearbd($c){\n $temp=\"\";\n //RUTA DEL FICHERO QUE CONTIENE LA CREACION DE TABLAS\n $ruta_fichero_sql = 'mysql_script/tablas.sql';\n \n \n //CON EL COMANDO FILE,VOLCAMOS EL CONTENIDO DEL FICHERO EN OTRA VARIABLE\n $datos_fichero_sql = file($ruta_fichero_sql);\n //LEEMOS EL FICHERO CON UN BUCLE FOREACH\n foreach($datos_fichero_sql as $linea_a_ejecutar){\n //QUITAMOS LOS ESPACIOS DE ALANTE Y DETRÁS DE LA VARIABLE\n $linea_a_ejecutar = trim($linea_a_ejecutar); \n \n //GUARDAMOS EN LA VARIABLE TEMP EL BLOQUE DE SENTENCIAS QUE VAMOS A EJECUTAR EN MYSQL\n $temp .= $linea_a_ejecutar.\" \";\n //COMPROBAMOS CON UN CONDICIONAL QUE LA LINEA ACABA EN ;, Y SI ES ASI LA EJECUTAMOS\n if(substr($linea_a_ejecutar, -1, 1) == ';'){\n mysqli_query($c,$temp);\n \n //REINICIAMOS LA VARIABLE TEMPORAL\n $temp=\"\";\n \n }//FIN IF BUSCAR SENTENCIA ACABADA EN ;\n else{\n //echo\"MAL\".$temp.\"<br><br>\";\n }\n \n }//FIN FOREACH\n \n \n }",
"public function createBlogPostFile() {\r\n\r\n\t\t$admblogtitle = trim(htmlentities($_POST[\"admblogtitle\"]));\r\n\t\t$admblogintro = trim(htmlentities($_POST[\"admblogintro\"]));\r\n\t\t$admblogcontent = trim(htmlentities($_POST[\"admblogcontent\"]));\r\n\r\n\t\tif (!empty($_POST[\"admblogtitle\"])) {\r\n\t\t\ttry {\r\n\t\t\t\r\n\t\t\t\t// try query\r\n\t\t\t\t$stmt = new PDO(\"mysql:host=localhost;dbname=demo\", 'root', '');\r\n\t\t\t\t$query = $stmt->prepare(\"SELECT create_date, dashedtitle FROM `evdnl_blog_posts_yc` ORDER BY id DESC LIMIT 0, 1\");\r\n\t\t\t\t$query->execute();\r\n\t\t\t\t$row = $query->fetch(PDO::FETCH_ASSOC);\r\n\t\t\t\r\n\t\t\t\t// sluit PDO connectie\r\n\t\t\t\t$query = NULL;\r\n\r\n\t\t\t\t$filepath = \"../../posts/\" . substr($row['create_date'], 0, 10) . '-' . strtolower(preg_replace('/[[:space:]]+/', '-', $_POST['admblogtitle'])) . '.php';\r\n\t\t\t\t//$filepath = . $filename;\r\n\t\t\t\tfile_put_contents($filepath, $admblogintro, FILE_APPEND);\r\n\t\t\t}\r\n\t\t\t// catch error\r\n\t\t\tcatch (PDOException $e) {\r\n\t\t\t\t\techo $e->getMessage();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function createDatabase($name, array $opts = null);",
"function mikado_create_db_tables() {\n\tinclude_once (WP_PLUGIN_DIR . '/mikado/lib/install-db.php');\t\t\t\n\tmikado_install_db();\n}",
"function setupDatabase($db){\n\t\tif($db == null) throw new Exception(\"Database is not given\");\n\t\t\n $sqlBirthdays = \"\n CREATE TABLE IF NOT EXISTS `birthdays` (\n `key` int(11) NOT NULL AUTO_INCREMENT,\n `date` date NOT NULL,\n `name` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,\n PRIMARY KEY (`key`)\n\t\t);\";\n\t\t\n\t\t$sqlEvents =\"\n\t\tCREATE TABLE IF NOT EXISTS `events` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `title` text NOT NULL,\n `date` date NOT NULL,\n `time` time NOT NULL,\n `descr` mediumtext CHARACTER SET latin1 COLLATE latin1_german1_ci NOT NULL,\n `startdate` date NOT NULL,\n `enddate` date NOT NULL,\n PRIMARY KEY (`id`)\n );\";\n\n $sqlTicker = \"\n\t\tCREATE TABLE IF NOT EXISTS `tickermsg` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `startdate` date NOT NULL,\n `enddate` date NOT NULL,\n `message` text NOT NULL,\n PRIMARY KEY (`id`)\n );\";\n\n // Execute the create querys\n $db->query($sqlBirthdays);\n $db->query($sqlEvents);\n $db->query($sqlTicker);\n }",
"public function create($name)\n {\n $file = $this->createFile($name);\n $this->autoload();\n $this->note(\"<info>Created Data Migration:</info> $file\");\n }",
"function PMA_exportDBCreate($db) {\n return TRUE;\n}",
"function PMA_exportDBCreate($db) {\n return TRUE;\n}",
"public function create()\n {\n parent::create();\n\n $sheet = $this->add_sheet();\n\n $this->add_table($sheet, $this->database, $this->generate_table());\n }",
"function Dataface_ConfigTool_createConfigTable(){\n\t$self =& Dataface_ConfigTool::getInstance();\n\tif ( !Dataface_Table::tableExists($self->configTableName, false) ){\n\t\t$sql = \"CREATE TABLE `\".$self->configTableName.\"` (\n\t\t\t\t\tconfig_id int(11) NOT NULL auto_increment primary key,\n\t\t\t\t\t`file` varchar(255) NOT NULL,\n\t\t\t\t\t`section` varchar(128),\n\t\t\t\t\t`key` varchar(128) NOT NULL,\n\t\t\t\t\t`value` text NOT NULL,\n\t\t\t\t\t`lang` varchar(2),\n\t\t\t\t\t`username` varchar(32),\n\t\t\t\t\t`priority` int(5) default 5\n\t\t\t\t\t)\";\n\t\t$res = mysql_query($sql, df_db());\n\t\tif ( !$res ){\n\t\t\ttrigger_error(mysql_error(df_db()), E_USER_ERROR);\n\t\t\texit;\n\t\t}\n\t}\n\n}",
"public function crear(){\n\t\t$this->archivo = fopen($this->nombre , \"w+\");\n\t}",
"public function acfedu_create_fill_db() {\n\t\t\t\t$this->acfedu_check_table();\n\t\t\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\t\t\tob_start();\n\t\t\t\tglobal $wpdb;\n //require_once( 'lib/import_nl.php' );\n //require_once( 'lib/import_be.php' );\n //require_once( 'lib/import_lux.php' );\n require_once( 'lib/import_id.php' );\n\t\t\t\t$sql = ob_get_clean();\n\t\t\t\tdbDelta( $sql );\n\t\t\t}",
"public function create_db_backup( $host, $file_name = '' ) {\n\t\t$export = false;\n\t\t// $this->host_info['hostname'], $this->host_info['wp_path']\n\n\t\tif ( $this->host_info['wp_is_installed'] == 'true' ) {\n\n\t\t\tif ( ! empty( $file_name ) ) {\n\t\t\t\t$export = shell_exec( 'wp db export --add-drop-table --path=' . $this->host_info['wp_path'] . ' ' . $file_name );\n\t\t\t} else {\n\t\t\t\t$file_name = 'dumps/' . $this->host_info['hostname'] . '_' . date( 'm-d-Y_g-i-s', time() ) . '.sql';\n\t\t\t\t$export = shell_exec( 'wp db export --add-drop-table --path=' . $this->host_info['wp_path'] . ' ' . $file_name );\n\t\t\t}\n\n\t\t\tif ( file_exists( $file_name ) ) {\n\t\t\t\treturn vvv_dash_notice( 'Your backup is ready at www/default/dashboard/' . $file_name );\n\t\t\t}\n\t\t}\n\n\t\treturn $export;\n\t}",
"protected function createEnvFile()\n {\n if (! file_exists('.env')) {\n copy('.env.example', '.env');\n $this->line('.env file successfully created');\n }\n }",
"public function setupDatabase()\n {\n exec('rm ' . storage_path() . '/testdb.sqlite');\n exec('cp ' . 'database/database.sqlite ' . storage_path() . '/testdb.sqlite');\n }",
"function wb_create_content_table($con)\n{\n\t$query = 'CREATE TABLE IF NOT EXISTS content\n\t(\n\t\tcontent_id INT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE,\n\t\tPRIMARY KEY(content_id),\n\t\tpage_id INT UNSIGNED NOT NULL,\n\t\tFOREIGN KEY(page_id) REFERENCES sitemap(page_id),\n\t\tdescription TEXT,\n\t\tdata MEDIUMBLOB\n\t) ENGINE=InnoDB';\n\t\n\twb_query($query, $con);\n}",
"public static function createDB($dbname) {\n\t\t\t$query = \"CREATE DATABASE IF NOT EXISTS `campDiaries`\";\n\t\t\tself::$db = DB::query($query);\n\t\t\t$select_db = mysqli_select_db(self::$con, 'campDiaries');\n\n\t\t\t//create tables\n\t\t\t$query = \"CREATE TABLE IF NOT EXISTS `users_test` (\n\t\t\t`userid` TINYINT(3) NOT NULL AUTO_INCREMENT,\n\t\t\t`username` VARCHAR(50) NOT NULL ,\n\t\t\t`password` VARCHAR(12) NOT NULL ,\n\t\t\t`age` TINYINT(2),\n\t\t\tPRIMARY KEY (`userid`)\";\n\t\t\tDB::query($query);\n\t\t}",
"public function generateDcaCache()\n\t{\n\t\t$arrFiles = array();\n\n\t\t// Parse all active modules\n\t\tforeach (\\ModuleLoader::getActive() as $strModule)\n\t\t{\n\t\t\t$strDir = 'system/modules/' . $strModule . '/dca';\n\n\t\t\tif (!is_dir(TL_ROOT . '/' . $strDir))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tforeach (scan(TL_ROOT . '/' . $strDir) as $strFile)\n\t\t\t{\n\t\t\t\tif (strncmp($strFile, '.', 1) !== 0 && substr($strFile, -4) == '.php')\n\t\t\t\t{\n\t\t\t\t\t$arrFiles[] = substr($strFile, 0, -4);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$arrFiles = array_values(array_unique($arrFiles));\n\n\t\t// Create one file per table\n\t\tforeach ($arrFiles as $strName)\n\t\t{\n\t\t\t// Generate the cache file\n\t\t\t$objCacheFile = new \\File('system/cache/dca/' . $strName . '.php', true);\n\t\t\t$objCacheFile->write('<?php '); // add one space to prevent the \"unexpected $end\" error\n\n\t\t\t// Parse all active modules\n\t\t\tforeach (\\ModuleLoader::getActive() as $strModule)\n\t\t\t{\n\t\t\t\t$strFile = 'system/modules/' . $strModule . '/dca/' . $strName . '.php';\n\n\t\t\t\tif (file_exists(TL_ROOT . '/' . $strFile))\n\t\t\t\t{\n\t\t\t\t\t$objCacheFile->append(static::readPhpFileWithoutTags($strFile));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Close the file (moves it to its final destination)\n\t\t\t$objCacheFile->close();\n\t\t}\n\n\t\t// Add a log entry\n\t\t$this->log('Generated the DCA cache', __METHOD__, TL_CRON);\n\t}",
"function create_htpasswd($username,$password) {\n\n\t$encrypted_password = crypt($password, base64_encode($password));\n\t$data = $username.\":\".$encrypted_password;\n\t\t\t\t\t\n\t$ht = fopen(\"administration/.htpasswd\", \"w\") or die(\"<div class=\\\"installer-message\\\">Could not open .htpassword for writing. Please make sure that the server is allowed to write to the administration folder. In Apache, the folder should be chowned to www-data. </div>\");\n\tfwrite($ht, $data);\n\tfclose($ht);\n}",
"public static function WCH_install () {\n\t\tglobal $wpdb;\n\t\t$table_name = $wpdb->prefix . \"whichet\";\n\t\t$sql = \"CREATE TABLE $table_name (\n\t\t\tid mediumint(9) NOT NULL AUTO_INCREMENT,\n\t\t\ttime datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,\n\t\t\tWCH_id tinytext NOT NULL,\n\t\t\tWCH_category tinytext NOT NULL,\n\t\t\tWCH_A_text text NOT NULL,\n\t\t\tWCH_A_link VARCHAR(55) NOT NULL,\n\t\t\tWCH_A_display_count smallint NOT NULL,\n\t\t\tWCH_A_click_count smallint NOT NULL,\n\t\t\tWCH_B_text text NOT NULL,\n\t\t\tWCH_B_link VARCHAR(55) NOT NULL,\n\t\t\tWCH_B_display_count smallint NOT NULL,\n\t\t\tWCH_B_click_count smallint NOT NULL,\n\t\t\tUNIQUE KEY id (id)\n );\";\n\t\t\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\tdbDelta( $sql );\n\t}",
"function create_file($file_path, $content=''){\r\n die( __FILE__ . ' : ' . __LINE__ );\r\n }",
"public function handle(): void\n {\n File::put(database_path('database.sqlite'),'');\n $this->line('database.sqlite created successfully.');\n }",
"public function createRecord()\n {\n $sql = sprintf(\n \"INSERT INTO %s (%s) values (%s)\", \"Cubans\",\n implode(\", \", array_keys($this->arrayKeysValues())),\n \":\" . implode(\", :\", array_keys($this->arrayKeysValues()))\n );\n $statement = $this->connect->prepare($sql);\n\t\t$statement->execute($this->arrayKeysValues());\n }",
"function getDatabase()\n{\n $db = new SQLite3(':memory:');\n $password = md5('password');\n $sql = \"CREATE TABLE users (id varchar(30) primary key, username text, password text);\";\n $sql .= \"INSERT INTO users VALUES ('id00001', 'jdoe', '$password');\";\n $sql .= \"INSERT INTO users VALUES ('id00002', 'jsmith', '$password');\";\n $created = $db->exec($sql);\n return $db;\n}",
"function wb_create_comments_table($con)\n{\n\t$query = 'CREATE TABLE IF NOT EXISTS comments\n\t(\n\t\tcomment_id SERIAL,\n\t\tPRIMARY KEY(comment_id),\n\t\tuser_id BIGINT UNSIGNED NOT NULL,\n\t\tFOREIGN KEY(user_id) REFERENCES users(user_id),\n\t\tpage_id INT UNSIGNED NOT NULL,\n FOREIGN KEY(page_id) REFERENCES sitemap(page_id),\n\t\tdatetime DATETIME,\n\t\tcomment TEXT,\n\t\treply_ref BIGINT UNSIGNED NOT NULL DEFAULT 0\n\t) ENGINE=InnoDB';\n\t\n\twb_query($query, $con);\n}",
"function new_db($name) {\n\t\t\t$sql = \"CREATE DATABASE IF NOT EXISTS \".$name;\n\t\t\tif ($this->checkup(\"\", $sql) != true) {\n\t\t\t\treturn $this->error(\"an error occured!\");\n\t\t\t}\n\n\t\t\t#\t\tif ( mysqli_query ($this->CONN, $sql ) ) {\n\t\t\tif ($this->one_query($sql)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn $this->error(\"error while creating database '$name'!\");\n\t\t\t}\n\t\t}",
"public function execDatabaseConnectionClassCreation($config) \n\t{\n\t\t$create_db_file = fopen(__DIR__.'/../database/Connection.php', \"w\");\n\t\t$fwrite = fwrite($create_db_file, $this->createMySqlFile($config));\n\t\tfclose($create_db_file);\n\t\tif ($fwrite === false) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}",
"public function createDB(){ \n $res = CouchNet::PUT($this->getUrl().\"/\"); \n return $this;\n }"
] | [
"0.5789226",
"0.57887864",
"0.5714959",
"0.56003565",
"0.5486891",
"0.528351",
"0.51988626",
"0.5155052",
"0.51373464",
"0.5117194",
"0.51164925",
"0.5095568",
"0.5058783",
"0.5050832",
"0.5025576",
"0.50233716",
"0.5008117",
"0.50074255",
"0.4994682",
"0.49878117",
"0.49682367",
"0.49340189",
"0.4913365",
"0.490913",
"0.48952484",
"0.48862544",
"0.48858005",
"0.48682696",
"0.48639783",
"0.4846584",
"0.48439625",
"0.48367962",
"0.48319018",
"0.4831169",
"0.48264104",
"0.4808942",
"0.47838095",
"0.47766414",
"0.47626585",
"0.47508562",
"0.47468925",
"0.47312397",
"0.47304812",
"0.47216648",
"0.47182557",
"0.4715595",
"0.47077116",
"0.4706651",
"0.4673238",
"0.46725315",
"0.4668947",
"0.46666753",
"0.4663816",
"0.46609232",
"0.46474594",
"0.46426776",
"0.46423823",
"0.46399927",
"0.4636131",
"0.46307638",
"0.4627173",
"0.4624831",
"0.46241283",
"0.46222237",
"0.46211088",
"0.4619754",
"0.46193993",
"0.46103358",
"0.46033108",
"0.46026862",
"0.45848185",
"0.45847815",
"0.4584046",
"0.45824984",
"0.45819095",
"0.45677048",
"0.45667368",
"0.45636255",
"0.45523655",
"0.45523655",
"0.45487925",
"0.45474106",
"0.45324177",
"0.45321777",
"0.45313525",
"0.45312315",
"0.45249516",
"0.45222574",
"0.45214376",
"0.45155722",
"0.45101348",
"0.45045805",
"0.44993085",
"0.449858",
"0.4497616",
"0.44969687",
"0.44947284",
"0.449137",
"0.44866115",
"0.44835955"
] | 0.6863739 | 0 |
Creates a base32 secret key of 16 chars length. | public static function generateSecretKey() : string
{
$secretKey = '';
for ($i = 0; $i < 16; $i++) $secretKey .= self::CHARSET[random_int(0, 31)];
return $secretKey;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function create_secret($secret_length = 16)\n {\n $valid_chars = self::_get_base32_lookup_table();\n unset($valid_chars[32]);\n\n $secret = '';\n for ($i = 0; $i < $secret_length; $i++) \n {\n $secret .= $valid_chars[array_rand($valid_chars)];\n }\n return $secret;\n }",
"abstract public function createSecretKey();",
"public static function generateSecret() {\n\n\t\t$secretLength = self::SECRET_LENGTH;\n\n\t\t// Valid secret lengths are 80 to 640 bits\n\t\tif ($secretLength < 16 || $secretLength > 128) {\n\t\t\tthrow new \\Exception('Bad secret length');\n\t\t}\n\n\t\t// Set accepted characters\n\t\t$validChars = self::getBase32LookupTable();\n\n\t\t// Generates a strong secret\n\t\t$secret = \\MWCryptRand::generate( $secretLength );\n\t\t$secretEnc = '';\n\t\tfor( $i = 0; $i < strlen($secret); $i++ ) {\n\t\t\t$secretEnc .= $validChars[ord($secret[$i]) & 31];\n\t\t}\n\n\t\treturn $secretEnc;\n\n\t}",
"public static function createSecret($secretLength = 16)\n {\n $validChars = self::_getBase32LookupTable();\n $secret = '';\n for ($i = 0; $i < $secretLength; $i++) {\n $secret .= $validChars[array_rand($validChars)];\n }\n return $secret;\n }",
"public function createSecret($secretLength = 16)\n {\n $validChars = $this->_getBase32LookupTable();\n unset($validChars[32]);\n\n $secret = '';\n for ($i = 0; $i < $secretLength; $i++) {\n $secret .= $validChars[array_rand($validChars)];\n }\n return $secret;\n }",
"public static function generate_secret_key($length = 16) {\n\t\t$b32 \t= \"234567QWERTYUIOPASDFGHJKLZXCVBNM\";\n\t\t$s \t= \"\";\n\n\t\tfor ($i = 0; $i < $length; $i++)\n\t\t\t$s .= $b32[rand(0,31)];\n\n\t\treturn $s;\n\t}",
"protected function createSecretKey()\n\t{\n\t\treturn random_string('unique');\n\t}",
"public function generateSecretKey($length = 16, $prefix = '')\n {\n return $this->generateBase32RandomKey($length, $prefix);\n }",
"function generateFixedSalt16Byte()\r\n{\r\n return \"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\";\r\n}",
"public function createSecret(int $secretLength = 16) : string\n {\n $validChars = self::base32LookupTable();\n\n // Valid secret lengths are 80 to 640 bits\n if ($secretLength < 16 || $secretLength > 128) {\n throw new Exception('Bad secret length');\n }\n\n // @codeCoverageIgnoreStart\n $rnd = false;\n if (function_exists('random_bytes')) {\n $rnd = random_bytes($secretLength);\n }\n\n if (!$rnd) {\n throw new Exception('No source of secure random');\n }\n // @codeCoverageIgnoreEnd\n\n $secret = '';\n for ($i = 0; $i < $secretLength; ++$i) {\n $secret .= $validChars[ord($rnd[$i]) & 31];\n }\n\n return $secret;\n }",
"public static function createApiKey()\n\t{\n\t\treturn Str::random(32);\n\t}",
"function createToken() {\n\treturn bin2hex(openssl_random_pseudo_bytes(32));\n}",
"public function generateSecret($prettyPrinting = FALSE) {\n\t\t$key = $this->getBase32Conversor()->randomBase32String(self::KEY_BYTE_LENGTH);\n\t\tif ($prettyPrinting) {\n\t\t\t$key = chunk_split($key, 4, ' ');\n\t\t}\n\t\treturn $key;\n\t}",
"function generate_key(): string\n{\n $keyset = \"0123456789ABCDEF\";\n do {\n $key = \"\";\n for ($i = 0; $i < 16; $i++) {\n $key .= substr($keyset, rand(0, strlen($keyset)-1), 1);\n }\n } while (substr($key, 0, 1) == \"0\");\n return $key;\n}",
"public static function generateKey(){\n $key = '';\n // [0-9a-z]\n for ($i=0;$i<32;$i++){\n $key .= chr(rand(48, 90));\n }\n self::$_key = $key;\n }",
"public static function randombytes_random16()\n {\n return '';\n }",
"public function createSecret($secretLength = 16)\n {\n $validChars = $this->_getBase32LookupTable();\n\n // Valid secret lengths are 80 to 640 bits\n if ($secretLength < 16 || $secretLength > 128) {\n throw new Exception('Bad secret length');\n }\n $secret = '';\n $rnd = false;\n if (function_exists('random_bytes')) {\n $rnd = random_bytes($secretLength);\n } elseif (function_exists('mcrypt_create_iv')) {\n $rnd = mcrypt_create_iv($secretLength, MCRYPT_DEV_URANDOM);\n } elseif (function_exists('openssl_random_pseudo_bytes')) {\n $rnd = openssl_random_pseudo_bytes($secretLength, $cryptoStrong);\n if (!$cryptoStrong) {\n $rnd = false;\n }\n }\n if ($rnd !== false) {\n for ($i = 0; $i < $secretLength; ++$i) {\n $secret .= $validChars[ord($rnd[$i]) & 31];\n }\n } else {\n throw new Exception('No source of secure random');\n }\n\n return $secret;\n }",
"function generateFixedSalt32Byte()\r\n{\r\n return \"\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\";\r\n}",
"public static function createKey() {\r\n $MIN = 100000;\r\n $MAX = 922337203685477580;\r\n return mt_rand($MIN,$MAX);\r\n }",
"private function genRandomKey()\n {\n return strtoupper(str_random(32));\n }",
"private function generateAPIKey() {\n $keyspace = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $length = 32;\n\n $new_api_key = '';\n $max = mb_strlen($keyspace, '8bit') - 1;\n for ($i = 0; $i < $length; ++$i) {\n $new_api_key .= $keyspace[random_int(0, $max)];\n }\n\n return $new_api_key;\n }",
"private function generateRandomKey()\n {\n return substr(base_convert(sha1(uniqid(mt_rand(), true)), 16, 36), 0, 8);\n }",
"public function generateEncryptionSecret(): string\n {\n try {\n return sodium_bin2hex(sodium_crypto_secretbox_keygen());\n } catch (SodiumException $e) {\n throw new RuntimeException('Could not generate encryption key', 0, $e);\n }\n }",
"public function newSecret(): string\n {\n $secret = str_random(32);\n $this->secret = $secret;\n $this->save();\n\n return $secret;\n }",
"function mysql_aes_key($key)\n{\n $bytes = 16;\n $newKey = \\str_repeat(\\chr(0), $bytes);\n $length = \\strlen($key);\n\n for ($i = 0; $i < $length; $i++) {\n $index = $i % $bytes;\n $newKey[$index] = $newKey[$index] ^ $key[$i];\n }\n\n return $newKey;\n}",
"public function generateToken()\n {\n $token = openssl_random_pseudo_bytes(16);\n \n $token = bin2hex($token);\n \n return $token;\n }",
"abstract protected function generateKey();",
"private static function _base32_encode($secret, $padding = true)\n {\n if (empty($secret)) return '';\n\n $base32chars = self::_get_base32_lookup_table();\n\n $secret = str_split($secret);\n $bin_str = \"\";\n for ($i = 0; $i < count($secret); $i++) \n {\n $bin_str .= str_pad(base_convert(ord($secret[$i]), 10, 2), 8, '0', STR_PAD_LEFT);\n }\n $five_bit_bin_arr = str_split($bin_str, 5);\n $base32 = \"\";\n $i = 0;\n while ($i < count($five_bit_bin_arr)) \n {\n $base32 .= $base32chars[base_convert(str_pad($five_bit_bin_arr[$i], 5, '0'), 2, 10)];\n $i++;\n }\n if ($padding && ($x = strlen($bin_str) % 40) != 0) \n {\n if ($x == 8) $base32 .= str_repeat($base32chars[32], 6);\n elseif ($x == 16) $base32 .= str_repeat($base32chars[32], 4);\n elseif ($x == 24) $base32 .= str_repeat($base32chars[32], 3);\n elseif ($x == 32) $base32 .= $base32chars[32];\n }\n return $base32;\n }",
"protected function getRandomKey()\n {\n return Str::random(32);\n }",
"public function generateAuthKey()\n {\n // default length=32\n $this->auth_key = Yii::$app->security->generateRandomString();\n }",
"private function _generateActivationKey()\n {\n $key = Utils::getRandomKey(32);\n return $key;\n }",
"private static function base32Decode(string $secret) : string\n {\n if (empty($secret)) {\n return '';\n }\n\n $base32chars = self::base32LookupTable();\n $base32charsFlipped = array_flip($base32chars);\n\n $paddingCharCount = substr_count($secret, $base32chars[32]);\n $allowedValues = [6, 4, 3, 1, 0];\n if (!in_array($paddingCharCount, $allowedValues)) {\n return '';\n }\n\n for ($i = 0; $i < 4; $i++){\n if ($paddingCharCount == $allowedValues[$i] &&\n substr($secret, -($allowedValues[$i])) != str_repeat($base32chars[32], $allowedValues[$i])) {\n return '';\n }\n }\n\n $secret = str_replace('=','', $secret);\n $secret = str_split($secret);\n $binaryString = \"\";\n for ($i = 0; $i < count($secret); $i = $i+8) {\n if (!in_array($secret[$i], $base32chars)) {\n return '';\n }\n\n $x = \"\";\n for ($j = 0; $j < 8; $j++) {\n $secretChar = $secret[$i + $j] ?? 0;\n $base = $base32charsFlipped[$secretChar] ?? 0;\n $x .= str_pad(base_convert($base, 10, 2), 5, '0', STR_PAD_LEFT);\n }\n $eightBits = str_split($x, 8);\n for ($z = 0; $z < count($eightBits); $z++) {\n $binaryString .= ( ($y = chr(base_convert($eightBits[$z], 2, 10))) || ord($y) == 48 ) ? $y : \"\";\n }\n }\n\n return $binaryString;\n }",
"function generateApiKey($str_length){\n //base 62 map\n $chars = \"123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\n //get enough randombits for base 64 encoding (and prevent '=' padding)\n //note: +1 is faster than cell\n $bytes = openssl_random_pseudo_bytes(3*$str_length/4+1);\n \n //convert base 64 to base 62 by mapping + and / to something from the base 62 map\n //use the first 2 random bytes for the new characters\n $repl = unpack(\"C2\", $bytes);\n\n $first = $chars[$repl[1]%62];\n $second = $chars[$repl[2]%62];\n \n return strtr(substr(base64_encode($bytes), 0, $str_length), \"+/\", \"$first$second\");\n}",
"protected abstract function getSecretKey();",
"function randombytes_random16()\n {\n return '';\n }",
"function generateApiKey($str_length){\n //base 62 map\n $chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\n //get enough random bits for base 64 encoding (and prevent '=' padding)\n //note: +1 is faster than ceil()\n $bytes = openssl_random_pseudo_bytes(3*$str_length/4+1);\n\n //convert base 64 to base 62 by mapping + and / to something from the base 62 map\n //use the first 2 random bytes for the characters\n $repl = unpack('C2', $bytes);\n\n $first = $chars[$repl[1]%62];\n $second = $chars[$repl[2]%62];\n return strtr(substr(base64_encode($bytes), 0, $str_length), '+/', \"$first$second\");\n\n}",
"public function GenerateKey()\n // Generates a 22 character salt.\n {\n $this->_SALT = \"$\";\n for($i = 0; $i < 22; $i ++)\n $this->_SALT = $this->_SALT . $this->_CHARSET[mt_rand(0, 63)];\n return $this->_SALT;\n }",
"public function generateKeyAndSecret() {\n $user = user_load($this->uid);\n\n $this->app_key = str_replace(array(' ', '', '-'), '_', strtolower($this->title));\n $this->app_secret = md5($user->name . $this->time);\n }",
"public static function makeNonce() {\r\n\t\treturn bin2hex(openssl_random_pseudo_bytes(16));\r\n\t}",
"private function _getSecretKey() {\n return \"hfd&*9997678g__vd45%%$3)(*kshdak\";\n }",
"public function generateTransactionKey(): string\n {\n $transactionKey = $this->randomService->bytes(16);\n\n return $transactionKey;\n }",
"public static function make($len = 32) {\r\n\t\t$bytes = openssl_random_pseudo_bytes($len / 2);\r\n\t\treturn bin2hex($bytes);\r\n\t}",
"function createKgMid() {\n $randomStr = '';\n $splitIndex = [8, 12, 16, 20];\n for ($index=0; $index < 32; $index++) {\n if (in_array($index, $splitIndex)) {\n $randomStr .= '-';\n }\n $randomStr .= dechex(random_int(0, 15));\n }\n return md5($randomStr);\n}",
"public function generateKey()\n\t{\n\t\treturn substr(md5(uniqid(mt_rand(), true)), 0, 3) . substr(md5(uniqid(mt_rand(), true)), 0, 2);\n\t}",
"private function getKey(){\r\n\t\t# convert a string into a key\r\n\t\t# key is specified using hexadecimal\r\n\t\t# show key size use either 16, 24 or 32 byte keys for AES-128, 192\r\n\t\t# and 256 respectively\t\t\r\n\t\t$key = array(\"key\" => $this->_keygen_str, \"key_size\"=>strlen($this->_keygen_str));\r\n\t\t\r\n\t\t# create a random IV to use with CBC encoding\r\n\t\t$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);\r\n\t\t$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\r\n\t\t$key[\"iv_size\"] = $iv_size;\r\n\t\t$key[\"iv\"] = $iv;\r\n\t\t\r\n\t\treturn $key;\r\n\t}",
"public function getSecretKey();",
"protected function generateRandomKey($len = 20)\r\n {\r\n return base_convert(sha1(uniqid(mt_rand(), true)), 16, 36);\r\n }",
"public static function setRandomSecretKey()\n {\n $key = self::getRandomString(15);\n\n \\QB::table(self::TABLE)->where('name', '=', 'secret_key')->update([\n 'value' => $key\n ]);\n\n return $key;\n }",
"private function generateKey(): string\n\t{\n\t\t// `+` and `/` are replaced by `-` and `_`, resp.\n\t\t// The other characters (a-z, A-Z, 0-9) are legal within an URL.\n\t\t// As the number of bytes is divisible by 3, no trailing `=` occurs.\n\t\treturn strtr(base64_encode(random_bytes(3 * self::RANDOM_ID_LENGTH / 4)), '+/', '-_');\n\t}",
"public function generateToken(): string\n {\n $token = bin2hex(random_bytes(16));\n $this->setTokens($this->limitTokens(\n array_merge($this->getTokens(), [$token])\n ));\n return $token;\n }",
"function GenerateKey() {\n // deterministic; see base.js.\n return rand();\n}",
"public function generateAuthKey()\n {\n $this->token = Yii::$app->security->generateRandomString(32);\n }",
"private static function base32Decode($secret)\n\t{\n\t\tif (empty($secret)) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$base32chars = self::getBase32LookupTable();\n\t\t$base32charsFlipped = array_flip($base32chars);\n\n\t\t$paddingCharCount = substr_count($secret, $base32chars[32]);\n\t\t$allowedValues = array(6, 4, 3, 1, 0);\n\t\tif (!in_array($paddingCharCount, $allowedValues)) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ($i = 0; $i < 4; ++$i) {\n\t\t\tif ($paddingCharCount == $allowedValues[$i] &&\n\t\t\t\tsubstr($secret, -($allowedValues[$i])) != str_repeat($base32chars[32], $allowedValues[$i])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t$secret = str_replace('=', '', $secret);\n\t\t$secret = str_split($secret);\n\t\t$binaryString = '';\n\t\tfor ($i = 0; $i < count($secret); $i = $i + 8) {\n\t\t\t$x = '';\n\t\t\tif (!in_array($secret[$i], $base32chars)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfor ($j = 0; $j < 8; ++$j) {\n\t\t\t\t$x .= str_pad(base_convert(@$base32charsFlipped[@$secret[$i + $j]], 10, 2), 5, '0', STR_PAD_LEFT);\n\t\t\t}\n\t\t\t$eightBits = str_split($x, 8);\n\t\t\tfor ($z = 0; $z < count($eightBits); ++$z) {\n\t\t\t\t$binaryString .= (($y = chr(base_convert($eightBits[$z], 2, 10))) || ord($y) == 48) ? $y : '';\n\t\t\t}\n\t\t}\n\n\t\treturn $binaryString;\n\t}",
"private static function _base32_decode($secret)\n {\n if (empty($secret)) return '';\n\n $base32chars = self::_get_base32_lookup_table();\n $base32chars_flipped = array_flip($base32chars);\n\n $padding_char_count = substr_count($secret, $base32chars[32]);\n $allowed_values = array(6, 4, 3, 1, 0);\n if (!in_array($padding_char_count, $allowed_values)) return false;\n for ($i = 0; $i < 4; $i++)\n {\n if ($padding_char_count == $allowed_values[$i] &&\n substr($secret, -($allowed_values[$i])) != str_repeat($base32chars[32], $allowed_values[$i])) return false;\n }\n $secret = str_replace('=','', $secret);\n $secret = str_split($secret);\n $bin_str = \"\";\n for ($i = 0; $i < count($secret); $i = $i+8) \n {\n $x = \"\";\n if (!in_array($secret[$i], $base32chars)) return false;\n for ($j = 0; $j < 8; $j++) \n {\n $x .= str_pad(base_convert(@$base32chars_flipped[@$secret[$i + $j]], 10, 2), 5, '0', STR_PAD_LEFT);\n }\n $eight_bits = str_split($x, 8);\n for ($z = 0; $z < count($eight_bits); $z++) \n {\n $bin_str .= ( ($y = chr(base_convert($eight_bits[$z], 2, 10))) || ord($y) == 48 ) ? $y:\"\";\n }\n }\n return $bin_str;\n }",
"public function generateAuthKey() {\n $this->auth_key = Yii::$app->security->generateRandomString(32);\n }",
"function generateSalt() {\n\t$numberOfDesiredBytes = 16;\n\t$salt = random_bytes($numberOfDesiredBytes);\n\treturn $salt;\n}",
"protected function _genSecret($func)\n {\n if ($func == 'sha1') {\n $macLen = 20; /* 160 bit */\n } else if ($func == 'sha256') {\n $macLen = 32; /* 256 bit */\n } else {\n return false;\n }\n return Zend_OpenId::randomBytes($macLen);\n }",
"function hash_generator($str, $key)\n{\n $nonce = random_bytes(SODIUM_CRYPTO_SECRETBOX_NONCEBYTES);\n $ciphertext = sodium_crypto_secretbox($str, $nonce, $key);\n\n return $nonce . $ciphertext;\n}",
"public static function generateKey()\n\t{\n\t\tToxusEncryption::$_key = Defuse\\Crypto\\Crypto::createNewRandomKey();\n\t\treturn ToxusEncryption::$_key;\n\t}",
"private function newKey()\n {\n $kp = sodium_crypto_box_keypair();\n //$pk = sodium_crypto_box_secretkey($kp);\n return $kp;\n }",
"public function getBoxSecretKey() : string;",
"public static function createUuid() {\n $data = \\openssl_random_pseudo_bytes(16);\n\n // set the version to 0100\n $data[6] = \\chr(\\ord($data[6]) & 0x0f | 0x40);\n // set bits 6-7 to 10\n $data[8] = \\chr(\\ord($data[8]) & 0x3f | 0x80);\n\n return \\vsprintf('%s%s-%s-%s-%s-%s%s%s', \\str_split(\\bin2hex($data), 4));\n }",
"protected function generateRandomKey($len = 20) {\n return base_convert(sha1(uniqid(mt_rand(), true)), 16, 36);\n }",
"private function _create_hash($key=''){\n\t\t$secret_key = 'gL0b3-E$sT4te'.date('m-d-y');\n\t\treturn md5($key.$secret_key);\n\t}",
"public function generateAuthKey()\n {\n $this->salt = OldDi::GetString(8);\n }",
"private function generatePassword() {\n // account is not wide open if conventional logins are permitted\n $guid = '';\n\n for ($i = 0; ($i < 8); $i++) {\n $guid .= sprintf(\"%x\", mt_rand(0, 15));\n }\n\n return $guid;\n }",
"public static function generateNewAuthKey()\r\n {\r\n return Yii::$app->security->generateRandomString();\r\n }",
"private function _generate_key(){\n $salt = base_convert(bin2hex($this->CI->security->get_random_bytes(64)), 16, 36);\n \n // If an error occurred, then fall back to the previous method\n if ($salt === FALSE){\n $salt = hash('sha256', time() . mt_rand());\n }\n \n $new_key = substr($salt, 0, config_item('rest_key_length'));\n while ($this->_key_exists($new_key));\n\n return $new_key;\n }",
"public static function createKey($src = self::RAND, $len = self::RAND_DEFAULT_SZ)\n\t{\n\t\treturn PhpCrypt_Core::randBytes($src, $len);\n\t}",
"public function getSignSecretKey() : string;",
"public static function generate_token() {\t\r\n\t\t$size = mcrypt_get_iv_size(MCRYPT_CAST_256, MCRYPT_MODE_CFB);\r\n\t\t$new_token = bin2hex(mcrypt_create_iv($size, MCRYPT_DEV_RANDOM));\r\n\t\treturn $new_token;\r\n\t}",
"function get_key($bit_length = 128) {\n\t$fp = @fopen('/dev/urandom','rb'); // should be /dev/random but it's too slow\n\tif ($fp !== FALSE) {\n\t\t$key = substr(base64_encode(@fread($fp,($bit_length + 7) / 8)), 0, (($bit_length + 5) / 6) - 2);\n\t\t@fclose($fp);\n\t\t$key = str_replace(array('+', '/'), array('0', 'X'), $key);\n\t\treturn $key;\n\t}\n\treturn null;\n}",
"public function createKey()\n {\n return md5('Our-Calculator') . (time() + 60);\n }",
"protected function _base32Encode($secret, $padding = true)\n {\n if (empty($secret)) {\n return '';\n }\n\n $base32chars = $this->_getBase32LookupTable();\n\n $secret = str_split($secret);\n $binaryString = '';\n foreach ($secret as $iValue) {\n $binaryString .= str_pad(base_convert(ord($iValue), 10, 2), 8, '0', STR_PAD_LEFT);\n }\n $fiveBitBinaryArray = str_split($binaryString, 5);\n $base32 = '';\n $i = 0;\n while ($i < count($fiveBitBinaryArray)) {\n $base32 .= $base32chars[base_convert(str_pad($fiveBitBinaryArray[$i], 5, '0'), 2, 10)];\n $i++;\n }\n if ($padding && ($x = strlen($binaryString) % 40) != 0) {\n if ($x == 8) {\n $base32 .= str_repeat($base32chars[32], 6);\n } elseif ($x == 16) {\n $base32 .= str_repeat($base32chars[32], 4);\n } elseif ($x == 24) {\n $base32 .= str_repeat($base32chars[32], 3);\n } elseif ($x == 32) {\n $base32 .= $base32chars[32];\n }\n }\n return $base32;\n }",
"function salt_hmac($size1=4,$size2=6) {\n$hprand = rand(4,6); $i = 0; $hpass = \"\";\nwhile ($i < $hprand) {\n$hspsrand = rand(1,2);\nif($hspsrand!=1&&$hspsrand!=2) { $hspsrand=1; }\nif($hspsrand==1) { $hpass .= chr(rand(48,57)); }\nif($hspsrand==2) { $hpass .= chr(rand(65,70)); }\n++$i; } return $hpass; }",
"function generateKey()\n\t{\n\t\treturn ( rand(1, 25) );\n\t}",
"function _gensesskey() {\n # with compliments to \"ripat at lumadis dot be\" from php.net online docs\n $acceptedChars = 'azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN0123456789';\n $max = strlen($acceptedChars)-1;\n $key = null;\n for ($i = 0; $i < 64; $i++) {\n $key .= $acceptedChars{mt_rand(0, $max)};\n }\n return $key;\n }",
"function makeSecureUUID() {\n\n if (function_exists('com_create_guid') === true) {\n return trim(com_create_guid(), '{}');\n }\n \n return sprintf('%04X%04X-%04X-%04X-%04X-%04X%04X%04X', \n mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(16384, 20479), mt_rand(32768, 49151), mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535));\n}",
"protected function kbKeyGenerator($length = 32)\n {\n $random = '';\n for ($i = 0; $i < $length; $i++) {\n $random .= chr(mt_rand(33, 126));\n }\n return md5($random);\n }",
"public static function generateKey () {\n $session = bin2hex(random_bytes(16));\n if (static::count([ 'key' => $session ]) == 1) {\n return static::generateSession();\n }\n return $session;\n }",
"public function createSecret()\n\t{\n\t\treturn $this->secret = (new GoogleAuthenticator())->generateSecret();\n\t}",
"public function generate_config_ftp_key()\n\t{\n\t\treturn random_str(32);\n\t}",
"function generate_token()\n {\n $this->load->helper('security');\n $res = do_hash(time().mt_rand());\n $new_key = substr($res,0,config_item('rest_key_length'));\n return $new_key;\n }",
"private function generateSalt()\n {\n return str_random(16);\n }",
"function get_Rand_Token($num_bytes=16) {\n \n return bin2hex(openssl_random_pseudo_bytes($num_bytes));\n}",
"public function generateSigningSecret(): string\n {\n try {\n return sodium_bin2hex(sodium_crypto_auth_keygen());\n } catch (SodiumException $e) {\n throw new RuntimeException('Could not generate signing key', 0, $e);\n }\n }",
"function generateRandomKey() {\n\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $key = '';\n\n for ($i = 0; $i < 13; $i++) {\n $key .= $characters[rand(0, strlen($characters) - 1)];\n }\n\n return $key;\n\n}",
"private function make_id () {\n // http://sourceforge.net/projects/phunction/\n return sprintf('%04X%04X%04X', mt_rand(0, 65535), mt_rand(0, 65535), mt_rand(0, 65535));\n }",
"private function generateSalt(): string\n {\n return base64_encode(random_bytes(16));\n }",
"private function generateSalt(): string\n {\n return base64_encode(random_bytes(16));\n }",
"public function test_generate_key()\n {\n $key = GuestToken::generate_key();\n $this->assertGreaterThan(10, strlen($key));\n }",
"function create_token()\n {\n $secretKey = \"B1sm1LLAH1rrohmaan1rroh11m\";\n\n // Generates a random string of ten digits\n $salt = mt_rand();\n\n // Computes the signature by hashing the salt with the secret key as the key\n $signature = hash_hmac('sha256', $salt, $secretKey, false);\n // $signature = hash('md5', $salt.$secretKey);\n\n // return $signature;\n return urlsafeB64Encode($signature);\n }",
"function __getSecretKey($uuid, $seed = '') {\n \t$salt = Configure::read('Security.salt');\n \t$key = sha1($uuid.$seed.$salt);\n// \tif (!$key) $key = sha1(time().'-'.rand().$salt); \t\t// guest user in designer mode. deprecate\n return $key;\n }",
"function generateRandomPassword(){\n $n = 10;\n $result = bin2hex(random_bytes($n));\n return $result;\n }",
"public static function generateKey()\n {\n do {\n $salt = sha1(time() . mt_rand());\n $newKey = substr($salt, 0, 40);\n } // Already in the DB? Fail. Try again\n while (self::keyExists($newKey));\n\n return $newKey;\n }",
"protected function generateRandomId(){\n return Keygen::numeric(7)->prefix(mt_rand(1, 9))->generate(true);\n}",
"public function randomKey();",
"function key_gen($str=''){\n\treturn str_replace('=','',base64_encode(md5($str)));\n}",
"function generarPassword() {\n\t\t$str = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890\";\n\t\t$cad = \"\";\n\t\tfor ($i = 0; $i < 8; $i++) {\n\t\t\t$cad .= substr($str, rand(0, 62), 1);\n\t\t}\n\t\treturn $cad;\n\t}",
"function generate_auth() {\n\treturn sprintf('%08x%08x%08x%08x',\n\t\tmt_rand(0, 0xffffffff), mt_rand(0, 0xffffffff),\n\t\tmt_rand(0, 0xffffffff), mt_rand(0, 0xffffffff));\n}"
] | [
"0.7042178",
"0.69217473",
"0.6914015",
"0.69081116",
"0.6839549",
"0.67635924",
"0.6713405",
"0.66964394",
"0.662873",
"0.6366154",
"0.6325132",
"0.6315783",
"0.6314056",
"0.63033956",
"0.626251",
"0.6223508",
"0.62070405",
"0.6206676",
"0.61957306",
"0.6176235",
"0.61426216",
"0.6140766",
"0.61182374",
"0.61048776",
"0.61047566",
"0.60956407",
"0.6078489",
"0.6067226",
"0.6005766",
"0.60030115",
"0.59979343",
"0.5990343",
"0.5945791",
"0.5944322",
"0.59208477",
"0.587172",
"0.5868587",
"0.5862713",
"0.5857893",
"0.5850521",
"0.5847194",
"0.5845781",
"0.58419245",
"0.58092624",
"0.5809055",
"0.57902664",
"0.5764796",
"0.576169",
"0.5759608",
"0.5745285",
"0.5738187",
"0.5736459",
"0.57336557",
"0.57215524",
"0.57091534",
"0.57044446",
"0.5691467",
"0.5688625",
"0.5682359",
"0.566847",
"0.56660414",
"0.5664603",
"0.56619716",
"0.5647132",
"0.5639223",
"0.56209743",
"0.56044364",
"0.5601602",
"0.55884767",
"0.55881506",
"0.5583516",
"0.5581307",
"0.5579616",
"0.5579181",
"0.5565085",
"0.55642456",
"0.5561789",
"0.5561353",
"0.5556811",
"0.5554652",
"0.55544937",
"0.5547651",
"0.5545739",
"0.5522534",
"0.5516577",
"0.54995155",
"0.54922646",
"0.54743356",
"0.5473052",
"0.5473052",
"0.5469062",
"0.5465984",
"0.5463761",
"0.5463485",
"0.54457355",
"0.5439114",
"0.5429565",
"0.5422957",
"0.5420078",
"0.5417501"
] | 0.71212524 | 0 |
Returns true if the code is correct. To avoid discrepancy in time, also accepts the corresponding codes of the previous and next time windows. | public static function verifyCode(string $secretKey, string $code) : bool
{
$time = time();
$result = 0;
// Timing attack safe iteration and code comparison
for ($i = -1; $i <= 1; $i++) {
$timeSlice = floor($time / self::TIME_WINDOW + $i);
$result = hash_equals(self::getCode($secretKey, $timeSlice), $code) ? $timeSlice : $result;
}
return ($result > 0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function v1_check_dupli_timeframe3($name, $key, $code, $stime, $etime, $owners, $pr_code, $gpr_code, &$error) {\n\tglobal $checked_data;\n\t// Format times\n\tif (empty($stime)) {\n\t\t$stime=\"0000-00-00 00:00:00\";\n\t}\n\tif (empty($etime)) {\n\t\t$etime=\"9999-12-31 23:59:59\";\n\t}\n\t// If such code was found before\n\tif (isset($checked_data[$key][$code])) {\n\t\t// Compare data\n\t\tforeach ($checked_data[$key][$code] as $cmp_data) {\n\t\t\t// Check owners\n\t\t\tforeach ($owners as $owner) {\n\t\t\t\tforeach ($cmp_data['owners'] as $cmp_owner) {\n\t\t\t\t\tif ($owner['id']==$cmp_owner['id'] && $cmp_data['parentcode']==$pr_code && $cmp_data['gparentcode']==$gpr_code) {\n\t\t\t\t\t\t// Check time\n\t\t\t\t\t\t// Format times\n\t\t\t\t\t\tif (empty($cmp_data['stime'])) {\n\t\t\t\t\t\t\t$cmp_stime=\"0000-00-00 00:00:00\";\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t$cmp_stime=$cmp_data['stime'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (empty($cmp_data['etime'])) {\n\t\t\t\t\t\t\t$cmp_etime=\"9999-12-31 23:59:59\";\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t$cmp_etime=$cmp_data['etime'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// No error = only if end time stricly before compared start time OR start time strictly after compared end time\n\t\t\t\t\t\tif (strcmp($stime, $cmp_etime)<=0 && strcmp($etime, $cmp_stime)>=0) {\n\t\t\t\t\t\t\t$error=\"<\".$name.\" code=\\\"\".$code.\"\\\" owner=\\\"\".$owner['code'].\"\\\">, the timeframes are overlapping: [\".$stime.\", \".$etime.\"] and [\".$cmp_stime.\", \".$cmp_etime.\"]\";\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}\n\t\t\t}\n\t\t}\n\t}\n\treturn TRUE;\n}",
"function v1_check_dupli_timeframe($name, $key, $code, $stime, $etime, $owners, &$error) {\n\t\n\tglobal $checked_data;\n\t\n\t// Format times\n\tif (empty($stime)) {\n\t\t$stime=\"0000-00-00 00:00:00\";\n\t}\n\tif (empty($etime)) {\n\t\t$etime=\"9999-12-31 23:59:59\";\n\t}\n\t\n\t// If such code was found before\n\tif (isset($checked_data[$key][$code])) {\n\t\t// Compare data\n\t\tforeach ($checked_data[$key][$code] as $cmp_data) {\n\t\t\t// Check owners\n\t\t\tforeach ($owners as $owner) {\n\t\t\t\tforeach ($cmp_data['owners'] as $cmp_owner) {\n\t\t\t\t\tif ($owner['id']==$cmp_owner['id']) {\n\t\t\t\t\t\t// Check time\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Format times\n\t\t\t\t\t\tif (empty($cmp_data['stime'])) {\n\t\t\t\t\t\t\t$cmp_stime=\"0000-00-00 00:00:00\";\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t$cmp_stime=$cmp_data['stime'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (empty($cmp_data['etime'])) {\n\t\t\t\t\t\t\t$cmp_etime=\"9999-12-31 23:59:59\";\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t$cmp_etime=$cmp_data['etime'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// No error = only if end time stricly before compared start time OR start time strictly after compared end time\n\t\t\t\t\t\tif (strcmp($stime, $cmp_etime)<=0 && strcmp($etime, $cmp_stime)>=0) {\n\t\t\t\t\t\t\t$error=\"<\".$name.\" code=\\\"\".$code.\"\\\" owner=\\\"\".$owner['code'].\"\\\">, the timeframes are overlapping: [\".$stime.\", \".$etime.\"] and [\".$cmp_stime.\", \".$cmp_etime.\"]\";\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}\n\t\t\t}\n\t\t}\n\t}\n\treturn TRUE;\n}",
"public static function verifyCode($code){\n\n if(!is_string($code) && !is_int($code)){\n\n return false;\n }\n\n $code=trim(''.$code);\n $codeLen=strlen($code);\n\n $totalW=array_sum(self::$WIDTH_SETTING);\n if($codeLen>$totalW){\n\n return false;\n }\n\n $flagInvalid=true;\n $curW=0;\n for($i=0; $i<count(self::$WIDTH_SETTING); $i++){\n\n $curW+=self::$WIDTH_SETTING[$i];\n if($curW==$codeLen){\n $flagInvalid=false;\n break;\n }\n }\n\n return !$flagInvalid;\n\n }",
"function v1_check_dupli_timeframe2($name, $key, $code, $stime, $etime, $owners, $pr_code, &$error) {\n\tglobal $checked_data;\n\t// Format times\n\tif (empty($stime)) {\n\t\t$stime=\"0000-00-00 00:00:00\";\n\t}\n\tif (empty($etime)) {\n\t\t$etime=\"9999-12-31 23:59:59\";\n\t}\n\t// If such code was found before\n\tif (isset($checked_data[$key][$code])) {\n\t\t// Compare data\n\t\tforeach ($checked_data[$key][$code] as $cmp_data) {\n\t\t\t// Check owners\n\t\t\tforeach ($owners as $owner) {\n\t\t\t\tforeach ($cmp_data['owners'] as $cmp_owner) {\n\t\t\t\t\tif ($owner['id']==$cmp_owner['id'] && $cmp_data['parentcode']==$pr_code) {\n\t\t\t\t\t\t// Check time\n\t\t\t\t\t\t// Format times\n\t\t\t\t\t\tif (empty($cmp_data['stime'])) {\n\t\t\t\t\t\t\t$cmp_stime=\"0000-00-00 00:00:00\";\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t$cmp_stime=$cmp_data['stime'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (empty($cmp_data['etime'])) {\n\t\t\t\t\t\t\t$cmp_etime=\"9999-12-31 23:59:59\";\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t$cmp_etime=$cmp_data['etime'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// No error = only if end time stricly before compared start time OR start time strictly after compared end time\n\t\t\t\t\t\tif (strcmp($stime, $cmp_etime)<=0 && strcmp($etime, $cmp_stime)>=0) {\n\t\t\t\t\t\t\t$error=\"<\".$name.\" code=\\\"\".$code.\"\\\" owner=\\\"\".$owner['code'].\"\\\">, the timeframes are overlapping: [\".$stime.\", \".$etime.\"] and [\".$cmp_stime.\", \".$cmp_etime.\"]\";\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}\n\t\t\t}\n\t\t}\n\t}\n\treturn TRUE;\n}",
"function validCode($request_code): bool {\n\t\t\t# Test to See Session Code is 32 character hexadecimal\n\t\t\tif (preg_match(\"/^[0-9a-f]{64}$/i\",$request_code)) return true;\n\t\t\t#error_log(\"Invalid session code: $request_code\");\n\t\t\treturn false;\n\t\t}",
"public static function check($code) {\n\t\t\n\t\t//isset($_SESSION) || session_start();\t\t\n\t\t//Verify code can not be empty\n\t\tif(empty($code) || empty($_SESSION[self::$seKey])) {\n\t\t\treturn false;\n\t\t}\n\t\t//session expired\n\t\tif(time() - $_SESSION[self::$seKey]['time'] > self::$expire) {\n\t\t\tunset($_SESSION[self::$seKey]);\n\t\t\treturn false;\n\t\t}\n\n\t\tif(strtolower($code) == strtolower($_SESSION[self::$seKey]['code'])) {\n\t\t\treturn true;\n\t\t}\t\t\n\n\t\treturn false;\n\t}",
"function v1_check_db_timeframe($name, $key, $code, $stime, $etime, $owners, &$error) {\n\t\n\tglobal $warnings;\n\t\n\t// Format times\n\tif (empty($stime)) {\n\t\t$stime=\"0000-00-00 00:00:00\";\n\t}\n\tif (empty($etime)) {\n\t\t$etime=\"9999-12-31 23:59:59\";\n\t}\n\t\n\t// If already in database, send a warning\n\t$rows=v1_get_id_times($key, $code, $owners);\n\t\n\tforeach ($rows as $row) {\n\t\t// Check time\n\t\t\n\t\t// Format times\n\t\tif (empty($row[$key.'_stime'])) {\n\t\t\t$cmp_stime=\"0000-00-00 00:00:00\";\n\t\t}\n\t\telse {\n\t\t\t$cmp_stime=$row[$key.'_stime'];\n\t\t}\n\t\tif (empty($row[$key.'_etime'])) {\n\t\t\t$cmp_etime=\"9999-12-31 23:59:59\";\n\t\t}\n\t\telse {\n\t\t\t$cmp_etime=$row[$key.'_etime'];\n\t\t}\n\t\t\n\t\t// If start time is same, warning only\n\t\tif ($stime==$cmp_stime) {\n\t\t\t// Warning: already in database\n\t\t\t$warning_msg=$name.\" code=\\\"\".$code.\"\\\"\";\n\t\t\t// 1st owner\n\t\t\tif (!empty($owners[0])) {\n\t\t\t\t$warning_msg.=\" owner1=\\\"\".$owners[0]['code'].\"\\\"\";\n\t\t\t}\n\t\t\t// 2nd owner\n\t\t\tif (!empty($owners[1])) {\n\t\t\t\t$warning_msg.=\" owner2=\\\"\".$owners[1]['code'].\"\\\"\";\n\t\t\t}\n\t\t\t// 3rd owner\n\t\t\tif (!empty($owners[2])) {\n\t\t\t\t$warning_msg.=\" owner3=\\\"\".$owners[2]['code'].\"\\\"\";\n\t\t\t}\n\t\t\t$warning_msg.=\" startTime=\\\"\".$stime.\"\\\"\";\n\t\t\tarray_push($warnings, $warning_msg);\n\t\t}\n\t\telse {\n\t\t\t// No error = only if end time strictly before compared start time OR start time strictly after compared end time\n\t\t\tif (strcmp($stime, $cmp_etime)<=0 && strcmp($etime, $cmp_stime)>=0) {\n\t\t\t\t$error=\"<\".$name.\" code=\\\"\".$code.\"\\\" owner1=\\\"\".$owners[0]['code'].\"\\\">, the timeframe [\".$stime.\", \".$etime.\"] overlaps with existing data in database [\".$cmp_stime.\", \".$cmp_etime.\"]\";\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn TRUE;\n}",
"public function verifyTwoFACode($code) {\n $verification = Yii::app()->db->createCommand()\n ->select('code')\n ->from('x2_twofactor_auth')\n ->where('userId = :id AND requested >= :requested', array(\n ':id' => $this->id,\n ':requested' => time() - (60 * 5), // within the past 5 minutes\n ))->queryScalar();\n return $code === $verification;\n }",
"public function checkTOTPCode($code, $key, $timestamp = NULL) {\n\t\t$rawKey = $this->getRawKey($key);\n\t\t$challenge = $this->getChallenge($timestamp);\n\n\t\tfor ($i = -1; $i <= 1; $i++) {\n\t\t\tif ($code == $this->getTOTPGenerator()->getTOTPCode($rawKey, $challenge + $i)) {\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}",
"function v1_check_db_timeframe3($name, $key, $code, $stime, $etime, $owners, $guest_table, $guest_code, $gguest_table, $gguest_code, &$error) {\n\tglobal $warnings;\n\t// Format times\n\tif (empty($stime)) {\n\t\t$stime=\"0000-00-00 00:00:00\";\n\t}\n\tif (empty($etime)) {\n\t\t$etime=\"9999-12-31 23:59:59\";\n\t}\n\t\n\t// If already in database, send a warning\n\t$rows=v1_get_id_times3($key, $code, $owners, $guest_table, $guest_code, $gguest_table, $gguest_code);\n\t\n\tforeach ($rows as $row) {\n\t\t// Check time\n\t\t// Format times\n\t\tif (empty($row[$key.'_stime'])) {\n\t\t\t$cmp_stime=\"0000-00-00 00:00:00\";\n\t\t}else {\n\t\t\t$cmp_stime=$row[$key.'_stime'];\n\t\t}\n\t\tif (empty($row[$key.'_etime'])) {\n\t\t\t$cmp_etime=\"9999-12-31 23:59:59\";\n\t\t}else {\n\t\t\t$cmp_etime=$row[$key.'_etime'];\n\t\t}\n\t\t\n\t\t// If start time is same, warning only\n\t\tif ($stime==$cmp_stime) {\n\t\t\t// Warning: already in database\n\t\t\t$warning_msg=$name.\" code=\\\"\".$code.\"\\\"\";\n\t\t\t// 1st owner\n\t\t\tif (!empty($owners[0])) {\n\t\t\t\t$warning_msg.=\" owner1=\\\"\".$owners[0]['code'].\"\\\"\";\n\t\t\t}\n\t\t\t// 2nd owner\n\t\t\tif (!empty($owners[1])) {\n\t\t\t\t$warning_msg.=\" owner2=\\\"\".$owners[1]['code'].\"\\\"\";\n\t\t\t}\n\t\t\t// 3rd owner\n\t\t\tif (!empty($owners[2])) {\n\t\t\t\t$warning_msg.=\" owner3=\\\"\".$owners[2]['code'].\"\\\"\";\n\t\t\t}\n\t\t\t$warning_msg.=\" startTime=\\\"\".$stime.\"\\\"\";\n\t\t\tarray_push($warnings, $warning_msg);\n\t\t}\n\t\telse {\n\t\t\t// No error = only if end time strictly before compared start time OR start time strictly after compared end time\n\t\t\tif (strcmp($stime, $cmp_etime)<=0 && strcmp($etime, $cmp_stime)>=0) {\n\t\t\t\t$error=\"<\".$name.\" code=\\\"\".$code.\"\\\" owner1=\\\"\".$owners[0]['code'].\"\\\">, the timeframe [\".$stime.\", \".$etime.\"] overlaps with existing data in database [\".$cmp_stime.\", \".$cmp_etime.\"]\";\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn TRUE;\n}",
"function _checkAnswer($goodCode){\n $reply = $this->_getReply();\n if($reply['code'] != $goodCode) \n\t{ \n\t $this->_fixError($reply['msg']);\t\n\t return false;\n\t}\n return true;\t\n}",
"public static function verifyCode($secret, $code, $discrepancy = 1, $currentTimeSlice = null) {\n\n\t\tif ($currentTimeSlice === null) {\n\t\t\t$currentTimeSlice = floor(time() / 30);\n\t\t}\n\n\t\tif (strlen($code) != 6) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor ($i = -$discrepancy; $i <= $discrepancy; ++$i) {\n\t\t\t$calculatedCode = self::getCode($secret, $currentTimeSlice + $i);\n\t\t\tif (self::timingSafeEquals($calculatedCode, $code)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"function _check_captcha($code)\n {\n $time = $this->session->flashdata('captcha_time');\n $word = $this->session->flashdata('captcha_word');\n\n list($usec, $sec) = explode(\" \", microtime());\n $now = ((float)$usec + (float)$sec);\n\n if ($now - $time > $this->config->item('captcha_expire', 'tank_auth')) {\n $this->form_validation->set_message('_check_captcha', $this->lang->line('auth_captcha_expired'));\n return FALSE;\n\n } elseif (($this->config->item('captcha_case_sensitive', 'tank_auth') AND\n $code != $word) OR\n strtolower($code) != strtolower($word)) {\n $this->form_validation->set_message('_check_captcha', $this->lang->line('auth_incorrect_captcha'));\n return FALSE;\n }\n return TRUE;\n }",
"function v1_check_db_timeframe2($name, $key, $code, $stime, $etime, $owners, $guest_table, $guest_code, &$error) {\n\tglobal $warnings;\n\t// Format times\n\tif (empty($stime)) {\n\t\t$stime=\"0000-00-00 00:00:00\";\n\t}\n\tif (empty($etime)) {\n\t\t$etime=\"9999-12-31 23:59:59\";\n\t}\n\t\n\t// If already in database, send a warning\n\t$rows=v1_get_id_times2($key, $code, $owners, $guest_table, $guest_code);\n\t\n\tforeach ($rows as $row) {\n\t\t// Check time\n\t\t// Format times\n\t\tif (empty($row[$key.'_stime'])) {\n\t\t\t$cmp_stime=\"0000-00-00 00:00:00\";\n\t\t}else {\n\t\t\t$cmp_stime=$row[$key.'_stime'];\n\t\t}\n\t\tif (empty($row[$key.'_etime'])) {\n\t\t\t$cmp_etime=\"9999-12-31 23:59:59\";\n\t\t}else {\n\t\t\t$cmp_etime=$row[$key.'_etime'];\n\t\t}\n\t\t\n\t\t// If start time is same, warning only\n\t\tif ($stime==$cmp_stime) {\n\t\t\t// Warning: already in database\n\t\t\t$warning_msg=$name.\" code=\\\"\".$code.\"\\\"\";\n\t\t\t// 1st owner\n\t\t\tif (!empty($owners[0])) {\n\t\t\t\t$warning_msg.=\" owner1=\\\"\".$owners[0]['code'].\"\\\"\";\n\t\t\t}\n\t\t\t// 2nd owner\n\t\t\tif (!empty($owners[1])) {\n\t\t\t\t$warning_msg.=\" owner2=\\\"\".$owners[1]['code'].\"\\\"\";\n\t\t\t}\n\t\t\t// 3rd owner\n\t\t\tif (!empty($owners[2])) {\n\t\t\t\t$warning_msg.=\" owner3=\\\"\".$owners[2]['code'].\"\\\"\";\n\t\t\t}\n\t\t\t$warning_msg.=\" startTime=\\\"\".$stime.\"\\\"\";\n\t\t\tarray_push($warnings, $warning_msg);\n\t\t}\n\t\telse {\n\t\t\t// No error = only if end time strictly before compared start time OR start time strictly after compared end time\n\t\t\tif (strcmp($stime, $cmp_etime)<=0 && strcmp($etime, $cmp_stime)>=0) {\n\t\t\t\t$error=\"<\".$name.\" code=\\\"\".$code.\"\\\" owner1=\\\"\".$owners[0]['code'].\"\\\">, the timeframe [\".$stime.\", \".$etime.\"] overlaps with existing data in database [\".$cmp_stime.\", \".$cmp_etime.\"]\";\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn TRUE;\n}",
"public static function isValid( $code )\n {\n return in_array(\n strtoupper( $code ),\n [\n self::AFRICA,\n self::ASIA,\n self::EUROPE,\n self::NORTH_AMERICA,\n self::OCEANIA,\n self::SOUTH_AMERICA,\n self::ANTARCTICA,\n ]\n );\n }",
"public function checkResetCode()\n {\n return $this->resetCode()->isValid();\n }",
"function damm32Check($code) {\r\n\tglobal $base32;\r\n\treturn (damm32Encode($code) == $base32[0]) ? 1 : 0;\r\n\t}",
"public function onCheckAnswer($code = null)\n\t{\n\t\t$key = Request::getInt('captcha_krhash', 0);\n\t\t$answer = Request::getInt('captcha_answer', 0);\n\t\t$answer = $this->_generateHash($answer, date('j'));\n\n\t\tif ($answer == $key)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"protected function IsValidCode($code)\n\t\t{\n\t\t\tif (preg_match('/^[a-z]{3}$/i', $code)) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}",
"function checkTime($access){\n\t\t$now = new DateTime(null , new DateTimeZone('Asia/Kolkata'));\n\t\t$acceYear = new DateTime($access);\n\t\t\n\t\t\n\t\tif($now->format('Y-m-d') <= $acceYear->format('Y-m-d')){\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"function _check_captcha($code)\n\t{\n\t\t$time = $this->session->flashdata('captcha_time');\n\t\t$word = $this->session->flashdata('captcha_word');\n\t\t$word = $_COOKIE['captchaword'];\n\t\t$time = $_COOKIE['captchatime'];\n\t\tlist($usec, $sec) = explode(\" \", microtime());\n\t\t$now = ((float)$usec + (float)$sec);\n\n\t\tif ($now - $time > $this->config->item('captcha_expire', 'tank_auth')) {\n\t\t\t$this->form_validation->set_message('_check_captcha', $this->lang->line('auth_captcha_expired'));\n\t\t\treturn FALSE;\n\n\t\t} elseif (($this->config->item('captcha_case_sensitive', 'tank_auth') AND\n\t\t\t\t$code != $word) OR\n\t\t\t\tstrtolower($code) != strtolower($word)) {\n\t\t\t$this->form_validation->set_message('_check_captcha', $this->lang->line('auth_incorrect_captcha'));\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}",
"function _check_captcha($code)\n\t{\n\t\t$time = $this->session->flashdata('captcha_time');\n\t\t$word = $this->session->flashdata('captcha_word');\n\n\t\tlist($usec, $sec) = explode(\" \", microtime());\n\t\t$now = ((float)$usec + (float)$sec);\n\n\t\tif ($now - $time > $this->config->item('captcha_expire', 'tank_auth')) {\n\t\t\t$this->form_validation->set_message('_check_captcha', $this->lang->line('auth_captcha_expired'));\n\t\t\treturn FALSE;\n\n\t\t} elseif (($this->config->item('captcha_case_sensitive', 'tank_auth') AND\n\t\t\t\t$code != $word) OR\n\t\t\t\tstrtolower($code) != strtolower($word)) {\n\t\t\t$this->form_validation->set_message('_check_captcha', $this->lang->line('auth_incorrect_captcha'));\n\t\t\treturn FALSE;\n\t\t}\n\t\treturn TRUE;\n\t}",
"public function checkTimeEnd(): bool;",
"public function isCode(int $code): bool\n {\n return $this->code === $code;\n }",
"public function isWin() {\n\t\tif ($_SESSION['game']->getState()==\"correct\") {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function matchTime()\n {\n $zone = $this->automation->customer->getTimezone();\n $today = Carbon::now($zone)->toTimeString();\n $time = Carbon::parse($this->getDataValue('time'))->tz($zone)->toTimeString();\n return $today >= $time;\n }",
"public function verifyCode($secret, $code, $discrepancy = 1, $currentTimeSlice = null)\n {\n if ($currentTimeSlice === null) {\n $currentTimeSlice = floor(time() / 30);\n }\n\n for ($i = -$discrepancy; $i <= $discrepancy; $i++) {\n $calculatedCode = $this->getCode($secret, $currentTimeSlice + $i);\n if ($calculatedCode == $code) {\n return true;\n }\n }\n\n return false;\n }",
"public function isValid()\n {\n return ($this->_code > 0) ? true : false;\n }",
"public static function isValidCode($code): bool\n {\n if (array_key_exists($code, self::getInfoForCurrencies())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesWithoutCurrencyCode())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesWithUnofficialCode())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesWithHistoricalCode())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesIncomplete())) {\n return true;\n }\n\n return false;\n }",
"public function checkWin() {\n\n $data = $this->getDeathRecord();\n $data = array_map(function($d) {\n return $d[key($d)];\n }, $data);\n\n if ($data) {\n if (in_array(\"FARMER\", $data)) {\n return FALSE;\n }\n if (in_array(\"COW_1\", $data) && in_array(\"COW_2\", $data)) {\n return FALSE;\n }\n if (in_array(\"BUNNY_1\", $data) && in_array(\"BUNNY_2\", $data) && in_array(\"BUNNY_4\", $data) && in_array(\"BUNNY_4\", $data)) {\n return FALSE;\n }\n }\n return true;\n }",
"function check_time($time)\n\t{\n\t\t$components = explode(' ', $time);\n\t\t$date = explode('-', $components[0]);\n\t\t$clock = explode(':', $components[1]);\n\n\t\t// This is really annoying, but we have to check whether each array has the right number of digits, since the next line converts each number to an int.\n\t\tif ((strlen($date[0]) != 4) || (strlen($date[1]) != 2) || (strlen($date[2]) != 2) ||\n\t\t\t(strlen($clock[0]) != 2) || (strlen($clock[1]) != 2) || (strlen($clock[2]) != 2))\n\t\t\treturn false;\n\t\t\n\t\t// now make sure each part of the datetime is valid.\n\t\telse if (!checkdate((int)$date[1], (int)$date[2],(int)$date[0]))\n\t\t\treturn false;\n\t\telse if ((int)$clock[0] > 24 || (int)$clock[0] < 0)\n\t\t\treturn false;\n\t\telse if ((int)$clock[1] > 60 || (int)$clock[1] < 0)\n\t\t\treturn false;\n\t\telse if ((int)$clock[2] > 60 || (int)$clock[2] < 0)\n\t\t\treturn false;\n\t\telse \n\t\t\treturn true;\n\t}",
"public function verify_code($name, $code)\n {\n if (!$this->ci->config->item('captchas_enabled')) return true;\n\n $session_code = $this->ci->session->userdata('captcha_' . $name);\n\n if ($session_code !== null)\n {\n // delete the old image from cache\n $this->redis->del('captcha:' . $session_code);\n\n // the code matches\n if ($session_code == $code)\n {\n return true;\n }\n\n // generate a new code and image\n $new_code = $this->generate_code();\n $captcha_image = $this->generate_image($new_code);\n\n // code doesn't match, store the new captcha\n $this->ci->session->set_tempdata('captcha_' . $name, $new_code, 600);\n $this->redis->set('captcha:' . $new_code, serialize($captcha_image), ['ex'=> 120]);\n }\n else\n {\n return $session_code;\n }\n return false;\n }",
"protected function _canRun()\r\n\t{\r\n\t\t$start\t= strtotime($this->_scheduleStart);\r\n\t\t$stop\t= strtotime($this->_scheduleStop);\r\n\t\t$now\t= time();\r\n\t\t\r\n\t\tif($now > $start && $now < $stop) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public function verifyCode($secret, $code)\n {\n if (strlen($code) != 6) {\n return false;\n }\n return ($this->getCode($secret) == $code) ? true : false;\n }",
"public function isValid()\n {\n $this->checkJMBG();\n\n $arr = @$this->explode();\n if (count($arr) <> 13) return false;\n foreach ($arr as $k => $v) $$k = (int)$v;\n\n $checksum = 11 - (7 * ($A + $G) + 6 * ($B + $H) + 5 * ($C + $I) + 4 * ($D + $J) + 3 * ($E + $K) + 2 * ($F + $L)) % 11;\n return ($checksum == $M);\n }",
"public function testIsVerificationCodeValidForUser()\n {\n $this->ensurePasswordValidationReturns(true);\n Craft::$app->getConfig()->getGeneral()->verificationCodeDuration = 172800;\n\n $this->updateUser([\n // The past.\n 'verificationCodeIssuedDate' => '2018-06-06 20:00:00',\n ], ['id' => $this->activeUser->id]);\n\n $this->assertFalse(\n $this->users->isVerificationCodeValidForUser($this->activeUser, 'irrelevant_code')\n );\n\n // Now the code should be present - within 2 day window\n $this->updateUser([\n // The present.\n 'verificationCodeIssuedDate' => Db::prepareDateForDb(new DateTime('now')),\n ], ['id' => $this->activeUser->id]);\n\n $this->assertTrue(\n $this->users->isVerificationCodeValidForUser($this->activeUser, 'irrelevant_code')\n );\n }",
"public function hasCodeType(){\n return $this->_has(3);\n }",
"public function hasCodeType(){\n return $this->_has(4);\n }",
"public function hasCodeType(){\n return $this->_has(4);\n }",
"protected function canRun(Blackbox_Data $data, Blackbox_IStateData $state_data)\n\t{\n\t\tif (!empty($data->social_security_number_encrypted) && !empty($data->next_pay_date))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\t\n\t\treturn FALSE;\n\t}",
"public function isValid()\n {\n if ($this->year === null && $this->month === null && $this->day === null && $this->hour === null && $this->minute === null && $this->second === null) {\n return false; // must have at least one value to be valid.\n }\n // While we might expect the two-digit values to be more constrained (e.g., month=1..12; minute=1..59),\n // the format allows larger values, and perhaps a duration of 55 days is a reasonable thing to express.\n return self::ok($this->year, 0, 9999) && self::ok($this->month, 0, 99) && self::ok($this->day, 0, 99) && self::ok($this->hour, 0, 99) && self::ok($this->minute, 0, 99) && self::ok($this->second, 0, 99);\n }",
"function _check_captcha($code) {\r\n $word = $this->session->flashdata('captcha_word');\r\n if (($this->config->item('captcha_case_sensitive') AND $code != $word) OR\r\n strtolower($code) != strtolower($word)) {\r\n return FALSE;\r\n }\r\n return TRUE;\r\n }",
"public static function checkClock() : bool\r\n {\r\n $dirs = array();\r\n\r\n if (strtoupper(substr(PHP_OS, 0, 3)) == \"WIN\")\r\n {\r\n $windir = getenv(\"windir\");\r\n if ($windir !== false)\r\n {\r\n $dirs[] = $windir;\r\n $dirs[] = \"$windir\\\\system32\";\r\n }\r\n\r\n $dirs[] = getenv(\"ProgramFiles\");\r\n $dirs[] = getenv(\"ProgramFiles(x86)\");\r\n $dirs[] = sys_get_temp_dir();\r\n\r\n $paths = getenv(\"PATH\");\r\n if ($paths !== false)\r\n $dirs = array_merge($dirs, explode(';', $paths));\r\n }\r\n else\r\n {\r\n $dirs[] = '/usr';\r\n $dirs[] = '/usr/bin';\r\n $dirs[] = '/etc';\r\n $dirs[] = sys_get_temp_dir();\r\n $dirs[] = getenv(\"HOME\");\r\n\r\n $paths = getenv(\"PATH\");\r\n if ($paths !== false)\r\n $dirs = array_merge($dirs, explode(':', $paths));\r\n }\r\n\r\n $cur_time = time();\r\n $strikes = 0;\r\n foreach ($dirs as $d)\r\n {\r\n if ($d !== false && is_dir($d))\r\n {\r\n $t = filemtime($d);\r\n if ($t > $cur_time && ($t - $cur_time) > 604800)\r\n $strikes++;\r\n }\r\n }\r\n\r\n // if three or more directories have modification times greater\r\n // than one week from today, return false, otherwise true\r\n return ($strikes >= 3) ? false : true;\r\n }",
"private function checkCode(Int $code) {\n if ($code === 200) :\n return true;\n endif;\n\n return false;\n }",
"public function hasCode(){\n return $this->_has(3);\n }",
"function timezonecalculator_checkData($timeZoneTime) {\r\n\t//first check if the size of the timezones-array match\r\n\tif (sizeof($timeZoneTime)!=7)\r\n\t\treturn -1;\r\n\r\n\t//WordPress TimeZones Support\r\n\tif ($timeZoneTime[0]=='Local_WordPress_Time') {\r\n\t\t$timeZoneTime[0]=get_option('timezone_string');\r\n\t}\r\n\r\n\t//the timezone_id should contain at least one character\r\n\tif (strlen($timeZoneTime[0])<1)\r\n\t\treturn -2;\r\n\r\n\t//are the last two array-parameters 0 or 1?\r\n\t$mycheck=false;\r\n\tif ($timeZoneTime[5]==1 || $timeZoneTime[5]==0)\r\n\t\t$mycheck=true;\r\n\tif (!$mycheck)\r\n\t\treturn -3;\r\n\r\n\t$mycheck=false;\r\n\tif ($timeZoneTime[6]==1 || $timeZoneTime[6]==0)\r\n\t\t$mycheck=true;\r\n\tif (!$mycheck)\r\n\t\treturn -4;\r\n\r\n\t/*\r\n\tprevious-version check by the following assumption:\r\n\tif array-parameter [4] (offset in older versions) is numeric\r\n\t&& the value between -12.5 and 12.5 ==> old version\r\n\tthrow error\r\n\t*/\r\n\r\n\t//thanx 2 Darcy Fiander 4 updating the regex to match the half-hour offsets which is now used for old-version checks\r\n\tif (ereg(\"(^[-]?[0-9]{1,2}(\\\\.5)?$)\", $timeZoneTime[4]) && $timeZoneTime[4]>=-12.5 && $timeZoneTime[4]<=12.5) {\r\n\t\treturn -5;\r\n\t}\r\n\r\n\t//check if timezone_id exists by creating a new instance\r\n\t$dateTimeZone=@timezone_open($timeZoneTime[0]);\r\n\r\n\tif (!$dateTimeZone)\r\n\t\treturn -2;\r\n\telse return $dateTimeZone;\r\n}",
"public function valid() : bool\n {\n // dd($this->position >= 65 && $this->position <= 90);\n return $this->position >= 65 && $this->position <= 90;\n }",
"public function shouldExecute()\n\t{\n\t\t// date range check\n\t\tif( strtotime($this->start_date) > utc_time() || strtotime($this->end_date) < utc_time() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// time range check, for the current day-of-week\n\t\t$dow_abbrevs = [null, 'mon', 'tues', 'wed', 'thurs', 'fri', 'sat', 'sun'];\n\t\t$dow_int = utc_date()->format('N');\t// 1 = mon, 7 = sun\n\t\t$dow = $dow_abbrevs[$dow_int];\n\t}",
"public function hasScoreCode(){\n return $this->_has(3);\n }",
"public function codeIsValid(string $code): bool\n {\n return $this->constantValueExists($code);\n }",
"public function Check\n\t(\n\t\t$sInputCode,\n\t\t$sEncryptedGen,\n\t\t$bCaseSensitive = false,\n\t\t$nMinDelay = self::DEFAULT_DELAY_MIN,\n\t\t$nMaxDelay = self::DEFAULT_DELAY_MAX\n\t)\n\t{\n\t\tif ( ! CLib::IsExistingString( $sInputCode ) || ! CLib::IsExistingString( $sEncryptedGen ) )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$bRet = false;\n\t\t$cDrawImg = new CDrawImage( $this->m_sCryptSeed );\n\n\t\tif ( $cDrawImg->VerifyInputWithEncryptedGen( $sInputCode, $sEncryptedGen, $bCaseSensitive, $nMinDelay, $nMaxDelay ) )\n\t\t{\n\t\t\t$bRet = true;\n\t\t}\n\n\t\treturn $bRet;\n\t}",
"public function hasRtime32Created()\n {\n return $this->rtime32_created !== null;\n }",
"public function checkDiff()\n {\n if ($this->tokensOriginal !== $this->tokensMutated) {\n return true;\n }\n\n return false;\n }",
"function reservedCodes($data) {\n\t\tif(in_array($data['code'], Configure::read('InvalidCodes'))) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"private function _checkDispatchCode( $code1, $code2 )\n {\n if( $code1 == '' || $code1 == $code2 ) return $code2;\n\n // If the second code is empty, return code1\n if( $code2 == '' ) return $code1;\n\n $arrRule = array( 'HH', 'YH', 'GM', 'SU', 'SF', 'FR', 'AP', 'JM', 'AO', 'AJ', 'NO' );\n\n $pos1 = array_search( $code1, $arrRule );\n $pos2 = array_search( $code2, $arrRule );\n\n if( $pos2 !== false && $pos1 < $pos2 ) return $code1;\n\n return $code2;\n }",
"function verify_code($rec_num, $checkstr)\n\t{\n\t\tif ($user_func = e107::getOverride()->check($this,'verify_code'))\n\t\t{\n\t \t\treturn call_user_func($user_func,$rec_num,$checkstr);\n\t\t}\n\t\t\n\t\t$sql = e107::getDb();\n\t\t$tp = e107::getParser();\n\n\t\tif ($sql->db_Select(\"tmp\", \"tmp_info\", \"tmp_ip = '\".$tp -> toDB($rec_num).\"'\")) {\n\t\t\t$row = $sql->db_Fetch();\n\t\t\t$sql->db_Delete(\"tmp\", \"tmp_ip = '\".$tp -> toDB($rec_num).\"'\");\n\t\t\t//list($code, $path) = explode(\",\", $row['tmp_info']);\n\t\t\t$code = intval($row['tmp_info']);\n\t\t\treturn ($checkstr == $code);\n\t\t}\n\t\treturn FALSE;\n\t}",
"public function verifyCode(string $secret, string $code, int $discrepancy = 1) : bool\n {\n $currentTimeSlice = floor(time() / 30);\n\n if (strlen($code) != 6) {\n return false;\n }\n\n for ($i = -$discrepancy; $i <= $discrepancy; $i++) {\n try {\n $calculatedCode = $this->getCode($secret, $currentTimeSlice + $i);\n } catch (Exception $e) {\n return false;\n }\n\n if (hash_equals($calculatedCode, $code)) {\n return true;\n }\n }\n\n return false;\n }",
"public function check($code) {\n $code = trim($code);\n // last token should be ;\n if(substr($code, -1) != ';') {\n $this->error = ['line' => (substr_count($code, \"\\n\") + 1), 'prev' => ']', 'token' => ';', 'must' => true];\n return false;\n }\n // exclude last token\n $code = substr($code, 0, -1);\n // get all tokens\n $tokens = token_get_all($code);\n $prev = false;\n $this->error['line'] = false;\n foreach($tokens as $token) {\n if(is_array($token)) {\n $tn = token_name($token['0']);\n if(in_array($tn, ['T_WHITESPACE', 'T_COMMENT']))\n continue;\n $this->error = ['line' => $token[2], 'prev' => $prev, 'token' => $tn];\n if(!in_array($tn, self::$valid_tokens))\n return false;\n elseif($tn == 'T_STRING' && !in_array(strtolower($token[1]), ['true', 'false']))\n return false;\n if($this->validSequence($prev, $tn))\n $prev = $tn;\n else\n return false; \n } else {\n // line will be defined in any case, so no needed to define it here \n $this->error['prev'] = $prev;\n $this->error['token'] = $token;\n if(in_array($token, self::$valid_symbols) && $this->validSequence($prev, $token))\n $prev = $token;\n else\n return false;\n }\n }\n // chek pairs of $braces\n $braces = 0;\n $inString = 0;\n $this->error['line'] = 0;\n foreach($tokens as $token) {\n if($inString & 1) {\n switch ($token) {\n case '`':\n case '\"': --$inString; break;\n }\n } else {\n switch ($token) {\n case '`':\n case '\"': ++$inString; break;\n \n case '[': case '(': ++$braces; break;\n case ']': case ')':\n if ($inString) {\n --$inString;\n }\n else {\n --$braces;\n if ($braces < 0) {\n return false;\n }\n }\n break;\n }\n }\n }\n if ($braces) {\n return false;\n }\n return true;\n }",
"function MCW_plausibility_check($widget){\n // error message if code is incorrect\n $res = false; // = 0 = ''\n $code = stripslashes($widget['code']);\n $kind = $widget['kind'];\n \n //check 0\n $rec_check = MCW_check_chain($widget);\n if ($rec_check['clean']==false){\n $res=$res.'DANGER: Current widget configuration would lead to infinite loops: <code>'.$rec_check['chain'].'</code>';\n }\n \n //check 1\n $code_a='<?php';\n $code_b='?'.'>';\n $code_a_count=substr_count($code, $code_a);\n $code_b_count=substr_count($code, $code_b);\n if ($code_a_count <> $code_b_count) \n $res=$res.$code_a_count.' php-open-tag (<code>'.MCW_make_html_writeable($code_a).'</code>) vs. '.$code_b_count.' php-close-tag (<code>'.MCW_make_html_writeable($code_b).'</code>)';\n \n //check 2\n if ($kind=='html'){\n $code_a='?'.'>';\n $code_b='<?php'; \n } else {\n $code_a='<?php';\n $code_b='?'.'>'; \n }\n $code_a_pos=strpos($code, $code_a);\n $code_b_pos=strpos($code, $code_b);\n if ($code_a_pos < $code_b_pos){\n if ($res) $res=$res.',<br>';\n $res=$res.'You should not use <code>'.MCW_make_html_writeable($code_a).'</code> before <code>'.MCW_make_html_writeable($code_b).'</code> in '.$kind.'-code. Please select html or remove these tags.';\n }\n \n return $res;\n //return false; \n }",
"public function verifyCodeChallenge(string $codeVerifier, string $codeChallenge) : bool;",
"public function isInputsFromDifferentCodecs(): bool\n {\n $this->consistencyCheck();\n\n $input_list = ProjectInputs::query()->where('project', $this->id)->get();\n if (count($input_list) > 1) {\n return $input_list->where('status', InputStatuses::WRONG_CODEC)->isNotEmpty();\n } else {\n return false;\n }\n }",
"protected function isWithinTimedBannerRange()\n {\n // First fetch the server datetime and then convert that exact datetime to UTC so that it's compatible\n // with the UTC given start and end datetimes\n $oCurrentDateTime = $this->getLocale()->date(null, $this->getDateTimeFormat());\n $oCurrentDateTime = new Zend_Date($oCurrentDateTime->toString(), $this->getDateTimeFormat(), $this->getLocale()->getLocaleCode());\n\n $oStart = $this->getStart();\n $oEnd = $this->getEnd();\n\n // There is only a start and it's now or before\n if ($oStart && !$oEnd && $oCurrentDateTime >= $oStart) { return true; }\n // Both start and end are present and now is between them\n if ($oStart && $oEnd && $oCurrentDateTime >= $oStart && $oCurrentDateTime <= $oEnd) { return true; }\n // There is no start but there is an end and now is before the end\n if (!$oStart && $oEnd && $oCurrentDateTime <= $oEnd) { return true; }\n\n return false;\n }",
"public function verifyCode($code,$id)\n\t{\n\t\ttry{\n\t\t\t$select = $this->getDbTable()->select();\n\t\t\t$select->from('rd.location_boundaries',array('COUNT(id) as count'))\n\t\t\t->where('code ILIKE ?',$code);\n\t\t\tif($id != 0){\n\t\t\t\t$select->where('id <> ?',$id);\n\t\t\t}\n\t\t\t$rowset = $this->getDbTable()->fetchAll($select);\n\t\t\t$count = 0;\n\n\t\t\tforeach($rowset as $row){\n\t\t\t\t$count = $row->count;\n\t\t\t}\n\t\t\tif($count == 0){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception $ex){\n\t\t\tthrow new Exception($ex->getMessage()) ;\n\t\t}\n\n\t}",
"function checkCode($typeId, $schedConfId, $code) {\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT COUNT(*)\n\t\t\t\tFROM registration_types\n\t\t\t\tWHERE type_id = ?\n\t\t\t\tAND sched_conf_id = ?\n\t\t\t\tAND code = ?',\n\t\t\tarray(\n\t\t\t\t$typeId,\n\t\t\t\t$schedConfId,\n\t\t\t\t$code\n\t\t\t)\n\t\t);\n\t\t$returner = isset($result->fields[0]) && $result->fields[0] != 0 ? true : false;\n\n\t\t$result->Close();\n\t\tunset($result);\n\n\t\treturn $returner;\n\t}",
"protected static function checkIfSpecifiedTimePassed()\n {\n $passed = false;\n $specified_time = env('APIMO_TIME_SYNC');\n $now = time();\n $last_sync_time = self::queryLastSyncTimeOnDb();\n if (($now - $specified_time) > $last_sync_time) {\n $passed = true;\n }\n\n return $passed;\n }",
"function check_formkey($formkey)\r\n\t{\r\n\t\t$code = decrypt($formkey);\r\n\t\t\r\n\t\treturn (($code >= 1199116800 && REQUEST_TIME - $code <= FORMKEY_TIMEOUT) ? true : false);\r\n\t\t\r\n\t}",
"function checkTime($stmt, $i){\n\t\tif(floatval(self::$data[$i]['Time']) < floatval($stmt['sequenceStart']) || floatval(self::$data[$i]['Time']) > floatval($stmt['sequenceStart']) + floatval($stmt['sequenceLength']) ){\n\t\t\t$arr = array('success' => 3, 'error_msg' => 'Wrong values');\n\t\t\techo json_encode($arr);\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}",
"protected function isValidRedirect()\n {\n $savedState = $this->loadState();\n if (!$this->getCode() || !isset($_GET['state'])) {\n return false;\n }\n $givenState = $_GET['state'];\n $savedLen = mb_strlen($savedState);\n $givenLen = mb_strlen($givenState);\n if ($savedLen !== $givenLen) {\n return false;\n }\n $result = 0;\n for ($i = 0; $i < $savedLen; $i++) {\n $result |= ord($savedState[$i]) ^ ord($givenState[$i]);\n }\n return $result === 0;\n }",
"private function checkTimeValidity()\n {\n $inThirtyMinutes = Carbon::createFromFormat('H:i:s', Carbon::now()->toTimeString())->addMinutes(30);\n $pickup_time = Carbon::createFromFormat('H:i', request('pickup_time'));\n $minTime = Carbon::createFromFormat('H:i', \"11:00\");\n $maxTime = Carbon::createFromFormat('H:i', \"22:00\");\n\n $error = false;\n $error_message = '';\n\n if ($pickup_time < $minTime) {\n $error = true;\n $error_message = 'Sorry, this is too early';\n }\n\n if ($pickup_time < $inThirtyMinutes) {\n $error = true;\n $error_message = 'Sorry but You can\\'t pick up earlier than ' . $inThirtyMinutes->toTimeString();\n }\n\n if ($pickup_time > $maxTime) {\n $error = true;\n $error_message = 'Sorry but You can\\'t pick up later than ' . $maxTime->toTimeString();\n }\n\n return ['error' => $error, 'error_message' => $error_message];\n }",
"private function validateCode($code, $updateCount = false)\n {\n $invitationCodes = InvitationCode::active()->pluck('id','code');\n\n if( ! empty($invitationCodes[$code])){\n\n if($updateCount){\n $invitationCode = InvitationCode::find($invitationCodes[$code]);\n $invitationCode->current_count += 1;\n $invitationCode->save();\n }\n\n return true;\n } else {\n return false;\n }\n }",
"function check_reply($code)\n\t{\n\t\tif($code=='230')\n\t\t{\n\t\t\twhile(1)\n\t\t\t{\n\t\t\t\tif($this->is_ok())\n\t\t\t\t{\n\t\t\t\t\tif( preg_match('/^230 /',$this->message))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($this->is_ok())\n\t\t\t{\n\t\t\t\t$pat = '/^'. $code .'/';\n\t\t\t\tif( preg_match($pat,$this->message))\n\t\t\t\t{\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\t\n\t\t\treturn 0;\n\t\t}\n\t}",
"private function is_valid($mutation_data) {\n if (count($mutation_data) >= 5) {\n $chromosome_format = preg_match(\"/^chr/\", $mutation_data[0]);\n $wild_format = preg_match(\"/^[A,C,G,T]$/\", $mutation_data[6]);\n $mut_format = preg_match(\"/^[A,C,G,T]$/\", $mutation_data[7]);\n return $chromosome_format && $wild_format && $mut_format;\n } else {\n return false;\n }\n }",
"function VerifyTime() {\r\n $current = time();\r\n // check if the session has expired\r\n $this->err_level = 16;\r\n $this->err = \"Verify expire. LastUsed: \" . (string)$this->sessdata[\"lastused\"] . \" ExpireTime: \" . (string)$this->expire_time . \" Current: \" . (string)$current ;\r\n $this->err_no = 0;\r\n $this->DbgAddSqlLog();\r\n if ($this->sessdata[\"lastused\"]+$this->expire_time<$current) {\r\n return 0;\r\n }\r\n return 1;\r\n }",
"public function isValidCheckin(){\n\t\t$users_connection = $this->dbHandle->users;\n\t\t$data = $users_connection->findOne(array('uid' => intval($this->uid)));\n\t\tif (!isset ($data['last_update']) || $data['last_update'] == null){\n\t\t\t//first update so is valid.\n\t\t\treturn true;\n\t\t}\n\t\t//$last_update_time = $data['last_update']['created_on']->sec;\n\t\tif (isset ($data['last_update']['listing'])){\n\t\t\t$last_checkedin_show = $data['last_update']['listing']['listing_id'];\n\t\t\t$last_checkedin_show_start = $data['last_update']['listing']['start']->sec;\n\t\t}\n\t\telse{\n\t\t\treturn true;\n\t\t}\n\t\tif (($this->listing_id == $last_checkedin_show) && ($this->time == $last_checkedin_show_start)){\n\t\t\t$this->logger->log(\"Checked into the same show again. Return false\",Zend_Log::INFO);\n\t\t\treturn false;\n\t\t}\n\t\t/*\n\t\t$current_update_time = $this->timestamp;\n\t\t$diff_secs = $current_update_time - $last_update_time;\n\t\t$this->logger->log(\"The diff secs = $diff_secs\",Zend_Log::INFO);\n\t\t$threshold = 30*60; //30 mins \n\t\tif ($diff_secs > $threshold){\n\t\t\treturn true;\n\t\t}\n\t\t//within 30 mins not valid for points.\n\t\treturn false;\n\t\t*/\n\t\treturn true;\n\t}",
"private static function compareWindows(Competition $photoComp, $window) {\r\n \r\n $Now = new DateTime;\r\n \r\n $open = sprintf(\"%sDateOpen\", $window);\r\n $close = sprintf(\"%sDateClose\", $window);\r\n \r\n if (!($photoComp->$open instanceof DateTime && $photoComp->$open <= $Now) || \r\n !($photoComp->$close instanceof DateTime && $photoComp->$close >= $Now)) {\r\n return false;\r\n }\r\n \r\n return true;\r\n \r\n }",
"public function isDuplicateKeyError($code)\n {\n return $code == 2601;\n }",
"public function hasBepro2Time(){\n return $this->_has(4);\n }",
"private function validateForgotPasswordCode($code)\n {\n try {\n $db_request = $this->db->prepare(\"SELECT forgot_password_code \n FROM users WHERE forgot_password_code=:forgot_password_code LIMIT 1\");\n $db_request->bindParam(':forgot_password_code', $code);\n $db_request->execute();\n if ($db_request->rowCount()) {\n return true;\n } else {\n $this->user_status_message = 'Enter the appropriate code to change the password.';\n return false;\n }\n } catch (PDOException $e) {\n DBErrorLog::loggingErrors($e);\n }\n }",
"private function checkNewCommondaty()\n {\n $date = new DateTime($this->addDate);\n $date->modify(self::TIME_INTERVAL);\n $date->format('Y-m-d H:i:s');\n $dateNow = new DateTime();\n $dateNow->format('Y-m-d H:i:s');\n\n if ($dateNow < $date) {\n return 1;\n }\n return 0;\n }",
"public function isValid()\n {\n if (is_null($this->delimiter)) {\n return false;\n }\n\n [$month, $year] = $this->getMonthYear();\n\n return checkdate($month, 1, $year);\n }",
"public static function updateAppointmentStatusForGuest($prevAppointmentCode)\n {\n $connection = \\Yii::$app->db;\n $model = $connection\n ->createCommand(\"UPDATE appointment\n SET status = 'Cancelled'\n WHERE appointment_code = '\".$prevAppointmentCode.\"'\n AND status != 'Served'\n ORDER BY id DESC\n LIMIT 1\n \");\n \n $affected_rows = $model->execute();\n\n if ($affected_rows >= 0)\n {\n return true;\n } else {\n return false;\n }\n }",
"function checkTime($date){\n\t\t$time=$date;\n\t\t$check=$time+(60*30);//60 seg y 30 min\n\t\tif(time()>$check){\n\t\t\treturn true; //true si ya se han cumplido los 30min\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function checkValidity()\r\n {\r\n if (!parent::checkValidity())\r\n return false;\r\n\r\n if (!$this->checkUniqueCode())\r\n return false;\r\n \r\n if ($this->workflowState && strlen($this->workflowState) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_WORKFLOWSTATE_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if (trim($this->name . ' ') == '')\r\n {\r\n $this->lastErrorMsg = _ERROR_NAME_IS_MANDATORY;\r\n return false;\r\n }\r\n \r\n if (strlen($this->name) > 255)\r\n {\r\n $this->lastErrorMsg = _ERROR_NAME_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if (trim($this->code . ' ') == '')\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_IS_MANDATORY;\r\n return false;\r\n }\r\n \r\n if (strlen($this->code) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if ($this->fromState && strlen($this->fromState) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_TOO_LONG;\r\n return false;\r\n }\r\n \r\n if ($this->toState && strlen($this->toState) > 64)\r\n {\r\n $this->lastErrorMsg = _ERROR_CODE_TOO_LONG;\r\n return false;\r\n } \r\n \r\n return true;\r\n }",
"function is_now_valid($start, $end)\n{\n $now = new DateTime;\n $hour = strval($now->format(\"H\"));\n if ($hour >= $start && $hour < $end)\n {\n return true;\n }\n return false;\n}",
"public function code_check($code)\n {\n if( $this->MItems->get_by_code($code))\n {\n $this->form_validation->set_message('code_check', 'Item code can\\'t be duplicate. Please choose different item code.');\n return false;\n }\n else\n {\n return true;\n }\n }",
"public function isNowInRange()\n {\n $now = (new \\DateTime())->format('H:i:s');\n return $this->start->__toString() <= $now\n && $this->end->__toString() >= $now;\n }",
"static public function western_time_past_event($str = \"2013-1-8\")\n {\n $datetime1 = new DateTime(\"now\");\n $datetime2 = new DateTime($str);\n //what is going on now here\n if ($datetime1 == $datetime2) {\n return 0;\n } else if ($datetime1 < $datetime2) {\n //what is going on the coming event- -- FUTURE EVENT\n return 1;\n } else if ($datetime1 > $datetime2) {\n //what has been happened in the past. -- PAST EVENT\n return 2;\n }\n return FALSE;\n }",
"function isValidCodeMachine($codeMachine) {\n\tglobal $DB_DB;\n\t$request = $DB_DB->prepare(\"SELECT * FROM Machine WHERE codeMachine LIKE :codeMachine\");\n\n\ttry {\n\t\t$request->execute(array(\n\t\t\t'codeMachine' => $codeMachine\n\t\t));\n\t}\n\tcatch(Exception $e) {\n\t\tif($DEBUG_MODE)\n\t\t\techo $e;\n\t\treturn -2;\n\t}\n\n\tif($request->rowCount() != 0)\n\t\treturn false;\n\treturn true;\n}",
"public function hasActivateCode(){\n return $this->_has(3);\n }",
"private function isSafeCode($code)\n {\n // http://sourceware.org/binutils/docs-2.23.1/as/Pseudo-Ops.html#Pseudo-Ops\n // Notes:\n // - .fill et al. are deemed unsafe because of potential DoS (huge output).\n // - \". \" allows for relative jumps, e.g. jmp . + 5\n $safe_directives = array(\n \".ascii\", \".asciz\", \".align\", \".balign\",\n \".byte\", \".int\", \".double\", \".quad\", \".octa\", \".word\", \". \"\n );\n\n foreach ($safe_directives as $directive)\n $code = str_replace($directive, \"\", $code);\n\n // These comments have special meaning to as. They don't seem dangerous but\n // reject anyway to be safe.\n if (strpos($code,\"#NO_APP\",0) !== false || strpos($code,\"#APP\",0) !== false)\n return false;\n\n // If the source contains any other directives, reject.\n // Yes, this will make it fail if there's a non-directive period in a string\n // constant, but if we want to check for that safely we need to go beyond\n // strpos and even regular expressions.\n return strpos($code, \".\", 0) === false; \n }",
"public function is_zone($zone_code) {\n return in_array($zone_code, array_keys($this->zone));\n }",
"public static function checkTime($user_time)\r\n {\r\n if (strlen($user_time) == 5 ) {\r\n return true;\r\n }\r\n return false;\r\n }",
"public function checkForWin() \n\t{\n\n\t\t$score = array_intersect($this->phrase->selected, $this->phrase->getLetters());\n\n\t\tif (count($score) == count($this->phrase->getLetters())) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}",
"public function is_reset_code_exist($reset_code) {\r\n\t\t\t$query = 'SELECT `username` FROM `forgot_password` \r\n\t\t\t\t\t\tWHERE `reset_code` =:reset_code AND \r\n\t\t\t\t\t\t(`time_requested` > DATE_SUB(NOW(), INTERVAL 1 DAY) AND \r\n\t\t\t\t\t\t`time_requested` < NOW())';\r\n\t\t\t\r\n\t\t\t$statement = $this->con->prepare($query);\r\n\t\t\t$statement->bindValue(':reset_code', $reset_code);\r\n\t\t\t$statement->execute();\r\n\t\t\t$valid = ($statement->rowCount() == 1);\r\n\t\t\t$statement->closeCursor();\r\n\t\t\treturn $valid;\r\n\t\t}",
"public static function check_time($t1, $t2, $tn, $opposite=false) {\n $t1 = +str_replace(\":\", \"\", $t1);\n $t2 = +str_replace(\":\", \"\", $t2);\n $tn = +str_replace(\":\", \"\", $tn); \n if ($t2 >= $t1) {\n if($opposite==true){\n return $t1 < $tn && $tn < $t2;\n }else{\n return $t1 <= $tn && $tn < $t2;\n }\n } else {\n if($opposite==true){\n return ! ($t2 < $tn && $tn < $t1);\n }else{\n return ! ($t2 <= $tn && $tn < $t1);\n }\n }\n }",
"function game_check() {\r\n $this->invalid_char = array_diff($this->position, $this->valid_char);\r\n if ($this->grid_size % 2 == 0 || $this->grid_size < 3 || $this->grid_size > 15) {\r\n $this->game_message('invalid-size');\r\n } else if (count($this->invalid_char, COUNT_RECURSIVE) > 0) {\r\n $this->game_message('invalid-character');\r\n } else if (strlen($this->board) <> pow($this->grid_size, 2)) {\r\n $this->game_message('invalid-board');\r\n } else if ($this->board == str_repeat('-', pow($this->grid_size, 2))) {\r\n $this->game_play(true);\r\n $this->game_message('new-game');\r\n } else if (substr_count($this->board, 'x') - substr_count($this->board, 'o') > 1) {\r\n $this->game_play(false);\r\n $this->game_message('too-many-x');\r\n } else if (substr_count($this->board, 'o') - substr_count($this->board, 'x') > 0) {\r\n $this->game_play(false);\r\n $this->game_message('too-many-o');\r\n } else if ($this->win_check('x')) {\r\n $this->game_play(false);\r\n $this->game_message('x-win');\r\n } else if ($this->win_check('o')) {\r\n \r\n $this->game_play(false);\r\n $this->game_message('o-win');\r\n } else if (stristr($this->board, '-') === FALSE) {\r\n \r\n $this->game_play(false);\r\n $this->game_message('tie-game');\r\n } else {\r\n $this->pick_move();\r\n if ($this->win_check('o')) {\r\n $this->game_play(false);\r\n $this->game_message('o-win');\r\n } else {\r\n $this->game_play(true);\r\n $this->game_message('ongoing-game');\r\n }\r\n }\r\n }",
"public function lastEditedIn($time): bool;",
"function codecheck($code){\n\t\t// echo 'Code Check wordt uitgevoerd!';\n\t\t\n\t\t$con=mysqli_connect(\"localhost\",\"durftean\",\"SSander123\",\"durftean\");\n\t\t$query = \"SELECT * FROM codes WHERE code = $code\";\t\t\n\t\t$result = mysqli_query($con, $query);\n\t\t$data = mysqli_fetch_assoc($result);\n\t\t\n\t\tif($result->num_rows > 0) {\n\t\t\t$ja = true; // Wel iets gevonden\n\t\t}else{\n\t\t\t$nee = false; // Niks gevonden\n\t\t}\n\t\treturn array($ja,$nee,$data);\n\t}",
"public function isTime() : bool {\n return $this->isMinute() && $this->isHour() && $this->isDayOfMonth() && $this->isMonth() && $this->isDayOfWeek();\n }",
"public function DataIsValid()\n {\n $bDataIsValid = parent::DataIsValid();\n if ($this->HasContent() && $bDataIsValid) {\n if (intval($this->data) < 12 && intval($this->data) >= -11) {\n $bDataIsValid = true;\n } else {\n $bDataIsValid = false;\n $oMessageManager = TCMSMessageManager::GetInstance();\n $sConsumerName = TCMSTableEditorManager::MESSAGE_MANAGER_CONSUMER;\n $sFieldTitle = $this->oDefinition->GetName();\n $oMessageManager->AddMessage($sConsumerName, 'TABLEEDITOR_FIELD_TIMEZONE_NOT_VALID', array('sFieldName' => $this->name, 'sFieldTitle' => $sFieldTitle));\n }\n }\n\n return $bDataIsValid;\n }"
] | [
"0.62165713",
"0.61603135",
"0.61120814",
"0.60779154",
"0.58857197",
"0.5743725",
"0.56865674",
"0.5669224",
"0.56627095",
"0.5610339",
"0.5609935",
"0.5604962",
"0.555654",
"0.5535757",
"0.55022544",
"0.5500485",
"0.54954994",
"0.54853594",
"0.54817694",
"0.5479959",
"0.5474741",
"0.5474009",
"0.54215705",
"0.5412282",
"0.53848004",
"0.53742814",
"0.5368288",
"0.53657854",
"0.536011",
"0.52965045",
"0.5292854",
"0.52204764",
"0.52163243",
"0.5210343",
"0.5190871",
"0.51871413",
"0.51660967",
"0.5153177",
"0.5153177",
"0.5140334",
"0.51346034",
"0.5133173",
"0.5129157",
"0.51208115",
"0.5101171",
"0.5088615",
"0.50832385",
"0.506596",
"0.5062488",
"0.5054019",
"0.50528777",
"0.5047575",
"0.503461",
"0.4997099",
"0.49910766",
"0.49903923",
"0.4983949",
"0.49754325",
"0.49643978",
"0.49488053",
"0.49432752",
"0.49356484",
"0.493436",
"0.49317515",
"0.49316537",
"0.49307835",
"0.49306354",
"0.49200127",
"0.49161115",
"0.4914828",
"0.49044588",
"0.48830786",
"0.48733556",
"0.48663512",
"0.48575526",
"0.48534903",
"0.48532277",
"0.48507643",
"0.4849437",
"0.48490667",
"0.4844232",
"0.4842369",
"0.48377874",
"0.48343202",
"0.48326847",
"0.48323834",
"0.48318177",
"0.48179466",
"0.48172873",
"0.48151425",
"0.4809682",
"0.48042518",
"0.48004645",
"0.4799728",
"0.47975364",
"0.47962132",
"0.47948438",
"0.4793435",
"0.4793334",
"0.47903144"
] | 0.6007434 | 4 |
Calculates the code for a given secret key. | public static function getCode(string $secretKey, ?int $timeSlice = null) : string
{
$time = pack('J', $timeSlice ?? floor(time() / self::TIME_WINDOW));
$hash = hash_hmac('sha1', $time, self::base32Decode($secretKey), true);
$hashpart = substr($hash, ord(substr($hash, -1)) & 0x0F, 4);
$value = unpack('N', $hashpart)[1] & 0x7FFFFFFF;
return str_pad($value % pow(10, self::CODE_LENGTH), self::CODE_LENGTH, '0', STR_PAD_LEFT);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function code() {\n\t\t// transform the secret key to binary data\n\t\t$secret = pack('H*', $this->secret());\n\t\t// compute the cycle number\n\t\t$time = (int) ($this->servertime() / $this->waitingtime());\n\t\t// convert the cycle to a 8 bytes unsigned long big endian order\n\t\t$cycle = pack('N*', 0, $time);\n\t\t// calculate HMAC-SHA1 from secret key and cycle\n\t\t$mac = hash_hmac('sha1', $cycle, $secret);\n\t\t// determine which 4 bytes of the MAC are taken as the current code\n\t\t// last 4 bit of the MAC points to the starting byte\n\t\t$start = hexdec($mac{39}) * 2;\n\t\t// select the byte at starting position and the following 3 bytes\n\t\t$mac_part = substr($mac, $start, 8);\n\t\t$code = hexdec($mac_part) & 0x7fffffff;\n\t\t// use the lowest 8 decimal digits from the selected integer as the\n\t\t// current authenticator code\n\t\treturn str_pad($code % 100000000, 8, '0', STR_PAD_LEFT);\n\t}",
"public static function get_code($secret, $time_slice = null)\n {\n if ($time_slice === null) \n {\n $time_slice = floor(time() / 30);\n }\n\n $secretkey = self::_base32_decode($secret);\n\n // Pack time into binary string\n $time = chr(0).chr(0).chr(0).chr(0).pack('N*', $time_slice);\n // Hash it with users secret key\n $hm = hash_hmac('SHA1', $time, $secretkey, true);\n // Use last nipple of result as index/offset\n $offset = ord(substr($hm, -1)) & 0x0F;\n // grab 4 bytes of the result\n $hashpart = substr($hm, $offset, 4);\n\n // Unpak binary value\n $value = unpack('N', $hashpart);\n $value = $value[1];\n // Only 32 bits\n $value = $value & 0x7FFFFFFF;\n\n $modulo = pow(10, self::$_code_length);\n return str_pad($value % $modulo, self::$_code_length, '0', STR_PAD_LEFT);\n }",
"protected function getCode($sec_web_socket_key = false)\n {\n if ($sec_web_socket_key) {\n return $this->hash($sec_web_socket_key);\n }\n\n return $this->hash(str_random(16));\n }",
"public function getCode($secret, $timeSlice = null)\n {\n if ($timeSlice === null) {\n $timeSlice = floor(time() / 30);\n }\n\n $secretkey = $this->_base32Decode($secret);\n\n // Pack time into binary string\n $time = chr(0) . chr(0) . chr(0) . chr(0) . pack('N*', $timeSlice);\n // Hash it with users secret key\n $hm = hash_hmac('SHA1', $time, $secretkey, true);\n // Use last nipple of result as index/offset\n $offset = ord(substr($hm, -1)) & 0x0F;\n // grab 4 bytes of the result\n $hashpart = substr($hm, $offset, 4);\n\n // Unpak binary value\n $value = unpack('N', $hashpart);\n $value = $value[1];\n // Only 32 bits\n $value = $value & 0x7FFFFFFF;\n\n $modulo = pow(10, $this->_codeLength);\n\n return str_pad($value % $modulo, $this->_codeLength, '0', STR_PAD_LEFT);\n }",
"public function getCode($secret, $timeSlice = null)\n {\n if ($timeSlice === null) {\n $timeSlice = floor(time() / 30);\n }\n\n $secretkey = $this->_base32Decode($secret);\n\n // Pack time into binary string\n $time = chr(0) . chr(0) . chr(0) . chr(0) . pack('N*', $timeSlice);\n // Hash it with users secret key\n $hm = hash_hmac('SHA1', $time, $secretkey, true);\n // Use last nipple of result as index/offset\n $offset = ord(substr($hm, -1)) & 0x0F;\n // grab 4 bytes of the result\n $hashpart = substr($hm, $offset, 4);\n\n // Unpak binary value\n $value = unpack('N', $hashpart);\n $value = $value[1];\n // Only 32 bits\n $value &= 0x7FFFFFFF;\n\n $modulo = 10 ** $this->_codeLength;\n return str_pad($value % $modulo, $this->_codeLength, '0', STR_PAD_LEFT);\n }",
"private function generate_code() {\n\t\t$secret = $this->code_generator->createSecret();\n\t\t$code = $this->code_generator->getCode($secret);\n\t\treturn array('secret'=>$secret, 'code'=>$code);\n\t}",
"public function getCode(string $secret, int $timeSlice = null) : string\n {\n if ($timeSlice === null) {\n $timeSlice = floor(time() / 30);\n }\n\n $secretkey = self::base32Decode($secret);\n if (empty($secretkey)) {\n throw new Exception('Could not decode secret');\n }\n\n // Pack time into binary string\n $time = chr(0).chr(0).chr(0).chr(0).pack('N*', $timeSlice);\n // Hash it with users secret key\n $hm = hash_hmac('SHA1', $time, $secretkey, true);\n // Use last nipple of result as index/offset\n $offset = ord(substr($hm, -1)) & 0x0F;\n // grab 4 bytes of the result\n $hashpart = substr($hm, $offset, 4);\n\n // Unpak binary value\n $value = unpack('N', $hashpart);\n $value = $value[1];\n // Only 32 bits\n $value = $value & 0x7FFFFFFF;\n\n $modulo = pow(10, $this->_codeLength);\n\n return str_pad($value % $modulo, $this->_codeLength, '0', STR_PAD_LEFT);\n }",
"final function getCode();",
"public static function verifyCode(string $secretKey, string $code) : bool\n {\n $time = time();\n $result = 0;\n\n // Timing attack safe iteration and code comparison\n for ($i = -1; $i <= 1; $i++) {\n $timeSlice = floor($time / self::TIME_WINDOW + $i);\n $result = hash_equals(self::getCode($secretKey, $timeSlice), $code) ? $timeSlice : $result;\n }\n\n return ($result > 0);\n }",
"function checksum_code39($code) {\n\n $chars = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', \n 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', \n 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', \n 'W', 'X', 'Y', 'Z', '-', '.', ' ', '$', '/', '+', '%');\n $sum = 0;\n for ($i=0 ; $i<strlen($code); $i++) {\n $a = array_keys($chars, $code[$i]);\n $sum += $a[0];\n }\n $r = $sum % 43;\n return $chars[$r];\n}",
"protected abstract function getSecretKey();",
"public function getCode()\n {\n if($this->request->getQuery()->offsetExists($this->options->stage1->state->accessKey)) {\n $code = $this->getCodeFromRequest();\n if(is_string($code)) {\n return $code;\n }\n }\n return $this->getCodeFromVendor();\n }",
"function checksum_code39($code) {\n\n\t $chars = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n\t 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',\n\t 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',\n\t 'W', 'X', 'Y', 'Z', '-', '.', ' ', '$', '/', '+', '%');\n\t $sum = 0;\n\t for ($i=0 ; $i<strlen($code); $i++) {\n\t $a = array_keys($chars, $code{$i});\n\t $sum += $a[0];\n\t }\n\t $r = $sum % 43;\n\t return $chars[$r];\n\t}",
"function Code128($x, $y, $code, $w, $h) {\n $Aguid = \"\"; // Création des guides de choix ABC\n $Bguid = \"\";\n $Cguid = \"\";\n for ($i = 0; $i < strlen($code); $i++) {\n $needle = substr($code, $i, 1);\n $Aguid .= ((strpos($this->Aset, $needle) === false) ? \"N\" : \"O\");\n $Bguid .= ((strpos($this->Bset, $needle) === false) ? \"N\" : \"O\");\n $Cguid .= ((strpos($this->Cset, $needle) === false) ? \"N\" : \"O\");\n }\n\n $SminiC = \"OOOO\";\n $IminiC = 4;\n\n $crypt = \"\";\n while ($code > \"\") {\n // BOUCLE PRINCIPALE DE CODAGE\n $i = strpos($Cguid, $SminiC); // forçage du jeu C, si possible\n if ($i !== false) {\n $Aguid [$i] = \"N\";\n $Bguid [$i] = \"N\";\n }\n\n if (substr($Cguid, 0, $IminiC) == $SminiC) { // jeu C\n $crypt .= chr(($crypt > \"\") ? $this->JSwap[\"C\"] : $this->JStart[\"C\"]); // début Cstart, sinon Cswap\n $made = strpos($Cguid, \"N\"); // étendu du set C\n if ($made === false) {\n $made = strlen($Cguid);\n }\n if (fmod($made, 2) == 1) {\n $made--; // seulement un nombre pair\n }\n for ($i = 0; $i < $made; $i += 2) {\n $crypt .= chr(strval(substr($code, $i, 2))); // conversion 2 par 2\n }\n $jeu = \"C\";\n } else {\n $madeA = strpos($Aguid, \"N\"); // étendu du set A\n if ($madeA === false) {\n $madeA = strlen($Aguid);\n }\n $madeB = strpos($Bguid, \"N\"); // étendu du set B\n if ($madeB === false) {\n $madeB = strlen($Bguid);\n }\n $made = (($madeA < $madeB) ? $madeB : $madeA ); // étendu traitée\n $jeu = (($madeA < $madeB) ? \"B\" : \"A\" ); // Jeu en cours\n\n $crypt .= chr(($crypt > \"\") ? $this->JSwap[$jeu] : $this->JStart[$jeu]); // début start, sinon swap\n\n $crypt .= strtr(substr($code, 0, $made), $this->SetFrom[$jeu], $this->SetTo[$jeu]); // conversion selon jeu\n }\n $code = substr($code, $made); // raccourcir légende et guides de la zone traitée\n $Aguid = substr($Aguid, $made);\n $Bguid = substr($Bguid, $made);\n $Cguid = substr($Cguid, $made);\n } // FIN BOUCLE PRINCIPALE\n\n $check = ord($crypt[0]); // calcul de la somme de contrôle\n for ($i = 0; $i < strlen($crypt); $i++) {\n $check += (ord($crypt[$i]) * $i);\n }\n $check %= 103;\n\n $crypt .= chr($check) . chr(106) . chr(107); // Chaine cryptée complète\n\n $i = (strlen($crypt) * 11) - 8; // calcul de la largeur du module\n $modul = $w / $i;\n\n for ($i = 0; $i < strlen($crypt); $i++) { // BOUCLE D'IMPRESSION\n $c = $this->T128[ord($crypt[$i])];\n for ($j = 0; $j < count($c); $j++) {\n $this->Rect($x, $y, $c[$j] * $modul, $h, \"F\");\n $x += ($c[$j++] + $c[$j]) * $modul;\n }\n }\n }",
"public function getCode() {}",
"private static function _key($key)\n {\n return hash('sha256', $key, true);\n }",
"private function _create_hash($key=''){\n\t\t$secret_key = 'gL0b3-E$sT4te'.date('m-d-y');\n\t\treturn md5($key.$secret_key);\n\t}",
"public function calc($key);",
"public function get_code()\n {\n $util_class_name = lib::get_class_name( 'util' );\n return $util_class_name::convert_number_to_code( $this->get_number() );\n }",
"public function getTOTPCode($key, $timestamp = NULL) {\n\t\t$rawKey = $this->getRawKey($key);\n\t\t$challenge = $this->getChallenge($timestamp);\n\n\t\treturn $this->getTOTPGenerator()->getTOTPCode($rawKey, $challenge);\n\t}",
"public function getCodeHash() {\n $date = new \\DateTime();\n return hexdec($date->format('d-m-y his'));\n }",
"public function getCode();",
"public function getCode();",
"public function getCode();",
"public function getCode();",
"public function getCode();",
"public function getCode();",
"public function calculate_security_code()\n {\n return sha1($this->get_id() . ':' . $this->get_creation_date());\n }",
"public function getVarificationCode(){ \n $pw = $this->randomString(); \n return $varificat_key = password_hash($pw, PASSWORD_DEFAULT); \n }",
"public function restore_code() {\n\t\t$serial = $this->plain_serial();\n\t\t$secret = pack('H*', $this->secret());\n\t\t// take the 10 last bytes of the digest of our data\n\t\t$data = substr(sha1($serial.$secret, true), -10);\n\t\treturn Authenticator_Crypto::restore_code_to_char($data);\n\t}",
"public function getSharedSecretKey($type = self::NUMBER)\n {\n if (!isset($this->_secretKey)) {\n require_once('Crypt/DiffieHellman/Exception.php');\n throw new Crypt_DiffieHellman_Exception('A secret key has not yet been computed; call computeSecretKey()');\n }\n if ($type == self::BINARY) {\n return $this->_math->toBinary($this->_secretKey);\n } elseif ($type == self::BTWOC) {\n return $this->_math->btwoc($this->_math->toBinary($this->_secretKey));\n }\n return $this->_secretKey;\n }",
"public static function codeKey()\n {\n static $codeKey = null;\n\n if (is_null($codeKey)) {\n $codeKey = config('api.response.key.code', 'code');\n }\n\n return $codeKey;\n }",
"public static function generateCode() {\n $long_code = strtr(md5(uniqid(rand())), '0123456789abcdefghij', '234679QWERTYUPADFGHX');\n return substr($long_code, 0, 12);\n }",
"private function _getSecretKey() {\n return \"hfd&*9997678g__vd45%%$3)(*kshdak\";\n }",
"function getRandomCode() {\n $code = md5($this->getid_recipient() . $this->getid_offer() . $this->getexpirationdate());\n return $code;\n }",
"public function getProtectCode();",
"public function code() {\n Authentication::guard();\n\n $_POST = json_decode(file_get_contents('php://input'), true);\n\n if(!Csrf::check('global_token')) {\n die();\n }\n\n if(empty($_POST)) {\n die();\n }\n\n if(!settings()->payment->is_enabled || !settings()->payment->codes_is_enabled) {\n die();\n }\n\n /* Make sure the discount code exists */\n $code = db()->where('code', $_POST['code'])->where('type', 'redeemable')->where('redeemed < quantity')->getOne('codes');\n\n if(!$code) {\n Response::json(language()->account_plan->error_message->code_invalid, 'error');\n }\n\n /* Make sure the plan id exists and get details about it */\n $plan = (new Plan())->get_plan_by_id($code->plan_id);\n\n if(!$plan) {\n Response::json(language()->account_plan->error_message->code_invalid, 'error');\n }\n\n /* Make sure the code was not used previously */\n if(db()->where('user_id', $this->user->user_id)->where('code_id', $code->code_id)->getOne('redeemed_codes', ['id'])) {\n Response::json(language()->account_plan->error_message->code_used, 'error');\n }\n\n Response::json(sprintf(language()->account_plan->success_message->code, '<strong>' . $plan->name . '</strong>', '<strong>' . $code->days . '</strong>'), 'success', ['discount' => $code->discount]);\n }",
"public function getSecretKey();",
"public static function generateSecret() {\n\n\t\t$secretLength = self::SECRET_LENGTH;\n\n\t\t// Valid secret lengths are 80 to 640 bits\n\t\tif ($secretLength < 16 || $secretLength > 128) {\n\t\t\tthrow new \\Exception('Bad secret length');\n\t\t}\n\n\t\t// Set accepted characters\n\t\t$validChars = self::getBase32LookupTable();\n\n\t\t// Generates a strong secret\n\t\t$secret = \\MWCryptRand::generate( $secretLength );\n\t\t$secretEnc = '';\n\t\tfor( $i = 0; $i < strlen($secret); $i++ ) {\n\t\t\t$secretEnc .= $validChars[ord($secret[$i]) & 31];\n\t\t}\n\n\t\treturn $secretEnc;\n\n\t}",
"function generate_validation_code()\n {\r\n return hash_hmac($this->hash_function, $this->email,\r\n $this->created_at.hash($this->hash_function, $this->password));\r\n }",
"abstract public function createSecretKey();",
"public function widgetCode($key = null)\n {\n if (is_null($key)) {\n // get key from config file: /config/tawkto.php which pulls TAWKTO_KEY from .env file.\n $key = config('tawkto.api_key');\n }\n\n if (empty($key)) {\n throw new \\Exception('Your TawkTo API key (TAWKTO_KEY) is not set in your .env file!');\n\n } else {\n // the widget code\n $script = '<script type=\"text/javascript\">var Tawk_API=Tawk_API||{}, Tawk_LoadStart=new Date();(function(){var s1=document.createElement(\"script\"),s0=document.getElementsByTagName(\"script\")[0];s1.async=true;s1.src=\"https://embed.tawk.to/%s/default\";s1.charset=\"UTF-8\";s1.setAttribute(\"crossorigin\",\"*\");s0.parentNode.insertBefore(s1,s0);})();</script>';\n\n // echo merged string\n echo sprintf($script, $key);\n }\n }",
"private function _calculate($key)\n {\n $data = [];\n for ($i = 1; $i < 13; $i++) {\n $data[$i] = $this->intoKillo(\n $this->_sumUp($key, (string) $i, Date('Y'))\n );\n }\n return implode(', ', $data);\n }",
"public function getSignSecretKey() : string;",
"private function generate_code(){\n $bytes = random_bytes(2);\n // var_dump(bin2hex($bytes));\n return bin2hex($bytes);\n }",
"public static function codeFromId($id)\n\t{\n\n\t\treturn base64_encode(openssl_encrypt($id, \"AES-128-CBC\", User::SECRET, 0, User::SECRET_IV));\n\n\t}",
"function makeKey($masterID){\n\n\t$key = \"I want to see you so bad :/\";\n\t$keyElement1 = \"\";\n\t$keyElement2 = \"\";\n\t$keyElement3 = \"\";\n\t$hash = \"\";\n\n\t$strSQL = \"SELECT * FROM masteraccount WHERE 1 \n\t\tAND masterID = '\".$masterID.\"' \n\t\t\";\n\t\n\t$objQuery = mysql_query($strSQL);\n\t$objResult = mysql_fetch_array($objQuery);\n\tif($objResult) {\n\t\t$keyElement1 = $objResult[\"masterTextPassword\"];\n\t\t$keyElement2 = $objResult[\"masterGraphicalPassword\"];\n\n\t\t//echo \"element2 : \".$keyElement2.\"<br>\";\n\n\t\t$keyElement3 = $objResult[\"email\"];\n\t\t$cost = 11;\n\t\t$salt = mcrypt_create_iv(22, MCRYPT_DEV_URANDOM);\n\t\t\n\t\t//make key -> Hash(Hash(text)+Hash(graphical))+Hash(email)\n\t\t$keyElement1 = hash(\"sha256\",$keyElement1, false);\n\t\t$keyElement2 = hash(\"sha256\",$keyElement2, false);\n\t\t$key = $keyElement1.$keyElement2 ;\n\n\t\t//echo \"key ele1+2 : \".$key.\"<br>\";\n\n\t\t$key = hash(\"sha256\",$key, false);\n\n\t\t//echo \"hashed key ele1+2 : \".$key.\"<br>\";\n\n\t\t$keyElement3 = hash(\"sha256\",$keyElement3, false);\n\t\t$key = $key.$keyElement3 ;\n\t\t$key = hash(\"sha256\",$key, false);\n\n\t\t//echo \"FinalKey : \".$key.\"<br><br>\";\n\t}\n\treturn $key;\n}",
"function generateCode(){\n $base=\"abcdefghijklmnopkrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_-\";\n $i=0;\n $c=\"\";\n while ($i<6){\n $c.=$base[rand(0,strlen($base)-1)];\n $i++;\n }\n if (validate::existCode($c))\n return generateCode();\n return $c;\n}",
"abstract public function getPaymentAuthorizationCode();",
"abstract protected function getPaymentMethodCode();",
"public function getCode($Iban);",
"private function generate_code()\n\t\t{\n\t\t\t$code = \"\";\n\t\t\tfor ($i = 0; $i < 5; ++$i) \n\t\t\t{\n\t\t\t\tif (mt_rand() % 2 == 0) \n\t\t\t\t{\n\t\t\t\t\t$code .= mt_rand(0,9);\n\t\t\t\t} else \n\t\t\t\t{\n\t\t\t\t\t$code .= chr(mt_rand(65, 90));\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn $code; \n\n\t\t}",
"function authcode($string, $operation = 'DECODE', $key = '', $expiry = 0) {\n\t$ckey_length = 4;\n\t$key = md5($key ? $key : ET_URL);\n\t$keya = md5(substr($key, 0, 16));\n\t$keyb = md5(substr($key, 16, 16));\n\t$keyc = $ckey_length ? ($operation == 'DECODE' ? substr($string, 0, $ckey_length): substr(md5(microtime()), -$ckey_length)) : '';\n\t$cryptkey = $keya.md5($keya.$keyc);\n\t$key_length = strlen($cryptkey);\n\t$string = $operation == 'DECODE' ? base64_decode(substr($string, $ckey_length)) : sprintf('%010d', $expiry ? $expiry + time() : 0).substr(md5($string.$keyb), 0, 16).$string;\n\t$string_length = strlen($string);\n\t$result = '';\n\t$box = range(0, 255);\n\t$rndkey = array();\n\tfor($i = 0; $i <= 255; $i++) {\n\t\t$rndkey[$i] = ord($cryptkey[$i % $key_length]);\n\t}\n\tfor($j = $i = 0; $i < 256; $i++) {\n\t\t$j = ($j + $box[$i] + $rndkey[$i]) % 256;\n\t\t$tmp = $box[$i];\n\t\t$box[$i] = $box[$j];\n\t\t$box[$j] = $tmp;\n\t}\n\tfor($a = $j = $i = 0; $i < $string_length; $i++) {\n\t\t$a = ($a + 1) % 256;\n\t\t$j = ($j + $box[$a]) % 256;\n\t\t$tmp = $box[$a];\n\t\t$box[$a] = $box[$j];\n\t\t$box[$j] = $tmp;\n\t\t$result .= chr(ord($string[$i]) ^ ($box[($box[$a] + $box[$j]) % 256]));\n\t}\n\tif($operation == 'DECODE') {\n\t\tif((substr($result, 0, 10) == 0 || substr($result, 0, 10) - time() > 0) && substr($result, 10, 16) == substr(md5(substr($result, 26).$keyb), 0, 16)) {\n\t\t\treturn substr($result, 26);\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t} else {\n\t\treturn $keyc.str_replace('=', '', base64_encode($result));\n\t}\n}",
"private function genCode()\r\n\t{\r\n\t\t$digits = 10;\r\n\t\treturn rand(pow(10, $digits-1), pow(10, $digits)-1);\r\n\t}",
"private function calcSign($clientId, $secret, $timestamp) {\n\n $str = $clientId . $this->access_token . $timestamp;\n $hash = hash_hmac('sha256', $str, $secret);\n $hashInBase64 = (string)$hash;\n $signUp = strtoupper($hashInBase64);\n return $signUp;\n }",
"public function getCode()\n {\n $this->code = $_GET['code'];\n return $this->code;\n\n }",
"protected function generateCode(): string {\n return (string)rand(100000, 999999);\n }",
"private static function generateUniqueCode()\n {\n do {\n $code = str_random(7);\n } while (static::checkCode($code));\n\n return $code;\n }",
"public function getSecret(): string {\n\n if ($this->secret) {\n return $this->secret;\n }\n\n // Get the secret from the databae\n if ($r = $this->user->secret2FA()) {\n return $r;\n }\n\n // Get the secret from file cache\n if ($r = $this->cache->get($this->user->id())) {\n return $this->secret = $r;\n }\n\n // Create a secret of 160 bits as a\n $this->secret = $this->tfa->createSecret(160);\n\n // Save the secret for 2 min that lets the user to scan the code\n $this->cache->set($this->user->id(), $this->secret, 2);\n\n return $this->secret;\n }",
"public function getSecret(): string;",
"private static function base32Decode(string $secret) : string\n {\n if (empty($secret)) {\n return '';\n }\n\n $base32chars = self::base32LookupTable();\n $base32charsFlipped = array_flip($base32chars);\n\n $paddingCharCount = substr_count($secret, $base32chars[32]);\n $allowedValues = [6, 4, 3, 1, 0];\n if (!in_array($paddingCharCount, $allowedValues)) {\n return '';\n }\n\n for ($i = 0; $i < 4; $i++){\n if ($paddingCharCount == $allowedValues[$i] &&\n substr($secret, -($allowedValues[$i])) != str_repeat($base32chars[32], $allowedValues[$i])) {\n return '';\n }\n }\n\n $secret = str_replace('=','', $secret);\n $secret = str_split($secret);\n $binaryString = \"\";\n for ($i = 0; $i < count($secret); $i = $i+8) {\n if (!in_array($secret[$i], $base32chars)) {\n return '';\n }\n\n $x = \"\";\n for ($j = 0; $j < 8; $j++) {\n $secretChar = $secret[$i + $j] ?? 0;\n $base = $base32charsFlipped[$secretChar] ?? 0;\n $x .= str_pad(base_convert($base, 10, 2), 5, '0', STR_PAD_LEFT);\n }\n $eightBits = str_split($x, 8);\n for ($z = 0; $z < count($eightBits); $z++) {\n $binaryString .= ( ($y = chr(base_convert($eightBits[$z], 2, 10))) || ord($y) == 48 ) ? $y : \"\";\n }\n }\n\n return $binaryString;\n }",
"public function verifyCode(string $secret, string $code, int $discrepancy = 1) : bool\n {\n $currentTimeSlice = floor(time() / 30);\n\n if (strlen($code) != 6) {\n return false;\n }\n\n for ($i = -$discrepancy; $i <= $discrepancy; $i++) {\n try {\n $calculatedCode = $this->getCode($secret, $currentTimeSlice + $i);\n } catch (Exception $e) {\n return false;\n }\n\n if (hash_equals($calculatedCode, $code)) {\n return true;\n }\n }\n\n return false;\n }",
"public function getClientSecret();",
"public function getClientSecret();",
"public function getCode() {\n return $this->parse()['code'];\n }",
"public function createVerificationCode()\n {\n return $code = random_int(config('twilio-verify.random_int.initial_value'), config('twilio-verify.random_int.final_value'));\n }",
"public function decode($code)\n {\n $result = 0;\n if ($code && strstr($code, $this->_prefix)) {\n $code = strtoupper($code);\n $result = intval(hexdec(strtolower(str_replace($this->_prefix, '', $code))));\n $result = $result - $this->_secret;\n }\n return $result > 0 ? $result : 0;\n }",
"public function getSecurityCode()\n {\n $sid = 'abcdefghiklmnopqstvxuyz0123456789ABCDEFGHIKLMNOPQSTVXUYZ';\n $max = strlen($sid) - 1;\n $res = \"\";\n for($i = 0; $i<16; ++$i){\n $res .= $sid[mt_rand(0, $max)];\n } \n return $res;\n }",
"function mysql_aes_key($key)\n{\n $bytes = 16;\n $newKey = \\str_repeat(\\chr(0), $bytes);\n $length = \\strlen($key);\n\n for ($i = 0; $i < $length; $i++) {\n $index = $i % $bytes;\n $newKey[$index] = $newKey[$index] ^ $key[$i];\n }\n\n return $newKey;\n}",
"function getCardCode12($card_no) {\n\n$code = strtoupper(str_replace('0', 'O', base_convert(md5(microtime().$card_no.'random pepper32490238590435657'), 16, 36)));\nreturn substr($code, 0, 3).\"-\".substr($code, 3, 3).\"-\".substr($code, 6, 3).\"-\".substr($code, 9, 3);\n}",
"public function getCode(): string;",
"public function getCode(): string;",
"public function getCode(): string;",
"function _generate_code_string() {\n\n $str = strval(microtime());\n return substr(md5($str),rand(0, 15) , 10);\n}",
"public static function generateSecretKey() : string\n {\n $secretKey = '';\n for ($i = 0; $i < 16; $i++) $secretKey .= self::CHARSET[random_int(0, 31)];\n return $secretKey;\n }",
"public function handleCode()\n {\n if (isset($_GET['code'])) {\n Session::put('spotify_code', $_GET['code']);\n $this->requestToken();\n }\n\n return Session::get('spotify_code');\n }",
"public static function getCode()\n {\n return Currency::get('code', false);\n }",
"function bitfinex_get_total_coin_value($key, $secret) {\n $balances = bitfinex_get_balances($key, $secret);\n $_total = 0;\n foreach ($balances as $balance) {\n if ($balance->currency == 'btc') {\n $_total += doubleval($balance->amount);\n }\n }\n return $_total;\n}",
"public function GetCode () \r\n\t{\r\n\t\treturn ($Code);\r\n\t}",
"private function generateBusinessCode() {\n $code = mt_rand(10000001, 99999999);\n return ((8 > strlen( $code)) || $this->where('code', $code)->exists()) ? $this->generateBusinessCode() : $code;\n }",
"public static function hash(string $key): int\n {\n return (int)sprintf(\"%u\", crc32($key));\n }",
"public function getCode() : int;",
"private function getRawKey($key) {\n\t\t$rawKey = $this->getBase32Conversor()->base32decode($key);\n\t\tif ($rawKey === FALSE) {\n\t\t\tthrow new GAP_InvalidSecretKey('Invalid secret key: '.$key);\n\t\t} elseif (strlen($rawKey) < self::KEY_BYTE_LENGTH) {\n\t\t\tthrow new GAP_InvalidSecretKey('Secret key is too short: '.$key);\n\t\t}\n\t\treturn $rawKey;\n\t}",
"function getOTP($key){\n\n /** Getting Time **/\n $time=$this->getTime10sec();\n\n /** Setting OpenSSL Encrypt variables **/\n $method = \"AES-256-CFB8\";\n $iv=2707201820180727;\n\n /** Encrypting */\n $encrypted = openssl_encrypt($time,$method,$key,0, $iv);\n\n /** Passing the encrypted string in hex */\n $hex = $this->strToHex($encrypted);\n\n /** Passing the hex into dec and taking only the last 6 digits */\n $dec = hexdec($hex);\n $dec = $dec / 1111111111111111111111111;\n $dec = $dec * $time;\n $dec = (int)$dec;\n $decLength=strlen($dec);\n $decLengthMinusSix=$decLength-7;\n $decLastSix = substr($dec,$decLengthMinusSix);\n\n /** Returning the 7 digits OTP code **/\n return $decLastSix;\n }",
"protected function checksum_code93($code) {\n\t\t$chars = array(\n\t\t\t'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n\t\t\t'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K',\n\t\t\t'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',\n\t\t\t'W', 'X', 'Y', 'Z', '-', '.', ' ', '$', '/', '+', '%',\n\t\t\t'<', '=', '>', '?');\n\t\t// translate special characters\n\t\t$code = strtr($code, chr(128).chr(131).chr(129).chr(130), '<=>?');\n\t\t$len = strlen($code);\n\t\t// calculate check digit C\n\t\t$p = 1;\n\t\t$check = 0;\n\t\tfor ($i = ($len - 1); $i >= 0; --$i) {\n\t\t\t// FIXME: use strpos() instead and check result\n\t\t\t$k = array_keys($chars, $code[$i]);\n\t\t\t$check += ( (int) $k[0] * $p);\n\t\t\t++$p;\n\t\t\tif ($p > 20) {\n\t\t\t\t$p = 1;\n\t\t\t}\n\t\t}\n\t\t$check %= 47;\n\t\t$c = $chars[$check];\n\t\t$code .= $c;\n\t\t// calculate check digit K\n\t\t$p = 1;\n\t\t$check = 0;\n\t\tfor ($i = $len; $i >= 0; --$i) {\n\t\t\t// FIXME: use strpos() instead and check result\n\t\t\t$k = array_keys($chars, $code[$i]);\n\t\t\t$check += ( (int) $k[0] * $p);\n\t\t\t++$p;\n\t\t\tif ($p > 15) {\n\t\t\t\t$p = 1;\n\t\t\t}\n\t\t}\n\t\t$check %= 47;\n\t\t$checksum = $c.$chars[$check];\n\t\t// restore special characters\n\t\t$checksum = strtr($checksum, '<=>?', chr(128).chr(131).chr(129).chr(130));\n\t\treturn $checksum;\n\t}",
"function _obfuscate_jI_PlJOMhoiPkZOOh4_OkYs’( $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ = 1 )\r\n{\r\n $_obfuscate_iJGPjJWLj4uLkIqVjYiHh48’ = unpack( \"C*\", \"ViewZendSourceCodeIsInvalid!\" );\r\n do\r\n {\r\n $_obfuscate_iY2Oh5OGlIqQhpCJi5CMkog’ = ( $_obfuscate_lZKViImJjo6UhouJj4aVi4Y’[$_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’] << 4 ) + ( $_obfuscate_lZKViImJjo6UhouJj4aVi4Y’[$_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ + 1] >> 4 );\r\n $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ += 2;\r\n } while ( $_obfuscate_jpKPlJSUiZOHkYaPlIeOiY4’ < 28 );\r\n}",
"private function getResponse($secret, $challenge)\n {\n if (\\strlen($secret) > 64) {\n $secret = pack('H32', md5($secret));\n }\n\n if (\\strlen($secret) < 64) {\n $secret = str_pad($secret, 64, \\chr(0));\n }\n\n $k_ipad = substr($secret, 0, 64) ^ str_repeat(\\chr(0x36), 64);\n $k_opad = substr($secret, 0, 64) ^ str_repeat(\\chr(0x5C), 64);\n\n $inner = pack('H32', md5($k_ipad.$challenge));\n $digest = md5($k_opad.$inner);\n\n return $digest;\n }",
"public function generateBuildCode(Build $build) {\n\t\t$schema = static::$currentSchema;\n\t\t$parts = [$schema];\n\n\t\tforeach (static::$schemas[$schema] as $part) {\n\t\t\tswitch ($part) {\n\t\t\t\tcase 'name':\n\t\t\t\t\tarray_push($parts, $build->name);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'map':\n\t\t\t\t\tarray_push($parts, $build->map['MapId']);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'champion':\n\t\t\t\t\tarray_push($parts, $build->champion['id']);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'summoners':\n\t\t\t\t\t$values = $build->summoners->values();\n\t\t\t\t\tfor ($i = 0; $i < 2; $i++) {\n\t\t\t\t\t\tarray_push($parts, $values[$i]['id']);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'items':\n\t\t\t\t\t$values = $build->items->values();\n\t\t\t\t\tfor ($i = 0; $i < 6; $i++) {\n\t\t\t\t\t\tarray_push($parts, $values[$i]['id']);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$checksum = $this->getCheckSum($parts);\n\t\tarray_push($parts, $checksum);\n\n\t\t// Turn into string where separator = 11base11\n\t\t$stringified = implode('a', $parts);\n\n\t\treturn base_convert_arbitrary($stringified, 11, 62);\n\t}",
"public function generate_code()\n {\n $code = \"\";\n $count = 0;\n while ($count < $this->num_characters) {\n $code .= substr($this->captcha_characters, mt_rand(0, strlen($this->captcha_characters)-1), 1);\n $count++;\n }\n return $code;\n }",
"public static function getResultCode()\n\t\t{\n\t\t\treturn self::getCache()->getResultCode();\n\t\t}",
"public function generate_code()\n {\n return $string = bin2hex(random_bytes(10));\n }",
"public function getSecret();",
"public function getSecret();",
"public function getSecret();",
"public function getSecret();",
"public function getSecret();",
"public function getBoxSecretKey() : string;",
"function evhash( $data, ?string $secretkey = null, string $algo = 'sha256' ): string\n{\n if ( \\is_null( $secretkey ) ) {\n return hash_hmac( $algo, $data, env( 'SECURE_AUTH_KEY' ) );\n }\n\n return hash_hmac( $algo, $data, $secretkey );\n}",
"public function getCode()\n {\n return $this->get(self::ENTRY_CODE);\n }",
"public function activationCode();"
] | [
"0.7005123",
"0.6550783",
"0.6437742",
"0.6369511",
"0.6346658",
"0.62812555",
"0.617102",
"0.5938031",
"0.5913567",
"0.569649",
"0.55956894",
"0.5448077",
"0.5421585",
"0.53969324",
"0.5387937",
"0.5382496",
"0.53734213",
"0.53609043",
"0.53567934",
"0.53530496",
"0.53515",
"0.533864",
"0.533864",
"0.533864",
"0.533864",
"0.533864",
"0.533864",
"0.53357315",
"0.53207403",
"0.532031",
"0.5316637",
"0.5296991",
"0.52826566",
"0.5258874",
"0.52580494",
"0.52550536",
"0.5253625",
"0.5220556",
"0.51854247",
"0.51607704",
"0.51435864",
"0.5130701",
"0.5120981",
"0.5108681",
"0.5089853",
"0.50646895",
"0.5046396",
"0.5034601",
"0.5016673",
"0.50151163",
"0.5000754",
"0.49891475",
"0.49816203",
"0.49722487",
"0.49705732",
"0.4970554",
"0.49646908",
"0.49643534",
"0.4964288",
"0.49642658",
"0.49605963",
"0.49553895",
"0.49542403",
"0.49542403",
"0.49541068",
"0.4952413",
"0.49405816",
"0.4926539",
"0.4921393",
"0.49170998",
"0.49161348",
"0.49161348",
"0.49161348",
"0.49129352",
"0.49127898",
"0.4905536",
"0.48984635",
"0.4895979",
"0.4892679",
"0.48923537",
"0.48837173",
"0.48753244",
"0.4872718",
"0.4865547",
"0.4859614",
"0.48388988",
"0.48379135",
"0.48344472",
"0.48327821",
"0.4831872",
"0.4831162",
"0.4831",
"0.4831",
"0.4831",
"0.4831",
"0.4831",
"0.4828136",
"0.48273242",
"0.48138583",
"0.48125324"
] | 0.63300735 | 5 |
Generates a QR code image URL. Provider: | public static function getQRCodeUrl(string $secretKey, string $label, int $size = 200) : string
{
$issuer = Config::app('authenticator_issuer');
$urlEncoded = rawurlencode("otpauth://totp/{$label}?secret={$secretKey}&issuer={$issuer}");
return "https://api.qrserver.com/v1/create-qr-code/?data=$urlEncoded&size=${size}x${size}&ecc=M";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getQRCode( $qraddress, $size ) {\n $alt_text = 'Send VRSC to ' . $qraddress;\n return \"\\n\" . '<img src=\"https://chart.googleapis.com/chart?chld=H|2&chs='.$size.'x'.$size.'&cht=qr&chl=' . $qraddress . '\" alt=\"' . $alt_text . '\" />' . \"\\n\";\n}",
"public function getQRCodeGoogleUrl() {\n $urlencoded = $this->getProvisioningUri();\n if($this->issuer) {\n $urlencoded .= '&issuer='.urlencode($this->issuer);\n }\n\n return 'https://chart.googleapis.com/chart?chs=200x200&chld=M|0&cht=qr&chl='.urlencode($urlencoded).'';\n }",
"public function generate(Request $request){ \n $data = $request->all();\n QRCode::text($data['code'])->png(); \n }",
"public function generateQRCode()\n {\n if (! $this->getUser()->loginSecurity || ! $this->getUser()->loginSecurity->google2fa_secret) {\n $this->generate2faSecret();\n $this->getUser()->refresh();\n }\n\n $g2faUrl = $this->googleTwoFaService->getQRCodeUrl(\n config('app.name'),\n $this->getUser()->email,\n $this->getUser()->loginSecurity->google2fa_secret\n );\n\n $writer = new Writer(\n new ImageRenderer(\n new RendererStyle(400),\n new ImagickImageBackEnd()\n )\n );\n\n return [\n 'image' => 'data:image/png;base64,' . base64_encode($writer->writeString($g2faUrl)),\n 'otp_url' => $g2faUrl,\n 'secret' => $this->getUser()->loginSecurity->google2fa_secret,\n ];\n }",
"public function generateQRCodeImage($url)\n {\n $image = imagecreatefrompng($url);\n $bg = imagecreatetruecolor(imagesx($image), imagesy($image));\n\n imagefill($bg, 0, 0, imagecolorallocate($bg, 255, 255, 255));\n imagealphablending($bg, TRUE);\n imagecopy($bg, $image, 0, 0, 0, 0, imagesx($image), imagesy($image));\n imagedestroy($image);\n\n header('Content-Type: image/jpeg');\n\n $quality = 50;\n imagejpeg($bg);\n imagedestroy($bg);\n }",
"function generateQRImageTag( $identifier){\n\n ob_start();\n QRCode::png($identifier,false,'L',9,2);\n $imageString = base64_encode(ob_get_clean());\n return '<img src =\"data:image/png;base64,'.$imageString.'\"/>';\n }",
"public function generateQrCode()\n {\n return $this->doRequest('GET', 'qr-code', []);\n }",
"function generateQrcode($selectedProductId)\r\n \t{\r\n \t\t$ProductId = implode(',',$selectedProductId);\r\n \t\t$model\t\t= &$this->getModel();\r\n \t\t$productDetails = $model->getCategoryByProduct($ProductId);\r\n \t\t$qrcodeImagePath = JPATH_ROOT.DS . 'images'.DS.'qrcode';\r\n if ( !is_dir($qrcodeImagePath) )\r\n\t\t\t{\r\n\t\t\t\tmkdir($qrcodeImagePath,0777,true);\r\n\t\t\t}\r\n \t\tfor($i = 0;$i <count($productDetails);$i++)\r\n \t\t{\r\n \t\t\t$qrcodeProductId = $selectedProductId[$i];\r\n \t\t\t$qrcodeCategoryId = $productDetails[$i][0];\r\n \t\t\t$qrcodeImageContent = urlencode(JURI::root().(\"index.php?option=com_virtuemart&page=shop.product_details&product_id=$qrcodeProductId&category_id=$qrcodeCategoryId\"));\r\n \t\t\t$imageName = $qrcodeProductId.'.png';\r\n\t\t\t\t$qrcodeImage[] = $qrcodeProductId.'.png';\r\n\t\t\t\t// save image in configured image uploads folder \r\n\t\t\t\t$imagePath = $qrcodeImagePath . DS . $imageName;\r\n\t\t\t\t\t \r\n\t\t\t\t$size = \"500x500\";\r\n\t\t\t\t$image_url_qr = \"https://chart.googleapis.com/chart?cht=qr&chs=$size&chl=$qrcodeImageContent\";\r\n\t\t\t\t\r\n\t\t\t\tif(function_exists('curl_init'))\r\n\t\t\t\t{\r\n\t\t\t\t$curl_handle=curl_init();\r\n\t\t\t\tcurl_setopt($curl_handle,CURLOPT_URL,$image_url_qr);\r\n\t\t\t\tcurl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);\r\n\t\t\t\tcurl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,true);\r\n\t\t\t\tcurl_setopt($curl_handle, CURLOPT_SSL_VERIFYPEER, false);\r\n\t\t\t\t$returnData = curl_exec($curl_handle);\r\n\t\t\t\tcurl_close($curl_handle);\r\n\t\t\t\t\r\n\t\t\t\t$imageContent = $returnData;\r\n\t\t\t\t\t\t\r\n\t\t\t\t$imageLocation = fopen($imagePath , 'w');\r\n\t\t\t\tchmod($imagePath , 0777);\r\n\t\t\t\t$fp = fwrite($imageLocation, $imageContent);\r\n\t\t\t\tfclose($imageLocation);\r\n\t\t\t\t$errorMessage = JText::_('COM_QRCODE_CONTROLLER_GENERATE_QRCODE_SUCCESS');\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$errorMessage = JError::raiseWarning('',\"COM_QRCODE_CONTROLLER_ENABLE_CURL\");\r\n\t\t\t\t}\t\t\t\t\t\r\n \t\t}\r\n \t\tif($fp)//If image content write to folder, then store the value in database.\r\n\t\t\t$model->storeQrcodeDetails($selectedProductId,$qrcodeImage);\r\n\t\t\treturn $errorMessage;\r\n \t}",
"public function testComAdobeCqWcmMobileQrcodeServletQRCodeImageGenerator()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.cq.wcm.mobile.qrcode.servlet.QRCodeImageGenerator';\n\n $crawler = $client->request('POST', $path);\n }",
"function qrcodeGenerate()\r\n\t {\r\n\t \t$selectedValue = JRequest::getVar('selectedValue');\r\n\t \t$selectedProductId = explode(\",\", $selectedValue);\r\n\t \tarray_pop($selectedProductId);\r\n\t \t$qrcodeId = implode(',',$selectedProductId);\r\n\t \t$qrcodeGenerateResult = $this->generateQrcode($selectedProductId);//function to generate qrcode for product.\r\n\t \t$path = urldecode(JRequest::getVar('redirectPath'));\r\n\t $this->setRedirect($path,$qrcodeGenerateResult);\r\n\t }",
"public function qr_generator_view()\n {\n $data = [\n \"route_info\" => \\sr::api(\"qr-gene\"),\n 'theme' => $this->themes[0],\n 'ng_app' => \"myApp\",\n 'ng_controller' => \"main\",\n ];\n return $this->get_view(\"Apis.qr\", $data);\n }",
"public function getQRCodeUrl($qrdata) {\n $_baseurl = Yii::app()->createAbsoluteUrl('/');\n $qr_filename = 'QR_' . md5($qrdata) . '.png';\n $qr_filePath = (empty(Yii::app()->params['qrcode_folder']) ? (Yii::getPathOfAlias('webroot.uploads') . DIRECTORY_SEPARATOR . 'qr') : Yii::app()->params['qrcode_folder']);\n $qr_fileUrl = (empty(Yii::app()->params['qrcode_url']) ? $_baseurl . '/uploads/qr' : Yii::app()->params['qrcode_url']);\n $qr_fullFilePath = $qr_filePath . DIRECTORY_SEPARATOR . $qr_filename;\n $qr_fullUrl = $qr_fileUrl . '/' . $qr_filename;\n\n // check to create the qr code now\n if (!is_file($qr_fullFilePath)) {\n $code = new QRCode($qrdata);\n $code->create($qr_fullFilePath);\n }\n return $qr_fullUrl;\n }",
"function getUserQRCode()\n{\n\t $qr = new qrcode();\n\t //the defaults starts\n\t global $myStaticVars;\n\t extract($myStaticVars); // make static vars local\n\t $member_default_avatar \t= $member_default_avatar;\n\t $member_default_cover\t\t= $member_default_cover;\n\t $member_default\t\t\t\t= $member_default;\n\t $company_default_cover\t\t= $company_default_cover;\n\t $company_default_avatar\t= $company_default_avatar;\n\t $events_default\t\t\t\t= $events_default;\n\t $event_default_poster\t\t= $event_default_poster;\n\t //the defaults ends\t\n\t\n\t $session_values=get_user_session();\n\t $my_session_id\t= $session_values['id'];\n\t if($my_session_id>0)\n\t {\n\t // how to build raw content - QRCode with Business Card (VCard) + photo \t \n\t //$tempDir = QRCODE_PATH; \n\t \n\t $data\t\t\t=\tfetch_info_from_entrp_login($my_session_id);\n\t \n\t $clientid \t\t= $data['clientid'];\n \t $username \t\t= $data['username'];\n \t $email \t\t\t= $data['email'];\n \t $firstname \t= $data['firstname'];\n \t $lastname \t\t= $data['lastname'];\n \t $voffStaff\t\t= $data['voffStaff'];\n\t\t $vofClientId\t= $data['vofClientId'];\t\n\t\t \n\t\t //Fetch qr-code from db if already generated\n\t\t $qrCode= fetchUserQRCodeFromDB($clientid);\n\t \n\t if($qrCode=='')\n\t {\n\t \t$qrCodeToken\t=\tuniqueQRCodeToken();\n\t \tsaveQRCOdeforUser($clientid,$qrCodeToken);\n\t }\n\t else\n\t {\n\t \t$qrCodeToken\t= $qrCode;\n\t }\n\t \n\t $qr->text($qrCodeToken);\n\t $data['qr_link'] \t\t\t= $qr->get_link();\n\t $data['client_id'] \t\t\t= $clientid;\n\t $data['vofClientId'] \t\t= $vofClientId;\n\t $data['vofStaffStatus'] \t= $voffStaff;\n\t //return $qr->get_link(); \n\t return $data; \n\t }\t \n}",
"public function showQrCode()\n {\n $this->app->qrCode->show($this->app->config['server.qr_uuid']);\n }",
"public function qrCode(){\n }",
"public function actionGenerateBarcode() \n {\n\t\t$inputCode = Yii::app()->request->getParam(\"code\", \"\");\n\t\t$bc = new BarcodeGenerator;\n\t\t$bc->init('png');\n\t\t$bc->build($inputCode);\n }",
"public function codiceqr($testo,$larghezza=150){\n\t\t$testo=urlencode($testo);\n\t\treturn '<img src=\"https://chart.googleapis.com/chart?chs='.$larghezza.'x'.$larghezza.'&cht=qr&chl='.$testo.'&choe=UTF-8\" alt=\"codice QR\">';\n\t}",
"public function qrcodeSave() {\r\n $user_id = \\Yii::$app->user->getId();\r\n $baseimgurl = 'date/upload/wechat/qrcode/';\r\n $createpath=\\Yii::$app->basePath.'/web/'.$baseimgurl;\r\n ToolService::createdir($createpath);\r\n //生成随机文件名\r\n $basefilename = $user_id . '_' . time() . '_' . rand(1000, 9999);\r\n $this->s_img_url = $sfilename = $baseimgurl . 's' . $basefilename . '.' . $this->file->extension;\r\n $this->o_img_url = $ofilename = $baseimgurl . 'o' . $basefilename . '.' . $this->file->extension;\r\n $this->m_img_url = $mfilename = $baseimgurl . 'm' . $basefilename . '.' . $this->file->extension;\r\n $this->b_img_url = $bfilename = $baseimgurl . 'b' . $basefilename . '.' . $this->file->extension;\r\n $this->file->saveAs($bfilename);\r\n $image = \\Yii::$app->image->load($bfilename);\r\n //生成中图片\r\n $image->resize(100, 100, Image::NONE);\r\n $image->save($mfilename);\r\n //生成小图片\r\n $image->resize(64, 64, Image::NONE);\r\n $image->save($sfilename);\r\n //生成微略图\r\n $image->resize(48, 48, Image::NONE);\r\n $image->save($ofilename);\r\n\r\n\r\n $newpic = new Pic();\r\n $newpic->setAttributes([\r\n 'user_id' => $user_id,\r\n 'pic_type' => 3,\r\n 'pic_s_img' => '/' . $sfilename,\r\n 'pic_m_img' => '/' . $mfilename,\r\n 'pic_b_img' => '/' . $bfilename\r\n ]);\r\n if ($newpic->save()) {\r\n $this->id = \\Yii::$app->db->getLastInsertID();\r\n return true;\r\n }\r\n return FALSE;\r\n }",
"function attendance_renderqrcode($session) {\n global $CFG;\n\n if (strlen($session->studentpassword) > 0) {\n $qrcodeurl = $CFG->wwwroot . '/mod/attendance/attendance.php?qrpass=' .\n $session->studentpassword . '&sessid=' . $session->id;\n } else {\n $qrcodeurl = $CFG->wwwroot . '/mod/attendance/attendance.php?sessid=' . $session->id;\n }\n\n $barcode = new TCPDF2DBarcode($qrcodeurl, 'QRCODE');\n $image = $barcode->getBarcodePngData(15, 15);\n echo html_writer::img('data:image/png;base64,' . base64_encode($image), get_string('qrcode', 'attendance'));\n}",
"public static function getGenerateQrCode(Request $request){\n $title = \"Generate Qr Code\";\n $projectDetailObj = new \\App\\Project;\n $input = $request->all();\n $project = $projectDetailObj->find($input['id']);\n try{\n DB::beginTransaction();\n $explode_name = explode(' ',$project->name);\n\n $qrcode = mt_rand(1000000, 9999999).$explode_name[0].$project->id;\n // QrCode::size(500)->format('png')->generate($qrcode, public_path('storage/public/storage/user_images/'.$input['id'].'-code.png'));\n $project->update(['qrcode'=>$qrcode,'need_to_scan_qr'=>'enable']);\n DB::commit();\n /* Transaction successful. */\n }catch(\\Exception $e){ \n DB::rollback();\n /* Transaction failed. */\n }\n return \"1\" ;\n }",
"public function createImgUri() {\n\t\t$this->imgUri = FLICKR_FARM;\n\t\t$this->imgUri .= $this->photo['farm'];\n\t\t$this->imgUri .= '.';\n\t\t$this->imgUri .= STATICFLICKR;\n\t\t$this->imgUri .= $this->photo['server'];\n\t\t$this->imgUri .= '/';\n\t\t$this->imgUri .= $this->photo['id'];\n\t\t$this->imgUri .= '_';\n\t \t$this->imgUri .= $this->photo['secret'];\n\t\t$this->imgUri .= '.';\n\t \t$this->imgUri .= IMGEXT;\n\t}",
"public function qrcode($no_peminjaman)\n {\n $peminjaman = Peminjaman::where('no_peminjaman', $no_peminjaman)\n ->where('email', Auth::user()->email)\n ->where('status_peminjaman', 'Booking')\n ->first();\n if (empty($peminjaman)) {\n return redirect('/daftar-peminjaman');\n } \n\n $renderer = new ImageRenderer(\n new RendererStyle(200),\n new ImagickImageBackEnd()\n );\n $writer = new Writer($renderer);\n // $qrcode = $writer->writeFile('Hello World!', 'qrcode.png');\n $qrcode = base64_encode($writer->writeString($peminjaman->token));\n\n return view('peminjaman.qrcode', compact('qrcode'));\n \n }",
"public function createQRcode(string $address, string $cryptocurrency, float $amount): string\n {\n return \"https://chart.googleapis.com/chart?chs=300x300&cht=qr&chl={$cryptocurrency}:{$address}?amount={$amount}\";\n }",
"public static function getQRCode($secret, $username, $width = 200, $height = 200, $returnAsImage = true) {\n\n\t\tglobal $wgGAIssuer, $wgSitename;\n\n\t\t// Replace sitename to $wgSitename\n\t\t$issuer = str_replace('__SITENAME__', $wgSitename, $wgGAIssuer);\n\n\t\t// Set CHL\n\t\t$chl = urlencode(\"otpauth://totp/{$username}?secret={$secret}\");\n\t\t$chl .= urlencode(\"&issuer=\". urlencode(\"{$issuer}\"));\n\n\t\t// Set the sourceUrl\n\t\t$sourceUrl = \"https://chart.googleapis.com/chart?chs={$width}x{$height}&chld=H|0&cht=qr&chl={$chl}\";\n\n\t\treturn ($returnAsImage)\n\t\t\t? file_get_contents( $sourceUrl )\n\t\t\t: $sourceUrl;\n\n\t}",
"public function stock_get_qr_code($card_id, Request $request){\n\t\t$card = App\\Card::find($card_id);\n\t\tif($card !== null){\n\t\t\t$qr_code_str = base64_encode(json_encode(array(\"code\" => $card->code, \"password\" => $card->passwd)));\n\t\t\t$code_image = 'card/qrcode_'.$card->id.'.png';\n\t\t\t\n\t\t\tif(!is_file(public_path($code_image))){\n\t\t\t\t$renderer = new \\BaconQrCode\\Renderer\\Image\\Png();\n\t\t\t\t$renderer->setHeight(256);\n\t\t\t\t$renderer->setWidth(256);\n\t\t\t\t$writer = new \\BaconQrCode\\Writer($renderer);\n\t\t\t\t$writer->writeFile($qr_code_str, public_path($code_image));\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$return_arr = array(\"status\" => true, \"img_code\" => $code_image);\n\t\t}else{\n\t\t\t$return_arr = array(\"status\" => false);\n\t\t}\n\t\techo json_encode($return_arr);\n\t}",
"public static function get_qrcode_url($name, $secret, $title = null, $params = array())\n {\n $width = !empty($params['width']) && (int) $params['width'] > 0 ? (int) $params['width'] : 200;\n $height = !empty($params['height']) && (int) $params['height'] > 0 ? (int) $params['height'] : 200;\n $level = !empty($params['level']) && array_search($params['level'], array('L', 'M', 'Q', 'H')) !== false ? $params['level'] : 'M';\n $urlencoded = urlencode('otpauth://totp/'.$name.'?secret='.$secret.'');\n if (isset($title)) \n {\n $urlencoded .= urlencode('&issuer='.urlencode($title));\n }\n return 'https://chart.googleapis.com/chart?chs='.$width.'x'.$height.'&chld='.$level.'|0&cht=qr&chl='.$urlencoded.'';\n }",
"public function getLinkUrl()\n\t{\n\t\t// @see http://www.php.net/manual/en/reserved.variables.php#84025\n\t\t$url = '_core/component:qrcode/' . urlencode(urlencode($this->getFingerprint())) . '.data';\n\n\t\tif (Config::get('debug') === true) {\n\t\t\t$url .= '&text=' . urlencode($this->_text);\n\t\t}\n\t\treturn $url;\n\t}",
"public function CreateQR($cinema,$purchase,$number){\n $room=$cinema->getCinemaRoomList()[0];\n $function=$room->getFunctionList()[0];\n $movie=$function->getMovie();\n $QR=\"https://chart.googleapis.com/chart?chs=300x300&cht=qr&chl=\".$cinema->getCinemaName().\"/\".$cinema->getIdCinema().\"/\".$room->getRoomName().\"/\".$room->getIdCinemaRoom().\"/\".$function->getIdFunction().\"/\".$function->getDate().\"/\".$function->getTime().\"/\".$purchase->getIdPurchase().\"/\".$movie->getMovieName().\"/\".$movie->getIdMovie().\"/\".$number.\"&choe=UTF-8\";\n $QR=str_replace(\" \",\"-\",$QR);\n return $QR;\n }",
"public function generate_image($code = null) {\n\t\t$func = \"generate_image_\" . $this->imgoutlook;\n\t\treturn $this->$func ( $code );\n\t\n\t}",
"public function getImage()\n\t{\n\t\treturn $this->generator->render($this->generateCode(), $this->params);\n\t}",
"public function qr(Link $link): Response\n {\n return response($link->qrCodeImage)\n ->header('Content-type','image/png');\n }",
"public function QRcode($kodenya = null){\n \tQRcode::png(\n \t\t$kodenya,\n \t\t$outfile = false,\n \t\t$level = QR_ECLEVEL_H,\n \t\t$size = 13,\n \t\t$margin = 3\n \t);\n }",
"public function generate_url()\n {\n }",
"public function toEncodedURI() : string {\n\t\t\tif ($this->uri === null) {\n\t\t\t\t$this->uri = 'data:image/png;base64,' . urlencode(base64_encode($this->render()));\n\t\t\t}\n\t\t\treturn $this->uri;\n\t\t}",
"function show_wpuf_qrcode( $id, $metakey ) {\n $qr_meta = get_post_meta( $id, $metakey , false );\n\n return $qr_meta[0]['image'];\n}",
"public function example()\n {\n\n // header('Content-Type: ' . $qrCode->getContentType());\n // // $this->request->setHeader('Content-Endcoding', $qrCode->getContentType());\n // return $qrCode->writeString();\n return view('admin/code_divisi/example');\n\n // $qrCode = new QrCode();\n // $qrCode\n // ->setText('1111')\n // ->setSize(300)\n // ->setPadding(10)\n // ->setErrorCorrection('high')\n // ->setForegroundColor(array('r' => 0, 'g' => 0, 'b' => 0, 'a' => 0))\n // ->setBackgroundColor(array('r' => 255, 'g' => 255, 'b' => 255, 'a' => 0))\n // ->setLabel('PT. PAL Indonesia (persero)')\n // ->setLabelFontSize(16)\n // ->setImageType(QrCode::IMAGE_TYPE_PNG);\n // echo '<img src=\"data:' . $qrCode->getContentType() . ';base64,' . $qrCode->generate() . '\" />';\n }",
"public function url()\n\t{\n\t\t$this->buildImage();\n\t\treturn $this->buildCachedFileNameUrl;\n\t}",
"public function getPictureUrl()\n\t{\n\t\treturn 'http://local.postcard.com' . $this->getPictureUri();\n\t}",
"public function renderUri() {\n\t\tif ($this->isThumbnailPossible($this->getFile()->getExtension())) {\n\t\t\t$this->processedFile = $this->getFile()->process($this->getProcessingType(), $this->getConfiguration());\n\t\t\t$result = $this->processedFile->getPublicUrl(TRUE);\n\n\t\t\t// Update time stamp of processed image at this stage. This is needed for the browser to get new version of the thumbnail.\n\t\t\tif ($this->processedFile->getProperty('originalfilesha1') != $this->getFile()->getProperty('sha1')) {\n\t\t\t\t$this->processedFile->updateProperties(array('tstamp' => $this->getFile()->getProperty('tstamp')));\n\t\t\t}\n\t\t} else {\n\t\t\t$result = $this->getIcon($this->getFile()->getExtension());\n\t\t}\n\t\treturn $result;\n\t}",
"public function getQRCodeGoogleUrl($name, $secret, $title = null)\n {\n $urlencoded = urlencode('otpauth://totp/' . $name . '?secret=' . $secret . '');\n if (isset($title)) {\n $urlencoded .= urlencode('&issuer=' . urlencode($title));\n }\n return 'https://chart.googleapis.com/chart?chs=200x200&chld=M|0&cht=qr&chl=' . $urlencoded . '';\n }",
"public function src()\n {\n return url('captcha').'?'.Str::random(8);\n }",
"public function executeExportQRCode() {\r\n\t\t$this->action_name = $this->getActionName();\r\n\t\t$object = $this->_getObjectOrCreate();\r\n\t\tif (!$object || $object->isNew()) { //Object is created if not retrieved by request parameters\r\n\t\t\t$objects = $this->getListObjects('list');\r\n\t\t\t$name = $this->getClassName() . 's-' . date('Ymd');\r\n\t\t} else {\r\n\t\t\t$objects[] = $object;\r\n\t\t\t$name = $this->getClassName() . '_' . $object->getByName($this->getPrimaryKey(), BasePeer::TYPE_FIELDNAME);\r\n\t\t}\r\n\t\t$component = $this->getGeneratorParameter('behaviors.qrcode.export.component', 'export_qrcode');\r\n\t\t$orientation = $this->getGeneratorParameter('behaviors.qrcode.export.orientation', 'L');\r\n\t\t$width = $this->getGeneratorParameter('behaviors.qrcode.export.width', 84);\r\n\t\t$height = $this->getGeneratorParameter('behaviors.qrcode.export.height', 35);\r\n\t\t$margin = $this->getGeneratorParameter('behaviors.qrcode.export.margin', 5);\r\n\r\n\t\tsfLoader::loadHelpers(array('Partial'));\r\n\t\t$content = get_partial('print_qrcode', array('objects' => $objects, 'module_name' => $this->getModuleName(), 'class_name' => $this->getClassName(), 'primary_key' => $this->getPrimaryKey(), 'component' => $component));\r\n\t\t//echo $content;exit;//DEBUG\r\n\t\t$pdf = $this->getHtml2PdfObject($orientation, array($width, $height), array($margin, $margin, $margin, $margin));\r\n\t\t$pdf->writeHTML($content);\r\n\t\t@ob_clean();\r\n\t\t$pdf->Output($name . '.pdf', 'D');\r\n\t\texit;\r\n\t}",
"public function buildPhotoUrl () {\n\t\t\n\t}",
"public function getImage()\n {\n // merge text options with generation options\n $queryArgs = array_merge(\n $this->getOptions(),\n array(\n \t'text' => $this->getText(),\n )\n );\n \n $url = self::GENERATOR_SERVICE_URL . '?' . http_build_query($queryArgs);\n \n // Set curl options and execute the request\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n\n $result = curl_exec($ch);\n \n // if the request fails, throw exception\n if ($result === false) {\n require_once 'Ncstate/Brand/Exception.php';\n throw new Ncstate_Brand_Exception('CURL Error: ' . curl_error($ch));\n }\n \n $im = imagecreatefromstring($result);\n curl_close($ch); \n \n return $this->_store($im);\n }",
"public function QRcode($kodenya)\n\t\t{\n\t\t QRcode::png(\n\t\t $kodenya,\n\t\t $outfile = false,\n\t\t $level = QR_ECLEVEL_H,\n\t\t $size = 6,\n\t\t $margin = 2\n\t\t );\n\t\t}",
"function displayQrcode()\r\n\t {\r\n\t \t$redirectPage = JRequest::getVar('redirect');\r\n\t\t $model = $this->getModel('qrcode');\r\n\t\t $printStyle = $model->getActiveStyle();//Get active style name from the database.\r\n\t\t $currentStyle = $printStyle->style_name;\r\n\t\t \r\n\t\t if($redirectPage == \"print\")\r\n\t\t {\r\n\t\t\t\tJRequest::setVar( 'view', 'qrcode' );\r\n\t \tJRequest::setVar( 'layout', $currentStyle);\r\n\t \tJRequest::setVar('hidemainmenu', 0);\r\n\t \tparent::display();\r\n\t\t }\r\n\t\t else\r\n\t\t {\r\n\t\t \tJRequest::setVar( 'view', 'qrcode' );\r\n\t \tJRequest::setVar( 'layout', 'share');\r\n\t \tJRequest::setVar('hidemainmenu', 0);\r\n\t \tparent::display();\r\n\t\t }\t \r\n\t }",
"private function generate_image_ugly($code) {\n\t\t$pincode = ( int ) (1000000.0 * $code / (mt_getrandmax () + 1.0));\n\t\t$pincode = strval ( $pincode );\n\t\tif (! $this->generate_encrypt_string ( $pincode )) {\n\t\t\treturn false;\n\t\t}\n\t\t// print http header\n\t\t$this->set_code_key ();\n\t\t// set-cookie must be printed befor this\n\t\theader ( \"Content-type: image/\" . $this->imgtype . \"\\n\\n\" );\n\t\t// omit return value\n\t\t// create an image\n\t\t$img = imagecreate ( $this->imgwidth, $this->imgheight );\n\t\t// allocate color for image\n\t\t$color [ \"white\" ] = imagecolorallocate ( $img, 255, 255, 255 );\n\t\t$color [ \"black\" ] = imagecolorallocate ( $img, 0, 0, 0 );\n\t\t$color [ \"gray\" ] = imagecolorallocate ( $img, 40, 40, 40 );\n\t\t$color [ \"point\" ] = imageColorallocate ( $img, 80, 180, 40 );\n\t\t// (int)$num is equal to intval( $num)\n\t\tfor($i = 0; $i < (rand () % intval ( $this->imgwidth * $this->imgheight / 200 )); $i ++) {\n\t\t\t// draw a line\n\t\t\timageline ( $img, rand () % $this->imgwidth, \n\t\t\trand () % $this->imgheight, \n\t\t\trand () % $this->imgwidth, \n\t\t\trand () % $this->imgheight, $color [ \"black\" ] );\n\t\t}\n\t\t\n\t\tfor($i = 0; $i < intval ( $this->imgwidth * $this->imgheight / 20 ); $i ++) {\n\t\t\t// draw a single pixel\n\t\t\timagesetpixel ( $img, rand () % $this->imgwidth, \n\t\t\trand () % $this->imgheight, $color [ \"black\" ] );\n\t\t}\n\t\t// draw pincode horizontally\n\t\t$font = 5;\n\t\timagestring ( $img, $font, \n\t\t\t(imagesx ( $img ) / 2 - strlen ( $pincode ) * imagefontwidth ( $font ) / 2), \n\t\t\t(imagesy ( $img ) / 2 - imagefontheight ( $font ) / 2), \n\t\t\t$pincode, $color [ \"black\" ] );\n\t\t$showimgfunc = \"image\" . $this->imgtype;\n\t\t$showimgfunc ( $img );\n\t\t// destroy image\n\t\timagedestroy ( $img );\n\t\treturn true;\n\t}",
"function print_qrcode($code_ams)\n {\n \n $data[\"code_ams\"] = $code_ams;\n $data[\"data\"] = $this->get_data_qrcode($code_ams); \n return view('masterdata.print_qrcode')->with(compact('data'));\n }",
"public function getQRCodeGoogleUrl($name, $secret, $title = null, $params = array())\n {\n $width = !empty($params['width']) && (int) $params['width'] > 0 ? (int) $params['width'] : 200;\n $height = !empty($params['height']) && (int) $params['height'] > 0 ? (int) $params['height'] : 200;\n $level = !empty($params['level']) && array_search($params['level'], array('L', 'M', 'Q', 'H')) !== false ? $params['level'] : 'M';\n\n $urlencoded = urlencode('otpauth://totp/' . $name . '?secret=' . $secret . '');\n if (isset($title)) {\n $urlencoded .= urlencode('&issuer=' . urlencode($title));\n }\n return \"https://chart.googleapis.com/chart?chs={$width}x{$height}&chld={$level}|0&cht=qr&chl={$urlencoded}\";\n }",
"public function getPictureUri()\n\t{\n\t\treturn '/uploads/postcards/' . $this->picture;\n\t}",
"public function QRcode($kodenya){\n QRcode::png(\n $kodenya,\n $outfile = false,\n $level = QR_ECLEVEL_H,\n $size = 10,\n $margin = 1\n );\n }",
"public function show()\n {\n\n return view('qrcode');\n }",
"public function testUrlGeneration() {\n\n\t\t$image = $this->getSampleImage();\n\n\t\t$this->assertTrue( !empty($image->ID) && $image->exists() );\n\n\t\t// Generate a thumb\n\t\t$colour = 'ffffff';\n\t\t$thumb = $image->Pad( self::WIDTH, self::HEIGHT, $colour );\n\t\t$this->assertTrue($thumb instanceof ThumboredImage);\n\t\t// Get its URL\n\t\t$url = $thumb->getAbsoluteURL();\n\n\t\t// Thumbor\\Url\\Builder\n\t\t$instance = $image->getUrlInstance();\n\t\t$this->assertTrue($instance instanceof ThumborUrlBuilder);//Phumbor\n\t\t$instance_url = $instance->__toString();\n\n\t\t$this->assertEquals($url, $instance_url);\n\n\t\t$this->getRemoteImageDimensions($url, $width, $height);\n\n\t\t$this->assertEquals($width, self::WIDTH);\n\t\t$this->assertEquals($height, self::HEIGHT);\n\n\t\t// Test that the _resampled thumb DOES NOT exist locally in /assets, which is the point of Thumbor\n\t\t$variant_name = $image->variantName('Pad', self::WIDTH, self::HEIGHT, $colour);\n\t\t$filename = $image->getFilename();\n\t\t$hash = $image->getHash();\n\t\t$exists = $this->asset_store->exists($filename, $hash, $variant_name);\n\n\t\t$this->assertTrue( !$exists, \"The variant name exists and it should not\" );\n\n\t}",
"public function getUrl( $width = null, $height = null, $cropX = null, $cropY = null, $cropWidth = null, $cropHeight = null, $algorithm = null, $compressionQuality = null, $frame = null )\n {\n $filename = $this->getFilename();\n\n $systemConfig = $this->_site->getSystemConfig();\n $imageHost = $systemConfig->getSetting( 'SYSTEM_IMAGE_HOST' );\n $imageProtocol = $systemConfig->getSetting( 'SYSTEM_IMAGE_PROTOCOL' );\n $imageSalt = $systemConfig->getSetting( 'SYSTEM_IMAGE_SALT' );\n\n // we always want some kind of compression by default, so they have to explicitly\n // put a -1 if they don't want compression\n if ( $compressionQuality === null ) {\n $compressionQuality = $systemConfig->getSetting( 'SYSTEM_IMAGE_COMPRESSION_QUALITY' );\n }\n\n $baseUri = \"/image/$filename?\";\n\n if ( $width ) { $baseUri .= \"&x=$width\"; }\n if ( $height ) { $baseUri .= \"&y=$height\"; }\n if ( $cropX !== null ) { $baseUri .= \"&cx=$cropX\"; }\n if ( $cropY !== null ) { $baseUri .= \"&cy=$cropY\"; }\n if ( $cropWidth ) { $baseUri .= \"&cw=$cropWidth\"; }\n if ( $cropHeight ) { $baseUri .= \"&ch=$cropHeight\"; }\n if ( $algorithm ) { $baseUri .= \"&nmd=$algorithm\"; }\n if ( $compressionQuality > 0 ) { $baseUri .= \"&icq=$compressionQuality\"; }\n if ( $frame ) { $baseUri .= \"&frame=$frame\"; }\n\n $signature = md5( $imageSalt . $baseUri );\n\n return \"$imageProtocol://$imageHost$baseUri&sig=$signature\";\n }",
"public function create_image(){\n\t\t$md5_hash = md5(rand(0,999));\n\t\t$security_code = substr($md5_hash, 15, 5);\n\t\t$this->Session->write('security_code',$security_code);\n\t\t$width = 80;\n\t\t$height = 22;\n\t\t$image = ImageCreate($width, $height);\n\t\t$black = ImageColorAllocate($image, 37, 170, 226);\n\t\t$white = ImageColorAllocate($image, 255, 255, 255);\n\t\tImageFill($image, 0, 0, $black);\n\t\tImageString($image, 5, 18, 3, $security_code, $white);\n\t\theader(\"Content-Type: image/jpeg\");\n\t\tImageJpeg($image);\n\t\tImageDestroy($image);\n\t}",
"private function generateUrl() : string\n {\n return $this->apiUrl.$this->ownerRepo.$this->branchPath.$this->branch;\n }",
"function AddQRCode($aName,$db){\r\n\r\n\t\r\n\t$tempDir = dirname(__FILE__).DIRECTORY_SEPARATOR.'phpqrcode'.DIRECTORY_SEPARATOR.'temp'.DIRECTORY_SEPARATOR; //setting the tempory directory to store the qrcode\r\n\t$fileName = $tempDir.$aName.'.png';//naming the qrcode file \r\n\t$errorCorrectionLevel = 'Q'; //setting the error correction level of the qrcode\r\n\t$matrixPointSize = 5; //setting the size of the generated qrcode\r\n\t$generationDate = date('Y/m/d');//setting the date\r\n\t\r\n\t//generating the qrcode and saving it to the temp folder\r\n\tQRcode::png($aName,$fileName,$errorCorrectionLevel,$matrixPointSize, 2);\r\n\t\t\r\n\t//gets the animals animal_ID\r\n\t$sql = \"SELECT animal_ID FROM tbl_Animals WHERE animal_Name ='\".$aName.\"'\";\r\n\t\r\n\tif(!$result = $db->query($sql)){\r\n\t\t$GLOBALS['Error'] = 'There was an error running the query['.$db->error.']';\r\n\t}\r\n\telse{\r\n\t\twhile ($row = $result->fetch_assoc()){\r\n\t\t\t$animal_ID = $row['animal_ID'];\r\n\t\t}\r\n\t\t\t//storing qrcode image as binary\r\n\t\t\t$QRImage = addslashes(file_get_contents($fileName));\r\n\t\t\t\r\n\t\t\t//sql to insert qrcode into tbl_QRCodes\r\n\t\t\t$insertQRCodeSQL = \"INSERT INTO tbl_QRCodes VALUES(NULL,'$QRImage','$generationDate','$animal_ID')\";\r\n\t\t\t\r\n\t\t\t\tif(!$result = $db->query($insertQRCodeSQL)){\r\n\t\t\t\t\t$GLOBALS['Error'] = 'There was an error running the query['.$db->error.']';\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tif(DeleteTempQRCode($fileName)){\r\n\t\t\t\t\t\t$GLOBALS['Success'] = ' Animal Added';\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\t$GLOBALS['Warning'] = ' Animal added but there was an error deleting the QRCode';\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t}\r\n\t\r\n}",
"public function createQrCodeForUser($type = 'PNG')\n\t{\n\t\treturn $this->createQrCode($this->getOtpAuthUrl($this->secret, \\App\\User::getUserModel($this->userId)->getDetail('user_name')), $type);\n\t}",
"public function getQRCodeUrl(string $name, string $secret) : string\n {\n $uri = \"otpauth://totp/$name?secret=$secret\";\n return $this->getQRCodeDataUri($uri);\n }",
"protected function renderImage(){\n \n return sprintf(\n '<img src=\"%s\" title=\"%s\" alt=\"%s\">',\n $this->getField('url'),\n $this->getField('title',''),\n $this->getField('alt','')\n );\n \n }",
"protected function dumpImage():string{\n\t\tob_start();\n\n\t\ttry{\n\n\t\t\tswitch($this->options->outputType){\n\t\t\t\tcase QROutputInterface::GDIMAGE_GIF:\n\t\t\t\t\timagegif($this->image);\n\t\t\t\t\tbreak;\n\t\t\t\tcase QROutputInterface::GDIMAGE_JPG:\n\t\t\t\t\timagejpeg($this->image, null, max(0, min(100, $this->options->jpegQuality)));\n\t\t\t\t\tbreak;\n\t\t\t\t// silently default to png output\n\t\t\t\tcase QROutputInterface::GDIMAGE_PNG:\n\t\t\t\tdefault:\n\t\t\t\t\timagepng($this->image, null, max(-1, min(9, $this->options->pngCompression)));\n\t\t\t}\n\n\t\t}\n\t\t// not going to cover edge cases\n\t\t// @codeCoverageIgnoreStart\n\t\tcatch(Throwable $e){\n\t\t\tthrow new QRCodeOutputException($e->getMessage());\n\t\t}\n\t\t// @codeCoverageIgnoreEnd\n\n\t\t$imageData = ob_get_contents();\n\t\timagedestroy($this->image);\n\n\t\tob_end_clean();\n\n\t\treturn $imageData;\n\t}",
"function pngAction($publicCode)\n {\n //find captchaCode by public code\n $c = new Criteria();\n $c->add(\"publicCode\", $publicCode);\n $captcha = $this->captchaCode->find($c);\n\n //display private code as image\n $this->set(\"code\", $captcha->privateCode);\n $this->viewClass = \"CaptchaView\";\n }",
"public function mainImageURL()\n {\n if ($this->image) {\n $imageLocation = $this->image->location;\n } else {\n // If the image cannot be displayed, show a generic image.\n $imageLocation = 'generic/generic1.jpg';\n }\n\n return Storage::url($imageLocation);\n }",
"public function getImageUrl();",
"public function build_pixel_url() {\n\t\tif ( $this->error ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$args = get_object_vars( $this );\n\n\t\t// Request Timestamp and URL Terminator must be added just before the HTTP request or not at all.\n\t\tunset( $args['_rt'], $args['_'] );\n\n\t\t$validated = self::validate_and_sanitize( $args );\n\n\t\tif ( is_wp_error( $validated ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn esc_url_raw( WC_Tracks_Client::PIXEL . '?' . http_build_query( $validated ) );\n\t}",
"private function createBarcode()\n {\n $barcodeOptions = [\n 'text' => $this->barcodeValue,\n 'factor' => '1',\n 'drawText' => $this->barcodeSettings->includeNumber($this->storeId),\n 'backgroundColor' => $this->barcodeSettings->getBackgroundColor($this->storeId),\n 'foreColor' => $this->barcodeSettings->getFontColor($this->storeId),\n ];\n\n $type = $this->barcodeSettings->getType($this->storeId);\n // @codingStandardsIgnoreLine\n $imageResource = ZendBarcode::draw($type, 'image', $barcodeOptions, []);\n // @codingStandardsIgnoreLine\n imagejpeg($imageResource, $this->fileName, 100);\n // @codingStandardsIgnoreLine\n imagedestroy($imageResource);\n }",
"function render($qcode)\n\t{\n\t\t\n\t\trequire_once($this->BASE_DIR.$this->HANDLERS_DIRECTORY.\"override_class.php\");\n\t\t$over = new override;\n\t\t\n\t\tif ($user_func = $over->check($this,'render'))\n\t\t{\n\t\t\t\n\t \t\treturn call_user_func($user_func,$qcode);\n\t\t}\n\t\t\n\t\tif(!is_numeric($qcode)){ exit; }\n\t\t$recnum = preg_replace('#\\D#',\"\",$qcode);\n\n\t\t$imgtypes = array('jpg'=>\"jpeg\",'png'=>\"png\",'gif'=>\"gif\");\n\n\t\t@mysql_connect($this->MYSQL_INFO['server'], $this->MYSQL_INFO['user'], $this->MYSQL_INFO['password']) || die('db connection failed');\n\t\t@mysql_select_db($this->MYSQL_INFO['db']);\n\n\t\t$result = mysql_query(\"SELECT tmp_info FROM {$this->MYSQL_INFO['prefix']}tmp WHERE tmp_ip = '{$recnum}'\");\n\t\tif(!$result || !($row = mysql_fetch_array($result, MYSQL_ASSOC)))\n\t\t{\n\t\t\t// echo \"Render Failed\";\n\t\t\t// echo \"SELECT tmp_info FROM {$this->MYSQL_INFO['prefix']}tmp WHERE tmp_ip = '{$recnum}'\";\n\t\t\texit;\n\t\t}\n\n\t\t$code = intval($row['tmp_info']); // new value\n\n\t\t$type = \"none\";\n\n\t\tforeach($imgtypes as $k=>$t)\n\t\t{\n\t\t\tif(function_exists(\"imagecreatefrom\".$t))\n\t\t\t{\n\t\t\t\t$ext = \".\".$k;\n\t\t\t\t$type = $t;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$path = $this->BASE_DIR.$this->IMAGES_DIRECTORY;\n\t\t$secureimg = array();\n\n\t\tif(is_readable($path.\"secure_image_custom.php\"))\n\t\t{\n\n\t\t\trequire_once($path.\"secure_image_custom.php\");\n\t\t\t/* Example secure_image_custom.php file:\n\n\t\t\t$secureimg['image'] = \"code_bg_custom\"; // filename excluding the .ext\n\t\t\t$secureimg['size']\t= \"15\";\n\t\t\t$secureimg['angle']\t= \"0\";\n\t\t\t$secureimg['x']\t\t= \"6\";\n\t\t\t$secureimg['y']\t\t= \"22\";\n\t\t\t$secureimg['font'] \t= \"imagecode.ttf\";\n\t\t\t$secureimg['color'] = \"90,90,90\"; // red,green,blue\n\n\t\t\t*/\n\t\t\t$bg_file = $secureimg['image'];\n\n\t\t\tif(!is_readable($path.$secureimg['font']))\n\t\t\t{\n\t\t\t\techo \"Font missing\"; // for debug only. translation not necessary.\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\tif(!is_readable($path.$secureimg['image'].$ext))\n\t\t\t{\n\t\t\t\techo \"Missing Background-Image: \".$secureimg['image'].$ext; // for debug only. translation not necessary.\n\t\t\t\texit;\n\t\t\t}\n\t\t\t// var_dump($secureimg);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$bg_file = \"generic/code_bg\";\n\t\t}\n\n\t\tswitch($type)\n\t\t{\n\t\t\tcase \"jpeg\":\n\t\t\t\t$image = ImageCreateFromJPEG($path.$bg_file.\".jpg\");\n\t\t\t\tbreak;\n\t\t\tcase \"png\":\n\t\t\t\t$image = ImageCreateFromPNG($path.$bg_file.\".png\");\n\t\t\t\tbreak;\n\t\t\tcase \"gif\":\n\t\t\t\t$image = ImageCreateFromGIF($path.$bg_file.\".gif\");\n\t\t\t\tbreak;\n\t\t}\n\n\n\n\t\tif(isset($secureimg['color']))\n\t\t{\n\t\t\t$tmp = explode(\",\",$secureimg['color']);\n\t\t\t$text_color = ImageColorAllocate($image,$tmp[0],$tmp[1],$tmp[2]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$text_color = ImageColorAllocate($image, 90, 90, 90);\n\t\t}\n\n\t\theader(\"Content-type: image/{$type}\");\n\n\t\tif(isset($secureimg['font']) && is_readable($path.$secureimg['font']))\n\t\t{\n\t\t\timagettftext($image, $secureimg['size'],$secureimg['angle'], $secureimg['x'], $secureimg['y'], $text_color,$path.$secureimg['font'], $code);\n\t\t}\n\t\telse\n\t\t{\n\t\t\timagestring ($image, 5, 12, 2, $code, $text_color);\n\t\t}\n\n\t\tswitch($type)\n\t\t{\n\t\t\tcase \"jpeg\":\n\t\t\t\timagejpeg($image);\n\t\t\t\tbreak;\n\t\t\tcase \"png\":\n\t\t\t\timagepng($image);\n\t\t\t\tbreak;\n\t\t\tcase \"gif\":\n\t\t\t\timagegif($image);\n\t\t\t\tbreak;\n\t\t}\n\n\n\t}",
"public function generateUrl($original_image_url, $image_class, $image_width);",
"public function getImageUrl() \n {\n // return a default image placeholder if your source avatar is not found\n $imagen = isset($this->imagen) ? $this->imagen : 'default_product.jpg';\n return Url::to('@web/img/producto/'). $imagen;\n }",
"public function __toString()\n {\n try {\n if ($this->getImageFile()) {\n $this->_getModel()->setBaseFile($this->getImageFile());\n } else {\n $this->_getModel()->setBaseFile($this->getProduct()\n ->getData($this->_getModel()->getDestinationSubdir()));\n }\n\n if ($this->_getModel()->isCached()) {\n return $this->_getModel()->getUrl();\n } else {\n if ($this->_scheduleRotate) {\n $this->_getModel()->rotate($this->getAngle());\n }\n\n if ($this->_cropPosition) {\n $this->_getModel()->setCropPosition($this->_cropPosition);\n }\n\n if ($this->_scheduleResize) {\n $this->_getModel()->resize();\n }\n\n if ($this->_scheduleAdaptiveResize) {\n $this->_getModel()->adaptiveResize();\n }\n\n if ($this->getWatermark()) {\n $this->_getModel()->setWatermark($this->getWatermark());\n }\n\n $url = $this->_getModel()->saveFile()->getUrl();\n }\n } catch (Exception $e) {\n Mage::logException($e);\n $url = Mage::getDesign()->getSkinUrl($this->getPlaceholder());\n }\n return $url;\n }",
"function qr_shortcode_render( $atts ) {\n $qr_meta = get_post_meta( $atts['id'], $atts['metakey'] , false );\n\n return $qr_meta[0]['image'];\n}",
"public function getQrcode($product_model,$product_id){\n\n\t\tinclude DIR_SYSTEM.\"pub/phpqrcode/phpqrcode.php\";//引入PHP QR库文件\n\n\t\t// $this->load->model('catalog/product');\n\t\t// $product_model=$this->model_catalog_product->getProductModelById($product_id);\n\n\t\t$value=HTTP_CATALOG.\"index.php?route=product/product&product_id=\".$product_id;\n\t\t$this->log->write($value);\n\t\t$this->log->write('看看路径');\n\t\t$errorCorrectionLevel = \"L\";\n\t\t$matrixPointSize = \"9\";\n\t\t$margin='2';\n\t\t$outfile=DIR_APPLICATION.'view/image/qrcode/'.$product_model.'.png';\n\t\t$saveandprint=true;\n\n\t\tif (!file_exists($outfile)) {\n\t\t\tQRcode::png($value, $outfile, $errorCorrectionLevel, $matrixPointSize,true);\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function createUrl(){\n\t\t$urlObj [\"id\"] =KuaiDi100Conf_pub::APPKEY;// $this->appid; //WxPayConf_pub::APPID;\n\t\t$urlObj [\"com\"] = $this->typeCom;\n\t\t$urlObj [\"typeNu\"] = $this->typeNu;\n\t\t$urlObj [\"show\"] = KuaiDi100Conf_pub::SHOW;\n\t\t$urlObj[\"muti\"] = KuaiDi100Conf_pub::MUTI;\n\t\t$urlObj[\"order\"] = KuaiDi100Conf_pub::ORDER;\n\t\t$bizString = $this->formatBizQueryParaMap ( $urlObj, false );\n\t\treturn KuaiDi100Conf_pub::URL . $bizString;\n\t}",
"protected function createInvalidFakeReturnUrl(): string\n {\n return (string) base64_encode(openssl_random_pseudo_bytes(32));\n }",
"public function index(Request $request)\n {\n $url = config('console.create_talent_url');\n $qrImg = QrCode::format('png')->margin(0)->size(130)->generate($url, public_path('img/qrcode.png'));\n \n $type = $request->get('type', '');\n \n if ($type == 'download')\n {\n header(\"Content-Disposition: attachment; filename=qrcode.png\"); // 告诉浏览器通过附件形式来处理文件\n header('Content-Length: ' . filesize(public_path('img/qrcode.png'))); // 下载文件大小\n readfile(public_path('img/qrcode.png')); // 读取文件内容\n }else {\n return config('console.web_index').'img/qrcode.png';\n }\n }",
"public function QRcode($kodenya)\n {\n // render qr dengan format gambar PNG\n QRcode::png(\n $kodenya,\n $outfile = false,\n $level = QR_ECLEVEL_H,\n $size = 6,\n $margin = 2\n );\n }",
"function cbGenCover($url, $align) {\n return\n '<a href=\"' . $url . '\">'\n . '<img style=\"padding: 10px;\" align=\"' . $align\n . '\" border=\"0\" width=\"200\" height=\"250\"'\n . 'src=\"' . $url . '\" />'\n . '</a>';\n}",
"public function renderUri();",
"public function get_image_url()\n {\n }",
"function build_pixel_url() {\n\t\tif ( $this->error ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$args = get_object_vars( $this );\n\n\t\t// Request Timestamp and URL Terminator must be added just before the HTTP request or not at all.\n\t\tunset( $args['_rt'] );\n\t\tunset( $args['_'] );\n\n\t\t$validated = self::validate_and_sanitize( $args );\n\n\t\tif ( is_wp_error( $validated ) )\n\t\t\treturn '';\n\n\t\treturn Jetpack_Tracks_Client::PIXEL . '?' . http_build_query( $validated );\n\t}",
"private function MakeContentQR(){\n $content = \"{$this->Nombre} {$this->Apellidos}\\n{$this->email}\\n{$this->Carrera}\\n\n {$this->Semestre}\\n{$this->ncontrol}\\n{$this->FolioPago}\\n{$this->F_Examen}\";\n\n return $content;\n }",
"public function get_image_link()\n {\n }",
"public function testGenerateBarcodeQRCode()\n {\n }",
"public function imageUrl()\n\t{\n\t\treturn \"/storage/$this->image\";\n\t}",
"public function download_qrcode($filename)\n {\n $file_path = storage_path() .'/app/public/img/qr-code/kader/'. $filename;\n if (file_exists($file_path))\n {\n // Send Download\n return Response::download($file_path, $filename, [\n 'Content-Length: '. filesize($file_path)\n ]);\n }\n else\n {\n Session::flash('error','Requested file does not exist on our server!');\n // Error\n return back();\n }\n }",
"public static function makeResultImageGenerator()\n {\n $user = static::$fm->create('User');\n $quiz = Quiz::where('topic', 'How dirty is your mind?')->first();\n $result = new QuizUserResults();\n $result->user = $user;\n $result->quiz = $quiz;\n $result->result_id = self::$testResultId;\n\n //Setting custom profile pic (a local file for faster testing)\n $result->user->photo = base_path('tests/assets/sample-profile-pic.jpg');\n $settings = (array) $result->quiz->settings;\n $settings['addUserPicInResults'] = true;\n $settings['userPicSize'] = 50;\n $settings['userPicXPos'] = 100;\n $settings['userPicYPos'] = 100;\n $result->quiz->settings = json_encode($settings);\n\n $resultImageGenerator = new ResultImageGenerator($result);\n return $resultImageGenerator;\n }",
"public function toUrl()\n {\n $queryParams = '';\n\n $index = 0;\n\n foreach ($this->args as $key => $param) {\n $separator = '?';\n\n if ($index) {\n $separator = '&';\n }\n\n $queryParams .= \"{$separator}{$key}={$param}\";\n\n $index++;\n }\n\n return \"https://dev-ops.mee.ma/glenn/1/5/people.jpg{$queryParams}\";\n }",
"public function display()\n {\n header(\"Content-Type: image/png; name=\\\"barcode.png\\\"\");\n imagepng($this->_image);\n }",
"public static function getImageUrl($plot);",
"public function getSignedUrl(): string\n {\n $query = base64_encode(json_encode($this->buildQuery()));\n $signature = hash_hmac('sha256', $this->templateId . $query, $this->token);\n\n return $this->signedUrlBase . $this->templateId . '.png?' . http_build_query(['s' => $signature, 'v' => $query]);\n }",
"function addQRCode() {\n?>\n<script src=\"https://cdn.rawgit.com/davidshimjs/qrcodejs/04f46c6a/qrcode.min.js\">\n</script>\n<script src=\"https://unpkg.com/[email protected]/distribution/globalinputmessage.min.js\">\n</script>\n<script>\n\tjQuery(document).ready(function(){\n\t\tjQuery( \".message\" ).append('12121212');\n\n\t});\t\t\n</script>\n<script type=\"text/javascript\">\n\n\t(function() {\n\n\t var formElement = document.getElementById(\"loginform\");\n\t qrCodeElement = document.createElement('p');\n\n\t qrCodeElement.style.padding = \"10px\";\n\t qrCodeElement.style.backgroundColor = \"#FFFFFF\";\n\n\t formElement.parentNode.insertBefore(qrCodeElement, formElement);\n\n\t var globalinput = {\n\t api: require(\"global-input-message\")\n\t };\n\n\n\t globalinput.config = {\n\t onSenderConnected: function() {\n\t qrCodeElement.style.display = \"none\";\n\t },\n\t onSenderDisconnected: function() {\n\t qrCodeElement.style.display = \"block\";\n\t },\n\t initData: {\n\t action: \"input\",\n\t dataType: \"form\",\n\t form: {\n\t id: \"###username###@\" + window.location.hostname + \".wordpress\",\n\t title: \"Wordpress login\",\n\t fields: [{\n\t label: \"Username\",\n\t id: \"username\",\n\t operations: {\n\t onInput: function(username) {\n\t document.getElementById(\"user_login\").value = username;\n\t }\n\t }\n\n\t }, {\n\t label: \"Password\",\n\t id: \"password\",\n\t type: \"secret\",\n\t operations: {\n\t onInput: function(password) {\n\t document.getElementById(\"user_pass\").value = password;\n\t }\n\t }\n\n\t }, {\n\t label: \"Login\",\n\t type: \"button\",\n\t operations: {\n\t onInput: function() {\n\t document.getElementById(\"wp-submit\").click();\n\t }\n\t }\n\n\t }]\n\t }\n\t }\n\n\t };\n\t \n\t globalinput.connector = globalinput.api.createMessageConnector();\n\t globalinput.connector.connect(globalinput.config);\n\t var codedata = globalinput.connector.buildInputCodeData();\n\t var qrcode = new QRCode(qrCodeElement, {\n\t text: codedata,\n\t width: 300,\n\t height: 300,\n\t colorDark: \"#000000\",\n\t colorLight: \"#ffffff\",\n\t correctLevel: QRCode.CorrectLevel.H\n\t });\n\n\t})();\n\n</script>\n<?php\n\t}",
"public function img()\n {\n return '<img src=\"'.$this->src().'\" alt=\"captcha\">';\n }",
"private function getQRCodeByBackend($qrText, $size, ImageBackEndInterface $backend)\n {\n $rendererStyleArgs = array($size, $this->borderWidth);\n\n if (is_array($this->foregroundColour) && is_array($this->backgroundColour)) {\n $rendererStyleArgs = array(...$rendererStyleArgs, ...array(\n null,\n null,\n Fill::withForegroundColor(\n new Rgb(...$this->backgroundColour),\n new Rgb(...$this->foregroundColour),\n new EyeFill(null, null),\n new EyeFill(null, null),\n new EyeFill(null, null)\n ),\n ));\n }\n\n $writer = new Writer(new ImageRenderer(\n new RendererStyle(...$rendererStyleArgs),\n $backend\n ));\n\n return $writer->writeString($qrText);\n }",
"public function GetQR()\n {\n $trackingId = Session::get('TrackingID');\n Session::forget('TrackingID');\n $CasedId = Session::get('CaseId');\n Session::forget('CaseId');\n if ($CasedId != null) {\n DB::table('caselinks')->where('RefundCase_Id', '=', $CasedId)->update(['IsActive' => 0]);//change to 0 for 1 time link\n return view('QR', ['Data' => $CasedId, 'TrackingID' => config('app.url') . '/Status/' . $trackingId]);\n } else {\n return view('errors.InvalidLink');\n }\n }",
"public function get_image_url(){\n\t\tglobal $CFG;\n\n\t\trequire_once $CFG->libdir . \"/filelib.php\";\n\n\t\t$course = get_course($this->_courseid);\n\n\t\tif ($course instanceof stdClass) {\n\t\t\trequire_once $CFG->libdir . '/coursecatlib.php';\n\t\t\t$course = new course_in_list($course);\n\t\t}\n\n\t\tforeach ($course->get_course_overviewfiles() as $file) {\n\t\t\t$isImage = $file->is_valid_image();\n\n\t\t\tif ($isImage) {\n\t\t\t\treturn file_encode_url(\"$CFG->wwwroot/pluginfile.php\",\n\t\t\t\t\t'/' . $file->get_contextid() . '/' . $file->get_component() . '/' .\n\t\t\t\t\t$file->get_filearea() . $file->get_filepath() . $file->get_filename(), !$isImage);\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"function create_image($url) {\n $timeparts = explode(\" \",microtime());\n $currenttime = bcadd(($timeparts[0]*1000),bcmul($timeparts[1],1000));\n\n // Gathers the time with current date and puts it into the file name\n $path = \"temp/\";\n $htmlname = $currenttime . \".html\";\n $imagename = $currenttime . \".png\";\n\n // Saves the captured image\n $image = $_POST[\"image\"];\n $ifp = fopen( $path . $imagename, 'wb' );\n $data = explode( ',', $image );\n fwrite( $ifp, base64_decode( $data[ 1 ] ) );\n fclose( $ifp );\n\n // Returns the name for URL\n echo $path . $imagename;\n}",
"public function getImageUrl()\n {\n $baseUrl = $this->getBaseImageUrl();\n if ($baseUrl) {\n $dimensions = $this->getImageDimensions();\n $imageData = $this->getImageData();\n $width = Kwf_Media_Image::getResponsiveWidthStep($dimensions['width'],\n Kwf_Media_Image::getResponsiveWidthSteps($dimensions, $imageData['file']));\n $ret = str_replace('{width}', $width, $baseUrl);\n $ev = new Kwf_Component_Event_CreateMediaUrl($this->getData()->componentClass, $this->getData(), $ret);\n Kwf_Events_Dispatcher::fireEvent($ev);\n return $ev->url;\n }\n return null;\n }",
"public function getImage() {\n return Mage::helper('landingpage/image')->getImageUrl($this->getData('image'));\n }",
"public function preview_image()\n {\n return 'contact-area/02.png';\n }",
"public function actionCreate()\n {\n $model = new SanPham();\n\n if ($model->load(Yii::$app->request->post())) {\n $ngayTao=date(\"Ymd\");\n $tienTo='SP_'.$ngayTao;\n $model->ma=Dungchung::SinhMa($tienTo.'_','san_pham');\n $model->ngay_tao=date(\"Y-m-d\");\n $model->nguoi_tao=Yii::$app->user->id;\n $model->trang_thai=SanPham::SP_MOI;\n $model->anh_qr=$model->ma.'.png';\n if($model->save())\n {\n $url=Yii::$app->urlManagerBackend->baseUrl .'?id='.$model->id;\n// baseUrl = 'baseUrl' => 'http://ngogiadiep.local:8080/ThucTap/RBAC/frontend/web/index.php/qrcode/view'\n//fix cứng url sang frontend\n $pathFile=Yii::getAlias('@webroot').'/qr-code/';\n// Lấy linh từ webroot theo $url\n $qrCode=(new QrCode($model->ma))->setText($url);\n $qrCode->writeFile($pathFile.$model->ma.'.png');\n// return print_r($url);\n// die();\n Yii::$app->session->setFlash('success','Thêm sản phẩm mới thành công.');\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n Yii::$app->session->setFlash('error','Thêm sản phẩm mới thất bại');\n return $this->render('create',['model'=>$model]);\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }"
] | [
"0.7312467",
"0.71355844",
"0.7129024",
"0.7036289",
"0.7009082",
"0.69697934",
"0.6962704",
"0.65782124",
"0.6494209",
"0.64915264",
"0.64472044",
"0.6427266",
"0.64249027",
"0.6417364",
"0.6400035",
"0.6398154",
"0.63657665",
"0.6271001",
"0.6243494",
"0.623263",
"0.6226725",
"0.6180035",
"0.61656916",
"0.61614174",
"0.6112174",
"0.6105034",
"0.60577077",
"0.60563755",
"0.60479724",
"0.60407436",
"0.6006262",
"0.6003717",
"0.59853077",
"0.59609747",
"0.59595335",
"0.595472",
"0.5943569",
"0.5927277",
"0.5912469",
"0.591166",
"0.5862967",
"0.58492506",
"0.5840963",
"0.5824873",
"0.5779302",
"0.5774938",
"0.5767486",
"0.56912965",
"0.568906",
"0.56767607",
"0.5666104",
"0.5659205",
"0.56474495",
"0.56237984",
"0.56236887",
"0.56207615",
"0.5618482",
"0.56181127",
"0.5611082",
"0.5599773",
"0.55808425",
"0.5578837",
"0.5575047",
"0.5573669",
"0.5552306",
"0.5550332",
"0.5548351",
"0.55392504",
"0.5519452",
"0.551911",
"0.55155164",
"0.55138564",
"0.5511674",
"0.5502766",
"0.54991955",
"0.5473577",
"0.5449968",
"0.54467374",
"0.54201794",
"0.5383661",
"0.5382563",
"0.53749746",
"0.53713876",
"0.5365376",
"0.5341932",
"0.53413093",
"0.5336911",
"0.5335577",
"0.53301334",
"0.53133667",
"0.52985877",
"0.529057",
"0.52882236",
"0.5285287",
"0.52795035",
"0.52724147",
"0.5271444",
"0.5268072",
"0.5253933",
"0.5250805"
] | 0.63585037 | 17 |
Decodes a base32 (without padding) string. | protected static function base32Decode(string $base32) : string
{
$buffer = '';
// Map each character to a group of 5 bits and pass to the buffer
foreach (str_split($base32) as $char) {
$buffer .= sprintf('%05b', strpos(self::CHARSET, $char));
}
$string = '';
// Split the buffer into bytes, convert them to ASCII and add to the string
foreach (str_split($buffer, 8) as $byte) {
$string .= chr(bindec(str_pad($byte, 8, '0', STR_PAD_RIGHT)));
}
return $string;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function base32_decode($b32) {\n\n\t\t$b32 \t= strtoupper($b32);\n\n\t\tif (!preg_match('/^[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]+$/', $b32, $match))\n\t\t\tthrow new Exception('Invalid characters in the base32 string.');\n\n\t\t$l \t= strlen($b32);\n\t\t$n\t= 0;\n\t\t$j\t= 0;\n\t\t$binary = \"\";\n\n\t\tfor ($i = 0; $i < $l; $i++) {\n\n\t\t\t$n = $n << 5; \t\t\t\t// Move buffer left by 5 to make room\n\t\t\t$n = $n + self::$lut[$b32[$i]]; \t// Add value into buffer\n\t\t\t$j = $j + 5;\t\t\t\t// Keep track of number of bits in buffer\n\n\t\t\tif ($j >= 8) {\n\t\t\t\t$j = $j - 8;\n\t\t\t\t$binary .= chr(($n & (0xFF << $j)) >> $j);\n\t\t\t}\n\t\t}\n\n\t\treturn $binary;\n\t}",
"public function decode($value) {\n if (strlen($value) === 0) return '';\n if (preg_match('/[^' . preg_quote($this->dictionary) . ']/', $value) !== 0)\n throw new TwoFactorAuthenticationException('Invalid Base32 String');\n $bufferString = '';\n foreach (str_split($value) as $character) {\n if ($character !== '=')\n $bufferString .= str_pad(decbin($this->lookup[$character]), 5, 0, STR_PAD_LEFT);\n }\n $bufferLength = strlen($bufferString);\n $bufferBlocks = trim(chunk_split(substr($bufferString, 0, $bufferLength - ($bufferLength % 8)), 8, ' '));\n\n $outputString = '';\n foreach (explode(' ', $bufferBlocks) as $block)\n $outputString .= chr(bindec(str_pad($block, 8, 0, STR_PAD_RIGHT)));\n return $outputString;\n }",
"private static function base32Decode(string $secret) : string\n {\n if (empty($secret)) {\n return '';\n }\n\n $base32chars = self::base32LookupTable();\n $base32charsFlipped = array_flip($base32chars);\n\n $paddingCharCount = substr_count($secret, $base32chars[32]);\n $allowedValues = [6, 4, 3, 1, 0];\n if (!in_array($paddingCharCount, $allowedValues)) {\n return '';\n }\n\n for ($i = 0; $i < 4; $i++){\n if ($paddingCharCount == $allowedValues[$i] &&\n substr($secret, -($allowedValues[$i])) != str_repeat($base32chars[32], $allowedValues[$i])) {\n return '';\n }\n }\n\n $secret = str_replace('=','', $secret);\n $secret = str_split($secret);\n $binaryString = \"\";\n for ($i = 0; $i < count($secret); $i = $i+8) {\n if (!in_array($secret[$i], $base32chars)) {\n return '';\n }\n\n $x = \"\";\n for ($j = 0; $j < 8; $j++) {\n $secretChar = $secret[$i + $j] ?? 0;\n $base = $base32charsFlipped[$secretChar] ?? 0;\n $x .= str_pad(base_convert($base, 10, 2), 5, '0', STR_PAD_LEFT);\n }\n $eightBits = str_split($x, 8);\n for ($z = 0; $z < count($eightBits); $z++) {\n $binaryString .= ( ($y = chr(base_convert($eightBits[$z], 2, 10))) || ord($y) == 48 ) ? $y : \"\";\n }\n }\n\n return $binaryString;\n }",
"protected function _base32Decode($secret)\n {\n if (empty($secret)) {\n return '';\n }\n\n $base32chars = $this->_getBase32LookupTable();\n $base32charsFlipped = array_flip($base32chars);\n\n $paddingCharCount = substr_count($secret, $base32chars[32]);\n $allowedValues = array(6, 4, 3, 1, 0);\n if (!in_array($paddingCharCount, $allowedValues)) {\n return false;\n }\n for ($i = 0; $i < 4; $i++) {\n if ($paddingCharCount == $allowedValues[$i] &&\n substr($secret, -$allowedValues[$i]) != str_repeat($base32chars[32], $allowedValues[$i])) {\n return false;\n }\n }\n $secret = str_replace('=', '', $secret);\n $secret = str_split($secret);\n $binaryString = '';\n for ($i = 0, $iMax = count($secret); $i < $iMax; $i += 8) {\n $x = '';\n if (!in_array($secret[$i], $base32chars)) {\n return false;\n }\n for ($j = 0; $j < 8; $j++) {\n $x .= str_pad(base_convert(@$base32charsFlipped[@$secret[$i + $j]], 10, 2), 5, '0', STR_PAD_LEFT);\n }\n $eightBits = str_split($x, 8);\n foreach ($eightBits as $zValue) {\n $binaryString .= (($y = chr(base_convert($zValue, 2, 10))) || ord($y) == 48) ? $y : '';\n }\n }\n return $binaryString;\n }",
"protected function _base32Decode($secret)\n {\n if (empty($secret)) {\n return '';\n }\n\n $base32chars = $this->_getBase32LookupTable();\n $base32charsFlipped = array_flip($base32chars);\n\n $paddingCharCount = substr_count($secret, $base32chars[32]);\n $allowedValues = array(6, 4, 3, 1, 0);\n if (!in_array($paddingCharCount, $allowedValues)) {\n return false;\n }\n for ($i = 0; $i < 4; ++$i) {\n if (\n $paddingCharCount == $allowedValues[$i] &&\n substr($secret, - ($allowedValues[$i])) != str_repeat($base32chars[32], $allowedValues[$i])\n ) {\n return false;\n }\n }\n $secret = str_replace('=', '', $secret);\n $secret = str_split($secret);\n $binaryString = '';\n for ($i = 0; $i < count($secret); $i = $i + 8) {\n $x = '';\n if (!in_array($secret[$i], $base32chars)) {\n return false;\n }\n for ($j = 0; $j < 8; ++$j) {\n $x .= str_pad(base_convert(@$base32charsFlipped[@$secret[$i + $j]], 10, 2), 5, '0', STR_PAD_LEFT);\n }\n $eightBits = str_split($x, 8);\n for ($z = 0; $z < count($eightBits); ++$z) {\n $binaryString .= (($y = chr(base_convert($eightBits[$z], 2, 10))) || ord($y) == 48) ? $y : '';\n }\n }\n\n return $binaryString;\n }",
"private static function base32Decode($secret)\n\t{\n\t\tif (empty($secret)) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$base32chars = self::getBase32LookupTable();\n\t\t$base32charsFlipped = array_flip($base32chars);\n\n\t\t$paddingCharCount = substr_count($secret, $base32chars[32]);\n\t\t$allowedValues = array(6, 4, 3, 1, 0);\n\t\tif (!in_array($paddingCharCount, $allowedValues)) {\n\t\t\treturn false;\n\t\t}\n\t\tfor ($i = 0; $i < 4; ++$i) {\n\t\t\tif ($paddingCharCount == $allowedValues[$i] &&\n\t\t\t\tsubstr($secret, -($allowedValues[$i])) != str_repeat($base32chars[32], $allowedValues[$i])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t$secret = str_replace('=', '', $secret);\n\t\t$secret = str_split($secret);\n\t\t$binaryString = '';\n\t\tfor ($i = 0; $i < count($secret); $i = $i + 8) {\n\t\t\t$x = '';\n\t\t\tif (!in_array($secret[$i], $base32chars)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfor ($j = 0; $j < 8; ++$j) {\n\t\t\t\t$x .= str_pad(base_convert(@$base32charsFlipped[@$secret[$i + $j]], 10, 2), 5, '0', STR_PAD_LEFT);\n\t\t\t}\n\t\t\t$eightBits = str_split($x, 8);\n\t\t\tfor ($z = 0; $z < count($eightBits); ++$z) {\n\t\t\t\t$binaryString .= (($y = chr(base_convert($eightBits[$z], 2, 10))) || ord($y) == 48) ? $y : '';\n\t\t\t}\n\t\t}\n\n\t\treturn $binaryString;\n\t}",
"private static function _base32_decode($secret)\n {\n if (empty($secret)) return '';\n\n $base32chars = self::_get_base32_lookup_table();\n $base32chars_flipped = array_flip($base32chars);\n\n $padding_char_count = substr_count($secret, $base32chars[32]);\n $allowed_values = array(6, 4, 3, 1, 0);\n if (!in_array($padding_char_count, $allowed_values)) return false;\n for ($i = 0; $i < 4; $i++)\n {\n if ($padding_char_count == $allowed_values[$i] &&\n substr($secret, -($allowed_values[$i])) != str_repeat($base32chars[32], $allowed_values[$i])) return false;\n }\n $secret = str_replace('=','', $secret);\n $secret = str_split($secret);\n $bin_str = \"\";\n for ($i = 0; $i < count($secret); $i = $i+8) \n {\n $x = \"\";\n if (!in_array($secret[$i], $base32chars)) return false;\n for ($j = 0; $j < 8; $j++) \n {\n $x .= str_pad(base_convert(@$base32chars_flipped[@$secret[$i + $j]], 10, 2), 5, '0', STR_PAD_LEFT);\n }\n $eight_bits = str_split($x, 8);\n for ($z = 0; $z < count($eight_bits); $z++) \n {\n $bin_str .= ( ($y = chr(base_convert($eight_bits[$z], 2, 10))) || ord($y) == 48 ) ? $y:\"\";\n }\n }\n return $bin_str;\n }",
"function decode($string);",
"public static function decode($string);",
"function decodeString($string);",
"public function DecodeString(string $str){\n $byte_arr = unpack('C*', $str);\n return $this->Decode($byte_arr);\n }",
"protected final function _decodeSynchsafe32($val)\n {\n return ($val & 0x7f) | ($val & 0x7f00) >> 1 |\n ($val & 0x7f0000) >> 2 | ($val & 0x7f000000) >> 3;\n }",
"public function decode( string $value ): string;",
"function decode($string, $key = '')\n {\n $key = $this->getKey($key);\n\n if (preg_match('/[^a-zA-Z0-9\\/\\+=]/', $string)) {\n return false;\n }\n\n $dec = base64_decode($string);\n\n if (($dec = $this->mcryptDecode($dec, $key)) === false) {\n return false;\n }\n\n return $dec;\n }",
"public static function dec($str)\n {\n\n return unserialize(base64_decode($str));\n\n }",
"public function decode(string $data): string\n {\n if (empty($data)) {\n return \"\";\n }\n\n if ($this->isCrockford()) {\n $data = strtoupper($data);\n $data = str_replace([\"O\", \"L\", \"I\", \"-\"], [\"0\", \"1\", \"1\", \"\"], $data);\n }\n\n $this->validateInput($data);\n\n $data = str_split($data);\n $data = array_map(function ($character) {\n if ($character !== $this->padding()) {\n $index = strpos($this->characters(), $character);\n return sprintf(\"%05b\", $index);\n }\n }, $data);\n $binary = implode(\"\", $data);\n\n /* Split to eight bit chunks. */\n $data = str_split($binary, 8);\n\n /* Make sure binary is divisible by eight by ignoring the incomplete byte. */\n $last = array_pop($data);\n if ((null !== $last) && (8 === strlen($last))) {\n $data[] = $last;\n }\n\n return implode(\"\", array_map(function ($byte) {\n //return pack(\"C\", bindec($byte));\n return chr((int)bindec($byte));\n }, $data));\n }",
"function hashDecode($data)\n {\n return base64_decode(str_pad(strtr($data, '-_', '+/'), strlen($data) % 4, '=', STR_PAD_RIGHT));\n }",
"function DecodeVal($val) {\n return substr(substr(base64_decode($val), 0, -1), 1);\n }",
"function crockford_decode($number, $base, bool $checksum = false): string\n{\n return Crockford::decode($number, $base, $checksum);\n}",
"function decode($s) {\n if ($this->kod == 1) {\n $s = $this->win_utf8($s);\n }\n return $s;\n }",
"public static function decodeValue($value)\n {\n return base64_decode($value);\n }",
"function decode($input) {\n return base64_decode($input);\n }",
"public function testDecodeWithTrailingBits(): void\n {\n // Matches the behavior of Google Authenticator, drops extra 2 empty bits\n $this->assertEquals(\n 'c567eceae5e0609685931fd9e8060223',\n unpack(\"H*\", RSCT_OTP\\Base32::decode('YVT6Z2XF4BQJNBMTD7M6QBQCEM'))[1]\n );\n // For completeness, test all the possibilities allowed by Google Authenticator\n // Drop the incomplete empty extra 4 bits (28*5==140bits or 17.5 bytes, chopped to 136 bits)\n $this->assertEquals(\n 'e98d9807766f963fd76be9de3c4e140349',\n unpack(\"H*\", RSCT_OTP\\Base32::decode('5GGZQB3WN6LD7V3L5HPDYTQUANEQ'))[1]\n );\n }",
"function decodeInteger($integer);",
"public function decode($link)\n {\n $id = $this->alphaToNum($link, $this->CHARSET);\n return (!empty($this->SALT)) ? substr($id, $this->PADDING) : $id;\n }",
"protected function base16Decode($strValue) {\r\n \t$strReturn = '';\r\n \tfor($a=0; $a<strlen($strValue); $a+=2){\r\n \t\t$strTmp = substr($strValue,$a,2);\r\n \t\t$int = hexdec($strTmp);\r\n \t\t$strReturn.= chr($int);\r\n \t}\r\n \treturn $strReturn;\r\n }",
"function DecodeBase64( $string )\n\t{\n\t\treturn base64_decode( $string );\n\t}",
"abstract function decode($bytes);",
"function base64Decode($scrambled) {\n // Initialise output variable\n $output = \"\";\n \n // Fix plus to space conversion issue\n $scrambled = str_replace(\" \",\"+\",$scrambled);\n \n // Do encoding\n $output = base64_decode($scrambled);\n \n // Return the result\n return $output;\n}",
"public function base58_decode($base58) { \n\n\t// Initialize\n\t$origbase58 = $base58;\n\t$return = \"0\";\n\n\t// Go through string\n\tfor($i = 0; $i < strlen($base58); $i++) {\n\t\t$return = gmp_add(gmp_mul($return, 58), strpos('123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz', $base58[$i]));\n\t}\n\t$return = gmp_strval($return, 16);\n\t\t\n\tfor($i = 0; $i < strlen($origbase58) && $origbase58[$i] == \"1\"; $i++) {\n\t\t$return = \"00\" . $return;\n\t}\n\tif(strlen($return) %2 != 0) { $return = \"0\" . $return; }\n\t\n\t// Return\n\treturn $return;\n\n}",
"public static function DecodeSHA1($string,$key) {\n $key = sha1($key);\n $strLen = strlen($string);\n $keyLen = strlen($key);\n for ($i = 0; $i < $strLen; $i+=2) {\n $ordStr = hexdec(base_convert(strrev(substr($string,$i,2)),36,16));\n if ($j == $keyLen) { $j = 0; }\n $ordKey = ord(substr($key,$j,1));\n $j++;\n $hash .= chr($ordStr - $ordKey);\n }\n return $hash;\n }",
"public function packerOneUnpack(string $data): string\n {\n // Separa em dois pedaços\n $partOne = mb_substr($data, 0, 10, \"utf-8\");\n $partTwo = mb_substr($data, 12, null, \"utf-8\");\n return base64_decode($partOne . $partTwo);\n }",
"public function decode($raw);",
"function decode(String $data)\n\t{\n\n\t\treturn base64_decode($data) ?? false;\n\n\t}",
"private static function decode($string)\n {\n return base64_decode($string);\n }",
"public function decode(string $string): string\n {\n return base64_decode($string);\n }",
"abstract protected function getItoa64() ;",
"static public function decode(string $encoded): int\n {\n $value = 0;\n $len = strlen($encoded);\n\n for ($i = 0; $i < $len; ++$i) {\n $value <<= 6;\n $value += self::ord($encoded[$i]);\n }\n\n return $value;\n }",
"function decodeUtf8($str) {\n $res = '';\n for ($i = 0; $i <= strlen($str) - 6; $i++) {\n $character = $str[$i];\n if ($character == '\\\\' && $str[$i + 1] == 'u') {\n $value = hexdec(substr($str, $i + 2, 4));\n\n if ($value < 0x0080) {\n // 1 byte: 0xxxxxxx\n $character = chr($value);\n } else if ($value < 0x0800) {\n // 2 bytes: 110xxxxx 10xxxxxx\n $character = chr((($value & 0x07c0) >> 6) | 0xc0);\n $character .= chr(($value & 0x3f) | 0x80);\n } else {\n // 3 bytes: 1110xxxx 10xxxxxx 10xxxxxx\n $character = chr((($value & 0xf000) >> 12) | 0xe0);\n $character .= chr((($value & 0x0fc0) >> 6) | 0x80);\n $character .= chr(($value & 0x3f) | 0x80);\n }\n $i += 5;\n }\n $res .= $character;\n }\n return $res . substr($str, $i);\n}",
"public function decode($str)\n {\n $num = 0;\n $index = 0;\n\n $length = strlen($str);\n\n for ($i = 0; $i < $length; $i++) {\n $power = ($length - ($index + 1));\n $char = $str[$i];\n $position = strpos($this->alphabet, $char);\n $num = bcadd($num, bcmul($position, bcpow(62, $power)));\n $index++;\n }\n\n return $num;\n }",
"protected function base64Decode(string $data)\n {\n $data = str_pad(strtr($data, '-_', '+/'), strlen($data) % 4, '=', STR_PAD_RIGHT);\n return base64_decode($data);\n }",
"public function decode($code)\n {\n $result = 0;\n if ($code && strstr($code, $this->_prefix)) {\n $code = strtoupper($code);\n $result = intval(hexdec(strtolower(str_replace($this->_prefix, '', $code))));\n $result = $result - $this->_secret;\n }\n return $result > 0 ? $result : 0;\n }",
"function base64urlDecode($str) {\n return base64_decode(str_pad(strtr($str, '-_', '+/'), strlen($str) % 4, '=', STR_PAD_RIGHT));\n }",
"public function decode($encoded, $padAfter = 4) {\n $id = 0;\n $explode = array_reverse(str_split($encoded));\n foreach($explode as $index => $char) {\n $n = strpos($this->codeSet, $char);\n\n if($n === -1) return 0;\n\n $id += $n * pow($this->base, $index);\n }\n\n $id = substr($id, 0, strlen($id) - $padAfter);\n\n return intval($id);\n }",
"public function decode_encode()\n {\n if ( ($this->_type!= \"DEC\") && ($this->_type != \"ENC\") ) {\n return \"Error_-_Invalid_Hex_Type\";\n }\n\n if ($this->_type == \"DEC\") {\n $l=mb_strlen($this->_data)/4;\n\t\t $res='';\n\t\t for ($i=0;$i<$l;$i++) {\n $res.=html_entity_decode('&#'.hexdec(mb_substr($this->_data,$i*4,4)).';',ENT_NOQUOTES,'UTF-8');\n }\n }\n\n if ($this->_type == \"ENC\") {\n $l=mb_strlen($this->_data);\n $res='';\n for ($i=0;$i<$l;$i++)\n {\n $s = mb_substr($this->_data,$i,1);\n $s = mb_convert_encoding($s, 'UCS-2LE', 'UTF-8');\n $s = dechex(ord(substr($s, 1, 1))*256+ord(substr($s, 0, 1)));\n if (mb_strlen($s)<4) $s = str_repeat(\"0\",(4-mb_strlen($s))).$s;\n $res.=$s;\n }\n }\n\n return $res;\n }",
"function urlsafe_decode($input)\n\t{\n\t\t$remainder = strlen($input) % 4;\n\t\tif ($remainder) {\n\t\t\t$padlen = 4 - $remainder;\n\t\t\t$input .= str_repeat('=', $padlen);\n\t\t}\n\t\treturn base64_decode(strtr($input, '-_', '+/'));\n\t}",
"function urlsafeB64Decode(string $input)\n\t{\n\t\t$remainder = strlen($input) % 4;\n\t\tif ($remainder) {\n\t\t\t$padlen = 4 - $remainder;\n\t\t\t$input .= str_repeat('=', $padlen);\n\t\t}\n\t\treturn base64_decode(strtr($input, '-_', '+/'));\n\t}",
"public function decode($base58)\n {\n // Type Validation\n if (is_string($base58) === false) {\n throw new InvalidArgumentException('Argument $base58 must be a string.');\n }\n\n // If the string is empty, then the decoded string is obviously empty\n if (strlen($base58) === 0) {\n return '';\n }\n\n $indexes = array_flip(str_split($this->alphabet));\n $chars = str_split($base58);\n\n // Check for invalid characters in the supplied base58 string\n foreach ($chars as $char) {\n if (isset($indexes[$char]) === false) {\n throw new InvalidArgumentException('Argument $base58 contains invalid characters.');\n }\n }\n\n // Convert from base58 to base10\n $decimal = gmp_init($indexes[$chars[0]], 10);\n\n for ($i = 1, $l = count($chars); $i < $l; $i++) {\n $decimal = gmp_mul($decimal, $this->base);\n $decimal = gmp_add($decimal, $indexes[$chars[$i]]);\n }\n\n // Convert from base10 to base256 (8-bit byte array)\n $output = '';\n while (gmp_cmp($decimal, 0) > 0) {\n list($decimal, $byte) = gmp_div_qr($decimal, 256);\n $output = pack('C', gmp_intval($byte)) . $output;\n }\n\n // Now we need to add leading zeros\n foreach ($chars as $char) {\n if ($indexes[$char] === 0) {\n $output = \"\\x00\" . $output;\n continue;\n }\n break;\n }\n\n return $output;\n }",
"public function decode($in) {}",
"private function _xorDecode($string, $key)\n {\n $string = $this->_xorMerge($string, $key);\n\n $dec = '';\n for ($i = 0; $i < strlen($string); $i++) {\n $dec .= (substr($string, $i++, 1) ^ substr($string, $i, 1));\n }\n\n return $dec;\n }",
"public function decode ($raw);",
"function decode($input, $key = '')\n {\n $key = empty($key) ? config('env.APP_KEY') : $key;\n $charset = hash_hmac('sha256', $key, 'abcdefgopqrsthigklmnuvwxyz');\n\n $head = substr($input, 0, 2);\n $tail = substr($input, -2);\n $encoded = substr($input, 2, -2);\n if(strlen($encoded) % 2 !== 0) return false;\n $encoded = hex2bin($encoded);\n\n $len_str = mb_strlen($encoded);\n while(mb_strlen($charset) < $len_str)\n {\n $charset .= $charset;\n }\n $origin = $encoded ^ $charset;\n\n $mac = hash_hmac('sha256', $origin, $key);\n if($head == substr($mac, 0, 2) and $tail == substr($mac, -2))\n {\n return $origin;\n }\n else\n {\n return false;\n }\n }",
"public function decode(string $in)\n {\n $out = 0;\n $base = strlen($this->chars);\n $len = strlen($in) - 1;\n\n for ($t = $len; $t >= 0; $t--) {\n $bcp = bcpow($base, $len - $t);\n dump([$base, $len - $t, $bcp]);\n $out += intval(strpos($this->chars, substr($in, $t, 1)) * $bcp);\n }\n\n return $out;\n }",
"public function decode($data);",
"function decode_id ($id_encoded) {\n return base64_decode($id_encoded) / config('secure.tokenNumber');\n }",
"function DecodeMcrypt( $string )\n\t{\n\t\t$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);\n\t\t$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n\t\t$result = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $this->key, $string, MCRYPT_MODE_ECB, $iv);\n\t\t$result = rtrim($result, \"\\0\");\n\t\treturn $result;\n\t}",
"function utf_32_to_unicode($source) {\n\n\t// mb_string : methode rapide\n\tif (init_mb_string()) {\n\t\t$convmap = array(0x7F, 0xFFFFFF, 0x0, 0xFFFFFF);\n\t\t$source = mb_encode_numericentity($source, $convmap, 'UTF-32LE');\n\t\treturn str_replace(chr(0), '', $source);\n\t}\n\n\t// Sinon methode lente\n\t$texte = '';\n\twhile ($source) {\n\t\t$words = unpack(\"V*\", substr($source, 0, 1024));\n\t\t$source = substr($source, 1024);\n\t\tforeach ($words as $word) {\n\t\t\tif ($word < 128)\n\t\t\t\t$texte .= chr($word);\n\t\t\t// ignorer le BOM - http://www.unicode.org/faq/utf_bom.html\n\t\t\telse if ($word != 65279)\n\t\t\t\t$texte .= '&#'.$word.';';\n\t\t}\n\t}\n\treturn $texte;\n\n}",
"protected function _decode($encoded)\n {\n $decoded = array();\n // find the Punycode prefix\n if(!preg_match('!^' . preg_quote($this->_punycode_prefix, '!') . '!', $encoded))\n {\n $this->_error('This is not a punycode string');\n return false;\n }\n $encode_test = preg_replace('!^' . preg_quote($this->_punycode_prefix, '!') . '!', '', $encoded);\n // If nothing left after removing the prefix, it is hopeless\n if(!$encode_test)\n {\n $this->_error('The given encoded string was empty');\n return false;\n }\n // Find last occurence of the delimiter\n $delim_pos = strrpos($encoded, '-');\n if($delim_pos > strlen($this->_punycode_prefix))\n {\n for($k = strlen($this->_punycode_prefix); $k < $delim_pos; ++$k)\n {\n $decoded[] = ord($encoded{$k});\n }\n }\n $deco_len = count($decoded);\n $enco_len = strlen($encoded);\n \n // Wandering through the strings; init\n $is_first = true;\n $bias = $this->_initial_bias;\n $idx = 0;\n $char = $this->_initial_n;\n \n for($enco_idx = ($delim_pos)? ($delim_pos + 1) :0; $enco_idx < $enco_len; ++$deco_len)\n {\n for($old_idx = $idx, $w = 1, $k = $this->_base; 1; $k += $this->_base)\n {\n $digit = $this->_decode_digit($encoded{$enco_idx ++});\n $idx += $digit * $w;\n $t = ($k <= $bias)? $this->_tmin :(($k >= $bias + $this->_tmax)? $this->_tmax :($k - $bias));\n if($digit < $t)\n break;\n $w = (int)($w * ($this->_base - $t));\n }\n $bias = $this->_adapt($idx - $old_idx, $deco_len + 1, $is_first);\n $is_first = false;\n $char += (int)($idx / ($deco_len + 1));\n $idx %= ($deco_len + 1);\n if($deco_len > 0)\n {\n // Make room for the decoded char\n for($i = $deco_len; $i > $idx; $i --)\n $decoded[$i] = $decoded[($i - 1)];\n }\n $decoded[$idx ++] = $char;\n }\n return $this->_ucs4_to_utf8($decoded);\n }",
"function read_uint32(&$payload) {\n $uint32 = \\unpack('N', $payload)[1];\n $payload = \\substr($payload, 4);\n\n return $uint32;\n}",
"public function restore_code() {\n\t\t$serial = $this->plain_serial();\n\t\t$secret = pack('H*', $this->secret());\n\t\t// take the 10 last bytes of the digest of our data\n\t\t$data = substr(sha1($serial.$secret, true), -10);\n\t\treturn Authenticator_Crypto::restore_code_to_char($data);\n\t}",
"static public function base64url_decode($data) {\n $decoded = base64_decode(strtr($data, '-_', '+/'));\n if ($decoded == false) {\n throw new UnexpectedValueException('Invalid base64url string');\n }\n return $decoded;\n }",
"public function decode($data) {}",
"public function decode($data) {}",
"public function decode($data) {}",
"public function decode($data) {}",
"public function decode($data) {}",
"public function readUInt32();",
"function string_to_int($str){\n\t\treturn sprintf(\"%u\",crc32($str));\n\t}",
"static function base64url_decode($data) {\n\t\treturn base64_decode(str_pad(strtr($data, '-_', '+/'), strlen($data) % 4, '=', STR_PAD_RIGHT));\n\t}",
"function acoc_decode( $value ) {\n\n $func = 'base64' . '_decode';\n return $func( $value );\n \n}",
"Function decbin32 ($dec) {\n return str_pad(decbin($dec), 32, '0', STR_PAD_LEFT);\n}",
"public static function base64URIDecode($str) {\n return base64_decode(strtr($str, '_-', '+/'), /* strict = */ true);\n }",
"function base64urldecode($str)\n {\n return base64_decode(strtr($str, '-_,', '+/='));\n }",
"abstract public function decode($data);",
"protected function decodeMessageId(string $encodedMessageId): int\n {\n $length = strlen($encodedMessageId);\n $result = 0;\n\n foreach (str_split($encodedMessageId) as $index => $char) {\n $result += ord($char) << (($length - 1) * 8 - ($index * 8));\n }\n\n return $result;\n }",
"public function base64UrlDecode(string $data): string\n {\n $decodedContent = base64_decode(strtr($data, '-_', '+/'), true);\n\n if (! is_string($decodedContent)) {\n throw CannotDecodeContent::invalidBase64String();\n }\n\n return $decodedContent;\n }",
"public static function readTriad($str){\n\t\treturn unpack(\"N\", \"\\x00\" . $str)[1];\n\t}",
"function acadp_base64_decode( $string ) {\n\treturn base64_decode( str_replace( array( '-', '_', '.' ), array( '+', '/', '=' ), $string ) );\n}",
"public function decode($str)\n {\n if ($str[0] === $this->alphabet[0]) {\n throw BijectiveException::onZeroValueAsFirstChar($this);\n }\n\n $int = 0;\n foreach (str_split($str) as $char) {\n if (false === $pos = strpos($this->alphabet, $char)) {\n throw BijectiveException::onUnsupportedChar($this, $char);\n }\n\n $int = ($int * $this->base) + $pos;\n }\n\n return $int;\n }",
"function cryptCCNumberDeCrypt( $cifer, $key )\r\n{\r\n\treturn base64_decode($cifer);\r\n}",
"public function packerTwoUnpack(string $data): string\n {\n // Separa em dois pedaços\n $partOne = mb_substr($data, 0, 5, \"utf-8\");\n $partTwo = mb_substr($data, 7, null, \"utf-8\");\n return base64_decode($partOne . $partTwo);\n }",
"function isUTF32($string){\n $result = false;\n $length = strlen($string);\n if ($length >= 4) {\n $byte1 = ord($string);\n $byte2 = ord(substr($string, 1, 1));\n $byte3 = ord(substr($string, 2, 1));\n $byte4 = ord(substr($string, 3, 1));\n if ($byte1 === 0x00 && $byte2 === 0x00 // BOM (big-endian)\n && $byte3 === 0xFE && $byte4 === 0xFF) {\n $result = true;\n } else if ($byte1 === 0xFF && $byte2 === 0xFE // BOM (little-endian)\n && $byte3 === 0x00 && $byte4 === 0x00) {\n $result = true;\n } else {\n $pos = strpos($string, chr(0x00));\n if ($pos === false) {\n $result = false; // Non ASCII (omit)\n } else {\n $next = substr($string, $pos, 4); // Must be (BE)\n if (strlen($next) === 4) {\n $bytes = array_values(unpack('C4', $next));\n if (isset($bytes[0], $bytes[1], $bytes[2], $bytes[3])) {\n if ($bytes[0] === 0x00 && $bytes[1] === 0x00) {\n if ($bytes[2] === 0x00) {\n $result = $bytes[3] >= 0x09 && $bytes[3] <= 0x7F;\n } else if ($bytes[2] > 0x00 && $bytes[2] < 0xFF) {\n $result = $bytes[3] > 0x00 && $bytes[3] <= 0xFF;\n }\n }\n }\n }\n }\n }\n }\n return $result;\n }",
"function decode_base64($sData){\n $sBase64 = strtr($sData, '-_', '+/');\n return base64_decode($sBase64);\n }",
"function base64Decode($scrambled) {\n\n // Initialise output variable\n\n $output = \"\";\n\n \n\n // Do encoding\n\n $output = base64_decode($scrambled);\n\n \n\n // Return the result\n\n return $output;\n\n}",
"function COM_string_decode($string,$length=-1) {\r\n\t$value = trim(preg_replace('/[^\\w\\d\\.\\,\\-\\& ]/', '', html_entity_decode($string)));\r\n\tif ($length > 0) {\r\n\t\t$value = substr($value,0,$length);\r\n\t}\r\n\treturn $value;\r\n}",
"public function decode($s_id){\n return $this->cryptomute->decrypt((string) $s_id, 10, true, $this->getPass(), $this->getIV());\n }",
"function decodeToken($token) {\n if (!$token) return;\n $token_ = base64_decode($token);\n $token_ = explode('|',$token_);\n if (count( $token_) < 2) {\n return '';\n }\n $tokenLeftLength = base64_decode($token_[1]);\n $token_ = $token_[0];\n\n $key = substr($token_, -$tokenLeftLength);\n\n return substr($key,0,strlen($key)-constant('token_length'));\n }",
"function base_decode($str, $base=62, $chars='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') {\n if(!isset($base)) $base = strlen($chars);\n $len = strlen($str);\n $val = 0;\n $arr = array_flip(str_split($chars));\n for($i = 0; $i < $len; ++$i) {\n $val = bcadd($val, bcmul($arr[$str[$i]], bcpow($base, $len-$i-1)));\n }\n return $val;\n}",
"public function packerThreeUnpack(string $data): string\n {\n // Separa em dois pedaços\n $partOne = mb_substr($data, 0, 15, \"utf-8\");\n $partTwo = mb_substr($data, 17, null, \"utf-8\");\n return base64_decode($partOne . $partTwo);\n }",
"private static function decodeFilterASCIIHexDecode($data){\n\t\t// intialize string to return\n\t\t$decoded = '';\n\t\t// all white-space characters shall be ignored\n\t\t$data = preg_replace('/[\\s]/', '', $data);\n\t\t// check for EOD character: GREATER-THAN SIGN (3Eh)\n\t\t$eod = strpos($data, '>');\n\t\tif($eod !== false){\n\t\t\t// remove EOD and extra data (if any)\n\t\t\t$data = substr($data, 0, $eod);\n\t\t\t$eod = true;\n\t\t}\n\t\t// get data length\n\t\t$data_length = strlen($data);\n\t\tif(($data_length % 2) != 0){\n\t\t\t// odd number of hexadecimal digits\n\t\t\tif($eod){\n\t\t\t\t// EOD shall behave as if a 0 (zero) followed the last digit\n\t\t\t\t$data = substr($data, 0, -1) . '0' . substr($data, -1);\n\t\t\t} else {\n\t\t\t\t$this->Error('decodeASCIIHex: invalid code');\n\t\t\t}\n\t\t}\n\t\t// check for invalid characters\n\t\tif(preg_match('/[^a-fA-F\\d]/', $data) > 0){\n\t\t\t$this->Error('decodeASCIIHex: invalid code');\n\t\t}\n\t\t// get one byte of binary data for each pair of ASCII hexadecimal digits\n\t\t$decoded = pack('H*', $data);\n\t\treturn $decoded;\n\t}",
"function read_string(&$payload) {\n $length = read_uint32($payload);\n $string = \\substr($payload, 0, $length);\n $payload = \\substr($payload, $length);\n\n return $string;\n}",
"protected function decodeChunked($str)\n {\n for ($res = ''; !empty($str); $str = trim($str)) {\n $pos = strpos($str, \"\\r\\n\");\n $len = hexdec(substr($str, 0, $pos));\n $res.= substr($str, $pos + 2, $len);\n $str = substr($str, $pos + 2 + $len);\n }\n return $res;\n }",
"protected function getItoa64() {}",
"protected function getItoa64() {}",
"function str2dec($string)\n {\n // reverse string 0x'121314'=> 0x'141312'\n $str = strrev($string);\n $dec = 0;\n\n // foreach byte calculate decimal value multiplied by power of 256^$i\n for ($i = 0; $i < strlen($string); $i++) {\n // take a byte, get ascii value, multiply by 256^(0,1,...n where n=length-1) and add to $dec\n $dec += ord(substr($str, $i, 1)) * pow(256, $i);\n }\n\n return $dec;\n }",
"function decode($str)\n {\n $str = $this->reduce_string($str);\n\n switch (strtolower($str)) {\n case 'true':\n return true;\n\n case 'false':\n return false;\n\n case 'null':\n return null;\n\n default:\n $m = array();\n\n if (is_numeric($str)) {\n // Lookie-loo, it's a number\n\n // This would work on its own, but I'm trying to be\n // good about returning integers where appropriate:\n // return (float)$str;\n\n // Return float or int, as appropriate\n return ((float)$str == (integer)$str)\n ? (integer)$str\n : (float)$str;\n\n } elseif (preg_match('/^(\"|\\').*(\\1)$/s', $str, $m) && $m[1] == $m[2]) {\n // STRINGS RETURNED IN UTF-8 FORMAT\n $delim = substr($str, 0, 1);\n $chrs = substr($str, 1, -1);\n $utf8 = '';\n $strlen_chrs = strlen($chrs);\n\n for ($c = 0; $c < $strlen_chrs; ++$c) {\n\n $substr_chrs_c_2 = substr($chrs, $c, 2);\n $ord_chrs_c = ord($chrs{$c});\n\n switch (true) {\n case $substr_chrs_c_2 == '\\b':\n $utf8 .= chr(0x08);\n ++$c;\n break;\n case $substr_chrs_c_2 == '\\t':\n $utf8 .= chr(0x09);\n ++$c;\n break;\n case $substr_chrs_c_2 == '\\n':\n $utf8 .= chr(0x0A);\n ++$c;\n break;\n case $substr_chrs_c_2 == '\\f':\n $utf8 .= chr(0x0C);\n ++$c;\n break;\n case $substr_chrs_c_2 == '\\r':\n $utf8 .= chr(0x0D);\n ++$c;\n break;\n\n case $substr_chrs_c_2 == '\\\\\"':\n case $substr_chrs_c_2 == '\\\\\\'':\n case $substr_chrs_c_2 == '\\\\\\\\':\n case $substr_chrs_c_2 == '\\\\/':\n if (($delim == '\"' && $substr_chrs_c_2 != '\\\\\\'') ||\n ($delim == \"'\" && $substr_chrs_c_2 != '\\\\\"')) {\n $utf8 .= $chrs{++$c};\n }\n break;\n\n case preg_match('/\\\\\\u[0-9A-F]{4}/i', substr($chrs, $c, 6)):\n // single, escaped unicode character\n $utf16 = chr(hexdec(substr($chrs, ($c + 2), 2)))\n . chr(hexdec(substr($chrs, ($c + 4), 2)));\n $utf8 .= $this->utf162utf8($utf16);\n $c += 5;\n break;\n\n case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F):\n $utf8 .= $chrs{$c};\n break;\n\n case ($ord_chrs_c & 0xE0) == 0xC0:\n // characters U-00000080 - U-000007FF, mask 110XXXXX\n //see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8\n $utf8 .= substr($chrs, $c, 2);\n ++$c;\n break;\n\n case ($ord_chrs_c & 0xF0) == 0xE0:\n // characters U-00000800 - U-0000FFFF, mask 1110XXXX\n // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8\n $utf8 .= substr($chrs, $c, 3);\n $c += 2;\n break;\n\n case ($ord_chrs_c & 0xF8) == 0xF0:\n // characters U-00010000 - U-001FFFFF, mask 11110XXX\n // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8\n $utf8 .= substr($chrs, $c, 4);\n $c += 3;\n break;\n\n case ($ord_chrs_c & 0xFC) == 0xF8:\n // characters U-00200000 - U-03FFFFFF, mask 111110XX\n // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8\n $utf8 .= substr($chrs, $c, 5);\n $c += 4;\n break;\n\n case ($ord_chrs_c & 0xFE) == 0xFC:\n // characters U-04000000 - U-7FFFFFFF, mask 1111110X\n // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8\n $utf8 .= substr($chrs, $c, 6);\n $c += 5;\n break;\n\n }\n\n }\n\n return $utf8;\n\n } elseif (preg_match('/^\\[.*\\]$/s', $str) || preg_match('/^\\{.*\\}$/s', $str)) {\n // array, or object notation\n\n if ($str{0} == '[') {\n $stk = array(SERVICES_JSON_IN_ARR);\n $arr = array();\n } else {\n if ($this->use & SERVICES_JSON_LOOSE_TYPE) {\n $stk = array(SERVICES_JSON_IN_OBJ);\n $obj = array();\n } else {\n $stk = array(SERVICES_JSON_IN_OBJ);\n $obj = new stdClass();\n }\n }\n\n array_push($stk, array('what' => SERVICES_JSON_SLICE,\n 'where' => 0,\n 'delim' => false));\n\n $chrs = substr($str, 1, -1);\n $chrs = $this->reduce_string($chrs);\n\n if ($chrs == '') {\n if (reset($stk) == SERVICES_JSON_IN_ARR) {\n return $arr;\n\n } else {\n return $obj;\n\n }\n }\n\n //print(\"\\nparsing {$chrs}\\n\");\n\n $strlen_chrs = strlen($chrs);\n\n for ($c = 0; $c <= $strlen_chrs; ++$c) {\n\n $top = end($stk);\n $substr_chrs_c_2 = substr($chrs, $c, 2);\n\n if (($c == $strlen_chrs) || (($chrs{$c} == ',') && ($top['what'] == SERVICES_JSON_SLICE))) {\n // found a comma that is not inside a string, array, etc.,\n // OR we've reached the end of the character list\n $slice = substr($chrs, $top['where'], ($c - $top['where']));\n array_push($stk, array('what' => SERVICES_JSON_SLICE, 'where' => ($c + 1), 'delim' => false));\n //print(\"Found split at {$c}: \".substr($chrs, $top['where'], (1 + $c - $top['where'])).\"\\n\");\n\n if (reset($stk) == SERVICES_JSON_IN_ARR) {\n // we are in an array, so just push an element onto the stack\n array_push($arr, $this->decode($slice));\n\n } elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {\n // we are in an object, so figure\n // out the property name and set an\n // element in an associative array,\n // for now\n $parts = array();\n \n if (preg_match('/^\\s*([\"\\'].*[^\\\\\\][\"\\'])\\s*:\\s*(\\S.*),?$/Uis', $slice, $parts)) {\n // \"name\":value pair\n $key = $this->decode($parts[1]);\n $val = $this->decode($parts[2]);\n\n if ($this->use & SERVICES_JSON_LOOSE_TYPE) {\n $obj[$key] = $val;\n } else {\n $obj->$key = $val;\n }\n } elseif (preg_match('/^\\s*(\\w+)\\s*:\\s*(\\S.*),?$/Uis', $slice, $parts)) {\n // name:value pair, where name is unquoted\n $key = $parts[1];\n $val = $this->decode($parts[2]);\n\n if ($this->use & SERVICES_JSON_LOOSE_TYPE) {\n $obj[$key] = $val;\n } else {\n $obj->$key = $val;\n }\n }\n\n }\n\n } elseif ((($chrs{$c} == '\"') || ($chrs{$c} == \"'\")) && ($top['what'] != SERVICES_JSON_IN_STR)) {\n // found a quote, and we are not inside a string\n array_push($stk, array('what' => SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c}));\n //print(\"Found start of string at {$c}\\n\");\n\n } elseif (($chrs{$c} == $top['delim']) &&\n ($top['what'] == SERVICES_JSON_IN_STR) &&\n ((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\\\'))) % 2 != 1)) {\n // found a quote, we're in a string, and it's not escaped\n // we know that it's not escaped becase there is _not_ an\n // odd number of backslashes at the end of the string so far\n array_pop($stk);\n //print(\"Found end of string at {$c}: \".substr($chrs, $top['where'], (1 + 1 + $c - $top['where'])).\"\\n\");\n\n } elseif (($chrs{$c} == '[') &&\n in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {\n // found a left-bracket, and we are in an array, object, or slice\n array_push($stk, array('what' => SERVICES_JSON_IN_ARR, 'where' => $c, 'delim' => false));\n //print(\"Found start of array at {$c}\\n\");\n\n } elseif (($chrs{$c} == ']') && ($top['what'] == SERVICES_JSON_IN_ARR)) {\n // found a right-bracket, and we're in an array\n array_pop($stk);\n //print(\"Found end of array at {$c}: \".substr($chrs, $top['where'], (1 + $c - $top['where'])).\"\\n\");\n\n } elseif (($chrs{$c} == '{') &&\n in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {\n // found a left-brace, and we are in an array, object, or slice\n array_push($stk, array('what' => SERVICES_JSON_IN_OBJ, 'where' => $c, 'delim' => false));\n //print(\"Found start of object at {$c}\\n\");\n\n } elseif (($chrs{$c} == '}') && ($top['what'] == SERVICES_JSON_IN_OBJ)) {\n // found a right-brace, and we're in an object\n array_pop($stk);\n //print(\"Found end of object at {$c}: \".substr($chrs, $top['where'], (1 + $c - $top['where'])).\"\\n\");\n\n } elseif (($substr_chrs_c_2 == '/*') &&\n in_array($top['what'], array(SERVICES_JSON_SLICE, SERVICES_JSON_IN_ARR, SERVICES_JSON_IN_OBJ))) {\n // found a comment start, and we are in an array, object, or slice\n array_push($stk, array('what' => SERVICES_JSON_IN_CMT, 'where' => $c, 'delim' => false));\n $c++;\n //print(\"Found start of comment at {$c}\\n\");\n\n } elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == SERVICES_JSON_IN_CMT)) {\n // found a comment end, and we're in one now\n array_pop($stk);\n $c++;\n\n for ($i = $top['where']; $i <= $c; ++$i)\n $chrs = substr_replace($chrs, ' ', $i, 1);\n\n //print(\"Found end of comment at {$c}: \".substr($chrs, $top['where'], (1 + $c - $top['where'])).\"\\n\");\n\n }\n\n }\n\n if (reset($stk) == SERVICES_JSON_IN_ARR) {\n return $arr;\n\n } elseif (reset($stk) == SERVICES_JSON_IN_OBJ) {\n return $obj;\n\n }\n\n }\n }\n }",
"public function decodeRawTransaction($hexString);",
"public static function unpackInt64Hex($data) {\n\t\t//return hex number string\n\t\t$tokens = unpack(\"H*\", strrev($data));\n\t\treturn $tokens[1];\n\t}",
"private static function decodeBinary ($input) {\n \n $content = ''; \n $chunks = explode (\"\\n\", $input);\n \n foreach ($chunks as $chunk) {\n $content .= base64_decode (trim ($chunk));\n }\n \n return $content;\n }",
"protected function dbDecode($value)\n {\n $decodedValue = base64_decode($value);\n if (false === $decodedValue) {\n throw new Exception\\StorageException('Error decoding value');\n }\n \n return $decodedValue;\n }"
] | [
"0.7243656",
"0.7161796",
"0.6729308",
"0.64577985",
"0.64366245",
"0.64254874",
"0.636153",
"0.6198241",
"0.60867786",
"0.6041026",
"0.59015214",
"0.5849243",
"0.5808985",
"0.5790852",
"0.5704809",
"0.56872135",
"0.5678966",
"0.56746227",
"0.5662673",
"0.5658981",
"0.5657274",
"0.5653711",
"0.56391364",
"0.5603994",
"0.5587955",
"0.5523583",
"0.550272",
"0.5486641",
"0.54797846",
"0.5469625",
"0.54541796",
"0.54355586",
"0.5407423",
"0.54044586",
"0.54004925",
"0.5393553",
"0.5382643",
"0.53765255",
"0.53731656",
"0.53715503",
"0.5370243",
"0.53671604",
"0.5350162",
"0.53473824",
"0.5335222",
"0.5308486",
"0.53047943",
"0.5290842",
"0.5252278",
"0.5235045",
"0.523078",
"0.5221262",
"0.52198935",
"0.52165705",
"0.5208724",
"0.5192093",
"0.51717865",
"0.5157378",
"0.5157362",
"0.51531553",
"0.5142662",
"0.51381487",
"0.51381487",
"0.51381487",
"0.51381487",
"0.51381487",
"0.51368564",
"0.5133598",
"0.51324946",
"0.51269877",
"0.5121012",
"0.51189953",
"0.5116765",
"0.5111486",
"0.5108317",
"0.5103413",
"0.50996786",
"0.5096972",
"0.50941175",
"0.5093594",
"0.5091387",
"0.5086993",
"0.5085393",
"0.5073988",
"0.50702214",
"0.506791",
"0.5064799",
"0.5046353",
"0.50447035",
"0.5034304",
"0.50324863",
"0.5023051",
"0.50226665",
"0.50226665",
"0.5017762",
"0.5013914",
"0.49953923",
"0.4988499",
"0.49849224",
"0.49843308"
] | 0.7620079 | 0 |
In this action the page definitition with the given id is loaded, its members set to new values from posted data and saved. Then the PageDefinititionHints list is updated with new values from posted data. | function doAction() {
try {
// Load the page definitition ...
$pageDefinition = PageDefinition::fetch($this->context,
Request::post("page_definition_id", Request::TYPE_INTEGER));
// ... set the members ...
$pageDefinition->title = Request::post(
"label", Request::TYPE_STRING, new Str(""));
$pageDefinition->description = Request::post(
"description", Request::TYPE_STRING, new Str(""));
$pageDefinition->action = Request::post(
"action", Request::TYPE_STRING, new Str(""));
$pageDefinition->configOnly = Request::post(
"admin_only", Request::TYPE_BOOLEAN);
$pageDefinition->typeSet = Request::post(
"type_set", Request::TYPE_INTEGER);
$pageDefinition->defaultTabId = Request::post(
"default_tab_id", Request::TYPE_INTEGER, -1);
// ... and update the page definitition.
$res = $pageDefinition->update();
// Load the PageDefinititionHints::PARENT_PAGE_DEFINITION_COUNT
// list ...
$hnts = new PageDefinitionHints($this->context,
$pageDefinition->id,
PageDefinitionHints::PARENT_PAGE_DEFINITION_COUNT);
// ... get the new values ...
foreach ($hnts as $k=>$v) {
$dat = $_POST["hint{$k}"];
$hnts[$k]->maxNoOfChildren =
is_numeric($dat) ? intval($dat) : NULL;
}
// ... and update the list.
$hnts->update();
// Set action result.
$this->setResult(self::SUCCESS);
} catch(ApplicationException $e) {
$this->setResult(self::FAIL, $e, $pageDefinition);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function add_edited_page_to_xml($piecemakerId, $pageId){\n\t\t global $wpdb;\n\n\t\t\t$tempPages = $this->xml_to_table($piecemakerId);\n\t\t\t\n\t\t\t$tempPages['allPages']['type'][$pageId] = $_POST['typeOur'];\n\t\t\t\n\t\t\t\n\n\t\t\tif($tempPages['allPages']['type'][$pageId] == \"image\") {\n\t\t\t\t$tempPages['allPages']['slideTitle'][$pageId] = trim($_POST['imageTitle']);\n\t\t\t\t$tempPages['allPages']['slideText'][$pageId] = trim($_POST['slideText']);\n\t\t\t\t$tempPages['allPages']['hyperlinkURL'][$pageId] = $_POST['hyperlinkURL'];\n\t\t\t\t$tempPages['allPages']['hyperlinkTarget'][$pageId] = $_POST['hyperlinkTarget'];\n\t\t\t\t$tempPages['allPages']['videoWidth'][$pageId] = \"\";\n\t\t\t\t$tempPages['allPages']['videoHeight'][$pageId] = \"\";\n\t\t\t\t$tempPages['allPages']['autoplay'][$pageId] = \"\";\n\t\t\t\t$tempPages['allPages']['large'][$pageId] = \"\";\n\t\t\t} elseif($tempPages['allPages']['type'][$pageId] == \"video\") {\n\t\t\t\t$tempPages['allPages']['slideTitle'][$pageId] = trim($_POST['videoTitle']);\n\t\t\t\t$tempPages['allPages']['videoWidth'][$pageId] = $_POST['videoWidth'];\n\t\t\t\t$tempPages['allPages']['videoHeight'][$pageId] = $_POST['videoHeight'];\n\t\t\t\t$tempPages['allPages']['autoplay'][$pageId] = $_POST['autoplay'];\n\t\t\t\t$tempPages['allPages']['large'][$pageId] = $_POST['large'];\n\t\t\t\t$tempPages['allPages']['slideText'][$pageId] = \"\";\n\t\t\t\t$tempPages['allPages']['hyperlinkURL'][$pageId] = \"\";\n\t\t\t\t$tempPages['allPages']['hyperlinkTarget'][$pageId] = \"\";\n\t\t\t} elseif($tempPages['allPages']['type'][$pageId] == \"flash\") {\n\t\t\t\t$tempPages['allPages']['slideTitle'][$pageId] = trim($_POST['flashTitle']);\n\t\t\t\t$tempPages['allPages']['large'][$pageId] = $_POST['large'];\n\t\t\t\t$tempPages['allPages']['slideText'][$pageId] = \"\";\n\t\t\t\t$tempPages['allPages']['hyperlinkURL'][$pageId] = \"\";\n\t\t\t\t$tempPages['allPages']['hyperlinkTarget'][$pageId] = \"\";\n\t\t\t\t$tempPages['allPages']['videoWidth'][$pageId] = \"\";\n\t\t\t\t$tempPages['allPages']['videoHeight'][$pageId] = \"\";\n\t\t\t\t$tempPages['allPages']['autoplay'][$pageId] = \"\";\n\t\t\t}\n\n\t\t\t$this->modify_xml($tempPages, $piecemakerId );\n\t}",
"function setAsStartPageObject()\n\t{\n\t\tglobal $ilCtrl, $lng;\n\n\t\t$this->checkPermission(\"write\");\n\n\t\tif (!is_array($_POST[\"imp_page_id\"]) || count($_POST[\"imp_page_id\"]) != 1)\n\t\t{\n\t\t\tilUtil::sendInfo($lng->txt(\"wiki_select_one_item\"), true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->object->removeImportantPage((int) $_POST[\"imp_page_id\"][0]);\n\t\t\t$this->object->setStartPage(ilWikiPage::lookupTitle((int) $_POST[\"imp_page_id\"][0]));\n\t\t\t$this->object->update();\n\t\t\tilUtil::sendSuccess($this->lng->txt(\"msg_obj_modified\"),true);\n\t\t}\n\t\t$ilCtrl->redirect($this, \"editImportantPages\");\n\t}",
"public function setPageID(){/*ACTUALLY NOT DEFINED*/}",
"function editImportantPagesObject()\n\t{\n\t\tglobal $tpl, $ilToolbar, $ilTabs, $lng, $ilCtrl;\n\n\t\t$this->checkPermission(\"write\");\n\n\t\tilUtil::sendInfo($lng->txt(\"wiki_navigation_info\"));\n\t\t\n\t\t$ipages = ilObjWiki::_lookupImportantPagesList($this->object->getId());\n\t\t$ipages_ids = array();\n\t\tforeach ($ipages as $i)\n\t\t{\n\t\t\t$ipages_ids[] = $i[\"page_id\"];\n\t\t}\n\n\t\t// list pages\n\t\tinclude_once(\"./Modules/Wiki/classes/class.ilWikiPage.php\");\n\t\t$pages = ilWikiPage::getAllPages($this->object->getId());\n\t\t$options = array(\"\" => $lng->txt(\"please_select\"));\n\t\tforeach ($pages as $p)\n\t\t{\n\t\t\tif (!in_array($p[\"id\"], $ipages_ids))\n\t\t\t{\n\t\t\t\t$options[$p[\"id\"]] = ilUtil::shortenText($p[\"title\"], 60, true);\n\t\t\t}\n\t\t}\n\t\tif (count($options) > 0)\n\t\t{\n\t\t\tinclude_once(\"./Services/Form/classes/class.ilSelectInputGUI.php\");\n\t\t\t$si = new ilSelectInputGUI($lng->txt(\"wiki_pages\"), \"imp_page_id\");\n\t\t\t$si->setOptions($options);\n\t\t\t$si->setInfo($lng->txt(\"\"));\n\t\t\t$ilToolbar->addInputItem($si);\n\t\t\t$ilToolbar->setFormAction($ilCtrl->getFormAction($this));\n\t\t\t$ilToolbar->addFormButton($lng->txt(\"add\"), \"addImportantPage\");\n\t\t}\n\n\n\t\t$ilTabs->activateTab(\"settings\");\n\t\t$this->setSettingsSubTabs(\"imp_pages\");\n\n\t\tinclude_once(\"./Modules/Wiki/classes/class.ilImportantPagesTableGUI.php\");\n\t\t$imp_table = new ilImportantPagesTableGUI($this, \"editImportantPages\");\n\n\t\t$tpl->setContent($imp_table->getHTML());\n\t}",
"function save_postdata( $post_id ) {\n\tglobal $post, $new_meta_boxes;\n\n\tif(isset($post) && $post->post_type=='page'){\n\t\t$new_meta_boxes=$GLOBALS['new_meta_boxes'];\n\t\tpexeto_save_meta_data($new_meta_boxes, $post_id);\n\t}\n}",
"function edit_page($piecemakerId, $pageId) {\n\t\t$this->add_page_form($piecemakerId, $pageId, \"true\");\n\t}",
"public function actionUpdate($id) {\n $data = array();\n $Pagemodel = $this->findModel($id);\n $updatePage = new UpdatePage();\n $model = $updatePage->findIdentity($id);\n \n ######################FILEUPLOAD MODEL############################\n if (strtolower($model->slug) == 'tips' ) {\n $modelImageUpload = new ImageUpload();\n $modelImageUpload->scenario = 'update-profile';\n }\n else\n {\n $modelImageUpload = '';\n }\n \n $userpost = Yii::$app->request->post('UpdatePage');\n if (isset($userpost) && !empty($userpost)) {\n if (Yii::$app->request->isAjax) {\n $Pagemodel->status = $userpost['status'];\n if ($Pagemodel->save()) {\n Yii::$app->session->setFlash('item', $Pagemodel->status . ' status set for selected page successfully.');\n } else {\n Yii::$app->session->setFlash('item', 'No status is set for selected page, please try again.');\n }\n die();\n }\n \n ###########################FILE UPLOAD ONLY FOR TIPS PAGE#################################################################################\n if (Yii::$app->request->isPost && strtolower($model->slug) == 'tips' ) {\n \n $modelImageUpload->imageUpload = UploadedFile::getInstance($modelImageUpload, 'imageUpload'); \n \n if ($modelImageUpload->imageUpload && $uploadedFileNameVal = $modelImageUpload->uploadfile()) {\n $model->image = $uploadedFileNameVal;\n }\n }\n #####################################################################################################################\n \n if ($model->load(Yii::$app->request->post()) && $model->updatePage($id)) {\n //return $this->redirect(['view', 'id' => $id]);\n Yii::$app->session->setFlash('item', 'Page has been updated successfully!');\n return $this->redirect(['index']);\n } else {\n $data['respmesg'] = \"Please enter valid values for all the fields.\";\n $data['class'] = \"alert-danger\";\n }\n } else {\n $model->setAttributes($Pagemodel->getAttributes());\n }\n return $this->render('update', [\n 'data' => $data,\n 'model' => $model,\n 'modelImageUpload' => $modelImageUpload\n ]);\n }",
"public function update(Requests\\PageRequest $request, $id)\n {\n if (! $page = Page::find($id)) {\n return redirect()\n ->route('admin.pages.index')\n ->with('error', 'Could not find that page.');\n }\n\n $home_content = array();\n// $home_content['home_content'] = $request->extra_content;\n $request->merge(['extra_content' => \\GuzzleHttp\\json_encode($request->extra_content)]);\n// dd($request->extra_content);\n// dd($request);\n\n\n // Set checkboxes that aren't checked (default value), if it's not set in the form.\n if (! $request->active) {\n $request->merge(['active' => 0]);\n }\n if (! $request->on_main_nav) {\n $request->merge(['on_main_nav' => 0]);\n }\n if (! $request->protected) {\n $request->merge(['protected' => 0]);\n }\n\n $meta = $page->meta ?: $page->meta()->getRelated();\n $meta->page()->associate($page);\n $meta->fill($request->all())->save();\n\n $extra = ($page->extra) ?: $page->extra()->getRelated();\n $extra->page()->associate($page);\n $extra->fill($request->all())->save();\n\n // Get the banners and sync with order\n if (! $request->banner_order) {\n $bannersPivotData = [];\n } else {\n $order = explode(',', $request->banner_order);\n $bannersPivotData = [];\n foreach ($order as $key => $ordering) {\n if (Banner::find($ordering)) {\n $bannersPivotData[$ordering]['order'] = $key + 1;\n }\n }\n }\n $page->banners()->sync($bannersPivotData);\n\n // Get the documents and sync with order\n if (! $request->document_order) {\n $documentsPivotData = [];\n } else {\n $order = explode(',', $request->document_order);\n $documentsPivotData = [];\n foreach ($order as $key => $ordering) {\n if (Media::documents()->find($ordering)) {\n $documentsPivotData[$ordering]['order'] = $key + 1;\n }\n }\n }\n $page->documents()->sync($documentsPivotData);\n\n // Get the images and sync with order\n if (! $request->image_order) {\n $imagesPivotData = [];\n } else {\n $order = explode(',', $request->image_order);\n $imagesPivotData = [];\n foreach ($order as $key => $ordering) {\n if (Media::images()->find($ordering)) {\n $imagesPivotData[$ordering]['order'] = $key + 1;\n }\n }\n }\n $page->images()->sync($imagesPivotData);\n\n // Sort out the fields for certain groups.\n $finalRequest = $this->finalRequestFields($request);\n\n if (! $page->update($finalRequest)) {\n return back()\n ->withInput()\n ->with('error', 'Failed to edited that page.');\n }\n\n if ($page->parent_id == 1) {\n return redirect()\n ->route('admin.pages.edit', $page->id)\n ->with('success', 'Edited that page.');\n }\n\n return redirect()\n ->route('admin.pages.edit', $page->id)\n ->with('success', 'Edited that page.');\n }",
"public function definition_after_data() {\n global $DB;\n\n $mform = $this->_form;\n\n // Check that we are updating a current customcert.\n if ($this->id) {\n // Get the pages for this customcert.\n if ($pages = $DB->get_records('customcert_pages', array('customcertid' => $this->id))) {\n // Loop through the pages.\n foreach ($pages as $p) {\n // Set the width.\n $element = $mform->getElement('pagewidth_' . $p->id);\n $element->setValue($p->width);\n // Set the height.\n $element = $mform->getElement('pageheight_' . $p->id);\n $element->setValue($p->height);\n // Set the margin.\n $element = $mform->getElement('pagemargin_' . $p->id);\n $element->setValue($p->margin);\n }\n }\n }\n }",
"function set_id( $id ){\n\t\t$this->id = $id;\n\t\t// this is add request. so number is 0\n\t\tif( $this->id == $this->id_base ){\n\t\t\t$this->number = 0;\n\t\t\t$this->is_new = true;\n\t\t}\n\t\t// parse number\n\t\telse{\n\t\t\t$this->number = str_replace($this->id_base.'-', '', $this->id);\n\n\t\t\t// load instance data\n\t\t\t$this->instance = jcf_field_settings_get( $this->id );\n\t\t\tif( !empty($this->instance) ){\n\t\t\t\t$this->slug = $this->instance['slug'];\n\t\t\t}\n\t\t}\n\t}",
"public static function on_definition_manager() {\n\t\t\n\t\t// Check Admin\n\t\tself::_check_admin();\n\t\t\n\t\t// Get Data\n\t\t$definition = Request::get(\"definition\");\n\t\t$class = ucfirst($definition).\"_Definition\";\n\t\t$obj = new $class();\n\t\t$id = Request::get(\"id\",\"int\");\n\t\t$entry = ORM::for_table($definition);\n\t\t\n\t\t// Load Entry if isnt is a update or create\n\t\t$entry = ($id>0)?$entry->find_one($id):$obj->create($entry->create(),Request::get(\"argument\",\"string\"));\n\t\t\n\t\t// Manager\n\t\t$body = HTML::header(1,I18n::_(\"definition.\".$definition.\".edit_entry\"));\n\t\t$body .= Helper::print_errors();\n\t\t\n\t\t// Open Body\n\t\t$body .= HTML::div_open(null,\"content\");\n\t\t$body .= HTML::form_open(Registry::get(\"request.referer\").\"?command=definition_update\",\"post\",array(\"enctype\"=>\"multipart/form-data\"));\n\t\t$body .= HTML::hidden(\"definition\",$definition);\n\t\t$body .= HTML::hidden(\"id\",$id);\n\t\t\n\t\t// Print Form Elements\n\t\tforeach($obj->blueprint as $field => $config) {\n\t\t\t\n\t\t\t// Merge Config with defaults\n\t\t\t$config = array_merge($obj->default_config,$config);\n\t\t\t\n\t\t\t// Get Field Name\n\t\t\t$name = $definition.\"[\".$field.\"]\";\n\t\t\t\n\t\t\t// Check for Visibility\n\t\t\tif(!$config[\"hidden\"]) {\n\t\t\t\t\n\t\t\t\t// Open Row\n\t\t\t\t$body .= HTML::div_open(null,\"row\");\n\t\t\t\t\n\t\t\t\t// Get Label and Name\n\t\t\t\t$label = ($config[\"label\"])?I18n::_(\"definition.\".$definition.\".field_\".$field):null;\n\t\t\t\t\n\t\t\t\t// Switch Field Type\n\t\t\t\tswitch($config[\"as\"]) {\n\t\t\t\t\t\n\t\t\t\t\t// Boolean\n\t\t\t\t\tcase \"boolean\" : {\n\t\t\t\t\t\t$body .= HTML::label($name,$label);\n\t\t\t\t\t\t$body .= HTML::div_open(null,\"radiogroup\");\n\t\t\t\t\t\t$body .= HTML::radio($name,1,I18n::_(\"definition.\".$definition.\".field_\".$field.\"_true\"),($entry->$field==1)?array(\"checked\"=>\"checked\"):array());\n\t\t\t\t\t\t$body .= HTML::radio($name,0,I18n::_(\"definition.\".$definition.\".field_\".$field.\"_false\"),($entry->$field==0)?array(\"checked\"=>\"checked\"):array());\n\t\t\t\t\t\t$body .= HTML::div_close();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Text Inputs\n\t\t\t\t\tcase \"number\":\n\t\t\t\t\tcase \"string\": $body .= HTML::text($name,$label,$entry->$field).HTML::br(); break;\n\t\t\t\t\t\n\t\t\t\t\t// Textareas\n\t\t\t\t\tcase \"html\": $body .= HTML::textarea($name,$label,$entry->$field,array(\"class\"=>\"hanya-editor-html\")); break;\n\t\t\t\t\tcase \"textile\": $body .= HTML::textarea($name,$label,$entry->$field,array(\"class\"=>\"hanya-editor-textile\")); break;\n\t\t\t\t\tcase \"markdown\": $body .= HTML::textarea($name,$label,$entry->$field,array(\"class\"=>\"hanya-editor-markdown\")); break;\n\t\t\t\t\tcase \"text\": $body .= HTML::textarea($name,$label,$entry->$field).HTML::br(); break;\n\t\t\t\t\t\n\t\t\t\t\t// Special\n\t\t\t\t\tcase \"time\": $body .= HTML::text($name,$label,$entry->$field,array(\"class\"=>\"hanya-timepicker\")).HTML::br(); break;\n\t\t\t\t\tcase \"date\": $body .= HTML::text($name,$label,$entry->$field,array(\"class\"=>\"hanya-datepicker\")).HTML::br(); break;\n\t\t\t\t\tcase \"selection\": $body .= HTML::select($name,$label,HTML::options($config[\"options\"],$entry->$field)).HTML::br(); break;\n\t\t\t\t\t\n\t\t\t\t\t// Reference Select\n\t\t\t\t\tcase \"reference\": {\n\t\t\t\t\t\t$data = array();\n\t\t\t\t\t\tforeach(ORM::for_table($config[\"definition\"])->find_many() as $item) {\n\t\t\t\t\t\t\t$data[$item->id] = $item->$config[\"field\"];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$body .= HTML::select($name,$label,HTML::options($data,$entry->$field)).HTML::br();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// File Select\n\t\t\t\t\tcase \"file\": {\n\t\t\t\t\t\t$data = array();\n\t\t\t\t\t\tif($config[\"blank\"]) {\n\t\t\t\t\t\t\t$data = array(\"\"=>\"---\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$content = Disk::read_directory(\"uploads/\".$config[\"folder\"]);\n\t\t\t\t\t\t$files = Disk::get_all_files($content);\n\t\t\t\t\t\t$directories = array(\"/\"=>\"/\");\n\t\t\t\t\t\tforeach(Disk::get_all_directories($content) as $dir) {\n\t\t\t\t\t\t\t$directories[\"/\".$dir] = \"/\".$dir;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tforeach($files as $file) {\n\t\t\t\t\t\t\t$data[$file] = $file;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($config[\"upload\"]) {\n\t\t\t\t\t\t\t$upload = HTML::br().I18n::_(\"system.definition.upload_file\").HTML::file($definition.\"[\".$field.\"_upload]\");\n\t\t\t\t\t\t\t$upload .= I18n::_(\"system.definition.upload_file_to\").HTML::select($definition.\"[\".$field.\"_upload_dir]\",null,HTML::options($directories));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$upload = \"\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$body .= HTML::label($name,$label).I18n::_(\"system.definition.select_file\");\n\t\t\t\t\t\t$body .= HTML::select($name,null,HTML::options($data,$entry->$field)).$upload.HTML::br();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t// Open Row\n\t\t\t\t$body .= HTML::div_open(null,\"hidden-row\");\n\t\t\t\t\n\t\t\t\t// Render Hidden Field\n\t\t\t\t$body .= HTML::hidden($name,$entry->$field);\n\t\t\t}\n\t\t\t\n\t\t\t// Close Row\n\t\t\t$body .= HTML::div_close();\n\t\t}\n\t\t\n\t\t// Close Manager\n\t\t$body .= HTML::submit(I18n::_(\"system.definition.save\"));\n\t\t$body .= HTML::form_close();\n\t\t$body .= HTML::div_close();\n\t\t\n\t\t// End\n\t\techo Render::file(\"system/views/definition/manager.html\",array(\"body\"=>$body)); exit;\n\t}",
"function save_metabox_data($post_id){\t\n\t\t\t\n\t\tupdate_post_meta($post_id,'wiki-contributons-status',$_REQUEST['wiki-tabel-shownorhide']);\n\t\t\n\t}",
"function set_page_vars($id) {\n global $_PAGE_TITLE, $_IMAGE_URL, $_PAGE_ID;\n\n $json = file_get_contents(\"http://1504.nl/api/?t=page&a=get&i=\" . $id);\n $json = Page_helper::remove_utf8_bom($json);\n $page = json_decode($json);\n // print_r($page);\n\n $_PAGE_ID = $page[0]->id;\n $_PAGE_TITLE = $page[0]->name;\n $_IMAGE_URL = $page[0]->image_url;\n }",
"function admin_edit($id=null)\n\t{\n\t $id = base64_decode($id);\n\t $this->set('pagetitle',\"Edit Page\");\t\n\t \n\t $this->Page->id = $id;\n\t if($id)\n\t {\n\t\t$count=$this->Page->find('count',array('conditions' => array('Page.id' => $id))); \n if($count >0)\n\t\t{\n\t\t if(!empty($this->data))\n\t\t {\n\t\t\t$this->data['Page']['name']=$this->Page->field('name');\n\t\t\tif($this->Page->save($this->data))\n\t\t\t{ \t\t\n\t\t\t $this->Session->setFlash('The Page has been saved','message/green');\n\t\t\t $this->redirect(array('action' => 'index'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t $this->Session->setFlash('The Page could not be saved. Please, try again.','message/yellow');\n\t\t\t}\n\t\t }\n\t\t if(empty($this->data))\n\t\t {\n\t\t\t$this->data = $this->Page->read(null, $id);\n\t\t }\n\t\t}\n\t\telse\n\t\t{\n\t\t $this->Session->setFlash('Invalid Page', 'message/yellow');\n\t\t $this->redirect(array('action' => 'index'));\n\t\t}\n\t } \n\t}",
"public static function on_definition_update() {\n\t\t\n\t\t// Check Admin\n\t\tself::_check_admin();\n\t\t\n\t\t// Get Data\n\t\t$definition = Request::post(\"definition\");\n\t\t$id = Request::post(\"id\",\"int\");\n\t\t$data = Request::post($definition,\"array\");\n\t\t$class = $class= ucfirst($definition).\"_Definition\";\n\t\t$obj = new $class();\n\t\t$entry = ORM::for_table($definition);\n\t\t\n\t\t// Check for new Entry\n\t\tif($id > 0) {\n\t\t\t$is_new = false;\n\t\t\t$entry = $entry->find_one($id);\n\t\t} else {\n\t\t\t$is_new = true;\n\t\t\t$entry = $entry->create();\n\t\t}\n\t\t\n\t\t// Append Data\n\t\tforeach($data as $field => $value) {\n\t\t\tif(array_key_exists($field,$obj->blueprint)) {\n\t\t\t\t$entry->$field = stripslashes($value);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check For Special Fields\n\t\tforeach($obj->blueprint as $field => $config) {\n\t\t\tswitch($config[\"as\"]) {\n\t\t\t\tcase \"file\" : {\n\t\t\t\t\t$target_dir = Registry::get(\"system.path\").\"uploads/\".$config[\"folder\"].$data[$field.\"_upload_dir\"];\n\t\t\t\t\tif($config[\"upload\"] && $_FILES[$definition][\"size\"][$field.\"_upload\"] > 0 && Disk::has_directory($target_dir)) {\n\t\t\t\t\t\t$filename = $_FILES[$definition][\"name\"][$field.\"_upload\"];\n\t\t\t\t\t\t$tmpfile = $_FILES[$definition][\"tmp_name\"][$field.\"_upload\"];\n\t\t\t\t\t\t$newfile = $target_dir.\"/\".$filename;\n\t\t\t\t\t\tDisk::copy($tmpfile,$newfile);\n\t\t\t\t\t\t$entry->$field = $filename;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tunset($data[$field.\"_upload\"]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Do Ordering\n\t\tif($obj->orderable && $is_new) {\n\t\t\t$last_entry = ORM::for_table($definition)->select(\"ordering\")->order_by_desc(\"ordering\");\n\t\t\tforeach($obj->groups as $group) {\n\t\t\t\tif($entry->$group) {\n\t\t\t\t\t$last_entry = $last_entry->where($group,$entry->$group);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$last_entry = $last_entry->limit(1)->find_one();\n\t\t\tif($last_entry) {\n\t\t\t\t$entry->ordering = $last_entry->ordering+1;\n\t\t\t} else {\n\t\t\t\t$entry->ordering = 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Validate and Save\n\t\tif(self::_validate($entry,$obj->blueprint,$obj->default_config)) {\n\t\t\t$entry->save();\n\t\t} else {\n\t\t\tdie(\"Validation failed\");\n\t\t}\n\t\t\n\t\t// Dispatch before_update Event\n\t\t$entry = $obj->before_update($entry);\n\t\t\n\t\t// Redirect\n\t\techo Render::file(\"system/views/shared/close.html\"); exit;\n\t}",
"public function onAfterEdit($module, $page, $id) {\nglobal $_LW;\nif ($page=='events_edit' || $page=='events_sub_edit') { // if loading data for the events editor form\n\tif (!empty($_LW->is_first_load) && !empty($id)) { // if loading the editor for the first time for an existing item\n\t\tif ($fields=$_LW->getCustomFields($module, $id)) { // getCustomFields($module, $id) gets any previously saved custom data for the item of this $module and $id\n\t\t\tforeach($fields as $key=>$val) { // add previously saved data to POST data so it prepopulates in the editor form\n\t\t\t\t$_LW->_POST[$key]=$val;\n\t\t\t};\n\t\t};\n\t};\n};\nif ($page=='profiles_edit' && $_LW->_GET['tid']==1) { // if loading the profiles editor, but only for profile type with ID = 1\n\t// do something for this type only\n};\n}",
"function insert_default_prefs($id){\n\t\t\t\tglobal $sql, $aa, $plugintable, $eArrayStorage;\n\t\t\t\t$plugintable\t= \"pcontent\";\n\t\t\t\t$plugindir\t\t= e_PLUGIN.\"content/\";\n\t\t\t\tunset($content_pref, $tmp);\n\t\t\t\t\n\t\t\t\tif(!is_object($aa)){\n\t\t\t\t\trequire_once($plugindir.\"handlers/content_class.php\");\n\t\t\t\t\t$aa = new content;\n\t\t\t\t}\n\n\t\t\t\t$content_pref = $aa -> ContentDefaultPrefs($id);\n\t\t\t\t$tmp = $eArrayStorage->WriteArray($content_pref);\n\n\t\t\t\t$sql -> db_Update($plugintable, \"content_pref='$tmp' WHERE content_id='$id' \");\n\t\t}",
"protected function setMemberDefaults(){\n parent::setMemberDefaults();\n if(!$this->id) $this->id = UniqId::get(\"faq-\");\n }",
"public function modifiertitre() {\n $idPage = $this->input->post('idPage');\n $titre = ($this->input->post('titre'));\n $this->admin_model->updatePage($titre, $idPage, \"titre\");\n }",
"function pre_load_edit_page() {\r\n global $wpi_settings;\r\n\r\n if (!empty($_REQUEST['wpi']) && !empty($_REQUEST['wpi']['existing_invoice'])) {\r\n $id = (int) $_REQUEST['wpi']['existing_invoice']['invoice_id'];\r\n if (!empty($id) && !empty($_REQUEST['action'])) {\r\n self::process_invoice_actions($_REQUEST['action'], $id);\r\n }\r\n }\r\n\r\n /** Screen Options */\r\n if (function_exists('add_screen_option')) {\r\n add_screen_option('layout_columns', array('max' => 2, 'default' => 2));\r\n }\r\n\r\n //** Default Help items */\r\n $contextual_help['Creating New Invoice'][] = '<h3>' . __('Creating New Invoice', WPI) . '</h3>';\r\n $contextual_help['Creating New Invoice'][] = '<p>' . __(\"Begin typing the recipient's email into the input box, or double-click to view list of possible options.\", WPI) . '</p>';\r\n $contextual_help['Creating New Invoice'][] = '<p>' . __(\"For new prospects, type in a new email address.\", WPI) . '</p>';\r\n\r\n //** Hook this action is you want to add info */\r\n $contextual_help = apply_filters('wpi_edit_page_help', $contextual_help);\r\n\r\n do_action('wpi_contextual_help', array('contextual_help' => $contextual_help));\r\n }",
"private function set_PageData() {\n\n\t\t\t// We have an existing page\n\t\t\t// should feed a wp_update_post not wp_insert_post\n\t\t\t//\n\t\t\tif ( $this->page_exists() ) {\n\t\t\t\t$this->pageData = array(\n\t\t\t\t\t'ID' => $this->linked_postid,\n\t\t\t\t\t'slp_notes' => 'pre-existing page',\n\t\t\t\t);\n\n\t\t\t\t// No page yet, default please.\n\t\t\t\t//\n\t\t\t} else {\n\t\t\t\t$this->pageData = array(\n\t\t\t\t\t'ID' => '',\n\t\t\t\t\t'post_type' => SLPlus::locationPostType,\n\t\t\t\t\t'post_status' => $this->pageDefaultStatus,\n\t\t\t\t\t'post_title' => ( empty( $this->store ) ? 'SLP Location #' . $this->id : $this->store ),\n\t\t\t\t\t'post_content' => '',\n\t\t\t\t\t'slp_notes' => 'new page',\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Apply our location page data filters.\n\t\t\t// This is what allows add-ons to tweak page data.\n\t\t\t//\n\t\t\t// FILTER: slp_location_page_attributes\n\t\t\t//\n\t\t\t$this->pageData = apply_filters( 'slp_location_page_attributes', $this->pageData );\n\n\t\t\treturn $this->pageData;\n\t\t}",
"function bfa_ata_save_postdata( $post_id ) {\r\n\r\n /* verify this came from the our screen and with proper authorization,\r\n because save_post can be triggered at other times */\r\n// Before using $_POST['value'] \r\nif (isset($_POST['bfa_ata_noncename'])) \r\n{ \r\n\r\n\tif ( !wp_verify_nonce( $_POST['bfa_ata_noncename'], plugin_basename(__FILE__) )) {\r\n\t\treturn $post_id;\r\n\t}\r\n\r\n\tif ( 'page' == $_POST['post_type'] ) {\r\n\t\tif ( !current_user_can( 'edit_page', $post_id ))\r\n\t\t\treturn $post_id;\r\n\t} else {\r\n\t\tif ( !current_user_can( 'edit_post', $post_id ))\r\n\t\t\treturn $post_id;\r\n\t\t}\r\n\r\n\t// Save the data\r\n\t\r\n\t$new_body_title = $_POST['bfa_ata_body_title'];\r\n\t$new_display_body_title = !isset($_POST[\"bfa_ata_display_body_title\"]) ? NULL : $_POST[\"bfa_ata_display_body_title\"];\r\n\t$new_body_title_multi = $_POST['bfa_ata_body_title_multi'];\r\n\t$new_meta_title = $_POST['bfa_ata_meta_title'];\r\n\t$new_meta_keywords = $_POST['bfa_ata_meta_keywords'];\r\n\t$new_meta_description = $_POST['bfa_ata_meta_description'];\r\n\r\n\tupdate_post_meta($post_id, 'bfa_ata_body_title', $new_body_title);\r\n\tupdate_post_meta($post_id, 'bfa_ata_display_body_title', $new_display_body_title);\r\n\tupdate_post_meta($post_id, 'bfa_ata_body_title_multi', $new_body_title_multi);\r\n\tupdate_post_meta($post_id, 'bfa_ata_meta_title', $new_meta_title);\r\n\tupdate_post_meta($post_id, 'bfa_ata_meta_keywords', $new_meta_keywords);\r\n\tupdate_post_meta($post_id, 'bfa_ata_meta_description', $new_meta_description);\r\n\r\n}}",
"public function postProcess()\n {\n $pageId = Tools::getValue('id_page');\n if (Tools::isSubmit('submitEditCustomHTMLPage') || Tools::isSubmit('submitEditCustomHTMLPageAndStay')) {\n if ($pageId == 'new')\n $this->processAdd();\n else\n $this->processUpdate();\n }\n else if (Tools::isSubmit('status'.$this->table)) {\n $this->toggleStatus();\n }\n else if (Tools::isSubmit('delete'.$this->table)) {\n $this->processDelete();\n }\n }",
"public function information_update() {\r\n $this->check_permission(16);\r\n $content_data['add'] = $this->check_page_action(16, 'add');\r\n $content_data['product_list'] = $this->get_product_list();\r\n $content_data['shift_list'] = $this->get_shift_list();\r\n $content_data['category_list'] = $this->get_category_list();\r\n $this->quick_page_setup(Settings_model::$db_config['adminpanel_theme'], 'adminpanel', $this->lang->line('information_update'), 'operation/information_update', 'header', 'footer', '', $content_data);\r\n }",
"public function edit($id){\t\n\t\tif($this->input->post('step')=='1'){\n\t\t\t\n\t\t\t$data = array(\n\t\t\t\t'name'=> $this->input->post('name'),\t\t\t\n\t\t\t\t'owner'=> $this->input->post('owner'),\t\t\n\t\t\t\t'address_line'=>$this->input->post('address_line'),\n\t\t\t\t'zip' =>$this->input->post('zip'),\n\t\t\t\t'fax'=>$this->input->post('fax'),\n\t\t\t\t'website'=>$this->input->post('website'),\n\t\t\t\t'working_start'=>$this->input->post('working_start'),\n\t\t\t\t'working_end'=>$this->input->post('working_end'),\n\t\t\t\t'since'=>$this->input->post('since'),\n\t\t\t\t'no_of_employees'=>$this->input->post('no_of_employees'),\n\t\t\t\t'email'=>$this->input->post('email')\n\t\t );\n\t\t}\n\t\tif($this->input->post('step')=='2'){\n\t\t\t\n\t\t\t$data = array(\n\t\t\t\t'description'=> $this->input->post('description'),\t\t\t\n\t\t );\n\t\t}\n\t\tif($this->input->post('step')=='3'){\n\t\t\t$other_info=array('facebook_url'=>$this->input->post('facebook_url'),'googleplus_url'=>$this->input->post('googleplus_url'),'twitter_url'=>$this->input->post('twitter_url'),'linkedin_url'=>$this->input->post('linkedin_url'),'youtube_url'=>$this->input->post('youtube_url'),'whatsup_contact_number'=>$this->input->post('whatsup_contact_number'));\n\t\t\t$other_info=serialize($other_info);\n\t\t\t$data = array(\t\n\t\t\t\t'other_info'=>$other_info\n\t\t\t);\n\t\t}\n\t\tif($this->input->post('step')=='4'){\n\t\t\t$city_id='0';\n\t\t\t$area_id='0';\n\t\t\tif($this->input->post('city')){\t\n\t\t\t\t$city_id=$this->cities_model->cityFindOrSave($this->input->post('city'));\n\t\t\t}\t\n\t\t\tif($this->input->post('area')){\n\t\t\t\t$area_id=$this->areas_model->areaFindOrSave($this->input->post('area'),$city_id);\n\t\t\t}\n\t\t\t$data = array(\n\t\t\t\t'city_name'=> $this->input->post('city_name'),\n\t\t\t\t'area_name'=> $this->input->post('area_name'),\n\t\t\t\t'city_id'=> $city_id,\t\t\t\t\n\t\t\t\t'area_id'=> $area_id,\n 'latitude'=> $this->input->post('latitude'),\n\t\t\t\t'longitude'=> $this->input->post('longitude')\t\n\t\t );\n\t\t}\n\t\tif($this->input->post('step')=='5'){\n\t\t\t$data = array(\n\t\t\t\t'description'=> $this->input->post('description'),\t\t\t\n\t\t );\n\t\t}\n\t\t$this->db->where('id', $id);\n\t\t$this->db->update('advertisements', $data);\n\t}",
"public function add_additional_page_settings($data){\n }",
"public function add_additional_page_settings($data){\n }",
"function a_edit() {\n\t\t$id = isset($_GET[\"id\"]) ? $_GET[\"id\"] : 0;\n\t\t$u=new Gestionnaire($id);\n\t\textract($u->data);\t\n\t\trequire $this->gabarit;\n\t}",
"public static function save($id = null) {\n global $lC_Database;\n\n $link = explode('/', $_GET['content_page'], 2);\n $group = (isset($_GET['group']) && $_GET['group'] != null) ? $_GET['group'] : $_GET['group_new'];\n\n if ( is_numeric($id) ) {\n $Qlayout = $lC_Database->query('update :table_templates_boxes_to_pages set templates_boxes_id = :templates_boxes_id, content_page = :content_page, boxes_group = :boxes_group, sort_order = :sort_order, page_specific = :page_specific where id = :id');\n $Qlayout->bindInt(':id', $id);\n } else {\n $Qlayout = $lC_Database->query('insert into :table_templates_boxes_to_pages (templates_boxes_id, templates_id, content_page, boxes_group, sort_order, page_specific) values (:templates_boxes_id, :templates_id, :content_page, :boxes_group, :sort_order, :page_specific)');\n $Qlayout->bindInt(':templates_id', $link[0]);\n }\n $Qlayout->bindInt(':templates_boxes_id', $_GET['box']);\n $Qlayout->bindTable(':table_templates_boxes_to_pages', TABLE_TEMPLATES_BOXES_TO_PAGES);\n $Qlayout->bindValue(':content_page', $link[1]);\n $Qlayout->bindValue(':boxes_group', $group);\n $Qlayout->bindInt(':sort_order', $_GET['sort_order']);\n $Qlayout->bindInt(':page_specific', ($_GET['page_specific'] == 'on') ? '1' : '0');\n $Qlayout->setLogging($_SESSION['module'], $id);\n $Qlayout->execute();\n\n if ( !$lC_Database->isError() ) {\n lC_Cache::clear('templates_' . $_GET['set'] . '_layout');\n\n return true;\n }\n\n return false;\n }",
"function wiki_edit_page($page_id, $title, $description, $notes, $hide_posts, $meta_keywords, $meta_description, $member = null, $edit_time = null, $add_time = null, $views = null, $null_is_literal = false)\n{\n if (is_null($edit_time)) {\n $edit_time = $null_is_literal ? null : time();\n }\n\n $pages = $GLOBALS['SITE_DB']->query_select('wiki_pages', array('*'), array('id' => $page_id), '', 1);\n if (!array_key_exists(0, $pages)) {\n warn_exit(do_lang_tempcode('MISSING_RESOURCE', 'wiki_page'));\n }\n $page = $pages[0];\n $_description = $page['description'];\n $_title = $page['title'];\n\n $log_id = log_it('WIKI_EDIT_PAGE', strval($page_id), get_translated_text($_title));\n if (addon_installed('actionlog')) {\n require_code('revisions_engine_database');\n $revision_engine = new RevisionEngineDatabase();\n $revision_engine->add_revision(\n 'wiki_page',\n strval($page_id),\n strval($page_id),\n get_translated_text($_title),\n get_translated_text($_description),\n $page['submitter'],\n $page['add_date'],\n $log_id\n );\n }\n\n $update_map = array(\n 'hide_posts' => $hide_posts,\n 'notes' => $notes,\n );\n\n $update_map['edit_date'] = $edit_time;\n if (!is_null($add_time)) {\n $update_map['add_date'] = $add_time;\n }\n if (!is_null($views)) {\n $update_map['wiki_views'] = $views;\n }\n if (!is_null($member)) {\n $update_map['submitter'] = $member;\n } else {\n $member = $page['submitter'];\n }\n\n require_code('attachments2');\n require_code('attachments3');\n\n $update_map += lang_remap('title', $_title, $title);\n $update_map += update_lang_comcode_attachments('description', $_description, $description, 'wiki_page', strval($page_id), null, $member);\n\n $GLOBALS['SITE_DB']->query_update('wiki_pages', $update_map, array('id' => $page_id), '', 1);\n\n require_code('seo2');\n seo_meta_set_for_explicit('wiki_page', strval($page_id), $meta_keywords, $meta_description);\n\n if (post_param_integer('send_notification', null) !== 0) {\n dispatch_wiki_page_notification($page_id, 'EDIT');\n }\n\n if ((addon_installed('commandr')) && (!running_script('install')) && (!get_mass_import_mode())) {\n require_code('resource_fs');\n generate_resource_fs_moniker('wiki_page', strval($page_id));\n }\n\n require_code('sitemap_xml');\n notify_sitemap_node_edit('_SEARCH:wiki:browse:' . strval($page_id), has_category_access($GLOBALS['FORUM_DRIVER']->get_guest_id(), 'wiki', strval($page_id)));\n}",
"protected function _postSave()\n {\n $titlePhrase = $this->getExtraData(self::DATA_TITLE);\n if ($titlePhrase !== null) {\n $this->_insertOrUpdateMasterPhrase($this->_getTitlePhraseName($this->get('tab_name_id')), $titlePhrase, '');\n }\n\n $defaults = $this->getExtraData(self::DATA_DEFAULTS);\n if ($defaults !== null) {\n $this->_setDefaultOptions($defaults);\n }\n }",
"public function postUpdate($id)\n\t{\n\t\t//\n\t}",
"protected function assignDefaults() {\n\t\t$this->view->assignMultiple(\n\t\t\tarray(\n\t\t\t\t'timestamp'\t\t\t=> time(),\n\t\t\t\t'submission_date'\t=> date('d.m.Y H:i:s', time()),\n\t\t\t\t'randomId'\t\t\t=> Tx_Formhandler_Globals::$randomID,\n\t\t\t\t'fieldNamePrefix'\t=> Tx_Formhandler_Globals::$formValuesPrefix,\n\t\t\t\t'ip'\t\t\t\t=> t3lib_div::getIndpEnv('REMOTE_ADDR'),\n\t\t\t\t'pid'\t\t\t\t=> $GLOBALS['TSFE']->id,\n\t\t\t\t'currentStep'\t\t=> Tx_FormhandlerFluid_Util_Div::getSessionValue('currentStep'),\n\t\t\t\t'totalSteps'\t\t=> Tx_FormhandlerFluid_Util_Div::getSessionValue('totalSteps'),\n\t\t\t\t'lastStep'\t\t\t=> Tx_FormhandlerFluid_Util_Div::getSessionValue('lastStep'),\n\t\t\t\t// f:url(absolute:1) does not work correct :(\n\t\t\t\t'baseUrl'\t\t\t=> t3lib_div::locationHeaderUrl('')\n\t\t\t)\n\t\t);\n\t\t\n\t\tif ($this->gp['generated_authCode']) {\n\t\t\t$this->view->assign('authCode', $this->gp['generated_authCode']);\n\t\t}\n\t\t\n\t\t/*\n\t\tStepbar currently removed - probably this should move in a partial\n\t\t$markers['###step_bar###'] = $this->createStepBar(\n\t\t\tTx_FormhandlerFluid_Session::get('currentStep'),\n\t\t\tTx_FormhandlerFluid_Session::get('totalSteps'),\n\t\t\t$prevName,\n\t\t\t$nextName\n\t\t);\n\t\t*/\n\t\t\n\t\t/*\n\t\tNot yet realized\n\t\t$this->fillCaptchaMarkers($markers);\n\t\t$this->fillFEUserMarkers($markers);\n\t\t$this->fillFileMarkers($markers);\n\t\t*/\n\t}",
"public function loadPostData(){\n \n // ID - if we're editing existing one\n if (isset($_POST['grading_id'])){\n $this->setID($_POST['grading_id']);\n }\n \n $this->setName($_POST['grading_name']);\n $this->setEnabled( (isset($_POST['grading_enabled']) && $_POST['grading_enabled'] == 1 ) ? 1 : 0);\n $this->setIsUsedForAssessments( (isset($_POST['grading_assessments']) && $_POST['grading_assessments'] == 1 ) ? 1 : 0);\n \n // If Build ID use that, otherwise use QualStructureID\n $buildID = optional_param('build', false, PARAM_INT);\n if ($buildID){\n $this->setQualBuildID($buildID);\n $this->setIsUsedForAssessments(1);\n } else {\n $this->setQualStructureID( $_POST['grading_qual_structure_id'] );\n }\n \n $gradeIDs = (isset($_POST['grade_ids'])) ? $_POST['grade_ids'] : false;\n if ($gradeIDs)\n {\n \n foreach($gradeIDs as $key => $id)\n {\n \n $award = new \\GT\\CriteriaAward($id);\n $award->setName($_POST['grade_names'][$key]);\n $award->setShortName($_POST['grade_shortnames'][$key]);\n $award->setSpecialVal($_POST['grade_specialvals'][$key]);\n $award->setPoints($_POST['grade_points'][$key]);\n $award->setPointsLower($_POST['grade_points_lower'][$key]);\n $award->setPointsUpper($_POST['grade_points_upper'][$key]);\n $award->setMet( (isset($_POST['grade_met'][$key])) ? 1 : 0 );\n $award->setImageFile( \\gt_get_multidimensional_file($_FILES['grade_files'], $key) );\n \n // If we have a tmp icon set load that back in\n if ( isset($_POST['grade_icon_names'][$key]) && strpos($_POST['grade_icon_names'][$key], \"tmp//\") === 0 ){\n $award->iconTmp = str_replace(\"tmp//\", \"\", $_POST['grade_icon_names'][$key]);\n }\n \n // If are editing something which already has a valid image saved\n elseif (isset($_POST['grade_icon_names'][$key]) && strlen($_POST['grade_icon_names'][$key]) > 0)\n {\n $award->setImage($_POST['grade_icon_names'][$key]);\n }\n \n $this->addAward($award);\n \n }\n \n }\n \n \n }",
"private function reload_data()\n\t{\n\t\tforeach ($this->checked as $k=>$v) {\n\t\t\t$this->content->template['leadtracker']['0'][$k]=$v;\n\t\t}\n\t}",
"static function modificadescrizione($id){\n if(!CUtente::verificalogin())header('Location: /Progetto/Utente/homepagedef');\n else{\n session_start();\n if($_SERVER['REQUEST_METHOD'] == \"GET\")header('Location: /Progetto/Utente/homepagedef');\n else{\n\n if(FPersistentManager::exist('id',$id,'FWatchlist')) {\n $w=FPersistentManager::load('id',$id,'FWatchlist');\n\n FPersistentManager::update(\"descrizione\", $_POST['descrizione'], \"id\", $id, \"FWatchlist\");\n\n\n }\n // else $_SESSION['pwedit']=false;\n\n header('Location: /Progetto'.$_SESSION['location']);\n }\n }\n }",
"public function savePageEditorSettingsObject()\n\t{\n\t\tglobal $tpl, $lng, $ilCtrl, $ilSetting;\n\t\n\t\t$this->initPageEditorForm();\n\t\tif ($this->form->checkInput())\n\t\t{\n\t\t\tinclude_once(\"./Services/COPage/classes/class.ilPageEditorSettings.php\");\n\t\t\tinclude_once(\"./Services/COPage/classes/class.ilPageContentGUI.php\");\n\t\t\t$buttons = ilPageContentGUI::_getCommonBBButtons();\n\t\t\tforeach ($buttons as $b => $t)\n\t\t\t{\n\t\t\t\tilPageEditorSettings::writeSetting($_GET[\"grp\"], \"active_\".$b,\n\t\t\t\t\t$this->form->getInput(\"active_\".$b));\n\t\t\t}\n\t\t\t\n\t\t\tif ($_GET[\"grp\"] == \"test\")\n\t\t\t{\n\t\t\t\t$ilSetting->set(\"enable_tst_page_edit\", (int) $_POST[\"tst_page_edit\"]);\n\t\t\t}\n\t\t\telseif ($_GET[\"grp\"] == \"rep\")\n\t\t\t{\n\t\t\t\t$ilSetting->set(\"enable_cat_page_edit\", (int) $_POST[\"cat_page_edit\"]);\n\t\t\t}\n\t\t\t\n\t\t\tilUtil::sendInfo($lng->txt(\"msg_obj_modified\"), true);\n\t\t}\n\t\t\n\t\t$ilCtrl->setParameter($this, \"grp\", $_GET[\"grp\"]);\n\t\t$ilCtrl->redirect($this, \"showPageEditorSettings\");\n\t}",
"function admin_edit($id = NULL) {\n\t\t$this->layout = \"admin\";\n\t\tConfigure::write('debug', 0);\n\t\t$this->set(\"parentClass\", \"selected\"); //set main navigation class\n\t\t\n\t\t$alldata = $this->State->find('all'); //retireve all states\n\t\t$states = Set::combine($alldata, '{n}.State.state_code', '{n}.State.state_name');\n\t\t$this->set(\"states\", $states);\n\t\t\n\t\t$id = convert_uudecode(base64_decode($id));\n\t\t\n\t\t\n\t\t$alldata = $this->School->find('all');\n\t\t$schoolname = Set::combine($alldata, '{n}.School.id', '{n}.School.school_name');\n\t\t\n\t\t$this->set(\"schoolname\", $schoolname);\n\t\t\n\t\t$admindata = $this->Member->find('first', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'Member.id' => $id\n\t\t\t)\n\t\t));\n\t\t\n\t\t$this->set('admindata', $admindata);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tif (!empty($this->data)) {\n\t\t\t/*echo '<pre>';\n\t\t\tprint_r($this->data);\n\t\t\tdie;\n\t\t\t\n\t\t\t*/\n\t\t\t$data['Member']['stripeid'] = $this->data['Member']['stripeid'];\n\t\t\t$data['Member']['email'] = $this->data['Member']['email'];\n\t\t\t$data['Member']['group_id'] = $this->data['Member']['group_id'];\n\t\t\t$data['Member']['active'] = $this->data['Member']['status'];\n\t\t\t$data['Member']['id'] = $this->data['Member']['id'];\n\t\t\t$data['Member']['school_id'] = $this->data['Member']['school_id'];\n\t\t\t$data['Member']['creditable_balance'] = $this->data['Member']['creditable_balance'];\n\t\t\t\t\t\n\t\t\t$this->Member->create();\n\t\t\t$db = $this->Member->getDataSource();\n\t\t\t\n\t\t\tif ($this->Member->save($data)) {\n\t\t\t\t$userMeta['userMeta']['fname'] = $this->data['userMeta']['fname'];\n\t\t\t\t$userMeta['userMeta']['lname'] = $this->data['userMeta']['lname'];\n\t\t\t\t$userMeta['userMeta']['address'] = $this->data['userMeta']['address'];\n\t\t\t\t\n\t\t\t\t$userMeta['userMeta']['state'] = $this->data['userMeta']['state'];\n\t\t\t\t$userMeta['userMeta']['city'] = $this->data['userMeta']['city'];\n\t\t\t\t$userMeta['userMeta']['zip'] = $this->data['userMeta']['zip'];\n\t\t\t\t$userMeta['userMeta']['contact'] = $this->data['userMeta']['contact'];\n\t\t\t//\t$userMeta['userMeta']['member_id'] = $this->data['Member']['id'];\n\t\t\t\t$userMeta['userMeta']['note'] = $this->data['userMeta']['note'];\n\t\t\t\t\n\t\t\t\t$user = $this->userMeta->find('first', array(\n\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t'member_id' => $this->data['Member']['id']\n\t\t\t\t\t)\n\t\t\t\t));\n\t\t\t\t\n\t\t\t\t$userMeta['userMeta']['id'] = $user['userMeta']['id'];\n\t\t\t\t\n\t\t\t\t$this->userMeta->create();\n\t\t\t\t\n\t\t\t\tif ($this->userMeta->save($userMeta)) {\n\t\t\t\t\n\t\t\t\t$this->Session->setFlash('User has been edited');\n\t\t\t\t\t\n\t\t\t\t//\t$this->redirect($this->referer());\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->Session->setFlash('User has been edited');\n\t\t\t\t\n\t\t\t\t$this->redirect(array(\n\t\t\t\t\t'action' => 'member_view',\n\t\t\t\t\t'admin' => true\n\t\t\t\t));\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t$admindata = $this->Member->find('first', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'Member.id' => $id\n\t\t\t)\n\t\t));\n\t\t\n\t\t$this->set('admindata', $admindata);\n\t\t\n\t}",
"public function modify_information($i_id=0)\r\n {}",
"public function inPageEdit() {\n\t\t\n\t\t$output = array();\n\t\t$context = Request::post('context');\n\t\t$postData = Request::post('data');\n\t\t$url = Request::post('url');\n\t\t\n\t\tif ($context) {\n\t\t\n\t\t\t// Check if page actually exists.\n\t\t\tif ($Page = $this->Automad->getPage($context)) {\n\t\t\t\t\n\t\t\t\t// If data gets received, merge and save.\n\t\t\t\t// Else send back form fields.\n\t\t\t\tif ($postData && is_array($postData)) {\n\t\t\t\t\t\n\t\t\t\t\t// Merge and save data.\n\t\t\t\t\t$data = array_merge(Core\\Parse::textFile($this->getPageFilePath($Page)), $postData);\n\t\t\t\t\tFileSystem::writeData($data, $this->getPageFilePath($Page));\n\t\t\t\t\tCore\\Debug::log($data, 'saved data');\n\t\t\t\t\tCore\\Debug::log($this->getPageFilePath($Page), 'data file');\n\t\t\t\t\t\n\t\t\t\t\t// If the title has changed, the page directory has to be renamed as long as it is not the home page.\n\t\t\t\t\tif (!empty($postData[AM_KEY_TITLE]) && $Page->url != '/') {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Move directory.\n\t\t\t\t\t\t$newPagePath = FileSystem::movePageDir(\n\t\t\t\t\t\t\t$Page->path, \n\t\t\t\t\t\t\tdirname($Page->path), \n\t\t\t\t\t\t\t$this->extractPrefixFromPath($Page->path), \n\t\t\t\t\t\t\t$postData[AM_KEY_TITLE]\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t\t\tCore\\Debug::log($newPagePath, 'renamed page');\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// Clear cache to reflect changes.\n\t\t\t\t\t$this->clearCache();\n\t\t\t\t\t\n\t\t\t\t\t// If the page directory got renamed, find the new URL.\n\t\t\t\t\tif ($Page->url == $url && isset($newPagePath)) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// The page has to be redirected to a new url in case the edited context is actually \n\t\t\t\t\t\t// the requested page and the title of the page and therefore the URL has changed.\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Rebuild Automad object, since the file structure has changed.\n\t\t\t\t\t\t$Automad = new Core\\Automad();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Find new URL and return redirect URL.\n\t\t\t\t\t\tforeach ($Automad->getCollection() as $key => $Page) {\n\n\t\t\t\t\t\t\tif ($Page->path == $newPagePath) {\n\t\t\t\t\t\t\t\t$output['redirect'] = AM_BASE_INDEX . $key;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// There are two cases where the currently requested page has to be\n\t\t\t\t\t\t// simply reloaded without redirection:\n\t\t\t\t\t\t// \n\t\t\t\t\t\t// 1.\tThe context of the edits is not the current page and another\n\t\t\t\t\t\t// \t\tpages gets actually edited.\n\t\t\t\t\t\t// \t\tThat would be the case for edits of pages displayed in pagelists or menus.\n\t\t\t\t\t\t// \t\n\t\t\t\t\t\t// 2.\tThe context is the current page, but the title didn't change and\n\t\t\t\t\t\t// \t\ttherefore the URL stays the same.\n\t\t\t\t\t\t$output['redirect'] = AM_BASE_INDEX . $url;\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// Append query string if not empty.\n\t\t\t\t\t$queryString = Request::post('query');\n\n\t\t\t\t\tif ($queryString) {\n\t\t\t\t\t\t$output['redirect'] .= '?' . $queryString;\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t// Return form fields if key is defined.\n\t\t\t\t\tif ($key = Request::post('key')) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$value = '';\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!empty($Page->data[$key])) {\n\t\t\t\t\t\t\t$value = $Page->data[$key];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Note that $Page->path has to be added to make image previews work in CodeMirror.\n\t\t\t\t\t\t$output['html'] = Components\\InPage\\Edit::render($this->Automad, $key, $value, $context, $Page->path);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t\treturn $output;\n\t\n\t}",
"public function edit($id = NULL)\n {\n if (is_null($id) && !is_numeric($id)) {\n show_404();\n }\n\n $result = $this->cms_page_model->as_array()->get_by(array('page_id' => $id));\n if (empty($result)) {\n show_404();\n }\n \n if ($this->input->post('submit') && $this->input->post('submit') == 'EDIT') {\n $this->form_validation->set_rules('name', 'Page Name', 'trim|required|max_length[30]');\n $this->form_validation->set_rules('page_content', 'Page Content', 'trim');\n $this->form_validation->set_rules('page_title', 'Page Title', 'trim|max_length[100]');\n $this->form_validation->set_rules('page_header', 'Page Header', 'trim|max_length[100]');\n $this->form_validation->set_rules('301_redirect_url', '301 Redirect Url', 'trim|max_length[500]');\n $this->form_validation->set_rules('canonical_url', 'Canonical Url', 'trim|max_length[500]');\n $this->form_validation->set_rules('301_redirect_status', '301 Redirect Status', 'trim|in_list[0,1]');\n $this->form_validation->set_rules('meta_robot_index', 'Meta Robot Index', 'trim|max_length[10]|in_list[INDEX,NOINDEX]');\n $this->form_validation->set_rules('meta_robot_follow', 'Meta Robot Follow', 'trim|max_length[10]|in_list[FOLLOW,NOFOLLOW]');\n $this->form_validation->set_rules('meta_description', 'Meta Description', 'trim|max_length[300]');\n $this->form_validation->set_rules('meta_keywords', 'Meta Keywords', 'trim|max_length[300]');\n $this->form_validation->set_rules('status', 'Status', 'trim|in_list[0,1]|required');\n\n if($result['type'] == 's') {\n if ($result['url'] == $this->input->post('page_url')) {\n $this->form_validation->set_rules('page_url', 'Page Url', 'trim|required|max_length[500]');\n } else {\n $this->form_validation->set_rules('page_url', 'Page Url', 'trim|required|max_length[500]|is_unique[cms_page.url]');\n }\n }\n \n $this->form_validation->set_message('required', 'This field is required');\n $this->form_validation->set_message('is_unique', 'This Url is already taken');\n $this->form_validation->set_error_delimiters('<span class=\"help-block\">', '</span>');\n \n if ($this->form_validation->run() == TRUE) {\n $data = array(\n 'name' => $this->input->post('name',TRUE),\n 'content' => $this->input->post('page_content',TRUE),\n 'page_header' => $this->input->post('page_header',TRUE),\n '301_redirect_url' => $this->input->post('301_redirect_url',TRUE),\n 'canonical_url' => $this->input->post('canonical_url',TRUE),\n '301_redirect_status' => $this->input->post('301_redirect_status',TRUE),\n 'meta_robots_index' => $this->input->post('meta_robot_index',TRUE),\n 'meta_robots_follow' => $this->input->post('meta_robot_follow',TRUE),\n 'meta_description' => $this->input->post('meta_description',TRUE),\n 'meta_keywords' => $this->input->post('meta_keywords',TRUE),\n 'status' => $this->input->post('status',TRUE),\n 'title' => $this->input->post('page_title',TRUE),\n 'date_updated' => date('Y-m-d H:i:s')\n );\n\n if($result['type'] == 's') {\n $data['url'] = url_title($this->input->post('page_url'), '-', TRUE);\n }\n \n if ($this->cms_page_model->update($id, $data)) {\n $this->session->set_flashdata('flashdata', array('type' => 'success', 'text' => lang('success_page_updated')));\n }else {\n $this->session->set_flashdata('flashdata', array('type' => 'error', 'text' => lang('error_message')));\n }\n\n redirect('admin/cms/page');\n exit();\n }\n }\n $this->data['page']=$result;\n $this->template->load_asset(array('jquery_upload', 'editor', 'select2', 'dialog'));\n $this->template->build('admin/cms/page/edit', $this->data);\n }",
"function insert_update_map_customize() {\n $page_id = $this->input->post('page-id');\n $this->Map_model->insert_update_map_customize_data($page_id);\n redirect('map/map_index/' . $page_id);\n }",
"public function update() {\n\t\ttry {\n\t\t\t$this->validateUpdate();\n\n\t\t\t$sth = $this->context->connection->prepare(\n\t\t\t\t\"UPDATE list_item_definition SET\n\t\t\t\t\tpage_definition_id = :pageDefId, title = :title, icon = :icon,\n\t\t\t\t\tphp_key = :phpSelector, title_width = :titleWidth,\n\t\t\t\t\ttitle_label = :titleLabel\n\t\t\t\tWHERE instance_id = :instId AND list_item_definition_id = :id\");\n\n\t\t\t$this->context->connection->bindInstance($sth);\n\t\t\t$sth->bindValue(\":id\", $this->id, \\PDO::PARAM_INT);\n\n\t\t\t$sth->bindValue(\n\t\t\t\t\":pageDefId\", $this->pageDefinitionId, \\PDO::PARAM_INT);\n\t\t\t$sth->bindValue(\":title\", $this->title, \\PDO::PARAM_STR);\n\t\t\t$sth->bindValue(\":icon\", $this->icon, \\PDO::PARAM_STR);\n\t\t\t$sth->bindValue(\n\t\t\t\t\":phpSelector\", $this->phpSelector, \\PDO::PARAM_STR);\n\t\t\t$sth->bindValue(\":titleWidth\", $this->titleWidth, \\PDO::PARAM_INT);\n\t\t\t$sth->bindValue(\":titleLabel\", $this->titleLabel, \\PDO::PARAM_STR);\n\n\t\t\t$sth->execute();\n\n\t\t\tunset($this->context->cache[$this->id]);\n\n\t\t} catch(\\PDOException $e) {\n\t\t\tthrow new \\Scrivo\\ResourceException($e);\n\t\t}\n\t}",
"public function replyToLoadTab( $oAdminPage ) {\n \n \n $this->registerFieldTypes( $this->sClassName );\n \n add_action( 'do_' . $this->sPageSlug . '_' . $this->sTabSlug, array( $this, 'replyToDoTab' ) );\n \n // Section\n $oAdminPage->addSettingSections( \n $this->sPageSlug, // the target page slug \n array(\n 'section_id' => $this->sSectionID,\n 'tab_slug' => $this->sTabSlug,\n 'title' => __( 'Apariencia', 'front-end-ninja-apf' ),\n 'description' => __( 'Modifica la apariencia del tema.', 'front-end-ninja-apf' ),\n 'content' => array(\n array(\n 'section_id' => 'main_settings',\n 'title' => __( 'Principal', 'front-end-ninja-apf' ),\n 'collapsible' => true,\n ),\n array(\n 'section_id' => 'extra',\n 'title' => __( 'Estilos', 'front-end-ninja-apf'),\n 'collapsible' => true,\n ),\n array(\n 'section_id' => 'alerts',\n 'title' => __( 'Alertas', 'front-end-ninja-apf'),\n 'collapsible' => true,\n )\n ),\n )\n ); \n \n $oAdminPage->addSettingFields(\n array( $this->sSectionID, 'main_settings' ), // the target section id\n array(\n 'field_id' => 'logotype',\n 'type' => 'image',\n 'title' => __( 'Logotipo', 'front-end-ninja-apf' ),\n 'description' => __( 'Tamaño sugerido de 100x140px.', 'front-end-ninja-apf' ),\n 'attributes' => array( \n 'preview' => array(\n 'style' => 'max-width: 180px;',\n ), \n ),\n ),\n array(\n 'field_id' => 'favicon',\n 'type' => 'image',\n 'title' => __( 'Favicon', 'front-end-ninja-apf' ),\n 'description' => __( 'Archivo .png, Tamaño 16x16px. <br> <small><a href=\"https://es.wikipedia.org/wiki/Favicon\">¿Qué es un favicon?</a></small>', 'front-end-ninja-apf' ),\n 'attributes' => array( \n 'preview' => array(\n 'style' => 'max-width: 16px;',\n ), \n ),\n 'default' => get_bloginfo('template_url').'/assets/images/favicon.png',\n ),\n array(\n 'field_id' => 'default_image',\n 'type' => 'image',\n 'title' => __( 'Imagen predeterminada', 'front-end-ninja-apf' ),\n 'description' => __( 'Esta imagen aparecerá de manera predeterminada en la cabecera de las categorías de productos.', 'front-end-ninja-apf' ),\n 'attributes' => array( \n 'preview' => array(\n 'style' => 'max-width: 300px;',\n ), \n ),\n 'default' => get_bloginfo('template_url').'/assets/images/default-thumbnail.jpg',\n ),\n array(\n 'field_id' => 'error_404',\n 'type' => 'image',\n 'title' => __( 'Error 404', 'front-end-ninja-apf' ),\n 'description' => __( 'Tamaño sugerido 1200x900 px. Esta imagen aparecerá en el Error 404.', 'front-end-ninja-apf' ),\n 'attributes' => array( \n 'preview' => array(\n 'style' => 'max-width: 300px;',\n ), \n )\n )\n );\n\n $oAdminPage->addSettingFields(\n array( $this->sSectionID, 'extra' ), // the target section id\n array(\n 'field_id' => 'ace_css_custom',\n 'type' => 'ace', \n 'title' => __( 'Custom Css', 'front-end-ninja-apf' ),\n 'description' => __( 'Será agregado al header bajo una etiqueta style', 'front-end-ninja-apf' ),\n 'default' => '/*.test{ background-color: #f00; }*/',\n 'attributes' => array(\n 'cols' => 60,\n 'rows' => 12,\n ), \n 'options' => array(\n 'language' => 'css',\n 'theme' => 'monokai',\n 'gutter' => false,\n 'readonly' => false,\n 'fontsize' => 12,\n ), \n )\n );\n\n $oAdminPage->addSettingFields(\n array( $this->sSectionID, 'alerts' ), // the target section id\n array(\n 'field_id' => 'main_alert',\n 'type' => 'textarea',\n 'title' => __( '<strong>Alerta Principal:</strong>', 'front-end-ninja-apf' ),\n 'description' => __( 'Agrega una alerta al header de la página.', 'front-end-ninja-apf' ),\n 'tip' => __( 'Incluye la etiqueta \"< br>\" para agregar un \"enter\" al título. <br>Deja vacío el campo para no mostrar nada.', 'front-end-ninja-apf' ),\n 'attributes' => array(\n 'placeholder' => __( 'Some text', 'front-end-ninja-apf' ),\n 'size' => 90,\n ),\n ),\n array(\n 'field_id' => 'main_alert_url',\n 'type' => 'text',\n 'title' => __( '<strong>URL Alerta Principal:</strong>', 'front-end-ninja-apf' ),\n 'description' => __( 'Agrega una url a la alerta.', 'front-end-ninja-apf' ),\n 'tip' => __( 'Incluye http:// al iniciar la url.' ),\n 'attributes' => array(\n 'placeholder' => __( 'http://' ),\n 'size' => 61,\n ),\n ),\n array(\n 'field_id' => 'type',\n 'type' => 'select',\n 'title' => __( 'Tipo de Alerta', 'front-end-ninja-apf' ),\n 'tip' => __( 'Dependiendo del tipo de alerta que selecciones, cambiará el color de la misma, p, ej: \"Success\" es color verde.' ),\n 'label' => array(\n 0 => '--- ' . __( 'Alert Type', 'front-end-ninja-apf' ) . ' ---',\n 'primary' => 'Primary',\n 'success' => 'Success',\n 'info' => 'Info',\n 'warning' => 'Warning',\n 'danger' => 'Danger',\n ),\n 'default' => 0,\n )\n );\n\n }",
"public function onPagesInitialized()\n {\n // Don't proceed if we are in the admin plugin\n if ($this->isAdmin()) {\n $this->active = false;\n return;\n }\n // Do not act upon empty POST payload or any POST not for this plugin\n $post = $_POST;\n if (!$post || ! isset($post['ce_data_post']) ) {\n return;\n }\n // Preemtively handle review edits ajax call\n if ($post['action'] == 'ceReviewEdits') {\n $output = $this->grav['twig']->processTemplate(\n 'partials/data-manager/content-edit/item.html.twig',\n [ 'itemData' => CompiledYamlFile::instance(DATA_DIR . $this->edits_loc . DS . $post['file'])->content() ]\n );\n } else {\n $pages = $this->grav['pages'];\n $page = $pages->dispatch($post['page'] , true);\n if ($post['language'] && $post['language'] != 'Default' ) {\n $fn = preg_match('/^(.+)\\..+?\\.md$/', $page->name(), $matches);\n if ($fn) {\n $fileP = $page->path() . DS . $matches[1] . '.' . $post['language'] . '.md';\n $route = $page->route();\n $page = new Page();\n $page->init(new \\SplFileInfo($fileP), $post['language'] . '.md');\n }\n }\n switch ($post['action']) {\n case 'ceTransferContent': // Transfer the md for the page\n $hd = $page->header();\n $menuExists = property_exists($hd,'menu') && $hd->menu !== null;\n $output = [ 'data' => $page->rawMarkdown(), 'menu' => $page->menu(), 'menuexists' => $menuExists ];\n break;\n case 'ceSaveContent': // Save markdown content\n $output = $this->saveContent($post, $page);\n break;\n case 'cePreviewContent': // Preview a route\n $r = ( $post['language'] == 'Default' ? '' : $post['language'] ) . $post['page'] ;\n $this->grav->redirect($r);\n break;\n case 'ceFileUpload': // Handle a file (or image) upload\n $output = $this->saveFile($post, $page);\n break;\n case 'ceFileDelete': // Deleting a file or images\n $output = $this->deleteFile($post, $page);\n break;\n default:\n return;\n }\n }\n $this->setHeaders();\n echo json_encode($output);\n exit;\n }",
"function saveGeneralPageSettingsObject()\n\t{\n\t\tglobal $ilCtrl, $lng, $tpl;\n\t\t\n\t\t$form = $this->initGeneralPageSettingsForm();\n\t\tif ($form->checkInput())\n\t\t{\n\t\t\t$aset = new ilSetting(\"adve\");\n\t\t\t$aset->set(\"use_physical\", $_POST[\"use_physical\"]);\n\t\t\tif ($_POST[\"block_mode_act\"])\n\t\t\t{\n\t\t\t\t$aset->set(\"block_mode_minutes\", (int) $_POST[\"block_mode_minutes\"]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$aset->set(\"block_mode_minutes\", 0);\n\t\t\t}\n\t\t\t\n\t\t\tilUtil::sendSuccess($lng->txt(\"msg_obj_modified\"), true);\n\t\t\t$ilCtrl->redirect($this, \"showGeneralPageEditorSettings\");\n\t\t}\n\t\t\n\t\t$form->setValuesByPost();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function settings_page_init() {\n global $WCPc;\n \n $settings_tab_options = array(\"tab\" => \"{$this->tab}\", \"ref\" => &$this,\n \"sections\" => array(\n // Section one\n \"default_settings_section\" => array(\n \"title\" => __('Default Settings', $WCPc->text_domain), \n \"fields\" => array( /* Hidden */\n \"id\" => array('title' => '', \n 'type' => 'hidden', \n 'id' => 'id', \n 'name' => 'id', \n 'value' => 999\n ),\n /* Text */ \n \"id_number\" => array('title' => __('ID Number', $WCPc->text_domain), \n 'type' => 'text', \n 'id' => 'id_number', \n 'label_for' => 'id_number', \n 'name' => 'id_number', \n 'hints' => __('Enter your ID Number here.', $WCPc->text_domain), \n 'desc' => __('It will represent your identification.', $WCPc->text_domain)\n ), \n /* Textarea */\n \"about\" => array('title' => __('About', $WCPc->text_domain) , \n 'type' => 'textarea', \n 'id' => 'about', \n 'label_for' => 'about', \n 'name' => 'about', \n 'rows' => 5, \n 'placeholder' => __('About you', $WCPc->text_domain), \n 'desc' => __('It will represent your significant.', $WCPc->text_domain)\n ), \n /* Text */\n \"demo_test\" => array('title' => __('Demo Test', $WCPc->text_domain),\n 'type' => 'text',\n 'id' => 'demo_test',\n 'label_for' => 'demo_test',\n 'name' => 'demo_test',\n 'placeholder' => __('Demo Test', $WCPc->text_domain)\n ),\n /* Wp Eeditor */\n \"bio\" => array('title' => __('Bio', $WCPc->text_domain), \n 'type' => 'wpeditor', \n 'id' => 'bio', \n 'label_for' => 'bio', \n 'name' => 'bio'\n ), \n /* Checkbox */\n \"is_enable\" => array('title' => __('Enable', $WCPc->text_domain), \n 'type' => 'checkbox', \n 'id' => 'is_enable', \n 'label_for' => 'is_enable', \n 'name' => 'is_enable', \n 'value' => 'Enable'\n ), \n /* Radio */\n \"offday\" => array('title' => __('Off Day', $WCPc->text_domain), \n 'type' => 'radio', \n 'id' => 'offday', \n 'label_for' => 'offday', \n 'name' => 'offday', \n 'dfvalue' => 'wednesday', \n 'options' => array('sunday' => 'Sunday', \n 'monday' => 'Monday', \n 'tuesday' => 'Tuesday', \n 'wednesday' => 'Wednesday', \n 'thrusday' => 'Thrusday'\n ), \n 'hints' => __('Choose your preferred week offday.', $WCPc->text_domain), \n 'desc' => __('By default Saterday will be offday.', $WCPc->text_domain)\n ), \n /* Select */\n \"preference\" => array('title' => __('Preference', $WCPc->text_domain), \n 'type' => 'select', \n 'id' => 'preference', \n 'label_for' => 'preference', \n 'name' => 'preference', \n 'options' => array('one' => 'One Time', \n 'two' => 'Two Time', \n 'three' => 'Three Time'\n ), \n 'hints' => __('Choose your preferred occurence count.', $WCPc->text_domain)\n ), \n /* Upload */\n \"logo\" => array('title' => __('Logo', $WCPc->text_domain), \n 'type' => 'upload', \n 'id' => 'logo', \n 'label_for' => 'logo', \n 'name' => 'logo', \n 'prwidth' => 125, \n 'hints' => __('Your presentation.', $WCPc->text_domain), \n 'desc' => __('Represent your graphical signature.', $WCPc->text_domain)\n ), \n /* Colorpicker */\n \"dc_colorpicker\" => array('title' => __('Choose Color', $WCPc->text_domain), \n 'type' => 'colorpicker', \n 'id' => 'dc_colorpicker', \n 'label_for' => 'dc_colorpicker', \n 'name' => 'dc_colorpicker', \n 'default' => '000000', \n 'hints' => __('Choose your color here.', $WCPc->text_domain),\n 'desc' => __('This lets you choose your desired color.', $WCPc->text_domain)\n ), \n /* Datepicker */\n \"dc_datepicker\" => array('title' => __('Choose DOB', $WCPc->text_domain),\n 'type' => 'datepicker', \n 'id' => 'dc_datepicker', \n 'label_for' => 'dc_datepicker', \n 'name' => 'dc_datepicker', \n 'hints' => __('Choose your DOB here', $WCPc->text_domain), \n 'desc' => __('This lets you choose your date of birth.', $WCPc->text_domain), \n 'custom_attributes' => array('date_format' => 'dd-mm-yy')\n ), \n /* Multiinput */\n \"slider\" => array('title' => __('Slider', $WCPc->text_domain) , \n 'type' => 'multiinput', \n 'id' => 'slider', \n 'label_for' => 'slider', \n 'name' => 'slider', \n 'options' => array(\n \"title\" => array('label' => __('Title', $WCPc->text_domain) , \n 'type' => 'text', \n 'label_for' => 'title', \n 'name' => 'title', \n 'class' => 'regular-text'\n ),\n \"content\" => array('label' => __('Content', $WCPc->text_domain), \n 'type' => 'textarea', \n 'label_for' => 'content', \n 'name' => 'content', \n 'cols' => 40\n ),\n \"image\" => array('label' => __('Image', $WCPc->text_domain), \n 'type' => 'upload', \n 'label_for' => 'image', \n 'name' => 'image', \n 'prwidth' => 125\n ),\n \"url\" => array('label' => __('URL', $WCPc->text_domain) , \n 'type' => 'url', \n 'label_for' => 'url', \n 'name' => 'url', \n 'class' => 'regular-text'\n ),\n \"published\" => array('label' => __('Published ON', $WCPc->text_domain), \n 'type' => 'datepicker', \n 'id' => 'published', \n 'label_for' => 'published', \n 'name' => 'published', \n 'hints' => __('Published Date', $WCPc->text_domain), \n 'custom_attributes' => array('date_format' => 'dd th M, yy')\n )\n )\n )\n )\n ), \n \"custom_settings_section\" => array(\n \"title\" => \"Demo Custom Settings\", // Another section\n \"fields\" => array(\n \"location\" => array('title' => __('Location', $WCPc->text_domain), \n 'type' => 'text', \n 'id' => 'location', \n 'name' => 'location', \n 'hints' => __('Location', $WCPc->text_domain)\n ),\n \"role\" => array('title' => __('Role', $WCPc->text_domain), \n 'type' => 'text', \n 'id' => 'role', \n 'name' => 'role', \n 'hints' => __('Role', $WCPc->text_domain)\n )\n )\n )\n )\n );\n \n $WCPc->admin->settings->wcpc_settings_field_init(apply_filters(\"wcpc_settings_{$this->tab}_tab_options\", $settings_tab_options));\n }",
"public static function save() {\n\t\t\t$page_title = $_POST['page_title'];\n\t\t\t$meta['dod_custom_css'] = $_POST['custom_css'];\n\t\t\t$meta['_wp_page_template'] = $_POST['page_template'];\n\t\t\treturn dd_update_page(get_option('dod_page_id'), $page_title, '', $meta);\n\t\t}",
"public function set_fields() {\n $this->fields = apply_filters('wpucommentmetas_fields', $this->fields);\n foreach ($this->fields as $id => $field) {\n if (!is_array($field)) {\n $this->fields[$id] = array();\n }\n if (!isset($field['label'])) {\n $this->fields[$id]['label'] = ucfirst($id);\n }\n if (!isset($field['admin_label'])) {\n $this->fields[$id]['admin_label'] = $this->fields[$id]['label'];\n }\n if (!isset($field['type'])) {\n $this->fields[$id]['type'] = 'text';\n }\n if (!isset($field['help'])) {\n $this->fields[$id]['help'] = '';\n }\n if (!isset($field['required'])) {\n $this->fields[$id]['required'] = false;\n }\n if (!isset($field['admin_visible'])) {\n $this->fields[$id]['admin_visible'] = true;\n }\n if (!isset($field['admin_column'])) {\n $this->fields[$id]['admin_column'] = false;\n }\n if (!isset($field['admin_list_visible'])) {\n $this->fields[$id]['admin_list_visible'] = false;\n }\n if (!isset($field['display_hooks'])) {\n $this->fields[$id]['display_hooks'] = array(\n 'comment_form_logged_in_after',\n 'comment_form_after_fields'\n );\n }\n if (!is_array($this->fields[$id]['display_hooks'])) {\n $this->fields[$id]['display_hooks'] = array($this->fields[$id]['display_hooks']);\n }\n }\n }",
"function setPageLayout()\n\t{\n\t\tglobal $tpl, $ilCtrl, $lng;\n\n\t\tif (!is_array($_POST[\"id\"]))\n\t\t{\n\t\t\tilUtil::sendFailure($lng->txt(\"no_checkbox\"), true);\n\t\t\t$ilCtrl->redirect($this, \"showHierarchy\");\n\t\t}\n\t\t\n\t\t$this->initSetPageLayoutForm();\n\t\t\n\t\t$tpl->setContent($this->form->getHTML());\n\t}",
"function update_page($pid) {\n $p_name = $_POST['page_title'];\n $p_caption = $_POST['caption'];\n $p_meta_title = $_POST['meta_title'];\n $p_meta_keywords = $_POST['meta_keywords'];\n $p_meta_description = $_POST['meta_description'];\n $p_description = $_POST['data'];\n $p_image = $this->upload_page_image();\n @$p_publish = $_POST['publish'];\n @$travel_info = $_POST['travel_info'];\n @$service = $_POST['service'];\n if (empty($p_image)) {\n $sql = \"UPDATE page SET\t page_title='$p_name',description='$p_description',caption='$p_caption',meta_title='$p_meta_title',meta_keywords='$p_meta_keywords',meta_description='$p_meta_description',publish='$p_publish',travel_info='$travel_info',service='$service' WHERE id='$pid'\";\n } else {\n $sql = \"UPDATE page SET\t page_title='$p_name',description='$p_description',caption='$p_caption',meta_title='$p_meta_title',meta_keywords='$p_meta_keywords',meta_description='$p_meta_description',image='$p_image',publish='$p_publish',travel_info='$travel_info',service='$service' WHERE id='$pid'\";\n }\n $this->mysqli->query($sql);\n\n if ($this->mysqli->error) {\n echo $this->mysqli->error;\n } else {\n echo \"<script type='text/javascript'>alert('Page updated successfully')</script>\";\n }\n }",
"function edit_page()\n\t{\n\t\tglobal $errors, $cache, $security, $basic_gui;\n\t\t\n\t\t// basic error check\n\t\tif ( !isset( $_POST[ 'submit_page' ] ) )\n\t\t{\n\t\t\t$errors->report_error( $this->lang[ 'Wrong_form' ], CRITICAL_ERROR );\n\t\t}\n\t\t\n\t\t// get data\n\t\t$title = ( isset( $_POST[ 'title' ] ) ) ? strval( $_POST[ 'title' ] ) : '';\n\t\t$lang = ( isset( $_POST[ 'language' ] ) ) ? strval( $_POST[ 'language' ] ) : '';\n\t\t$text = str_replace( ' ', ' ', $basic_gui->gennuline( ( isset( $_POST[ 'editor1' ] ) ) ? strval( $_POST[ 'editor1' ] ) : '' ) );\n\t\t$auth = ( isset( $_POST[ 'auth' ] ) ) ? intval( $_POST[ 'auth' ] ) : GUEST;\n\t\t$remove = ( isset( $_POST[ 'remove' ] ) && $_POST[ 'remove' ] == 'on' ) ? TRUE : FALSE;\n\t\t\n// \t\t$text = str_replace( \"\\n\", '<br />', $text );\n\t\t\n\t\tif ( empty( $title ) || empty( $text ) )\n\t\t{ // need these\n\t\t\t$errors->report_error( $this->lang[ 'No_data' ], GENERAL_ERROR );\n\t\t}\n\t\t\n\t\t// save to the array\n\t\tif ( !is_array( $this->pages_array[ $lang ] ) )\n\t\t{ // make it an array, just to be sure\n\t\t\t$this->pages_array[ $lang ] = array();\n\t\t}\n\t\tif ( !$remove )\n\t\t{\n\t\t\t$pag = array( 'content' => $text, 'auth' => $auth );\n\t\t\t$this->pages_array[ $lang ][ $title ] = $pag;\n\t\t}else\n\t\t{\n\t\t\tunset( $this->pages_array[ $lang ][ $title ] );\n\t\t}\n\t\t\n\t\t// now write it\n\t\t$this->save_pages();\n\t\t\n\t\t$errors->report_error( $this->lang[ 'Edited' ], MESSAGE );\n\t}",
"private function souprimePage($id) {\n\n\t\t$modele = new ModelePage();\n\t\t$souprime = $modele->souprimePage($id);\n\n\t\tif ($souprime) {\n\t\t\t$_SESSION['success'] = 'SUCCÈS: La page a été supprimée!';\n\t\t} else {\n\t\t\t$_SESSION['erreur'] = 'ERREUR: La page n\\'a pas été supprimée!';\n\t\t}\n\n\t\t$this->modificationAll();\n\n\t}",
"protected function set_post() {\n $this->post = $this->safe_find_from_id('Post');\n }",
"function edit_info()\n\t{\n\t\tif ($this->ipsclass->input['id'] == \"\")\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Невозможно определить ID языка\");\n\t\t}\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'languages', 'where' => \"lid='\".$this->ipsclass->input['id'].\"'\" ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\tif ( ! $row = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Невозможно найти язык по введенному ID\");\n\t\t}\n\n\t\t$final['lname'] = stripslashes($_POST['lname']);\n\n\t\tif (isset($_POST['lname']))\n\t\t{\n\t\t\t$final['lauthor'] = stripslashes($_POST['lauthor']);\n\t\t\t$final['lemail'] = stripslashes($_POST['lemail']);\n\t\t}\n\n\t\t$this->ipsclass->DB->do_update( 'languages', $final, \"lid='\".$this->ipsclass->input['id'].\"'\" );\n\n\t\t$this->rebuild_cache();\n\n\t\t$this->ipsclass->admin->done_screen(\"Языковой модуль обновлен\", \"Управление языками\", \"{$this->ipsclass->form_code}\" );\n\n\t}",
"function pa_edit() {\n\t\t\t\t$edit_pid = (int)UTIL::get_post('edit_pid');\n\t\t\t\t\n\t\t\t\t//-- haben wir keine edit-id, gibts eine seiten-tabelle zur auswahl\n\t\t\t\tif (!$edit_pid) {\n\t\t\t\t\techo 'error: no pid';\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$form = MC::create('form');\n\t\t\t\t$form->init('page', 'mod_page');\n\t\t\t\t$form->add_hidden('edit_pid', $edit_pid);\n\t\t\t\t\n\t\t\t\t// hatten wir fehler\n\t\t\t\tif ($this->get_var('error')) {\n\t\t\t\t\t$form->set_values($this->get_var('data'));\n\t\t\t\t\t$form->set_error_fields($this->get_var('error'));\n\t\t\t\t}\t\n\t\t\t\telse {\n\t\t\t\t\t// frisch aus db lesen\n\t\t\t\t\t$sql = 'SELECT * FROM '.$this->mod_tbl.' WHERE id='.$edit_pid;\n\t\t\t\t\t$res = $this->DB->query($sql);\n\t\t\t\t\t$data = $res->r();\n\t\t\t\t\t$form->set_values($data);\n\t\t\t\t}\n\n\t\t\t\t$this->set_var('path', $this->_get_path_print($edit_pid));\n\t\t\t\t$this->set_var('form', $form);\n\t\t\t\t\n\t\t\t\t$this->OPC->generate_view($this->tpl_dir.'pa_edit.php');\n\n\t\t\t}",
"function add_page_form($id, $imageId, $edit = '') {\n global $wpdb;\n\t\t$slideType = \"\";\n $sql = \"select `name`, `filename` from `\".$this->table_img_name.\"` where `id` = '\".$imageId.\"'\";\n\t\t$my_xml = $this->get_xml($id);\n\t $img = $wpdb->get_row($sql, ARRAY_A, 0);\n\t\tif($edit == \"true\"){\n\t\t\t\n\t\t\t$tempPages = $this->xml_to_table($id);\n\t\t\t$fileExt = split(\"\\.\", $tempPages['allPages']['src'][$imageId]);\n\t\t\t$slideType = $tempPages['allPages']['type'][$imageId];\n\t\t} else {\n\t\t\t$fileExt = split(\"\\.\", $img['name']);\n\t\t\tif($fileExt['1'] == \"png\" || $fileExt['1'] == \"jpg\" || $fileExt['1'] == \"gif\" || $fileExt['1'] == \"jpeg\"){\n\t\t\t\t$slideType = \"image\";\n\t\t\t} elseif($fileExt['1'] == \"swf\") {\n\t\t\t\t$slideType = \"flash\";\n\t\t\t} elseif($fileExt['1'] == \"flv\") {\n\t\t\t\t$slideType = \"video\";\n\t\t\t}\n\t\t}\n\t\n\t\t\n\t//\techo \"file ext = \".$slideType.$imageId;\n\t\t\n\t\t$dropId = -1;\n\t\t$typeValue = $slideType;\n ?>\n\n\t\t<div id=\"ajax-response\"></div>\n\t\t\t\t<form name=\"addpage\" id=\"addpage\" method=\"post\" action=\"\" enctype=\"multipart/form-data\" class=\"add:the-list: validate\">\n\t\t\t\t<input name=\"action\" value=\"addpage\" type=\"hidden\">\n\n\t\t\t\t<input name=\"id\" value=\"<?php echo $id;?>\" type=\"hidden\">\n\t\t\t\t<input name=\"imageId\" value=\"<?php echo $imageId;?>\" type=\"hidden\">\n\t\t\t\t<input type=\"hidden\" name=\"typeOur\" value=\"<?php echo $typeValue;?>\"/>\n\n\t\t\t\t<table class=\"form-table\" > <!-- table form for page type -->\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t<th class=\"table_heading\" colspan=\"3\"><h3>Assets</h3></th>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td class=\"under\" ><label>Slide type</label></td>\n\t\t\t\t\t\t\t\t<td class=\"middleLabel\"><label><?php echo $slideType; ?></label></td>\n\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Please specify the page of type, if you don't know which type to choose please see the help file</p></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t\t<?php if($slideType == \"image\"){?>\n\t\t\t\t\t<table class=\"form-table\" > <!-- table form for image type -->\n\t\t\t\t<?php }else{ ?>\n\t\t\t\t\t<table class=\"form-table\" id=\"hide\" style=\"display:none;\" >\n\t\t\t\t<?php }?>\t\t\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td class=\"under\"><label>Slide Title</label></td>\n\t\t\t\t\t\t\t\t\t<td class=\"middle\" >\n\t\t\t\t\t\t\t\t\t\t<?php if($edit == \"true\"){ ?>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"text\" name=\"imageTitle\" value=\"<?php echo $tempPages['allPages']['slideTitle'][$imageId]?>\" /></td>\n\t\t\t\t\t\t\t\t\t\t<?php }else{ ?>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"text\" name=\"imageTitle\" /></td>\n\t\t\t\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t\t\t<td class=\"desc\" ><p></p></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\t\n\t\t\t\t\t\t\t\t\t<td class=\"under\"><label>Slide Text</label></td>\n\t\t\t\t\t\t\t\t\t<td class=\"middle\" >\n\t\t\t\t\t\t\t\t\t\t<?php if($edit == \"true\"){ ?>\n\t\t\t\t\t\t\t\t\t\t\t<textarea class=\"text fat\" name=\"slideText\" cols=\"\" rows=\"\"><?php echo htmlspecialchars($tempPages['allPages']['slideText'][$imageId]);?></textarea>\n\t\t\t\t\t\t\t\t\t\t<?php }else{ ?>\n\t\t\t\t\t\t\t\t\t\t\t<textarea class=\"text fat\" name=\"slideText\" cols=\"\" rows=\"\"></textarea>\n\t\t\t\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t\t\t<td class=\"desc\" ><p>The text you enter must be HTML formatted.</p></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td class=\"under\"><label>Hyperlink URL</label></td>\n\t\t\t\t\t\t\t\t\t<td class=\"middle\" >\n\t\t\t\t\t\t\t\t\t\t<?php if($edit == \"true\"){ ?>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"text\" name=\"hyperlinkURL\" value=\"<?php echo $tempPages['allPages']['hyperlinkURL'][$imageId]?>\"/></td>\n\t\t\t\t\t\t\t\t\t\t<?php }else{ ?>\n\t\t\t\t\t\t\t\t\t\t\t<input type=\"text\" class=\"text\" name=\"hyperlinkURL\"/></td>\t\n\t\t\t\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t\t\t<td class=\"desc\" ><p>Specify hyperlinks URL</p></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td class=\"under\"><label>Hyperlink Target</label></td>\n\t\t\t\t\t\t\t\t\t<td class=\"middle\" >\n\t\t\t\t\t\t\t\t\t\t<select name=\"hyperlinkTarget\">\n\t\t\t\t\t\t\t\t\t\t\t<?php if($edit == \"true\"){ \n\t\t\t\t\t\t\t\t\t\t\t\t\tif($tempPages['allPages']['hyperlinkTarget'][$imageId] == \"_blank\") {?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"_blank\" selected=\"yes\">_blank</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"_self\">_self</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php } else {?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"_blank\">_blank</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"_self\" selected=\"yes\">_self</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php }?>\n\t\t\t\t\t\t\t\t\t\t\t<?php }else{ ?>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"_blank\" selected=\"yes\">_blank</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"_self\">_self</option>\n\t\t\t\t\t\t\t\t\t\t\t<?php } ?>\t\n\t\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t\t<td class=\"desc\" ><p>Specify hyperlinks target</p></td>\n\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t<!-- table form for swf type -->\n\t\t\t\t<?php if($slideType == \"flash\"){?>\n\t\t\t\t\t<table class=\"form-table\" >\n\t\t\t\t<?php }else{ ?>\n\t\t\t\t\t<table class=\"form-table\" id=\"hide\" style=\"display:none;\" >\n\t\t\t\t<?php }?>\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td class=\"under\"><label>Slide Title</label></td>\n\t\t\t\t\t\t\t<td class=\"middle\" >\n\t\t\t\t\t\t\t\t<?php if($edit == \"true\"){ ?>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"flashTitle\" value=\"<?php echo $tempPages['allPages']['slideTitle'][$imageId]?>\"/>\n\t\t\t\t\t\t\t\t<?php } else {?>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"flashTitle\" value=\"\"/>\n\t\t\t\t\t\t\t\t<?php }?>\t\n\t\t\t\t\t\t\t<td class=\"desc\" ><p></p></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t\t\n\t\t\t\t<?php if($slideType == \"flash\"){?>\n\t\t\t\t\t<table class=\"form-table\" >\n\t\t\t\t<?php }else{ ?>\n\t\t\t\t\t<table class=\"form-table\" id=\"1\" style=\"display:none;\" >\n\t\t\t\t<?php }?>\n\t\t\t\t\t\t\t<tr style=\"border:none;\">\n\t\t\t\t\t\t\t\t<td colspan=\"3\">\n\t\t\t\t\t\t\t\t\t\t<input class=\"button-primary\" name=\"action\" value=\"Add Slide\" type=\"submit\" onclick=\"display_type();\" style=\"margin-left:-9px\">\n\t\t\t\t\t\t\t\t\t<input class=\"button-primary\" name=\"action\" value=\"Cancel\" type=\"submit\">\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th class=\"table_heading\" colspan=\"3\"><h3>Select Image</h3></th>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tbody>\n\n\n\t\t\t\t<?php \n\t\t\t\t\t\tglobal $wpdb;\n\t\t\t\t\t\t$sql = \"select `id`, `name`, `filename` from `\".$this->table_img_name.\"` order by `id`\";\n\t\t\t\t\t\t$images = $wpdb->get_results($sql, ARRAY_A);\n\t\t\t\t\t\t$list_large = \"\";\n \t\t\tif(count($images) == \"0\") \n\t\t\t\t\t\t\t$list_large .= \"\";\n\t \t\t\telse foreach($images as $img) {\n\t\t\t\t\t\t\t$fileExt = split(\"\\.\", $img['name']);\n\t\t\t\t\t\t $formats = array(\"flv\", \"swf\");\n\t\t\t\t\t\t if(in_array(strtolower($fileExt['1']), $formats)) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t \t\t\t\t\t$list_large.=\"\t<tr style=\\\"text-align:center;\\\">\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\\\"under\\\"><input class=\\\"radio\\\" type=\\\"radio\\\" name=\\\"largeFlash\\\" value=\\\"\".$img['filename'].\"\\\" /></td>\";\n\t\t\t \t\t\t\t\t$list_large.=\"\t<td class=\\\"middle\\\">\".$this->printImg($img['filename']).\"</td>\";\n\t\t\t \t\t\t\t\t$list_large.=\"\t<td class=\\\"desc\\\">\".$img['name'].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t\t</tr>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo $list_large; // list images \n\t\t\t\t\t?>\n\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t\t\n\t\t\t\t<!-- VIDEO -->\n\t\t\t\t<?php if($slideType == \"video\"){?>\n\t\t\t\t\t<table class=\"form-table\" >\n\t\t\t\t<?php }else{ ?>\n\t\t\t\t\t<table class=\"form-table\" id=\"hide\" style=\"display:none;\" >\n\t\t\t\t<?php }?>\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td class=\"under\"><label>Slide Title</label></td>\n\t\t\t\t\t\t\t<td class=\"middle\" >\n\t\t\t\t\t\t\t\t<?php if($edit == \"true\"){ ?>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"videoTitle\" value=\"<?php echo $tempPages['allPages']['slideTitle'][$imageId]?>\"/>\n\t\t\t\t\t\t\t\t<?php } else {?>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"videoTitle\" value=\"\"/>\n\t\t\t\t\t\t\t\t<?php }?>\n\t\t\t\t\t\t\t<td class=\"desc\" ><p></p></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td class=\"under\"><label>Video Width</label></td>\n\t\t\t\t\t\t\t<td class=\"middle\" >\n\t\t\t\t\t\t\t\t<?php if($edit == \"true\"){ ?>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"videoWidth\" value=\"<?php echo $tempPages['allPages']['videoWidth'][$imageId]?>\"/>\n\t\t\t\t\t\t\t\t<?php } else {?>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"videoWidth\" value=\"\"/>\t\t\n\t\t\t\t\t\t\t\t<?php }?>\t\t\n\t\t\t\t\t\t\t<td class=\"desc\" ><p></p></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=\"under\"><label>Video Height</label></td>\n\t\t\t\t\t\t\t<td class=\"middle\" >\n\t\t\t\t\t\t\t\t<?php if($edit == \"true\"){ ?>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"videoHeight\" value=\"<?php echo $tempPages['allPages']['videoHeight'][$imageId]?>\"/>\n\t\t\t\t\t\t\t\t<?php } else {?>\n\t\t\t\t\t\t\t\t\t<input type=\"text\" name=\"videoHeight\" value=\"\"/>\n\t\t\t\t\t\t\t\t<?php }?>\t\n\t\t\t\t\t\t\t<td class=\"desc\" ><p></p></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=\"under\"><label>Autoplay</label></td>\n\t\t\t\t\t\t\t<td class=\"middle\" >\n\t\t\t\t\t\t\t\t<select name=\"autoplay\">\n\t\t\t\t\t\t\t\t\t<?php if($edit == \"true\"){ \n\t\t\t\t\t\t\t\t\t\t\tif($tempPages['allPages']['autoplay'][$imageId] == \"true\") {?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"true\" selected=\"yes\">true</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"false\">false</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<?php } else {?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"true\">true</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"false\" selected=\"yes\">false</option>\n\t\t\t\t\t\t\t\t\t\t\t\t<?php }?>\n\t\t\t\t\t\t\t\t\t<?php }else{ ?>\n\t\t\t\t\t\t\t\t\t\t<option value=\"true\" selected=\"yes\">true</option>\n\t\t\t\t\t\t\t\t\t\t<option value=\"false\">false</option>\n\t\t\t\t\t\t\t\t\t<?php } ?>\t\n\t\t\t\t\t\t\t\t</select></td>\n\t\t\t\t\t\t\t<td class=\"desc\" ><p></p></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t\t\n\t\t\t\t<?php if($slideType == \"video\"){?>\n\t\t\t\t\t<table class=\"form-table\" >\n\t\t\t\t<?php }else{ ?>\n\t\t\t\t\t<table class=\"form-table\" id=\"1\" style=\"display:none;\" >\n\t\t\t\t<?php }?>\n\t\t\t\t\t\t\t<tr style=\"border:none;\">\n\t\t\t\t\t\t\t\t<td colspan=\"3\">\n\t\t\t\t\t\t\t\t\t\t<input class=\"button-primary\" name=\"action\" value=\"Add Slide\" type=\"submit\" onclick=\"display_type();\" style=\"margin-left:-9px\">\n\t\t\t\t\t\t\t\t\t<input class=\"button-primary\" name=\"action\" value=\"Cancel\" type=\"submit\">\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th class=\"table_heading\" colspan=\"3\"><h3>Select Image</h3></th>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tbody>\n\n\n\t\t\t\t<?php \n\t\t\t\t\t\tglobal $wpdb;\n\t\t\t\t\t\t$sql = \"select `id`, `name`, `filename` from `\".$this->table_img_name.\"` order by `id`\";\n\t\t\t\t\t\t$images = $wpdb->get_results($sql, ARRAY_A);\n\t\t\t\t\t\t$list_large = \"\";\n \t\t\tif(count($images) == \"0\") \n\t\t\t\t\t\t\t$list_large .= \"\";\n\t \t\t\telse foreach($images as $img) {\n\t\t\t\t\t\t\t$fileExt = split(\"\\.\", $img['name']);\n\t\t\t\t\t\t $formats = array(\"flv\", \"swf\");\n\t\t\t\t\t\t if(in_array(strtolower($fileExt['1']), $formats)) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t \t\t\t\t\t$list_large.=\"\t<tr style=\\\"text-align:center;\\\">\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\\\"under\\\"><input class=\\\"radio\\\" type=\\\"radio\\\" name=\\\"largeVideo\\\" value=\\\"\".$img['filename'].\"\\\" /></td>\";\n\t\t\t \t\t\t\t\t$list_large.=\"\t<td class=\\\"middle\\\">\".$this->printImg($img['filename']).\"</td>\";\n\t\t\t \t\t\t\t\t$list_large.=\"\t<td class=\\\"desc\\\">\".$img['name'].\"</td>\n\t\t\t\t\t\t\t\t\t\t\t\t</tr>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo $list_large; // list images \n\t\t\t\t\t?>\n\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\n\t\t\t\t\t\t<br />\n\n\n\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\tif($edit == \"true\"){\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"button-primary\" name=\"action\" value=\"Edit Page\" type=\"submit\" onclick=\"display_type();\">\n\t\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t\t\t\t<input class=\"button-primary\" name=\"action\" value=\"Add Slide\" type=\"submit\" onclick=\"display_type();\">\n\t\t\t\t\t\t\t\t\t\t<?php\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<input class=\"button-primary\" name=\"action\" value=\"Cancel\" type=\"submit\">\n\n\n\t\t\t\t\n\t\t</form>\n\t\t<?php\n\n\t}",
"function bnk_save_slide_data($post_id) {\r\n\tglobal $slide_meta;\r\n \r\n\t// verify nonce\r\n\tif (!wp_verify_nonce($_POST['bnk_meta_box_nonce'], basename(__FILE__))) {\r\n\t\treturn $post_id;\r\n\t}\r\n \r\n\t// check autosave\r\n\tif (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\r\n\t\treturn $post_id;\r\n\t}\r\n \r\n\t// check permissions\r\n\tif ('page' == $_POST['post_type']) {\r\n\t\tif (!current_user_can('edit_page', $post_id)) {\r\n\t\t\treturn $post_id;\r\n\t\t}\r\n\t} elseif (!current_user_can('edit_post', $post_id)) {\r\n\t\treturn $post_id;\r\n\t}\r\n \r\n\tforeach ($slide_meta['fields'] as $field) {\r\n\t\t$old = get_post_meta($post_id, $field['id'], true);\r\n\t\t$new = $_POST[$field['id']];\r\n \r\n\t\tif ($new && $new != $old) {\r\n\t\t\tupdate_post_meta($post_id, $field['id'], $new);\r\n\t\t} elseif ('' == $new && $old) {\r\n\t\t\tdelete_post_meta($post_id, $field['id'], $old);\r\n\t\t}\r\n\t}\r\n}",
"public function pageIdCanBeDeterminedWhileEditingAPageRecord() {}",
"public function update_page_metadata(){\n\t\t\t\n\t\t\t$this->load->library('form_validation');\n\t\t\t\t\n\t\t\t$this->form_validation->set_error_delimiters('<div class=\"alert alert-danger text-danger text-center\"><i class=\"fa fa-exclamation-triangle\" aria-hidden=\"true\"></i> ', '</div>');\n\t\t\t\n\t\t\t$this->form_validation->set_rules('page','Page','required|trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('keywords','Keywords','required|trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('description','Description','required|trim|xss_clean');\n\t\t\t\t\n\t\t\tif ($this->form_validation->run()){\n\t\t\t\t\n\t\t\t\t//escaping the post values\n\t\t\t\t$page_metadata_id = html_escape($this->input->post('page_metadata_id'));\n\t\t\t\t$id = preg_replace('#[^0-9]#i', '', $page_metadata_id); // filter everything but numbers\n\t\t\t\n\t\t\t\t\n\t\t\t\t$update = array(\n\t\t\t\t\t'page' => strtolower($this->input->post('page')),\n\t\t\t\t\t'keywords' => strtolower($this->input->post('keywords')),\n\t\t\t\t\t'description' => $this->input->post('description'),\n\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\tif ($this->Page_metadata->update_page_metadata($update, $id)){\t\n\t\t\t\t\t\n\t\t\t\t\t$username = $this->session->userdata('admin_username');\n\t\t\t\t\t$user_array = $this->Admin->get_user($username);\n\t\t\t\t\t\n\t\t\t\t\t$fullname = '';\n\t\t\t\t\tif($user_array){\n\t\t\t\t\t\tforeach($user_array as $user){\n\t\t\t\t\t\t\t$fullname = $user->admin_name;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//update page metadata table\n\t\t\t\t\t$description = 'updated page metadata';\n\t\t\t\t\n\t\t\t\t\t$activity = array(\t\t\t\n\t\t\t\t\t\t'name' => $fullname,\n\t\t\t\t\t\t'username' => $username,\n\t\t\t\t\t\t'description' => $description,\n\t\t\t\t\t\t'keyword' => 'Page Metadata',\n\t\t\t\t\t\t'activity_time' => date('Y-m-d H:i:s'),\n\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t\t$this->Site_activities->insert_activity($activity);\n\t\t\t\t\t\t\t\n\t\t\t\t\t//$this->session->set_flashdata('updated', '<script type=\"text/javascript\" language=\"javascript\">setTimeout(function() { $(\".custom-alert-box\").fadeOut(\"slow\"); }, 5000);</script><div class=\"custom-alert-box text-center\"><i class=\"fa fa-check-circle\"></i> Page Metadata updated!</div>');\n\t\t\t\t\t\t\n\t\t\t\t\t$data['success'] = true;\n\t\t\t\t\t$data['notif'] = '<div class=\"alert alert-success text-center\" role=\"alert\"> <i class=\"fa fa-check-circle\"></i><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">×</button> Page metadata has been updated!</div>';\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}else {\n\t\t\t\t\n\t\t\t\t$data['success'] = false;\n\t\t\t\t$data['notif'] = '<div class=\"alert alert-danger text-center\" role=\"alert\"><i class=\"fa fa-ban\"></i><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">×</button> There are errors on the form!'.validation_errors().'</div>';\n\t\t\t}\n\t\t\t\n\t\t\t// Encode the data into JSON\n\t\t\t$this->output->set_content_type('application/json');\n\t\t\t$data = json_encode($data);\n\n\t\t\t// Send the data back to the client\n\t\t\t$this->output->set_output($data);\n\t\t\t//echo json_encode($data);\t\t\t\n\t\t}",
"function insert_update_text_icon_data($page_id, $id = NULL)\n {\n $redirect = $this->input->post('redirect');\n $open_new_tab = $this->input->post('open_new_tab');\n $status = $this->input->post('status');\n \n $redirect = (isset($redirect)) ? '1' : '0';\n $open_new_tab = (isset($open_new_tab)) ? '1' : '0';\n $status = (isset($status)) ? '1' : '0';\n \n if ($id == NULL):\n $insert_data = array(\n 'page_id' => $page_id,\n 'icon' => $this->input->post('icon'),\n 'icon_color' => $this->input->post('icon_color'),\n 'icon_position' => $this->input->post('icon_position'),\n 'icon_shape' => $this->input->post('icon_shape'),\n 'icon_background_color' => $this->input->post('icon_background_color'),\n 'icon_hover_color' => $this->input->post('icon_hover_color'),\n 'icon_hover_background' => $this->input->post('icon_hover_background'),\n 'title' => htmlspecialchars_decode(trim(htmlentities($this->input->post('title')))),\n 'content' => htmlspecialchars_decode(trim(htmlentities($this->input->post('content')))),\n 'title_color' => $this->input->post('title-color'),\n 'title_position' => $this->input->post('title_position'),\n 'content_title_color' => $this->input->post('content-title-color'),\n 'content_title_position' => $this->input->post('content_title_position'),\n 'content_color' => $this->input->post('content-color'),\n 'content_position' => $this->input->post('content_position'),\n 'redirect' => $redirect,\n 'redirect_url' => $this->input->post('redirect_url'),\n 'open_new_tab' => $open_new_tab,\n 'background_hover_color' => $this->input->post('background_hover'),\n 'hover_title_color' => $this->input->post('hover_title_color'),\n 'content_title_hover' => $this->input->post('content_title_hover'),\n 'text_hover_color' => $this->input->post('text_hover'),\n 'background_color' => $this->input->post('background-color'),\n 'sort_order' => $this->input->post('sort_order'),\n 'status' => $status,\n 'created_at' => date('m-d-Y')\n );\n // Insert into Text Icon\n $this->db->insert($this->table_name, $insert_data);\n return $this->db->insert_id();\n else:\n $update_data = array(\n 'icon' => $this->input->post('icon'),\n 'icon_color' => $this->input->post('icon_color'),\n 'icon_position' => $this->input->post('icon_position'),\n 'icon_shape' => $this->input->post('icon_shape'),\n 'icon_background_color' => $this->input->post('icon_background_color'),\n 'icon_hover_color' => $this->input->post('icon_hover_color'),\n 'icon_hover_background' => $this->input->post('icon_hover_background'),\n 'title' => htmlspecialchars_decode(trim(htmlentities($this->input->post('title')))),\n 'content' => htmlspecialchars_decode(trim(htmlentities($this->input->post('content')))),\n 'title_color' => $this->input->post('title-color'),\n 'title_position' => $this->input->post('title_position'),\n 'content_title_color' => $this->input->post('content-title-color'),\n 'content_title_position' => $this->input->post('content_title_position'),\n 'content_color' => $this->input->post('content-color'),\n 'content_position' => $this->input->post('content_position'),\n 'redirect' => $redirect,\n 'redirect_url' => $this->input->post('redirect_url'),\n 'open_new_tab' => $open_new_tab,\n 'background_hover_color' => $this->input->post('background_hover'),\n 'hover_title_color' => $this->input->post('hover_title_color'),\n 'content_title_hover' => $this->input->post('content_title_hover'),\n 'text_hover_color' => $this->input->post('text_hover'),\n 'background_color' => $this->input->post('background-color'),\n 'sort_order' => $this->input->post('sort_order'),\n 'status' => $status\n );\n // Update into Text Icon\n $this->db->where('id', $id);\n $this->db->where('page_id', $page_id);\n return $this->db->update($this->table_name, $update_data);\n endif;\n }",
"public function save( $data ){\n\t\t\t$args['numToShow'] \t = (int) $data['numToShow'];\n $args['displayBeneath'] = (int) $data['displayBeneath'];\n $args['parentPageID'] = (int) $data['parentPageID'];\n\t\t\tparent::save( $args );\n\t\t}",
"protected function _after_read(): void\n {\n $contents = PageContent::get_data_by( ['page_id' => $this->page_id], $offset = 0,$limit = 1, $use_like = FALSE, $sort_by = 'page_content_id', $sort_desc = TRUE );\n if (isset($contents[0]) && !$this->is_property_modified('page_content')) {\n $this->page_content = $contents[0]['page_content_data'];\n }\n\n if ($this->page_group_id && !$this->is_property_modified('page_group_uuid') ) {\n $PageGroup = new PageGroup($this->page_group_id);\n $this->page_group_uuid = $PageGroup->get_uuid();\n }\n\n //the property may be NULL not because it is not set/initialized but because it was explicitely set to NULL on another instance\n if (!$this->page_slug && !$this->is_property_modified('page_slug')) {\n $this->page_slug = $this->get_alias();\n }\n }",
"function add_edit_map($page_id, $id = null) {\n if ($id != null) {\n $map = $this->Map_model->get_map_by_id($page_id, $id);\n $customize_data = json_decode($map[0]->customization);\n $data['id'] = $map[0]->id;\n $data['image'] = $map[0]->image;\n $data['map_title'] = $map[0]->title;\n $data['address'] = $map[0]->address;\n $data['title_color'] = $customize_data->title_color;\n $data['title_position'] = $customize_data->title_position;\n $data['address_color'] = $customize_data->address_color;\n $data['address_position'] = $customize_data->address_position;\n $data['map_position'] = $customize_data->map_position;\n $data['background_color'] = $customize_data->background_color;\n $data['sort_order'] = $map[0]->sort_order;\n $data['status'] = $map[0]->status;\n } else {\n $data['id'] = \"\";\n $data['image'] = \"\";\n $data['map_title'] = \"\";\n $data['address'] = \"\";\n $data['sort_order'] = \"\";\n $data['status'] = \"\";\n $data['title_color'] = \"\";\n $data['title_position'] = \"\";\n $data['address_color'] = \"\";\n $data['address_position'] = \"\";\n $data['map_position'] = \"\";\n $data['background_color'] = \"\";\n }\n\n $data['website_folder_name'] = $this->admin_header->website_folder_name();\n $data['httpUrl'] = $this->admin_header->host_url();\n $data['ImageUrl'] = $this->admin_header->image_url(); \n $data['website_id'] = $this->admin_header->website_id();\n $data['page_id'] = $page_id;\n $data['title'] = ($id != null) ? 'Edit Map' : 'Add Map' . ' | Administrator';\n $data['heading'] = (($id != null) ? 'Edit' : 'Add') . ' Map';\n $this->load->view('template/meta_head', $data);\n $this->load->view('map_header');\n $this->admin_header->index();\n $this->load->view('add_edit_map', $data);\n $this->load->view('template/footer_content');\n $this->load->view('script');\n $this->load->view('template/footer');\n }",
"function editPage( &$outPage )\n {\n #echo \"eZNewsFlowerArticleViewer::editPage( \\$outPage = $outPage )<br />\\n\";\n $value = false;\n\n global $form_preview;\n #echo \"\\$form_preview = $form_preview<br />\\n\";\n #echo \"\\$this->Item->id() = \" . $this->Item->id() . \"<br />\\n\";\n $this->Item = new eZNewsArticle( $this->Item->id() );\n \n $this->IniObject->readAdminTemplate( \"eznewsflower/article\", \"view.php\" );\n\n if( !empty( $form_preview ) )\n {\n // OK, we need to store the changes.\n global $Story;\n global $Price;\n global $Name;\n global $ImageID;\n global $ParentID;\n \n $this->IniObject->set_file( array( \"article\" => \"preview.tpl\" ) );\n $this->IniObject->set_block( \"article\", \"go_to_parent_template\", \"go_to_parent\" );\n $this->IniObject->set_block( \"article\", \"go_to_self_template\", \"go_to_self\" );\n $this->IniObject->set_block( \"article\", \"upload_picture_template\", \"upload_picture\" );\n $this->IniObject->set_block( \"article\", \"picture_uploaded_template\", \"picture_uploaded\" );\n $this->IniObject->set_block( \"article\", \"picture_template\", \"picture\" );\n $this->IniObject->set_block( \"article\", \"article_image_template\", \"article_image\" );\n\n $newStory = \"<?xml version=\\\"1.0\\\"?>\\n\";\n $newStory = $newStory . \"<ezflower>\\n\";\n $newStory = $newStory . \"<name>\";\n $newStory = $newStory . htmlspecialchars( trim( $Name ) );\n $newStory = $newStory . \"</name>\\n\";\n $newStory = $newStory . \"<description>\";\n $newStory = $newStory . htmlspecialchars( trim( $Story ) );\n $newStory = $newStory . \"</description>\\n\";\n $newStory = $newStory . \"<price>\";\n $newStory = $newStory . htmlspecialchars( trim( $Price ) );\n $newStory = $newStory . \"</price>\\n\";\n $newStory = $newStory . \"</ezflower>\\n\";\n\n $this->Item->setParent( $ParentID, true );\n $this->Item->setStory( $newStory );\n $this->Item->setName( $Name );\n\n $file = new eZImageFile();\n\n if( $file->getUploadedFile( 'Image' ) )\n {\n $Picture = $file->name();\n\n $image = new eZImage();\n $image->setName( $file );\n $image->setCaption( \"Article picture: \" . $this->Item->name() );\n\n $image->setImage( $file );\n\n $image->store();\n $id = $image->ID();\n $PictureID = $id;\n }\n\n $this->Item->setImage( $PictureID, true );\n $this->Item->store( $outID );\n $this->doThis();\n }\n else\n {\n $this->IniObject->set_file( array( \"article\" => \"edit.tpl\" ) );\n $this->IniObject->set_block( \"article\", \"go_to_parent_template\", \"go_to_parent\" );\n $this->IniObject->set_block( \"article\", \"go_to_self_template\", \"go_to_self\" );\n $this->IniObject->set_block( \"article\", \"item_template\", \"item\" );\n $this->IniObject->set_block( \"article\", \"upload_picture_template\", \"upload_picture\" );\n $this->IniObject->set_block( \"article\", \"picture_uploaded_template\", \"picture_uploaded\" );\n $this->IniObject->set_block( \"article\", \"picture_template\", \"picture\" );\n $this->IniObject->set_block( \"article\", \"article_image_template\", \"article_image\" );\n $this->fillInCategories();\n $this->doThis( true );\n \n \n }\n \n\n $this->IniObject->setAllStrings();\n $outPage = $this->IniObject->parse( \"output\", \"article\" );\n\n $value = true;\n \n return $value;\n }",
"function save_post($post_id) {\n if ( !wp_verify_nonce( $_POST['manual-related-posts'], plugin_basename(__FILE__) ) )\n return $post_id;\n if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) \n return $post_id;\n if ( 'page' == $_POST['post_type'] ) \n {\n if ( !current_user_can( 'edit_page', $post_id ) )\n return $post_id;\n }\n else\n {\n if ( !current_user_can( 'edit_post', $post_id ) )\n return $post_id;\n }\n // need to collapse the list in case any in the middle were removed\n $update_posts = array();\n $i = 1;\n do{\n $key = $this->postmeta_key($i);\n $val = $_POST['manual_related_posts_'.$i];\n if ($val == 0) {\n delete_post_meta($post_id, $key);\n }else {\n $update_posts[] = $val;\n }\n $i++;\n } while (isset($_POST['manual_related_posts_'.$i]));\n $i = 1;\n foreach ($update_posts as $val) {\n update_post_meta($post_id, $this->postmeta_key($i), $val);\n $i++;\n }\n }",
"function form_init_elements()\r\n {\r\n $this->add_hidden_element(\"swimmeetid\") ;\r\n\r\n // This is used to remember the action\r\n // which originated from the GUIDataList.\r\n \r\n $this->add_hidden_element(\"_action\") ;\r\n }",
"protected function postLoad(){\n\t\t\t\n\t\t}",
"function setVariables($pageId, $instanceId, $variables){\n\tglobal $user,$mySQLLink;\n\t\n\t$pageId = mysql_real_escape_string($pageId);\n\t$instanceId = mysql_real_escape_string($instanceId);\n\t//put old edit data into database\n\t$propQuery = mysql_query(\"SELECT * FROM `moduleProps` WHERE `instanceId` = '\".$instanceId.\"' AND `pageId` = '\".$pageId.\"'\",$mySQLLink) or die(mysql_error());\n\twhile($propRow = mysql_fetch_array($propQuery)){\n\t\t\t$oldProps[$propRow[\"propName\"]]=$propRow[\"propValue\"];\n\t}\n\t//get current highest edit ID\n\t$id = mysql_fetch_array(mysql_query(\"SELECT * FROM editHistory ORDER BY editId DESC\")); \n\t//record edits\n\t$string = \"INSERT INTO editHistory (editId, pageId, instanceId, time, ip, user) VALUES ('\".($id['editId']+1).\"','\".$pageId.\"','\".$instanceId.\"','\".time().\"','\".$_SERVER['REMOTE_ADDR'].\"','\".$user->data[\"username_clean\"].\"')\";\n\tmysql_query($string)or die(mysql_error()); //insert edit into editHistory table\n\t\n\t//for each old module property, insert a row into modulePropsHistory table with data\n\tforeach($oldProps as $name => $value){\n\t\t//echo \"INSERT INTO modulePropsHistory (editId,propName,propValue) VALUES ('\".($id['editId']+1).\"','\".$name.\"','\".$value.\"')\";\n\t\t//if($name != \"pageId\" && $name != \"instanceId\")\n\t\tif($name != \"pageId\" || $name != \"instanceId\"){\n\t\t\tmysql_query(\"INSERT INTO modulePropsHistory (editId, propName, propValue) VALUES ('\".($id['editId']+1).\"','\".mysql_real_escape_string($name).\"','\".mysql_real_escape_string(stripslashes($value)).\"')\")or die(mysql_error());\n\t\t}\n\t}\n\t\n\t//for each new property (passed on through $variables array), update current mySQL record\n\tforeach ($variables as $key => $value){ \n\t\t$exist = mysql_query(\"SELECT * FROM `moduleProps` WHERE `pageId` = '\".$pageId.\"' AND `instanceId` = '\".$instanceId.\"' AND `propName` = '\".mysql_real_escape_string($key).\"'\")or die(mysql_error());\n\t\tif(mysql_num_rows($exist) > 0){\n\t\t\tmysql_query(\"UPDATE `moduleProps` SET `propValue` = '\".mysql_real_escape_string($value).\"' WHERE `pageId` = '\".$pageId.\"' AND `instanceId` = '\".$instanceId.\"' AND `propName` = '\".mysql_real_escape_string($key).\"'\")or die(mysql_error());\n\t\t}else{\n\t\t\tmysql_query(\"INSERT INTO `moduleProps` (pageId, instanceId, propName, propValue) VALUES ('\".$pageId.\"','\".$instanceId.\"','\".mysql_real_escape_string($key).\"','\".mysql_real_escape_string($value).\"')\")or die(mysql_error());\n\t\t}\n\t}\n\t\n\treturn true;\n}",
"function experiences_save_postdata($post_id) {\n if (array_key_exists('exp-link-url', $_POST)) {\n update_post_meta($post_id, 'experiences_link', $_POST['exp-link-url']);\n }\n\n if (array_key_exists('exp-image-size', $_POST)) {\n update_post_meta($post_id, 'experiences_size', $_POST['exp-image-size']);\n }\n}",
"public function edit()\r\n\t{\r\n\t\t$id_definition = $this->input->post('id_item_definition');\r\n\r\n\t\t$definition = array();\r\n\t\t$this->item_definition_model->feed_blank_template($definition);\r\n\t\t$this->item_definition_model->feed_blank_lang_template($definition);\r\n\r\n\t\t// Existing\r\n\t\tif ($id_definition)\r\n\t\t{\r\n\t\t\t$definition = $this->item_definition_model->get(array(\r\n\t\t\t\t$this->item_definition_model->get_pk_name() => $id_definition)\r\n\t\t\t);\r\n\r\n\t\t\t$this->item_definition_model->feed_lang_template($id_definition, $definition);\r\n\t\t}\r\n\r\n\t\t$this->template['definition'] = $definition;\r\n\r\n\t\t$this->output('item/definition/edit');\r\n\t}",
"protected function performPostLoadCallback()\n {\n // echo 'loaded a record ...';\n $currentFunc = FormUtil::getPassedValue('func', 'main', 'GETPOST', FILTER_SANITIZE_STRING);\n $usesCsvOutput = FormUtil::getPassedValue('usecsvext', false, 'GETPOST', FILTER_SANITIZE_STRING);\n \n $this['id'] = (int) ((isset($this['id']) && !empty($this['id'])) ? DataUtil::formatForDisplay($this['id']) : 0);\n $this->formatTextualField('workflowState', $currentFunc, $usesCsvOutput, true);\n $this->formatTextualField('name', $currentFunc, $usesCsvOutput);\n $this->formatTextualField('description', $currentFunc, $usesCsvOutput);\n $this->formatTextualField('thankYou', $currentFunc, $usesCsvOutput);\n $this->formatTextualField('thankYouTitle', $currentFunc, $usesCsvOutput);\n $this['thankYouAlternativeUrl'] = ((isset($this['thankYouAlternativeUrl']) && !empty($this['thankYouAlternativeUrl'])) ? DataUtil::formatForDisplay($this['thankYouAlternativeUrl']) : '');\n $this['weight'] = (int) ((isset($this['weight']) && !empty($this['weight'])) ? DataUtil::formatForDisplay($this['weight']) : 0);\n $this['maxPerIp'] = (int) ((isset($this['maxPerIp']) && !empty($this['maxPerIp'])) ? DataUtil::formatForDisplay($this['maxPerIp']) : 0);\n $this['maxPerUserId'] = (int) ((isset($this['maxPerUserId']) && !empty($this['maxPerUserId'])) ? DataUtil::formatForDisplay($this['maxPerUserId']) : 0);\n $this['useCaptcha'] = (bool) $this['useCaptcha'];\n if ($currentFunc != 'edit' && $currentFunc != 'wizard' && $currentFunc != 'processPage') { /** ADDED */\n $this['recipients'] = ((isset($this['recipients']) && is_array($this['recipients'])) ? DataUtil::formatForDisplay($this['recipients']) : array());\n } /** ADDED */\n $this->formatTextualField('responseSubject', $currentFunc, $usesCsvOutput);\n $this->formatTextualField('confirmationSubject', $currentFunc, $usesCsvOutput);\n $this->formatTextualField('confirmationBody', $currentFunc, $usesCsvOutput);\n $this['archived'] = (bool) $this['archived'];\n $this['template'] = (bool) $this['template'];\n $this->formatTextualField('addition1', $currentFunc, $usesCsvOutput);\n $this->formatTextualField('addition2', $currentFunc, $usesCsvOutput);\n $this->formatTextualField('addition3', $currentFunc, $usesCsvOutput);\n $this->formatTextualField('addition4', $currentFunc, $usesCsvOutput);\n $this->formatTextualField('addition5', $currentFunc, $usesCsvOutput);\n \n $this->prepareItemActions();\n \n return true;\n }",
"public function postCreate(){\n /** @var Partial $partial */\n foreach(Partial::where('autocreate', \"=\", 1)->get() as $partial){\n $data = [\"title\" => $partial->name, \"permission\" => Partial::PERMISSION_EDIT_ONLY];\n // now check autofill fields\n $partial->loadConfig();\n if(isset($partial->config->autofill)){\n foreach($partial->config->autofill as $partialProp => $pageProp){\n $data[$partialProp] = $this->{$partialProp};\n }\n }\n $this->partials()->attach($partial->id, $data);\n }\n $this->massAssignAllPartials();\n }",
"public static function saveMetaData( $post_id ) {\r\n // Check to see if multiple items should flag so the data isn't saved\r\n if( \r\n !wp_verify_nonce( $_POST[self::NONCE_NAME], self::NONCE_ACTION )\r\n ) {\r\n return;\r\n }\r\n\r\n // Set the data we want to be saved\r\n $is_disabled = ( isset( $_POST['wp_disable_page__is_disabled'] ) && $_POST['wp_disable_page__is_disabled'] != '' ) ? $_POST['wp_disable_page__is_disabled'] : '0';\r\n $url = ( isset( $_POST['wp_disable_page__url'] ) && $_POST['wp_disable_page__url'] != '' ) ? $_POST['wp_disable_page__url'] : '';\r\n\r\n // Save the data\r\n update_post_meta( $post_id, 'wp_disable_page__is_disabled', $is_disabled );\r\n update_post_meta( $post_id, 'wp_disable_page__url', $url );\r\n }",
"function updatePage(){\r\n\t$pageData=base64_decode($_POST['data']);\r\n\t// Get the page we need to edit\r\n\t$html=getPage();\r\n\t// Iterate HTML, look for the editable region and make sure it's count matches the one being sent. \r\n\t$eid=0; // Assign logical number to each found class tag\r\n\tforeach($html->find('.clienteditor') as $e){ // TODO: change this to variable defined topic for edit regions\r\n\t \tif($eid==$_GET['id']){\r\n\t \t\t$e->innertext=$pageData;\r\n\t \t}\r\n\t\t$eid++;\r\n\t}\r\n\t// Post Back the updated HTML object.\r\n\t$result=postData($html);\r\n\techo \"{'status':'$result'}\";\r\n}",
"public function save_post($id) {\n\n\t\t\tif (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n \t\n \t\treturn;\n\t\t\t}\n\n\t\t\tif (! isset($_POST[$this->slug.'_noncename']) || ! wp_verify_nonce($_POST[$this->slug.'_noncename'], dirname(__FILE__)) || ! check_admin_referer(dirname(__FILE__), $this->slug.'_noncename')) {\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (isset($_POST['post_type']) && $_POST['post_type'] == $this->screen && current_user_can('edit_post', $id)) {\n\n\t\t\t\tSave::save_meta_options($this->slug, $this->options['options'], $id);\n\t\t\t}\n\t\t\telse {\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t}",
"function mptheme_layout_save_meta_box( $post_id ){\n\n\t/*\n\t * We need to verify this came from our screen and with proper authorization,\n\t * because the save_post action can be triggered at other times.\n\t */\n\n\t// Check if our nonce is set.\n\tif ( ! isset( $_POST['mptheme_page_setup_meta_box_nonce'] ) ) {\n\t\treturn;\n\t}\n\n\t// Verify that the nonce is valid.\n\tif ( ! wp_verify_nonce( $_POST['mptheme_page_setup_meta_box_nonce'], 'mptheme_layout_save_meta_box' ) ) {\n\t\treturn;\n\t}\n\n\t// If this is an autosave, our form has not been submitted, so we don't want to do anything.\n\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\treturn;\n\t}\n\n\t// Check the user's permissions.\n\tif ( ! current_user_can( 'edit_post', $post_id ) ) {\n\t\treturn;\n\t}\n\n\t/* OK, it's safe for us to save the data now. */\n\t\n\t// Make sure that it is set.\n\tif ( isset( $_POST['mptheme_page_setup_show_heading'] ) ) {\n\t\t// Sanitize user input.\n\t\t$sq_data = sanitize_text_field( $_POST['mptheme_page_setup_show_heading'] );\n\t\t// Update the meta field in the database.\n\t\tupdate_post_meta( $post_id, 'mptheme_page_setup_show_heading', $sq_data );\n\t}\n\n\t// Make sure that it is set.\n\tif ( isset( $_POST['mptheme_page_setup_revslider'] ) ) {\n\t\t// Sanitize user input.\n\t\t$sq_data = sanitize_text_field( $_POST['mptheme_page_setup_revslider'] );\n\t\t// Update the meta field in the database.\n\t\tif ($sq_data == \"no_slider\") {\n\t\t\tdelete_post_meta( $post_id, 'mptheme_page_setup_revslider' );\n\t\t} else {\n\t\t\tupdate_post_meta( $post_id, 'mptheme_page_setup_revslider', $sq_data );\n\t\t}\n\t}\n\t\t\n}",
"public function load() {\n\t\t$this -> template = TemplateManager::load(\"ForumPreference\");\n\t\t$this -> template -> insert(\"profileImage\", $this -> user -> getProfileImage());\n\t\t$this -> template -> insert(\"signature\", $this -> user -> getSignature());\n\t\t$this -> display();\n\t}",
"function wp_idolondemand_edit_post()\n{\n}",
"public function PrePopulateFormValues($id, $field='')\n {\n if (empty($field)) {\n $field = $this->Index_Name;\n }\n $this->LoadData();\n $row = $this->GetRow($field, $id);\n if ($row) {\n Form_PostArray($row);\n return true;\n }\n return false;\n }",
"protected function handlePageEditing() {}",
"public static function saveForLanding(int $id, array $data): void\n\t{\n\t\t$check = Landing::getList([\n\t\t\t'select' => [\n\t\t\t\t'ID'\n\t\t\t],\n\t\t\t'filter' => [\n\t\t\t\t'ID' => $id\n\t\t\t]\n\t\t])->fetch();\n\t\tif ($check)\n\t\t{\n\t\t\t$editModeBack = self::$editMode;\n\t\t\tself::$editMode = true;\n\t\t\tself::saveData($id, self::ENTITY_TYPE_LANDING, $data);\n\t\t\tself::indexContent($id, self::ENTITY_TYPE_LANDING);\n\t\t\tif (Manager::getOption('public_hook_on_save') === 'Y')\n\t\t\t{\n\t\t\t\tself::publicationLandingWithSkipNeededPublication($id);\n\t\t\t}\n\t\t\tself::$editMode = $editModeBack;\n\t\t}\n\t}",
"public function pageIdCanBeDeterminedWhileEditingARegularRecord() {}",
"public function process( $id ) {\n\t\tglobal $ninja_forms_processing;\n\n\t\t$redirect_url = trim( Ninja_Forms()->notification( $id )->get_setting( 'redirect_url' ) );\n\n\t\t$ninja_forms_processing->update_form_setting( 'landing_page', $redirect_url );\n\t}",
"function setIdTip($id_tip){ $this->parameters['id_tip'] = $id_tip; }",
"public function loadDataFromId(){\r\n\t\t\t$this -> loadFromId();\r\n\t }",
"public function page_init()\n {\n register_setting(\n 'fo_general_options', // Option group\n 'fo_general_options', // Option name\n array( $this, 'general_sanitize' ) // Sanitize\n );\n register_setting(\n 'fo_elements_options', // Option group\n 'fo_elements_options', // Option name\n array( $this, 'elements_sanitize' ) // Sanitize\n );\n\n add_settings_section(\n 'setting_elements', // ID\n '', // Title\n array( $this, 'print_elements_section_info' ), // Callback\n 'font-setting-admin' // Page\n );\n\n // Add all the elements to the elements section.\n foreach ($this->elements as $id => $title) {\n add_settings_field(\n $id, // ID\n htmlspecialchars($title), // Title\n array( $this, 'fonts_list_field_callback' ), // Callback\n 'font-setting-admin', // Page\n 'setting_elements', // Section\n $id // Parameter for Callback\n );\n\n add_settings_field(\n $id . '_weight', // ID\n __('Font Weight', 'bk-fonts'), // Title\n array( $this, 'fonts_weight_list_field_callback' ), // Callback\n 'font-setting-admin', // Page\n 'setting_elements', // Section\n $id . '_weight' // Parameter for Callback\n );\n\n add_settings_field(\n $id . '_important', // ID\n '', // Title\n array( $this, 'is_important_element_field_callback' ), // Callback\n 'font-setting-admin', // Page\n 'setting_elements', // Section\n $id . '_important' // Parameter for Callback\n );\n }\n\n register_setting(\n 'bk_misc_options',\n 'bk_misc_options',\n array( $this, 'cpc_options_sanitize' )\n );\n register_setting(\n 'bk_cpc_options',\n 'bk_cpc_options',\n array( $this, 'cpc_options_sanitize' )\n );\n register_setting(\n 'bk_pimg_options',\n 'bk_pimg_options',\n array( $this, 'cpc_options_sanitize' )\n );\n /* material */\n register_setting(\n 'bk_material_options',\n 'bk_material_options',\n array( $this, 'cpc_material_sanitize' )\n );\n /* material */ \n add_settings_section(\n 'setting_general', // ID\n '', // Title\n '',\n 'font-setting-admin' // Page\n );\n add_settings_section(\n 'bk_misc_settings', // ID\n '', // Title\n '',\n 'font-setting-admin' // Page\n );\n add_settings_section(\n 'bk_pimg_settings', // ID\n '', // Title\n '',\n 'font-setting-admin' // Page\n );\n /* material section */\n add_settings_section(\n 'bk_material_settings', // ID\n '', // Title\n '',\n 'font-setting-admin' // Page\n );\n\n\n /* material */\n add_settings_field(\n 'bk_material_dibond',\n 'Black Dibond',\n array( $this, 'print_material_section_info_dibond' ),\n 'font-setting-admin',\n 'bk_material_settings'\n );\n add_settings_field(\n 'bk_material_white_dibond',\n 'White Dibond',\n array( $this, 'print_material_section_info_white_dibond' ),\n 'font-setting-admin',\n 'bk_material_settings'\n );\n add_settings_field(\n 'bk_material_acrylic',\n 'Black Acrylic',\n array( $this, 'print_material_section_info_acrylic' ),\n 'font-setting-admin',\n 'bk_material_settings'\n );\n add_settings_field(\n 'bk_material_acrylic_white',\n 'White Acrylic',\n array( $this, 'print_material_section_info_acrylic_white' ),\n 'font-setting-admin',\n 'bk_material_settings'\n );\n add_settings_field(\n 'bk_material_acrylic_coloured',\n 'Coloured Acrylic',\n array( $this, 'print_material_section_info_acrylic_coloured' ),\n 'font-setting-admin',\n 'bk_material_settings'\n );\n add_settings_field(\n 'bk_material_painted_aluminium',\n 'Painted Aluminium',\n array( $this, 'print_material_section_info_painted_aluminium' ),\n 'font-setting-admin',\n 'bk_material_settings'\n );\n add_settings_field(\n 'bk_material_brushed_dibond',\n 'Brushed Dibond',\n array( $this, 'print_material_section_info_brushed_dibond' ),\n 'font-setting-admin',\n 'bk_material_settings'\n );\n add_settings_field(\n 'bk_material_brushed_aluminium',\n 'Brushed Aluminium',\n array( $this, 'print_material_section_info_brushed_aluminium' ),\n 'font-setting-admin',\n 'bk_material_settings'\n );\n add_settings_field(\n 'bk_material_brushed_stainless',\n 'Stainless Steel',\n array( $this, 'print_material_section_info_brushed_stainless' ),\n 'font-setting-admin',\n 'bk_material_settings'\n );\n add_settings_field(\n 'bk_material_brushed_brass',\n 'Brushed Brass',\n array( $this, 'print_material_section_info_brushed_brass' ),\n 'font-setting-admin',\n 'bk_material_settings'\n );\n add_settings_field(\n 'bk_material_brushed_copper',\n 'Brushed Copper',\n array( $this, 'print_material_section_info_brushed_copper' ),\n 'font-setting-admin',\n 'bk_material_settings'\n );\n add_settings_field(\n 'bk_material_brushed_bronze',\n 'Brushed Bronze',\n array( $this, 'print_material_section_info_brushed_bronze' ),\n 'font-setting-admin',\n 'bk_material_settings'\n );\n /* material */\n add_settings_section(\n 'cpc_settings_section',\n 'cpc Settings Section',\n array( $this, 'print_elements_section_info' ),\n 'font-setting-admin'\n );\n add_settings_field(\n 'cpc_dibond',\n 'Black Dibond',\n array( $this, 'dibond_callback' ),\n 'font-setting-admin',\n 'setting_general'\n );\n add_settings_field(\n 'cpc_dibond_white',\n 'White Dibond',\n array( $this, 'dibond_white_callback' ),\n 'font-setting-admin',\n 'setting_general'\n );\n add_settings_field(\n 'cpc_acrylic',\n 'Black Acrylic',\n array( $this, 'acrylic_callback' ),\n 'font-setting-admin',\n 'setting_general'\n );\n add_settings_field(\n 'cpc_acrylic_white',\n 'White Acrylic',\n array( $this, 'acrylic_white_callback' ),\n 'font-setting-admin',\n 'setting_general'\n );\n add_settings_field(\n 'cpc_acrylic_coloured',\n 'Coloured Acrylic',\n array( $this, 'acrylic_coloured_callback' ),\n 'font-setting-admin',\n 'setting_general'\n );\n add_settings_field(\n 'cpc_pa',\n 'Painted Aluminium',\n array( $this, 'pa_callback' ),\n 'font-setting-admin',\n 'setting_general'\n );\n\n add_settings_field(\n 'cpc_brushed_dibond',\n 'Brushed Dibond',\n array( $this, 'brushed_dibond_callback' ),\n 'font-setting-admin',\n 'setting_general'\n );\n add_settings_field(\n 'cpc_ba',\n 'Brushed Aluminium',\n array( $this, 'ba_callback' ),\n 'font-setting-admin',\n 'setting_general'\n );\n add_settings_field(\n 'cpc_bs',\n 'Stainless Steel',\n array( $this, 'brushed_stainless_callback' ),\n 'font-setting-admin',\n 'setting_general'\n );\n\n add_settings_field(\n 'cpc_brushed_brass',\n 'Brushed Brass',\n array( $this, 'brushed_brass_callback' ),\n 'font-setting-admin',\n 'setting_general'\n );\n add_settings_field(\n 'cpc_brushed_copper',\n 'Brushed Copper',\n array( $this, 'brushed_copper_callback' ),\n 'font-setting-admin',\n 'setting_general'\n );\n add_settings_field(\n 'cpc_brushed_bronze',\n 'Brushed Bronze',\n array( $this, 'brushed_bronze_callback' ),\n 'font-setting-admin',\n 'setting_general'\n );\n\n /* Misc Settings */\n add_settings_field(\n 'bk_character_spacing',\n 'Character Spacing Average',\n array( $this, 'bk_character_spacing_callback' ),\n 'font-setting-admin',\n 'bk_misc_settings'\n );\n add_settings_field(\n 'bk_misc_tax',\n 'HST GST Tax',\n array( $this, 'bk_hst_gst_cb' ),\n 'font-setting-admin',\n 'bk_misc_settings'\n );\n add_settings_field(\n 'bk_installation_rate',\n 'Installation Rate',\n array( $this, 'bk_installation_cb' ),\n 'font-setting-admin',\n 'bk_misc_settings'\n );\n add_settings_field(\n 'bk_delivery_rate',\n 'Delivery Rate',\n array( $this, 'bk_delivery_cb' ),\n 'font-setting-admin',\n 'bk_misc_settings'\n );\n\n /* Product Images */\n add_settings_field(\n 'bk_dibond_pimg',\n 'Black Dibond',\n array( $this, 'bk_dibond_pimg_cb' ),\n 'font-setting-admin',\n 'bk_pimg_settings'\n );\n add_settings_field(\n 'bk_dibond_white_pimg',\n 'White Dibond',\n array( $this, 'bk_dibond_white_pimg_cb' ),\n 'font-setting-admin',\n 'bk_pimg_settings'\n );\n add_settings_field(\n 'bk_acrylic_pimg',\n 'Black Acrylic',\n array( $this, 'bk_acrylic_pimg_cb' ),\n 'font-setting-admin',\n 'bk_pimg_settings'\n );\n add_settings_field(\n 'bk_acrylic_white_pimg',\n 'White Acrylic',\n array( $this, 'bk_acrylic_white_pimg_cb' ),\n 'font-setting-admin',\n 'bk_pimg_settings'\n );\n add_settings_field(\n 'bk_acrylic_coloured_pimg',\n 'Coloured Acrylic',\n array( $this, 'bk_acrylic_coloured_pimg_cb' ),\n 'font-setting-admin',\n 'bk_pimg_settings'\n );\n add_settings_field(\n 'bk_pa_pimg',\n 'Painted Aluminium',\n array( $this, 'bk_pa_pimg_cb' ),\n 'font-setting-admin',\n 'bk_pimg_settings'\n );\n add_settings_field(\n 'bk_bd_pimg',\n 'Brushed Dibond',\n array( $this, 'bk_bd_pimg_cb' ),\n 'font-setting-admin',\n 'bk_pimg_settings'\n );\n add_settings_field(\n 'bk_ba_pimg',\n 'Brushed Aluminium',\n array( $this, 'bk_ba_pimg_cb' ),\n 'font-setting-admin',\n 'bk_pimg_settings'\n );\n add_settings_field(\n 'bk_bs_pimg',\n 'Stainless Steel',\n array( $this, 'bk_bs_pimg_cb' ),\n 'font-setting-admin',\n 'bk_pimg_settings'\n );\n add_settings_field(\n 'bk_bbrass_pimg',\n 'Brushed Brass',\n array( $this, 'bk_bbrass_pimg_cb' ),\n 'font-setting-admin',\n 'bk_pimg_settings'\n );\n add_settings_field(\n 'bk_bc_pimg',\n 'Brushed Copper',\n array( $this, 'bk_bc_pimg_cb' ),\n 'font-setting-admin',\n 'bk_pimg_settings'\n );\n add_settings_field(\n 'bk_bbronze_pimg',\n 'Brushed Bronze',\n array( $this, 'bk_bbronze_pimg_cb' ),\n 'font-setting-admin',\n 'bk_pimg_settings'\n );\n }",
"function populateFromPost()\n\t{\n\t}",
"public function ajaxProcessSaveTabModulePreferences()\n {\n }",
"function SetDefaultContent($id) {\n\t\tglobal $gCms;\n\t\t$db = &$gCms->GetDb();\n\t\t$query = \"SELECT content_id FROM \".cms_db_prefix().\"content WHERE default_content=1\";\n\t\t$old_id = $db->GetOne($query);\n\t\tif (isset($old_id)) \n\t\t{\n\t\t\t$one = new Content();\n\t\t\t$one->LoadFromId($old_id);\n\t\t\t$one->SetDefaultContent(false);\n\t\t\tdebug_buffer('save from ' . __LINE__);\n\t\t\t$one->Save();\n\t\t}\n\t\t$one = new Content();\n\t\t$one->LoadFromId($id);\n\t\t$one->SetDefaultContent(true);\n\t\tdebug_buffer('save from ' . __LINE__);\n\t\t$one->Save();\n\t}",
"function __construct($id, $value){\n\t\t$this->id = $id;\n\t\t\n\t\t?>\n <input type=\"text\" value=\"\" id=\"<?php echo $id; ?>\" name=\"<?php echo $id; ?>\" style=\"display:none;\"/>\n\n <div class=\"ui_tabs\">\n\t <div class=\"ui_tabs_menu pp_picker_filter\">\n\t \t<a href=\"#\" data-type=\"page\">Pages</a>\n\t \t<a href=\"#\" data-type=\"post\">Blog Posts</a>\n\t \t<a href=\"#\" data-type=\"portfolio\">Portfolio Works</a>\n\t </div>\n\t <div class=\"ui_tabs\">\n\t \t<div class=\"pp_picker_loading\">Loading Posts <img src=\"<?php echo get_template_directory_uri(); ?>/plusquare_admin/config-backend/images/ui/loading.gif\" /></div>\n\t \t<div class=\"pp_picker_list\"></div>\n\t </div>\n\t </div>\n\n\n <script type=\"text/javascript\">\n \tjQuery(document).ready(function($){\n\t\t\t\t//Input\n\t\t\t\tvar $input = $(\"#<?php echo $id; ?>\"); \n\n\t\t\t\t//List holder\n\t\t\t\tvar $list = $(\".pp_picker_list\");\n\n\t\t\t\t//Loading\n\t\t\t\tvar $loading = $(\".pp_picker_loading\");\n\n\t\t\t\t//Filter buttons\n\t\t\t\tvar $filter = $(\".pp_picker_filter\");\n\t\t\t\tvar $buttons = $(\".pp_picker_filter a\");\n\n\t\t\t\t//Filter button clicked\n\t\t\t\t$buttons.click(function(){\n\t\t\t\t\tvar post_type = $(this).attr(\"data-type\");\n\n\t\t\t\t\tload_list(post_type);\n\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\n\t\t\t\t//Load new list\n\t\t\t\tfunction load_list(post_type){\n\t\t\t\t\t$buttons.removeClass(\"active\");\n\t\t\t\t\t$filter.find(\"a[data-type='\"+post_type+\"']\").addClass(\"active\");\n\n\t\t\t\t\t$loading.show();\n\t\t\t\t\t$list.hide();\n\n\t\t\t\t\t//Asyn load\n\t\t\t\t\tjQuery.post(\n\t\t\t adminAjax,\n\t\t\t {\n\t\t\t 'action' : 'pq_get_pages_posts_list',\n\t\t\t 'post_type' : post_type\n\t\t\t },\n\t\t\t $.proxy(function( response ) {\n\n\t\t\t \t//Add list to holder\n\t\t\t $list.html( response );\n\n\t\t\t\t\t\t\t$loading.hide();\n\t\t\t\t\t\t\t$list.show();\n\n\t\t\t\t\t\t\t$list.find(\"a\").click(list_item_clicked);\n\n\t\t\t }, this)\n\t\t\t );\n\t\t\t\t}\n\n\t\t\t\tload_list(\"page\");\n\n\n\t\t\t\t//List item clicked\n\t\t\t\tfunction list_item_clicked(){\n\t\t\t\t\tvar $link = $(this);\n\n\t\t\t\t\t$list.find(\"a\").removeClass(\"active\");\n\t\t\t\t\t$link.addClass(\"active\");\n\n\t\t\t\t\t$input.val( $link.attr(\"data-id\") );\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t</script>\n\n\n\n <?php\n\t}",
"function attended_users_page()\n{ \n //if(isset($_POST['contest_id'])){\n require_once TS_SERVER_PATH . \"/inc/admin/model/contests_users_m.php\";\n\n $option = 'per_page';\n $args = [\n 'label' => __('Contests', 'plc-plugin'),\n 'default' => 20,\n 'option' => 'contests_per_page'\n ];\n\n add_screen_option($option, $args);\n \n $contest_id = $_POST['contest_id'];\n $contests_users_obj = new Contests_users_m();\n\n include TS_SERVER_PATH . \"/inc/admin/views/contests_users.php\";\n //}\n}",
"public function actionEdit(){\n\t\t$form = $_POST;\n\t\t$id = $form['id'];\n\t\tunset($form['id']);\n\t\tunset($form['submit_']);\n\t\tif($form['active'] == 'on'){\n\t\t\t$form['active'] = 1;\n\t\t}\n\t\t$db = $this->context->getService('database');\n\t\t$db->exec('UPDATE core_pages SET ? WHERE id = ?', $form, $id);\n\t\t$this->redirect('pages:');\n\t}",
"public function changeCommentary()\n {\n global $data, $imageId, $size, $zoom;\n $this->getParams();\n\n $this->setContentView();\n $this->setMenuView();\n }",
"protected function populateState()\n\t{\n\n\t\t$jinput = JFactory::getApplication()->input;\n\t\t$id = $jinput->get('Itemid', '', 'text');\n\t\t$this->setState('pimmel.id', $id);\n\n\t\t//Kint::dump($id);\n\t\t// Load the parameters.\n\t\t$this->setState('params', JFactory::getApplication()->getParams());\n\t\tparent::populateState();\n\t}",
"public function noticia_update_form()\r\n {\r\n $array = [\r\n 'user_info' => $this->user->infoUser(),\r\n ];\r\n $post = new PostFix();\r\n $array['info_post'] = $post->getPostId($_GET['id']);\r\n $this->loadTemplate('noticias/update_img', $array);\r\n }",
"public function startEditField($fieldid = \"\") {\n $field= $this->fieldfromid($fieldid);\n //check whether we are working with a siteField or a normal field\n if (get_class($field) == \"Field_Model\") {\n //get page we are working on\n Wi3::$page = $field->page;\n //run the siteandpageloaded event, so that the Pathof en Urlof will be properly filled\n Event::run(\"wi3.siteandpageloaded\");\n }\n new Pagefiller_default(); //calls __construct which enables the Pagefiller::$field\n return Pagefiller_default::$field->start_edit($field);\n }",
"function hs_add_review_page( $review_page, $form, $entry ) {\n\t \n\t# Enable the review page\n\t$review_page['is_enabled'] = true;\n\t\n # First thing to do is put the form's fields in variables for easier handling afterwards\n # So far I haven't found a loop to handle this but my PHP skills don't go that far\n # Tip also is to give the variables a clear name. I chose for this set up:\n # f = field, cp/d1/d2 the different sections on the form and then the field identifier\n # the :1.3, :3, ... are the field shortcodes. You can get them by entering the needed fields on a GF form's confirmation page.\n\t\n\t# On the first page of the form, general data is collected about the person filling in the application.\n\t# Depending on how many persons they choose, the next page is formed and there the application's names and other details are filled in.\n \n\t$f_cp_voornaam = GFCommon::replace_variables( '{:1.3}', $form, $entry );\n\t$f_cp_achternaam = GFCommon::replace_variables( '{:1.6}', $form, $entry );\n\t$f_cp_email = GFCommon::replace_variables( '{:3}', $form, $entry );\n\t$f_cp_telefoon = GFCommon::replace_variables( '{:4}', $form, $entry );\n\t$f_cp_adres = GFCommon::replace_variables( '{:5}', $form, $entry );\n\t$f_cp_postcode = GFCommon::replace_variables( '{:45}', $form, $entry );\n\t$f_cp_plaats = GFCommon::replace_variables( '{:46}', $form, $entry );\n\t$f_cp_sportkamp = GFCommon::replace_variables( '{:47}', $form, $entry );\n\t$f_cp_picknick = GFCommon::replace_variables( '{:49}', $form, $entry );\n\t$f_cp_aantalpersonen = GFCommon::replace_variables( '{:16}', $form, $entry );\n\t$f_cp_pppersoon = GFCommon::replace_variables( '{:50}', $form, $entry );\n\t$f_cp_totaal = GFCommon::replace_variables( '{:52}', $form, $entry );\n\n\t$f_d1_voornaam = GFCommon::replace_variables( '{:18.3}', $form, $entry );\n\t$f_d1_achternaam = GFCommon::replace_variables( '{:18.6}', $form, $entry );\n\t$f_d1_geslacht = GFCommon::replace_variables( '{:21}', $form, $entry );\n\t$f_d1_geboortedatum = GFCommon::replace_variables( '{:22}', $form, $entry );\n\n\t$f_d2_voornaam = GFCommon::replace_variables( '{:20.3}', $form, $entry );\n\t$f_d2_achternaam = GFCommon::replace_variables( '{:20.6}', $form, $entry );\n\t$f_d2_geslacht = GFCommon::replace_variables( '{:23}', $form, $entry );\n\t$f_d2_geboortedatum = GFCommon::replace_variables( '{:24}', $form, $entry );\n\n\t$f_d3_voornaam = GFCommon::replace_variables( '{:26.3}', $form, $entry );\n\t$f_d3_achternaam = GFCommon::replace_variables( '{:26.6}', $form, $entry );\n\t$f_d3_geslacht = GFCommon::replace_variables( '{:27}', $form, $entry );\n\t$f_d3_geboortedatum = GFCommon::replace_variables( '{:28}', $form, $entry );\n\n\t$f_d4_voornaam = GFCommon::replace_variables( '{:30.3}', $form, $entry );\n\t$f_d4_achternaam = GFCommon::replace_variables( '{:30.6}', $form, $entry );\n\t$f_d4_geslacht = GFCommon::replace_variables( '{:31}', $form, $entry );\n\t$f_d4_geboortedatum = GFCommon::replace_variables( '{:32}', $form, $entry );\n\n\t$f_d5_voornaam = GFCommon::replace_variables( '{:37.3}', $form, $entry );\n\t$f_d5_achternaam = GFCommon::replace_variables( '{:37.6}', $form, $entry );\n\t$f_d5_geslacht = GFCommon::replace_variables( '{:38}', $form, $entry );\n\t$f_d5_geboortedatum = GFCommon::replace_variables( '{:39}', $form, $entry );\n\n\t$f_d6_voornaam = GFCommon::replace_variables( '{:41.3}', $form, $entry );\n\t$f_d6_achternaam = GFCommon::replace_variables( '{:41.6}', $form, $entry );\n\t$f_d6_geslacht = GFCommon::replace_variables( '{:42}', $form, $entry );\n\t$f_d6_geboortedatum = GFCommon::replace_variables( '{:44}', $form, $entry );\n\t\n\t# After you collected all the fields in variables, it's time to create the output of the page with all necessary divs and css-classes.\n\t# In the end, they need to be merged into 1 variable that's outputted by the function.\n\t# As you can see, you can use all kinds of PHP functions (like the strpos function) to make sure all the necessary data is displayed.\n\n\t$o_cp = '<div class=\"o-cp o-block\"><h2>Contactpersoon</h2><p><span class=\"o-titel\">Naam: </span>' . $f_cp_voornaam . ' ' . $f_cp_achternaam .\n\t'<br /><span class=\"o-titel\">Email: </span>' . $f_cp_email .\n\t'<br /><span class=\"o-titel\">Telefoon: </span>' . $f_cp_telefoon .\n\t'<br /><span class=\"o-titel\">Adres: </span>' . $f_cp_adres .\n\t'<br /><span class=\"o-titel\">Plaats: </span>' . $f_cp_postcode . ' ' . $f_cp_plaats .\n\t'<br /><span class=\"o-titel\">Sportkamp: </span>' . $f_cp_sportkamp;\n\tif (strpos( $f_cp_sportkamp, 'Adventure') !== false ) {\n\t\t$o_cp = $o_cp .'<br /><span class=\"o-titel\">Picknick: </span>' . $f_cp_picknick;\n\t}\n\t$o_cp = $o_cp .'<br /><span class=\"o-titel\">Aantal personen: </span>' . $f_cp_aantalpersonen .\n\t'<br /><span class=\"o-titel\">Prijs per persoon: </span>' . $f_cp_pppersoon .\n\t'<br /><span class=\"o-titel\">Totaal te betalen: </span>' . $f_cp_totaal . '</p>' .\n\t'<p><input type=\\'button\\' id=\\'gform_previous_button_2_53\\' class=\\'gform_previous_button button\\' value=\\'Contactpersoon aanpassen\\' onclick=\\'jQuery(\"#gform_target_page_number_2\").val(\"1\"); jQuery(\"#gform_2\").trigger(\"submit\",[true]); \\' onkeypress=\\'if( event.keyCode == 13 ){ jQuery(\"#gform_target_page_number_2\").val(\"1\"); jQuery(\"#gform_2\").trigger(\"submit\",[true]); } \\' />' .\n\t\n\t'</div>';\n\n\t$o_deelnemers = '<div class=\"o-cp o-block\"><h2>Deelnemers</h2>' . \n\t'<p><span class=\"o-titel\">Naam: </span>' . $f_d1_voornaam . ' ' . $f_d1_achternaam .\n\t'<br /><span class=\"o-titel\">Geslacht: </span>' . $f_d1_geslacht .\n\t'<br /><span class=\"o-titel\">Geboortedatum: </span>' . $f_d1_geboortedatum . '</p>';\n\n\tif ($f_cp_aantalpersonen > 1) {\n\t\t$o_deelnemers = $o_deelnemers . \n\t\t'<p><span class=\"o-titel\">Naam: </span>' . $f_d2_voornaam . ' ' . $f_d2_achternaam .\n\t\t'<br /><span class=\"o-titel\">Geslacht: </span>' . $f_d2_geslacht .\n\t\t'<br /><span class=\"o-titel\">Geboortedatum: </span>' . $f_d2_geboortedatum . '</p>';\t} \n\tif ($f_cp_aantalpersonen > 2) {\n\t\t$o_deelnemers = $o_deelnemers . \n\t\t'<p><span class=\"o-titel\">Naam: </span>' . $f_d3_voornaam . ' ' . $f_d3_achternaam .\n\t\t'<br /><span class=\"o-titel\">Geslacht: </span>' . $f_d3_geslacht .\n\t\t'<br /><span class=\"o-titel\">Geboortedatum: </span>' . $f_d3_geboortedatum . '</p>'; }\n\tif ($f_cp_aantalpersonen > 3) {\n\t\t$o_deelnemers = $o_deelnemers . \n\t\t'<p><span class=\"o-titel\">Naam: </span>' . $f_d3_voornaam . ' ' . $f_d3_achternaam .\n\t\t'<br /><span class=\"o-titel\">Geslacht: </span>' . $f_d3_geslacht .\n\t\t'<br /><span class=\"o-titel\">Geboortedatum: </span>' . $f_d3_geboortedatum . '</p>'; }\n\tif ($f_cp_aantalpersonen > 4) {\n\t\t$o_deelnemers = $o_deelnemers . \n\t\t'<p><span class=\"o-titel\">Naam: </span>' . $f_d4_voornaam . ' ' . $f_d4_achternaam .\n\t\t'<br /><span class=\"o-titel\">Geslacht: </span>' . $f_d4_geslacht .\n\t\t'<br /><span class=\"o-titel\">Geboortedatum: </span>' . $f_d4_geboortedatum . '</p>'; }\n\tif ($f_cp_aantalpersonen > 5) {\n\t\t$o_deelnemers = $o_deelnemers . \n\t\t'<p><span class=\"o-titel\">Naam: </span>' . $f_d5_voornaam . ' ' . $f_d5_achternaam .\n\t\t'<br /><span class=\"o-titel\">Geslacht: </span>' . $f_d5_geslacht .\n\t\t'<br /><span class=\"o-titel\">Geboortedatum: </span>' . $f_d5_geboortedatum . '</p>'; }\n\tif ($f_cp_aantalpersonen >= 6) {\n\t\t$o_deelnemers = $o_deelnemers . \n\t\t'<p><span class=\"o-titel\">Naam: </span>' . $f_d6_voornaam . ' ' . $f_d6_achternaam .\n\t\t'<br /><span class=\"o-titel\">Geslacht: </span>' . $f_d6_geslacht .\n\t\t'<br /><span class=\"o-titel\">Geboortedatum: </span>' . $f_d6_geboortedatum . '</p>'; }\n\t\n\t$o_deelnemers = $o_deelnemers . '<p><input type=\\'button\\' id=\\'gform_previous_button_2_53\\' class=\\'gform_previous_button button\\' value=\\'Deelnemers aanpassen\\' onclick=\\'jQuery(\"#gform_target_page_number_2\").val(\"2\"); jQuery(\"#gform_2\").trigger(\"submit\",[true]); \\' onkeypress=\\'if( event.keyCode == 13 ){ jQuery(\"#gform_target_page_number_2\").val(\"2\"); jQuery(\"#gform_2\").trigger(\"submit\",[true]); } \\' />' . '</div>';\n\t\n\t# The above code that defines the input button, is retrieved from the form itself and makes a shortcut button to one of the relevant pages on the form.\n\t\n\t# Eventually you need to populate the review page. Combine all the variables you filled earlier into 1 single variable that's returned.\n\t$review_page['content'] = $o_cp . $o_deelnemers;\n \n\treturn $review_page;\n\t}",
"public function get_answers_page_2()\n\t{\n\t\tif ($this->input->post(\"design21\") != null) {\n\t\t $answer = new TblAnswers();\n\t\t\t$answer->answer = $this->input->post(\"design21\");\n\t\t\t$answer->user_id = $this->session->get(\"user\");\n\t\t\t$answer->q_id = '21';\n\t\t\t$answer->save();\n\t\t}\t\t\n\t\tif ($this->input->post(\"design22\") != null) {\n\t\t $answer = new TblAnswers();\n\t\t\t$answer->answer = $this->input->post(\"design22\");\n\t\t\t$answer->user_id = $this->session->get(\"user\");\n\t\t\t$answer->q_id = '22';\n\t\t\t$answer->save();\n\t\t}\t\t\n\t\tif ($this->input->post(\"content23\") != null) {\n\t\t $answer = new TblAnswers();\n\t\t\t$answer->answer = $this->input->post(\"content23\");\n\t\t\t$answer->user_id = $this->session->get(\"user\");\n\t\t\t$answer->q_id = '23';\n\t\t\t$answer->save();\n\t\t}\n\t\tif ($this->input->post(\"content24\") != null) {\n\t\t $answer = new TblAnswers();\n\t\t\t$answer->answer = $this->input->post(\"content24\");\n\t\t\t$answer->user_id = $this->session->get(\"user\");\n\t\t\t$answer->q_id = '24';\n\t\t\t$answer->save();\n\t\t}\n\t\tif ($this->input->post(\"content25\") != null) {\n\t\t $answer = new TblAnswers();\n\t\t\t$answer->answer = $this->input->post(\"content25\");\n\t\t\t$answer->user_id = $this->session->get(\"user\");\n\t\t\t$answer->q_id = '25';\n\t\t\t$answer->save();\n\t\t}\n\t\turl::redirect('creative/page_3');\n\t}",
"function fillWithDefaultValues() {\n\t\t$this->newIdt = \"default\"; \n\n\t\t$this->description = \"default template\";\n\t\t$this->postsHeader = \"<h2><%title%></h2><p><%description%></p><%navigation%><ul class=\\\"miniforum\\\">\"; \n\t\t$this->postBody = \"<li><%name%> [ <%date%> | <%time%> ] <br /><%body%></li>\";\n\t\t$this->postsFooter = \"</ul><br /><%navigation%>\";\n\t\t$this->formLogged = \"<textarea class='formfield' name='BODY' rows='3' cols='20'></textarea><br /><input type='submit' value='Send' />\\n\";\n\t\t$this->form = \"<label>name<input class='formfield' type='text' name='uname' value='<%name%>'/></label><br />\\n\".\n\t\t\t\t\t\t\t \"<label>e-mail<input class='formfield' type='text' name='email' value='<%email%>'/></label><br />\\n\".\n \t\t\t\t\t \"<label>url<input class='formfield' type='text' name='url' value='<%url%>'/></label><br />\\n\".\n\t\t\t\t\t\t\t \"<label>remember me<input class='formfield' type='checkbox' name='remember'/></label><br />\\n\".\n\t\t\t\t\t\t\t \"<textarea class='formfield' name='BODY' rows='3' cols='20'></textarea><br />\\n\".\n\t\t\t\t\t\t\t \"<input class='formbutton' type='submit' value='Send' />\";\n\t\t$this->navigation = \"<div class=\\\"forum\\\">[<%first-page%>][<%prev-page%>] (Page: <%cur-page%> from <%page-count%>) [<%next-page%>][<%last-page%>]</div>\";\n\t\t$this->name = \"<strong><%user-name%></strong> (<%user-email%>)\";\n\t\t$this->nameLin = \"<a href='<%user-link%>'><%user-name%></a>\";\n\t\t$this->memberName = \"<a class='member' href='<%user-link%>'><%user-name%></a>\";\n\t\t$this->date = \"d. m. y\";\n\t\t$this->time = \"H:i\"; \n\t\t$this->nextPage = \"Next\";\n\t\t$this->previousPage =\"Previous\";\n\t\t$this->firstPage = \"First\";\n\t\t$this->lastPage = \"Last\";\t\n\t\t$this->emoToImg = \t false;\n\t\t$this->urlToLink=\t true;\n\t\t$this->gravSize =\t 40; \n\t\t\n\t}"
] | [
"0.5812104",
"0.5788417",
"0.55732936",
"0.5558033",
"0.5508501",
"0.5402871",
"0.5398554",
"0.5334725",
"0.5328521",
"0.5320023",
"0.5309222",
"0.53046715",
"0.5304608",
"0.5256626",
"0.5219225",
"0.52150357",
"0.51836276",
"0.5168734",
"0.5168008",
"0.51613855",
"0.51561135",
"0.5141888",
"0.5129629",
"0.51243013",
"0.51010543",
"0.50940835",
"0.50940835",
"0.5094058",
"0.5079984",
"0.507949",
"0.50708807",
"0.5065167",
"0.50474423",
"0.50432837",
"0.5037049",
"0.501903",
"0.50154865",
"0.5008315",
"0.5000429",
"0.49930814",
"0.49880072",
"0.49877107",
"0.49853674",
"0.49828118",
"0.497857",
"0.4978061",
"0.49765113",
"0.4976245",
"0.4973876",
"0.49718562",
"0.49651885",
"0.4964936",
"0.4962988",
"0.49624997",
"0.49587113",
"0.49550658",
"0.49549308",
"0.49518886",
"0.49516943",
"0.4950632",
"0.4950417",
"0.494677",
"0.49438432",
"0.49371526",
"0.4936295",
"0.49343687",
"0.4934196",
"0.49311298",
"0.49235514",
"0.4921618",
"0.49206546",
"0.49195856",
"0.4911976",
"0.49114656",
"0.48974845",
"0.48973325",
"0.48972207",
"0.489714",
"0.48962384",
"0.48936248",
"0.4890621",
"0.48872733",
"0.48836768",
"0.48724782",
"0.487167",
"0.48712218",
"0.48684582",
"0.4860556",
"0.48601267",
"0.48599905",
"0.4858236",
"0.48563948",
"0.4855188",
"0.48483443",
"0.48456544",
"0.4844863",
"0.48447186",
"0.48424324",
"0.4842286",
"0.48349425"
] | 0.6002827 | 0 |
On instancie l'objet UserModel | public function httpPostMethod(Http $http, array $formFields)
{
$userModel = new UserModel();
//On vérifie que tous les champs sont renseignés
$verifEmpty = $userModel->verifyEmpty($_POST);
if ($verifEmpty === true) {
//Si tous les champs ont bien été renseignés, on vérifie que le mail entré n'existe pas déjà
$checkMail = $userModel->checkMail();
if ($checkMail === true) {
//Si le mail entré n'existe pas déjà dans la bdd, on ajoute un utilisateur
$insertUser = $userModel->insertUser();
if ($insertUser === true) {
//si l'utilisateur a bien était ajouté dans la bdd, on instancie l'objet ConnexionUser
$utiUtil = new ConnexionUser();
//On connecte directement l'uitlisateur
$retour = $utiUtil->login($_POST['email'], $_POST['password']);
//Redirection vers la page d'accueil
$http->redirectTo('/');
} else {
//On affiche une message d'erreur si il y a une erreur dans le formulaire
$errorRegister = new FlashBag();
$errorRegister->add('Une erreur est survenue dans le formulaire, veuillez recommencer'); //Ajout du message dans la variable $errorRegister
return ['errorRegister' => $errorRegister];
}
} else {
//On affiche une message d'erreur si il l'adresse mail entré existe déjà
$errorMail = new FlashBag();
$errorMail->add('Il existe déjà un compte utilisateur avec cette adresse e-mail');
return ['errorMail' => $errorMail];
}
} else {
//On affiche une message d'erreur si tous les champs du formulaire n'ont pas été remplis
$errorEmpty = new FlashBag();
$errorEmpty->add('Veuillez remplir tous les champs du formulaire');
return ['errorEmpty' => $errorEmpty];
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct(){\n $this->userModel = $this->model('User');\n\n }",
"public function __construct() {\n // und lädt das zugehörige Model\n $this->userModel = $this->model('User');\n }",
"public function __construct() {\n // load our model\n $this->userModel = $this->model('User'); // will check models folder for User.php\n }",
"static function Create() \n\t{\n if (NULL == self::$userModel) {\n self::$userModel = new UserModel();\n }\n return self::$userModel;\n }",
"private function loadModel()\n {\n require_once APP . '/model/User.php';\n // create new \"model\" (and pass the database connection)\n $this->model = new User($this->db);\n }",
"public function __construct(User $model)\n {\n $this->model = $model;\n }",
"protected function getUserModel() {\n return new User();\n }",
"public function _instanciar_model() {\n $Model = ClassRegistry::init('Autenticacao.' . $this->config['model_usuario']);\n return $Model;\n }",
"function UserModel()\n\t\t{\n\t\t\t$this->QueryTool = new UserModelDataBasic(DB_NAME);\n\t\t}",
"function Usermodel()\r\n {\r\n parent::Model();\r\n }",
"function __construct()\n {\n $this ->user = User::createInstance();\n }",
"public function __construct()\n {\n $this->userobj = new User();\n }",
"public function __construct()\n {\n $this->ModelUser = new LoginRegisterModel();\n $this->modelCategorie = new CategoriesModel();\n\t\t/* ********** fin initialisation Model ********** */\n }",
"function __construct()\n {\n parent::__construct();\n $this->load->model('Usermodel','um');\n \n }",
"public function __construct()\n {\n $this->middleware('auth');\n //Init Entity Model\n $this->_userModel = new User();\n }",
"function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model('User_model');\n\t}",
"public function __construct(UserModel $userModel)\n {\n $this->userModel = $userModel;\n }",
"public function __construct(){\n\t\tparent::__construct();\n $this->load->model('user_m');\n\t}",
"function __construct() {\n parent::__construct();\n $this->load->model('users_model');\n }",
"function userModel() { \n $model = config('auth.model');\n return new $model;\n }",
"public function __construct( User $user )\n {\n $this->model = $user;\n }",
"public function __construct( User $user )\n {\n $this->model = $user;\n }",
"function __construct() {\n parent::__construct();\n $this->load->model('user_model');\n }",
"public function __construct()\n {\n $this->user = new User();\n }",
"function __construct()\n {\n parent::__construct();\n $this->load->model('user_model');\n }",
"function UserModel($username)\n \t{\n \t\t$this->username = $username;\n \t//\t$this->type = $this->get_type($username);\n\n \t\t\n \t}",
"public function __construct() {\n require 'views/view_user.php';\n require 'models/model_user.php';\n $this->view = new view_user();\n $this->model = new model_user ();\n }",
"public function __construct(User $user)\n {\n $this->model = $user;\n }",
"public function __construct(User $user)\n {\n $this->model = $user;\n }",
"public function __construct(User $user)\n {\n $this->model = $user;\n }",
"public function getModel()\n\t{\n\t\treturn new User;\n\t}",
"public function __construct()\n {\n $this->user = new User;\n }",
"public function __construct()\n {\n parent::__construct();\n $this->load->model('user_model');\n }",
"function __construct()\n {\n parent::__construct();\n\n $this->load->model('user');\n \n }",
"public function createUser()\n {\n $this->user = factory(Easel\\Models\\User::class)->create();\n }",
"public function __construct()\n {\n $this->user=new User();\n }",
"public function initModel() {\n\t\t\tAppLoader::includeModel('UserEventModel');\n\t\t\t$objUserEvent = new UserEventModel();\n\t\t\treturn $objUserEvent;\n\t\t}",
"public function __construct(UserEntity $user)\n {\n self::$model = $user;\n }",
"public function __construct(){\n $this->user = $this->model('users');\n $this->mailer = $this->model('mailer');\n $this->friendModel = $this->model('Friends_relationship');\n }",
"public function __construct() {\n parent::__construct();\n $this->load->model('users/users_model', 'usm', true);\n }",
"function Controller_Utilisateur(){\n\t\tparent::__construct();\n\t\trequire_once './Modele/Modele_Utilisateur.php';\n\t\t$this->selfModel = new Utilisateur(); // appel du modèle correspondant à la classe Controller_Utilisateur\n\t}",
"public function _createMockModel()\r\n {\r\n return new D2LWS_User_Model();\r\n }",
"public function __construct()\n {\n $this->MemberModel = new MemberModel();\n }",
"public function createUser()\n {\n $this->user = factory(App\\Models\\User::class)->create();\n }",
"public function createUser()\n {\n $this->user = factory(App\\Models\\User::class)->create();\n }",
"public function __construct()\r\n\t{\r\n\t\t// Call the CI_Model constructor\r\n\t\tparent::__construct();\r\n\t\t$this->load->model(\"usuario_model\");\r\n\t}",
"function __construct(UserSetting $model){\n\t\t$this->model = $model;\n\t}",
"public function __construct($model)\n {\n if (is_string($model)) {\n $model = '\\\\App\\\\Models\\\\' . $model;\n $this->model = new $model();\n } elseif (is_object($model) && ($model instanceof Model) && !$model->exists) {\n $this->model = $model;\n } elseif (is_object($model) && ($model instanceof Model)) {\n $this->model = $model;\n $this->action = 'useru_id';\n }\n $this->builder = $this->model->newQuery();\n }",
"public function createModelObject($modelName){\n //$this->modelObject = new SignupModel;\n\n }",
"function __construct () {\n\t\t$this->_model = new Model();\n\t}",
"public function __construct()\n {\n $this->middleware('guest:backend')->except('logout');\n\n $this->guard = backend_guard();\n\n $this->model = new User;\n }",
"function __construct()\n {\n parent::__construct();\n $this->auth();\n $this->load->model('user_model','UserModel');\n\n }",
"public function initialize()\n {\n $this->loadModel('Users');\n }",
"public function __construct()\n {\n $this ->model = $this ->makeModel($this ->model());\n }",
"public function init() {\r\n $this->_model = new Storefront_Model_User();\r\n\r\n $this->_authService = Storefront_Service_Authentication::getInstance(\r\n $this->_model\r\n );\r\n }",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t$this->user = new User;\n\t}",
"public function __construct()\r\n {\r\n try\r\n { \r\n parent::__construct(); \r\n $this->load->model('user_model');\r\n }\r\n catch(Exception $err_obj)\r\n {\r\n show_error($err_obj->getMessage());\r\n }\r\n }",
"public function __construct() {\n parent::__construct();\n $this->load->model('usuario_model');\n }",
"public function __construct()\n {\n $this->userModel = new User();\n $this->instituteModel = new Institute(UserCommon::getLoggedInUserId());\n $this->common = new InstituteType();\n \n }",
"public function __construct()\n {\n if (verifyCsrf()) {\n redirect('error/show/csrf');\n exit();\n }\n /**Instancia del Modelo Usuario*/\n $this->usuarioModel = $this->model('Usuario');\n /**Instancia del Modelo Mesas Finales*/\n $this->mesaFinalModel = $this->model('MesaFinal');\n /**Instancia del Modelo Inscripciones Finales*/\n $this->inscripcionFinalModel = $this->model('InscripcionMesa');\n }",
"function __construct(){\n\t\t$this -> modelo = new usuarioBss();\n\t}",
"function __construct(){\n\t\tparent::__construct('user');\n\t}",
"public function __construct(){\n parent::__construct();\n permission();\n// Carregando modelo de Usuario\n$this->load->model('UsuarioModel');\n}",
"function __construct()\n {\n parent::__construct();\n $this->load->model('User');\n $this->load->model('Pesan');\n $this->load->model('Obat');\n }",
"public function __construct()\n {\n $this->imageModel = new ImageModel();\n $this->userModel = new User();\n $this->psychologySupervisorModel = new PsychologySupervisor();\n $this->registerSupervisionModel = new RegisterSupervision();\n $this->updateSupervisionModel = new UpdateSupervisionModel();\n }",
"public function __construct(UserAction $model)\n {\n $this->model = $model;\n }",
"public function createModel()\n {\n }",
"public function run()\n {\n $userModel = new UserModel;\n\n $userModel->name = \"Test\";\n $userModel->email = \"[email protected]\";\n $userModel->password = Hash::make(\"prueba\");\n $userModel->api_token = Str::random(60);//hash('sha256', \"prueba\");\n $userModel->save();\n\n }",
"function __construct() {\n $this->model = new HomeModel();\n }",
"function user() {\r\r\r\n\t\t$this->_dao = DB_DataObject::factory('Users');\r\r\r\n\t}",
"public function __construct()\n {\n\n $this->loginModel = new LoginModel();\n $this->pinjamModel = new PinjamModel();\n $this->db = db_connect();\n\n // $this->kategoriModel = new KategoriModel();\n }",
"public function __construct()\n {\n if(Auth::check()){\n $this->user = Auth::user();\n }else{\n $this->user = new User();\n $this->user->name =\" Test Name User\";\n $this->user->login =\"Test Login user\";\n\n }\n $this->photo_profil = $this->init_photo_profil();\n }",
"public function __construct()\n\t{\n\t\tparent::__construct(\"user\");\n\t}",
"public function model() {\n require_once \"../app/models/model.php\";\n $this->model = new Model($this->db);\n }",
"function __construct()\n {\n parent::__construct();\n $this->load->model('m_user');\n $this->load->model('m_user_group');\n $this->load->model('m_user_has_user_group');\n }",
"public function __construct(User $model, Normalizer $normalizer)\n {\n $this->model = $model;\n $this->normalizer = $normalizer;\n }",
"public function __construct() {\r\n parent::Admin_Controller();\r\n $this->load->model('user/user_m', 'model_user');\r\n }",
"public function init() {\n\t\tparent::init();\n\n\t\t// load the user model\n\t\t$this->Users = new Users();\n\t}",
"public function __construct()\n\t\t{\n\t\t\tparent::__construct('app/models/profiles/resource/user');\n\t\t}",
"function getUser($model)\n\t{\n\t\t$user = $this->users->find($model->idUser);\n\t\t$model->nameUser = $user->name;\n\t\t$model->scoreUser = $user->score;\n\t\t$model->emailUser = $user->email;\n\t\treturn $model;\n\t}",
"public function __construct()\n {\n parent::__construct();\n //自动加载相对应的数据模型\n if ($this->auto_load_model) {\n $model_name = $this->model_name ? $this->model_name . '_model' : $this->router->fetch_class() . '_model';\n $this->load->model($model_name, 'model');\n }\n $this->_set_user();\n $this->_check_resource();\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->model = new MembersModel();\n }",
"public function init()\n {\n\t\t$this->user_model = new Application_Model_Users;\n\t\t$this->request_model = new Application_Model_Requests;\n\t\t$this->material_model = new Application_Model_Materials;\n\t\t$this->course_model = new Application_Model_Courses;\n\t\t$this->comment_model = new Application_Model_Comments;\n\t\t$this->category_model = new Application_Model_Categories;\n \t$this->assoc_rules_model = new Application_Model_Assocrules;\n }",
"public function createUser()\n {\n $class = $this->userClass;\n $user = new $class;\n return $user;\n }",
"private function init_user() {\n global $USER, $DB;\n\n $userdata = new stdClass;\n $userdata->username = 'user';\n $userid = user_create_user($userdata);\n $USER = $DB->get_record('user', array('id' => $userid));\n context_user::instance($USER->id);\n }",
"private function _initUser()\n {\n $this->username = Request::varchar('f_username', true);\n $this->password = Request::varchar('f_password');\n $this->name = Request::varchar('f_name', true);\n $this->email = Request::email();\n }",
"protected function setUserModel()\n {\n if ($model = $this->getUserModel()) {\n Models::setUsersModel($model);\n }\n }",
"public function __construct() {\n\t\t$this->empleadoModel = $this->model('Empleado');\n\t}",
"function __construct(){\r\n\t\t\t$dbHelper = new DBhelper();\r\n\t\t\t$validation = new ValidationUser();\r\n\t\t}",
"public function __construct() {\n parent::__construct();\n $this->load->model(\"login_model\");\n $this->load->model(\"user_model\");\n }",
"public function __construct()\n {\n $this->model = new BaseModel;\n }",
"public static function user() {\n $userClass = config('auth.providers.users.model');\n\n return new $userClass;\n }",
"public function __construct()\n {\n $this->user = User::getMe();\n }",
"function User ( ){\n }",
"protected function getUserModel()\n\t{\n\t\t$userModel = Config::get('maclof/revisionable::user_model', 'User');\n\n\t\tif(!class_exists($userModel))\n\t\t{\n\t\t\tthrow new ModelNotFoundException('The model ' . $userModel . ' was not found.');\n\t\t}\n\n\t\treturn new $userModel;\n\t}",
"function __construct()\n {\n $this->object = new UserDAL();\n }",
"function __construct($model)\n {\n $this->model = $model;\n }",
"protected function model()\n {\n return User::class;\n }",
"private function __construct($model)\r\n {\r\n\r\n }",
"function __contruct()\n {\n $this->load->model('Inbound_message_model');\n $this->load->model('Psychic_model');\n $data['title'] = 'Bulletin board';\n\t\t$data['user'] = Auth::me();\n\n\t\t\n }",
"public function __construct() {\n\t\tparent::__construct();\n\t\t$this->commentsModel = new CommentsModel();\n\t\t$this->blogpostModel = new BlogpostModel();\n\t\t$this->fb = new FacebookLogin();\n\t\t$this->fbUser = $this->fb->checkLogin();\n\t}"
] | [
"0.8264039",
"0.8244332",
"0.8021973",
"0.7975276",
"0.79038996",
"0.77854645",
"0.76743376",
"0.7664334",
"0.7625033",
"0.7612212",
"0.7502504",
"0.7482921",
"0.74803185",
"0.7423453",
"0.74188876",
"0.7418854",
"0.7396114",
"0.7355367",
"0.7351049",
"0.7340396",
"0.73308516",
"0.73308516",
"0.73288625",
"0.73068386",
"0.7305746",
"0.72861075",
"0.72825843",
"0.7277427",
"0.7277427",
"0.7277427",
"0.7269199",
"0.72634",
"0.72593516",
"0.72484374",
"0.7203061",
"0.7182048",
"0.7139278",
"0.7114944",
"0.71137506",
"0.7096949",
"0.7093002",
"0.70921946",
"0.70827985",
"0.7076884",
"0.7076884",
"0.7059249",
"0.70488644",
"0.70346737",
"0.70048004",
"0.6993237",
"0.6988069",
"0.6969751",
"0.69635445",
"0.6960718",
"0.69441473",
"0.6924556",
"0.6891153",
"0.6880779",
"0.6868488",
"0.685276",
"0.6848443",
"0.6841771",
"0.6829868",
"0.682162",
"0.68110806",
"0.67781544",
"0.6770802",
"0.67558986",
"0.6749028",
"0.6719606",
"0.6718849",
"0.6716316",
"0.67141813",
"0.6707831",
"0.67027974",
"0.66841996",
"0.66817015",
"0.6679888",
"0.66764605",
"0.66757095",
"0.66695786",
"0.66570866",
"0.6653097",
"0.66463774",
"0.6641421",
"0.66372126",
"0.6622589",
"0.66169244",
"0.66115046",
"0.6604236",
"0.6591302",
"0.6586964",
"0.65831035",
"0.6581896",
"0.6560373",
"0.65599453",
"0.6556396",
"0.6555561",
"0.65529233",
"0.6551384",
"0.65273553"
] | 0.0 | -1 |
Gets the help tabs registered for the screen. | public function get_tabs() {
return $this->_tabs;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_help_tabs()\n {\n }",
"public function help_tab(){\r\n $screen = get_current_screen();\r\n\r\n foreach($this->what_helps as $help_id => $tab) {\r\n $callback_name = $this->generate_callback_name($help_id);\r\n if(method_exists($this, 'help_'.$callback_name.'_callback')) {\r\n $callback = array($this, 'help_'.$callback_name.'_callback');\r\n }\r\n else {\r\n $callback = array($this, 'help_callback');\r\n }\r\n // documentation tab\r\n $screen->add_help_tab( array(\r\n 'id' => 'hw-help-'.$help_id,\r\n 'title' => __( $tab['title'] ),\r\n //'content' => \"<p>sdfsgdgdfghfhfgh</p>\",\r\n 'callback' => $callback\r\n )\r\n );\r\n }\r\n }",
"public function get_help_tabs( $screen_id = '' ) {\n\t\t\t// Help urls\n\t\t\t$plugin_forum = '<a href=\"http://wordpress.org/support/plugin/wordcamp-talks\">';\n\t\t\t$help_tabs = false;\n\t\t\t$nav_menu_page = '<a href=\"' . esc_url( admin_url( 'nav-menus.php' ) ) . '\">';\n\t\t\t$widgets_page = '<a href=\"' . esc_url( admin_url( 'widgets.php' ) ) . '\">';\n\n\t\t\t/**\n\t\t\t * @param array associative array to list the help tabs\n\t\t\t */\n\t\t\t$help = array(\n\t\t\t\t'edit-talks' => array(\n\t\t\t\t\t'add_help_tab' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'edit-talks-overview',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Overview', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'This screen provides access to all the talks users of your site shared. You can customize the display of this screen to suit your workflow.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'You can customize the display of this screen's contents in a number of ways:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\tesc_html__( 'You can hide/display columns based on your needs and decide how many talks to list per screen using the Screen Options tab.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'You can filter the list of talks by post status using the text links in the upper left to show All, Published, Private or Trashed talks. The default view is to show all talks.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'You can view talks in a simple title list or with an excerpt. Choose the view you prefer by clicking on the icons at the top of the list on the right.', 'wordcamp-talks' ),\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\tarray(\n\t\t\t\t\t\t\t'id' => 'edit-talks-row-actions',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Actions', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'Hovering over a row in the talks list will display action links that allow you to manage an talk. You can perform the following actions:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\tesc_html__( 'Edit takes you to the editing screen for that talk. You can also reach that screen by clicking on the talk title.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'Trash removes the talk from this list and places it in the trash, from which you can permanently delete it.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'View opens the talk in the WordCamp Talks's part of your site.', 'wordcamp-talks' ),\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\tarray(\n\t\t\t\t\t\t\t'id' => 'edit-talks-bulk-actions',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Bulk Actions', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'You can also move multiple talks to the trash at once. Select the talks you want to trash using the checkboxes, then select the "Move to Trash" action from the Bulk Actions menu and click Apply.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'edit-talks-sort-filter',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Sorting & filtering', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'Clicking on specific column headers will sort the talks list. You can sort the talks alphabetically using the Title column header or by popularity:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\tesc_html__( 'Click on the column header having a dialog buble icon to sort by number of comments.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'Click on the column header having a star icon to sort by rating.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tesc_html__( 'Inside the rows, you can filter the talks by categories or tags clicking on the corresponding terms.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'talks' => array(\n\t\t\t\t\t'add_help_tab' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'talks-overview',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Overview', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'The title field and the big Talk Editing Area are fixed in place, but you can reposition all the other boxes using drag and drop. You can also minimize or expand them by clicking the title bar of each box. Use the Screen Options tab to hide/show boxes.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'settings_page_wc_talks' => array(\n\t\t\t\t\t'add_help_tab' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'settings-overview',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Overview', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'This is the place where you can customize the behavior of WordCamp Talks.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'Please see the additional help tabs for more information on each individual section.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'settings-main',\n\t\t\t\t\t\t'title' => esc_html__( 'Main Settings', 'wordcamp-talks' ),\n\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\tsprintf( esc_html__( 'Just before the first option, you will find the link to the main archive page of the plugin. If you wish, you can use it to define a new custom link %1$smenu item%2$s.', 'wordcamp-talks' ), $nav_menu_page, '</a>' ),\n\t\t\t\t\t\t\tsprintf( esc_html__( 'If you do so, do not forget to update the link in case you change your permalink settings. Another possible option is to use the %1$sWordCamp Talks Navigation%2$s widget in one of your dynamic sidebars.', 'wordcamp-talks' ), $widgets_page, '</a>' ),\n\t\t\t\t\t\t\tesc_html__( 'In the Main Settings you have a number of options:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\tesc_html__( 'WordCamp Talks archive page: you can customize the title of this page. It will appear on every WordCamp Talks's page, except the single talk one.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'New talks status: this is the default status to apply to the talks submitted by the user. If this setting is set to "Pending", it will be possible to edit the moderation message once this setting has been saved.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'Moderation message: if New talks status is defined to Pending, it is the place to customize the awaiting moderation message the user will see once he submited his talk.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'Not logged in message: if a user reaches the WordCamp Talks's front end submit form without being logged in, a message will invite him to do so. If you wish to use a custom message, use this setting.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'Rating stars hover captions: fill a comma separated list of captions to replace default one. On front end, the number of rating stars will depend on the number of comma separated captions you defined in this setting.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'Talk comments: if on, comments about talks will be separated from other post types comments and you will be able to moderate comments about talks from the comments submenu of the WordCamp Talks's main Administration menu. If you uncheck this setting, talks comments will be mixed up with other post types comments into the main Comments Administration menu', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'Comments: you can completely disable commenting about talks by activating this option', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'edit-category-talks' => array(\n\t\t\t\t\t'add_help_tab' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'talks-category-overview',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Overview', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'Talk Categories can only be created by the site Administrator. To add a new talk category please fill the following fields:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\tesc_html__( 'Name - The name is how it appears on your site (in the category checkboxes of the talk front end submit form, in the talk's footer part or in the title of WordCamp Talks's category archive pages).', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'Slug - The "slug" is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'Description - If you set a description for your category, it will be displayed over the list of talks in the category archive page.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tesc_html__( 'You can change the display of this screen using the Screen Options tab to set how many items are displayed per screen and to display/hide columns in the table.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'edit-tag-talks' => array(\n\t\t\t\t\t'add_help_tab' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'talks-tag-overview',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Overview', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'Talk Tags can be created by any logged in user of the site from the talk front end submit form. From this screen, to add a new talk tag please fill the following fields:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\tesc_html__( 'Name - The name is how it appears on your site (in the tag cloud, in the tags editor of the talk front end submit form, in the talk's footer part or in the title of WordCamp Talks's tag archive pages).', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'Slug - The "slug" is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'Description - If you set a description for your tag, it will be displayed over the list of talks in the tag archive page.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tesc_html__( 'You can change the display of this screen using the Screen Options tab to set how many items are displayed per screen and to display/hide columns in the table.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * @param array $help associative array to list the help tabs\n\t\t\t */\n\t\t\t$help = apply_filters( 'wct_get_help_tabs', $help );\n\n\t\t\tif ( ! empty( $help[ $screen_id ] ) ) {\n\t\t\t\t$help_tabs = array_merge( $help[ $screen_id ], array(\n\t\t\t\t\t'set_help_sidebar' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'strong' => esc_html__( 'For more information:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tsprintf( esc_html_x( '%1$sSupport Forums (en)%2$s', 'help tab links', 'wordcamp-talks' ), $plugin_forum, '</a>' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t) );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @param array $help associative array to list the help tabs\n\t\t\t */\n\t\t\t$help = apply_filters( 'wct_get_help_tabs', $help );\n\n\t\t\tif ( ! empty( $help[ $screen_id ] ) ) {\n\t\t\t\t$help_tabs = array_merge( $help[ $screen_id ], array(\n\t\t\t\t\t'set_help_sidebar' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'strong' => esc_html__( 'For more information:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tsprintf( esc_html_x( '%1$sSupport Forums (en)%2$s', 'help tab links', 'wordcamp-talks' ), $plugin_forum, '</a>' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t) );\n\t\t\t}\n\n\t\t\treturn $help_tabs;\n\t\t}",
"function get_site_screen_help_tab_args()\n {\n }",
"public static function getTabs() {\r\n\t\treturn self::getModulesForUser(Config::$sis_tab_folder);\r\n\t}",
"function dfcg_plugin_help() {\n\t\n\tglobal $current_screen;\n\t\n\t$sidebar = dfcg_help_sidebar();\n\t\n\t$current_screen->set_help_sidebar( $sidebar );\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-general',\n\t\t'title' => __( 'General info', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_general'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-theme',\n\t\t'title' => __( 'Theme integration', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_theme'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-quick',\n\t\t'title' => __( 'Quick Start', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_quick'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-gallery',\n\t\t'title' => __( 'Gallery Method', DFCG_DOMAIN ),\n\t\t'callback' => \"dfcg_help_gallery\"\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-images',\n\t\t'title' => __( 'Image Management', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_images'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-desc',\n\t\t'title' => __( 'Descriptions', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_desc'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-css',\n\t\t'title' => __( 'Gallery CSS', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_css'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-scripts',\n\t\t'title' => __( 'Load Scripts', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_scripts'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-troubleshooting',\n\t\t'title' => __( 'Troubleshooting', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_trouble'\n\t));\n}",
"public static function getAllHelp()\n {\n return $this->_help;\n }",
"public function setHelpTabs() {\n $this->args['help_tabs'][] = array(\n 'id' => 'redux-help-tab-1',\n 'title' => __( 'Theme Information 1', 'slova' ),\n 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'slova' )\n );\n\n $this->args['help_tabs'][] = array(\n 'id' => 'redux-help-tab-2',\n 'title' => __( 'Theme Information 2', 'slova' ),\n 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'slova' )\n );\n\n // Set the help sidebar\n $this->args['help_sidebar'] = __( '<p>This is the sidebar content, HTML is allowed.</p>', 'slova' );\n }",
"public function menu_get_active_help()\n {\n return menu_get_active_help();\n }",
"public static function add_help_tab() {\n\t\tif ( ! function_exists( 'wc_get_screen_ids' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$screen = get_current_screen();\n\n\t\tif ( ! $screen || ! in_array( $screen->id, wc_get_screen_ids(), true ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remove the old help tab if it exists.\n\t\t$help_tabs = $screen->get_help_tabs();\n\t\tforeach ( $help_tabs as $help_tab ) {\n\t\t\tif ( 'woocommerce_onboard_tab' !== $help_tab['id'] ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$screen->remove_help_tab( 'woocommerce_onboard_tab' );\n\t\t}\n\n\t\t// Add the new help tab.\n\t\t$help_tab = array(\n\t\t\t'title' => __( 'Setup wizard', 'woocommerce' ),\n\t\t\t'id' => 'woocommerce_onboard_tab',\n\t\t);\n\n\t\t$task_list_hidden = get_option( 'woocommerce_task_list_hidden', 'no' );\n\n\t\t$help_tab['content'] = '<h2>' . __( 'WooCommerce Onboarding', 'woocommerce' ) . '</h2>';\n\n\t\t$help_tab['content'] .= '<h3>' . __( 'Profile Setup Wizard', 'woocommerce' ) . '</h3>';\n\t\t$help_tab['content'] .= '<p>' . __( 'If you need to access the setup wizard again, please click on the button below.', 'woocommerce' ) . '</p>' .\n\t\t\t'<p><a href=\"' . wc_admin_url( '&path=/setup-wizard' ) . '\" class=\"button button-primary\">' . __( 'Setup wizard', 'woocommerce' ) . '</a></p>';\n\n\t\t$help_tab['content'] .= '<h3>' . __( 'Task List', 'woocommerce' ) . '</h3>';\n\t\t$help_tab['content'] .= '<p>' . __( 'If you need to enable or disable the task list, please click on the button below.', 'woocommerce' ) . '</p>' .\n\t\t( 'yes' === $task_list_hidden\n\t\t\t? '<p><a href=\"' . wc_admin_url( '&reset_task_list=1' ) . '\" class=\"button button-primary\">' . __( 'Enable', 'woocommerce' ) . '</a></p>'\n\t\t\t: '<p><a href=\"' . wc_admin_url( '&reset_task_list=0' ) . '\" class=\"button button-primary\">' . __( 'Disable', 'woocommerce' ) . '</a></p>'\n\t\t);\n\n\t\tif ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {\n\t\t\t$help_tab['content'] .= '<h3>' . __( 'Calypso / WordPress.com', 'woocommerce' ) . '</h3>';\n\t\t\tif ( class_exists( 'Jetpack' ) ) {\n\t\t\t\t$help_tab['content'] .= '<p>' . __( 'Quickly access the Jetpack connection flow in Calypso.', 'woocommerce' ) . '</p>';\n\t\t\t\t$help_tab['content'] .= '<p><a href=\"' . wc_admin_url( '&test_wc_jetpack_connect=1' ) . '\" class=\"button button-primary\">' . __( 'Connect', 'woocommerce' ) . '</a></p>';\n\t\t\t}\n\n\t\t\t$help_tab['content'] .= '<p>' . __( 'Quickly access the WooCommerce.com connection flow in Calypso.', 'woocommerce' ) . '</p>';\n\t\t\t$help_tab['content'] .= '<p><a href=\"' . wc_admin_url( '&test_wc_helper_connect=1' ) . '\" class=\"button button-primary\">' . __( 'Connect', 'woocommerce' ) . '</a></p>';\n\t\t}\n\n\t\t$screen->add_help_tab( $help_tab );\n\t}",
"public function setup_help_tab()\n {\n }",
"public function help(){\n\t\t$screen = get_current_screen();\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/installing\" target=\"_blank\">' . __( 'Installing the Plugin', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/staying-updated\" target=\"_blank\">' . __( 'Staying Updated', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/glossary\" target=\"_blank\">' . __( 'Glossary', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-general-info',\n\t\t\t'title' => __( 'General Info', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-interface\" target=\"_blank\">' . __( 'Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-creating\" target=\"_blank\">' . __( 'Creating a New Form', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-sorting\" target=\"_blank\">' . __( 'Sorting Your Forms', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-building\" target=\"_blank\">' . __( 'Building Your Forms', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-forms',\n\t\t\t'title' => __( 'Forms', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-interface\" target=\"_blank\">' . __( 'Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-managing\" target=\"_blank\">' . __( 'Managing Your Entries', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-searching-filtering\" target=\"_blank\">' . __( 'Searching and Filtering Your Entries', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-entries',\n\t\t\t'title' => __( 'Entries', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/email-design\" target=\"_blank\">' . __( 'Email Design Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/analytics\" target=\"_blank\">' . __( 'Analytics Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-email-analytics',\n\t\t\t'title' => __( 'Email Design & Analytics', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/import\" target=\"_blank\">' . __( 'Import Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/export\" target=\"_blank\">' . __( 'Export Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-import-export',\n\t\t\t'title' => __( 'Import & Export', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/conditional-logic\" target=\"_blank\">' . __( 'Conditional Logic', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/templating\" target=\"_blank\">' . __( 'Templating', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/custom-capabilities\" target=\"_blank\">' . __( 'Custom Capabilities', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/hooks\" target=\"_blank\">' . __( 'Filters and Actions', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-advanced',\n\t\t\t'title' => __( 'Advanced Topics', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<p>' . __( '<strong>Always load CSS</strong> - Force Visual Form Builder Pro CSS to load on every page. Will override \"Disable CSS\" option, if selected.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable CSS</strong> - Disable CSS output for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable Email</strong> - Disable emails from sending for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable Notifications Email</strong> - Disable notification emails from sending for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Skip Empty Fields in Email</strong> - Fields that have no data will not be displayed in the email.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable saving new entry</strong> - Disable new entries from being saved.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable saving entry IP address</strong> - An entry will be saved, but the IP address will be removed.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Place Address labels above fields</strong> - The Address field labels will be placed above the inputs instead of below.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Remove default SPAM Verification</strong> - The default SPAM Verification question will be removed and only a submit button will be visible.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable meta tag version</strong> - Prevent the hidden Visual Form Builder Pro version number from printing in the source code.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Skip PayPal redirect if total is zero</strong> - If PayPal is configured, do not redirect if the total is zero.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Prepend Confirmation</strong> - Always display the form beneath the text confirmation after the form has been submitted.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Max Upload Size</strong> - Restrict the file upload size for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Sender Mail Header</strong> - Control the Sender attribute in the mail header. This is useful for certain server configurations that require an existing email on the domain to be used.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>reCAPTCHA Public Key</strong> - Required if \"Use reCAPTCHA\" option is selected in the Secret field.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>reCAPTCHA Private Key</strong> - Required if \"Use reCAPTCHA\" option is selected in the Secret field.', 'visual-form-builder-pro' ) . '</p>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-settings',\n\t\t\t'title' => __( 'Settings', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t}",
"public function custom_help_tab() {\n\n\t\t\t$screen = get_current_screen();\n\n\t\t\t// Return early if we're not on the needed post type.\n\t\t\tif ( ( $this->object_type == 'post' && $this->object != $screen->post_type ) || \n\t\t\t\t ( $this->object_type == 'taxonomy' && $this->object != $screen->taxonomy ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Add the help tabs.\n\t\t\tforeach ( $this->args->help_tabs as $tab ) {\n\t\t\t\t$screen->add_help_tab( $tab );\n\t\t\t}\n\n\t\t\t// Add the help sidebar.\n\t\t\t$screen->set_help_sidebar( $this->args->help_sidebar );\n\t\t}",
"private static function options_page_tabs() {\n $tabs = array(\n 'general' => __('Allgemein', 'fau-cris'),\n 'layout' => __('Darstellung', 'fau-cris'),\n 'sync' => __('Synchronisierung', 'fau-cris')\n );\n return $tabs;\n }",
"public function getHelpLinks(){\n return $this->pluginDefinition['help_links'];\n }",
"public function help() {\n $screen = get_current_screen();\n SwpmFbUtils::help($screen);\n }",
"public function admin_head() {\n\t \t\t// Remove the fake Settings submenu\n\t \t\tremove_submenu_page( 'options-general.php', 'wc_talks' );\n\n\t \t\t//Generate help if one is available for the current screen\n\t \t\tif ( wct_is_admin() || ! empty( $this->is_plugin_settings ) ) {\n\n\t \t\t\t$screen = get_current_screen();\n\n\t \t\t\tif ( ! empty( $screen->id ) && ! $screen->get_help_tabs() ) {\n\t \t\t\t\t$help_tabs_list = $this->get_help_tabs( $screen->id );\n\n\t \t\t\t\tif ( ! empty( $help_tabs_list ) ) {\n\t \t\t\t\t\t// Loop through tabs\n\t \t\t\t\t\tforeach ( $help_tabs_list as $key => $help_tabs ) {\n\t \t\t\t\t\t\t// Make sure types are a screen method\n\t \t\t\t\t\t\tif ( ! in_array( $key, array( 'add_help_tab', 'set_help_sidebar' ) ) ) {\n\t \t\t\t\t\t\t\tcontinue;\n\t \t\t\t\t\t\t}\n\n\t \t\t\t\t\t\tforeach ( $help_tabs as $help_tab ) {\n\t \t\t\t\t\t\t\t$content = '';\n\n\t \t\t\t\t\t\t\tif ( empty( $help_tab['content'] ) || ! is_array( $help_tab['content'] ) ) {\n\t \t\t\t\t\t\t\t\tcontinue;\n\t \t\t\t\t\t\t\t}\n\n\t \t\t\t\t\t\t\tif ( ! empty( $help_tab['strong'] ) ) {\n\t \t\t\t\t\t\t\t\t$content .= '<p><strong>' . $help_tab['strong'] . '</strong></p>';\n\t \t\t\t\t\t\t\t}\n\n\t \t\t\t\t\t\t\tforeach ( $help_tab['content'] as $tab_content ) {\n\t\t\t\t\t\t\t\t\tif ( is_array( $tab_content ) ) {\n\t\t\t\t\t\t\t\t\t\t$content .= '<ul><li>' . join( '</li><li>', $tab_content ) . '</li></ul>';\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$content .= '<p>' . $tab_content . '</p>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$help_tab['content'] = $content;\n\n\t \t\t\t\t\t\t\tif ( 'add_help_tab' == $key ) {\n\t \t\t\t\t\t\t\t\t$screen->add_help_tab( $help_tab );\n\t \t\t\t\t\t\t\t} else {\n\t \t\t\t\t\t\t\t\t$screen->set_help_sidebar( $content );\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t}\n\t \t\t\t\t\t}\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t}\n\n\t \t\t// Add some css\n\t\t\t?>\n\n\t\t\t<style type=\"text/css\" media=\"screen\">\n\t\t\t/*<![CDATA[*/\n\n\t\t\t\t/* Bubble style for Main Post type menu */\n\t\t\t\t#adminmenu .wp-menu-open.menu-icon-<?php echo $this->post_type?> .awaiting-mod {\n\t\t\t\t\tbackground-color: #2ea2cc;\n\t\t\t\t\tcolor: #fff;\n\t\t\t\t}\n\n\t\t\t\t#wordcamp-talks-csv span.dashicons-media-spreadsheet {\n\t\t\t\t\tvertical-align: text-bottom;\n\t\t\t\t}\n\n\t\t\t\t<?php if ( wct_is_admin() && ! wct_is_rating_disabled() ) : ?>\n\t\t\t\t\t/* Rating stars in screen options and in talks WP List Table */\n\t\t\t\t\t.metabox-prefs .talk-rating-bubble:before,\n\t\t\t\t\tth .talk-rating-bubble:before {\n\t\t\t\t\t\tfont: normal 20px/.5 'dashicons';\n\t\t\t\t\t\tspeak: none;\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t\ttop: 4px;\n\t\t\t\t\t\tleft: -4px;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tvertical-align: top;\n\t\t\t\t\t\t-webkit-font-smoothing: antialiased;\n\t\t\t\t\t\t-moz-osx-font-smoothing: grayscale;\n\t\t\t\t\t\ttext-decoration: none !important;\n\t\t\t\t\t\tcolor: #444;\n\t\t\t\t\t}\n\n\t\t\t\t\tth .talk-rating-bubble:before,\n\t\t\t\t\t.metabox-prefs .talk-rating-bubble:before {\n\t\t\t\t\t\tcontent: '\\f155';\n\t\t\t\t\t}\n\n\t\t\t\t\t.metabox-prefs .talk-rating-bubble:before {\n\t\t\t\t\t\tvertical-align: baseline;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Rates management */\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\tlist-style: none;\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li {\n\t\t\t\t\t\tlist-style: none;\n\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tpadding:15px 0;\n\t\t\t\t\t\tborder-bottom:dotted 1px #ccc;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li:last-child {\n\t\t\t\t\t\tborder:none;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-star {\n\t\t\t\t\t\tfloat:left;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-star {\n\t\t\t\t\t\twidth:20%;\n\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users {\n\t\t\t\t\t\tmargin-left: 20%;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users span.user-rated {\n\t\t\t\t\t\tdisplay:inline-block;\n\t\t\t\t\t\tmargin:5px;\n\t\t\t\t\t\tpadding:5px;\n\t\t\t\t\t\t-webkit-box-shadow: 0 1px 1px 1px rgba(0,0,0,0.1);\n\t\t\t\t\t\tbox-shadow: 0 1px 1px 1px rgba(0,0,0,0.1);\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users a.del-rate {\n\t\t\t\t\t\ttext-decoration: none;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users a.del-rate div {\n\t\t\t\t\t\tvertical-align: baseline;\n\t\t\t\t\t}\n\t\t\t\t<?php endif; ?>\n\n\t\t\t/*]]>*/\n\t\t\t</style>\n\t\t\t<?php\n\t\t}",
"public function get_help_tab($id)\n {\n }",
"public function remove_help_tabs()\n {\n }",
"public function getHelpTabAllowableValues()\n {\n return [\n self::HELP_TAB_DEFAULT_OR_INHERIT,\n self::HELP_TAB_HIDE,\n self::HELP_TAB_SHOW,\n ];\n }",
"function admin_hide_help() { \n $screen = get_current_screen();\n $screen->remove_help_tabs();\n}",
"public function add_help_tab() {\n\t\t$screen = get_current_screen();\n\t\t$screen->add_help_tab( array(\n\t\t\t\t'id' => 'support',\n\t\t\t\t'title' => 'Support',\n\t\t\t\t'content' => '',\n\t\t\t\t'callback' => array( $this, 'display' ),\n\t\t\t)\n\t\t);\n\t}",
"function foodpress_admin_help_tab_content() {\r\n\t$screen = get_current_screen();\r\n\r\n\t$screen->add_help_tab( array(\r\n\t 'id'\t=> 'foodpress_overview_tab',\r\n\t 'title'\t=> __( 'Overview', 'foodpress' ),\r\n\t 'content'\t=>\r\n\r\n\t \t'<p>' . __( 'Thank you for using FoodPress plugin. ', 'foodpress' ). '</p>'\r\n\r\n\t) );\r\n\r\n\r\n\r\n\r\n\t$screen->set_help_sidebar(\r\n\t\t'<p><strong>' . __( 'For more information:', 'foodpress' ) . '</strong></p>' .\r\n\t\t'<p><a href=\"http://demo.myfoodpress.com/\" target=\"_blank\">' . __( 'foodpress Demo', 'foodpress' ) . '</a></p>' .\r\n\t\t\r\n\t\t'<p><a href=\"http://demo.myfoodpress.com/documentation/\" target=\"_blank\">' . __( 'Documentation', 'foodpress' ) . '</a></p>'.\r\n\t\t'<p><a href=\"https://foodpressplugin.freshdesk.com/support/home/\" target=\"_blank\">' . __( 'Support', 'foodpress' ) . '</a></p>'\r\n\t);\r\n}",
"private function help_style_tabs() {\n $help_sidebar = $this->get_sidebar();\n\n $help_class = '';\n if ( ! $help_sidebar ) :\n $help_class .= ' no-sidebar';\n endif;\n\n // Time to render!\n ?>\n <div id=\"screen-meta\" class=\"tr-options metabox-prefs\">\n\n <div id=\"contextual-help-wrap\" class=\"<?php echo esc_attr( $help_class ); ?>\" >\n <div id=\"contextual-help-back\"></div>\n <div id=\"contextual-help-columns\">\n <div class=\"contextual-help-tabs\">\n <ul>\n <?php\n $class = ' class=\"active\"';\n $tabs = $this->get_tabs();\n foreach ( $tabs as $tab ) :\n $link_id = \"tab-link-{$tab['id']}\";\n $panel_id = (!empty($tab['url'])) ? $tab['url'] : \"#tab-panel-{$tab['id']}\";\n ?>\n <li id=\"<?php echo esc_attr( $link_id ); ?>\"<?php echo $class; ?>>\n <a href=\"<?php echo esc_url( \"$panel_id\" ); ?>\">\n <?php echo esc_html( $tab['title'] ); ?>\n </a>\n </li>\n <?php\n $class = '';\n endforeach;\n ?>\n </ul>\n </div>\n\n <?php if ( $help_sidebar ) : ?>\n <div class=\"contextual-help-sidebar\">\n <?php echo $help_sidebar; ?>\n </div>\n <?php endif; ?>\n\n <div class=\"contextual-help-tabs-wrap\">\n <?php\n $classes = 'help-tab-content active';\n foreach ( $tabs as $tab ):\n $panel_id = \"tab-panel-{$tab['id']}\";\n ?>\n\n <div id=\"<?php echo esc_attr( $panel_id ); ?>\" class=\"inside <?php echo $classes; ?>\">\n <?php\n // Print tab content.\n echo $tab['content'];\n\n // If it exists, fire tab callback.\n if ( ! empty( $tab['callback'] ) )\n call_user_func_array( $tab['callback'], array( $this, $tab ) );\n ?>\n </div>\n <?php\n $classes = 'help-tab-content';\n endforeach;\n ?>\n </div>\n </div>\n </div>\n </div>\n <?php\n }",
"public function getTOC()\n {\n $devhelp = new Devhelp(@file_get_contents($this->DevhelpFile));\n return $devhelp->process() ? $devhelp->getTOC() : array();\n }",
"private function get_tabs() {\n return array(\n 'general' => array(\n 'title' => __( 'General', 'jpid' ),\n 'group' => 'jpid_general_settings'\n ),\n 'delivery' => array(\n 'title' => __( 'Delivery', 'jpid' ),\n 'group' => 'jpid_delivery_settings'\n ),\n 'payment' => array(\n 'title' => __( 'Payment', 'jpid' ),\n 'group' => 'jpid_payment_settings'\n )\n );\n }",
"public function getHelp()\n {\n return $this->run(array(\n 'help'\n ));\n }",
"public function getHelp()\n\t{\n\t\treturn $this->run(array('help'));\n\t}",
"public static function getHelpIndex() {\n return self::$_help_index;\n }",
"public function tabsAction()\n {\n\t\treturn array();\n }",
"protected function getTabs()\n {\n return $this->_tabs;\n }",
"public function getTabs()\n {\n // so we need to set current handler object for rendering. \n $tabs = static::$tabs;\n foreach ($tabs as $tab) {\n $tab->setHandler($this);\n }\n return $tabs;\n }",
"public function getTabs()\n\t\t{\n\t\t\treturn $this->_tabs;\n\t\t}",
"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\"] [] .= \"Zabbix Host Interface :\";\n\t\t$help = array_merge ( $help, zabbix_common_interface::help () );\n\t\t\n\t\treturn $help;\n\t}",
"public function getPageHelp()\n {\n switch ($this->_page)\n {\n case 'indexindex':\n return $this->_help['Login']['help'];\n\n case 'queueindex':\n return $this->_help['Rig Selection']['help'];\n\n case 'queuequeuing':\n return $this->_help['Queue']['help'];\n\n case 'bookingsindex':\n return $this->_help['Reservation']['help'];\n\n case 'bookingswaiting':\n return $this->_help['Reservation Waiting']['help'];\n\n case 'bookingsexisting':\n return $this->_help['Existing Reservations']['help'];\n\n case 'sessionindex':\n return $this->_help['Session']['help'];\n\n default:\n return 'This page has no help.';\n }\n }",
"public function menu_local_tabs()\n {\n return menu_local_tabs();\n }",
"public function describeTabs();",
"public function getShortcuts();",
"public function getTabs(): array\n {\n return $this->tabs;\n }",
"function siteorigin_panels_add_help_tab($prefix) {\n\t$screen = get_current_screen();\n\tif(\n\t\t( $screen->base == 'post' && ( in_array( $screen->id, siteorigin_panels_setting( 'post-types' ) ) || $screen->id == '') )\n\t\t|| ($screen->id == 'appearance_page_so_panels_home_page')\n\t) {\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'panels-help-tab', //unique id for the tab\n\t\t\t'title' => __( 'Page Builder', 'positive-panels' ), //unique visible title for the tab\n\t\t\t'callback' => 'siteorigin_panels_add_help_tab_content'\n\t\t) );\n\t}\n}",
"public function metabox_tabs() {\n\t\t$tabs = array(\n\t\t\t'vpn-general' => array(\n\t\t\t\t'label' => 'General',\n\t\t\t\t'icon' => 'dashicons-text',\n\t\t\t),\n\t\t\t'vpn-scripts' => array(\n\t\t\t\t'label' => 'Scripts',\n\t\t\t\t'icon' => 'dashicons-format-aside',\n\t\t\t),\n\t\t\t'vpn-promotions' => array(\n\t\t\t\t'label' => 'Promotions',\n\t\t\t\t'icon' => 'dashicons-testimonial',\n\t\t\t),\n\t\t);\n\n\t\treturn $tabs;\n\t}",
"public function getHelpSidbar()\n {\n $txt_title = __(\"Resources\", 'duplicator');\n $txt_home = __(\"Knowledge Base\", 'duplicator');\n $txt_guide = __(\"Full User Guide\", 'duplicator');\n $txt_faq = __(\"Technical FAQs\", 'duplicator');\n\t\t$txt_sets = __(\"Package Settings\", 'duplicator');\n $this->screen->set_help_sidebar(\n \"<div class='dup-screen-hlp-info'><b>{$txt_title}:</b> <br/>\"\n .\"<i class='fa fa-home'></i> <a href='https://snapcreek.com/duplicator/docs/' target='_sc-home'>{$txt_home}</a> <br/>\"\n .\"<i class='fa fa-book'></i> <a href='https://snapcreek.com/duplicator/docs/guide/' target='_sc-guide'>{$txt_guide}</a> <br/>\"\n .\"<i class='fa fa-file-code-o'></i> <a href='https://snapcreek.com/duplicator/docs/faqs-tech/' target='_sc-faq'>{$txt_faq}</a> <br/>\"\n\t\t\t.\"<i class='fa fa-gear'></i> <a href='admin.php?page=duplicator-settings&tab=package'>{$txt_sets}</a></div>\"\n );\n }",
"public function getHelp()\n {\n new Help('form');\n }",
"public static function getAllPortalTabs()\n {\n\n $tabs = array('Home');\n\n $browser = new SugarPortalBrowser();\n $browser->loadModules();\n foreach ($browser->modules as $moduleName => $sugarPortalModule) {\n if (!empty($sugarPortalModule->views['list.php'])) {\n $tabs[] = $moduleName;\n }\n }\n\n return $tabs;\n }",
"public static function render_help() {\n\n // Grab the current screen\n $screen = get_current_screen();\n\n }",
"protected function getTabOptions() {\n $options = [\n 'members' => $this->t('Members'),\n 'admins' => $this->t('Administrators'),\n ];\n if (($this->currentUser->hasPermission('manage circle spaces') &&\n $this->moduleHandler->moduleExists('living_spaces_circles')) ||\n $this->moduleHandler->moduleExists('living_spaces_subgroup')\n ) {\n $options['inherit'] = $this->t('Inherited');\n }\n return $options;\n }",
"public function learndash_admin_tab_sets( array $tab_set = array(), string $tab_key = '', string $current_page_id = '' ) : array {\n\t\t\tif ( ( ! empty( $tab_set ) ) && ( ! empty( $tab_key ) ) && ( ! empty( $current_page_id ) ) ) {\n\t\t\t\tif ( 'admin_page_learndash-help' === $current_page_id ) {\n\t\t\t\t\t?>\n\t\t\t\t\t<style> h1.nav-tab-wrapper { display: none; }</style>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $tab_set;\n\t\t}",
"function getTabs(&$tabs_gui)\n\t{\n\t\tglobal $rbacsystem;\n\n\t\t// properties\n\t\tif ($rbacsystem->checkAccess(\"write\", $_GET[\"ref_id\"]))\n\t\t{\n\t\t\t$tabs_gui->addTarget(\"edit_properties\",\n\t\t\t\t\"repository.php?cmd=properties&ref_id=\".$_GET[\"ref_id\"],\n\t\t\t\t\"properties\");\n\t\t}\n\n\t\t// edit permission\n\t\tif ($rbacsystem->checkAccess(\"edit_permission\", $_GET[\"ref_id\"]))\n\t\t{\n\t\t\t$tabs_gui->addTarget(\"perm_settings\",\n\t\t\t\t\"repository.php?cmd=permissions&ref_id=\".$_GET[\"ref_id\"],\n\t\t\t\t\"permissions\");\n\t\t}\n\t}",
"public function dashboard_page_mscr_intrusions() {\n\t\t// WordPress 3.3\n\t\tif ( function_exists( 'wp_suspend_cache_addition' ) ) {\n\t\t\t$args = array(\n\t\t\t\t'title' => 'Help',\n\t\t\t\t'id' => 'mscr_help',\n\t\t\t\t'content' => $this->get_contextual_help(),\n\t\t\t);\n\t\t\tget_current_screen()->add_help_tab( $args );\n\t\t}\n\t\t// WordPress 3.1 and later\n\t\telse if ( function_exists( 'get_current_screen' ) ) {\n\t\t\t// Add help to the intrusions list page\n\t\t\tadd_contextual_help( get_current_screen(), $this->get_contextual_help() );\n\t\t}\n\t}",
"public function tabs()\r\n\t{\r\n\t\tif(!$this->tabs instanceof \\Zbase\\Models\\Ui\\Tabs)\r\n\t\t{\r\n\t\t\t$className = zbase_model_name('ui.tabs', null, '\\Zbase\\Models\\Ui\\Tabs');\r\n\t\t\t$this->tabs = new $className;\r\n\t\t}\r\n\t\treturn $this->tabs;\r\n\t}",
"public function getHelp() {\n\t\treturn $this->help;\n\t}",
"public function getHelp() {\n\t\treturn $this->help;\n\t}",
"public function create_help_screen() {\n\t\t$this->admin_screen = WP_Screen::get( $this->admin_page );\n\n\t\t$this->admin_screen->add_help_tab(\n\t\t\tarray(\n\t\t\t\t'title' => 'Annotation Guide',\n\t\t\t\t'id' => 'annotation_tab',\n\t\t\t\t'content' => '<p>Drag the mouse and draw a rectangle around the object and the click save.</p>',\n\t\t\t\t'callback' => false\n\t\t\t)\n\t\t);\n\t}",
"public \tfunction\thelpMenu() { \n\t\t\t//Declare variables.\n\t\t\t$entries\t\t\t=\tarray();\n\t\t\t\n\t\t\t//Depending upon the type of directory reading function available. \n\t\t\tif (!function_exists('glob') && !function_exists('scandir')) {\n\t\t\t\t//Open the directory.\n\t\t\t\t$handle\t\t\t=\topendir(realpath(dirname(__FILE__) . '/doc'));\n\t\t\t\t\n\t\t\t\t//While there are entries to read.\n\t\t\t\twhile (($entry = readdir($handle)) !== false) {\n\t\t\t\t\t//If the file is a PHP file.\n\t\t\t\t\tif (strpos($entry, '.php') !== false) {\n\t\t\t\t\t\t//Increment entries.\n\t\t\t\t\t\t$entries[]\t=\t$entry;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Close the directory.\n\t\t\t\tclosedir($handle);\n\t\t\t} elseif (function_exists('glob')) {\n\t\t\t\t//Find all php files using glob.\n\t\t\t\t$files\t\t\t=\tglob(sprintf(\"%s/doc/*.php\", dirname(__FILE__)));\n\t\t\t\t\n\t\t\t\t//If the files are an array.\n\t\t\t\tif (is_array($files)) {\n\t\t\t\t\t//For each file.\n\t\t\t\t\tforeach($files as $entry) {\n\t\t\t\t\t\t//Increment entries.\n\t\t\t\t\t\t$entries[]\t=\t$entry;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} elseif (function_exists('scandir')) {\n\t\t\t\t//Get the files.\n\t\t\t\t$files\t\t=\tscandir(realpath(dirname(__FILE__) . '/doc'));\n\t\t\t\t\n\t\t\t\t//If the files are an array.\n\t\t\t\tif (is_array($files)) {\n\t\t\t\t\t//For each file.\n\t\t\t\t\tforeach($files as $entry) {\n\t\t\t\t\t\t//If the file is a PHP file.\n\t\t\t\t\t\tif (strpos($entry, '.php') !== false) {\n\t\t\t\t\t\t\t//Increment entries.\n\t\t\t\t\t\t\t$entries[]\t=\t$entry;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//If there are entries.\n\t\t\tif (count($entries) > 0) {\n\t\t\t\t//For each of the menu tabs.\n\t\t\t\tforeach ($entries as $key => $entry) {\n\t\t\t\t\t//Get the basename.\n\t\t\t\t\t$entry\t\t=\tbasename($entry);\n\t\t\t\t\t\n\t\t\t\t\t//Set the filename.\n\t\t\t\t\t$filename\t=\tsprintf(\"%sdoc/$entry\", plugin_dir_path(__FILE__));\n\t\t\t\t\t\n\t\t\t\t\t//If there is an entry, and the file exists.\n\t\t\t\t\tif ($entry && file_exists($filename)) { \n\t\t\t\t\t\t//Get the pieces of the filename. \n\t\t\t\t\t\t$pieces\t\t\t=\texplode('.', $entry);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Start the output buffer.\n\t\t\t\t\t\tob_start();\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Include the PHP file for rendering.\n\t\t\t\t\t\tinclude_once($filename);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Add the help tab.\n\t\t\t\t\t\tget_current_screen() -> add_help_tab(array(\n\t\t\t\t\t\t\t\t'id' => \"FrozenPlugin-help-$key\",\n\t\t\t\t\t\t\t\t'title' => ucwords(__(str_replace('-', ' ', $pieces[0]))),\n\t\t\t\t\t\t\t\t'content' => ob_get_clean()\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}",
"public function rates_help_tabs( $help_tabs = array() ) {\n\t\t\tif ( ! empty( $help_tabs['talks']['add_help_tab'] ) ) {\n\t\t\t\t$talks_help_tabs = wp_list_pluck( $help_tabs['talks']['add_help_tab'], 'id' );\n\t\t\t\t$talks_overview = array_search( 'talks-overview', $talks_help_tabs );\n\n\t\t\t\tif ( isset( $help_tabs['talks']['add_help_tab'][ $talks_overview ]['content'] ) ) {\n\t\t\t\t\t$help_tabs['talks']['add_help_tab'][ $talks_overview ]['content'][] = esc_html__( 'The Ratings metabox allows you to manage the ratings the talk has received.', 'wordcamp-talks' );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $help_tabs;\n\t\t}",
"public function get_help_page()\n\t{\n\t\t$this->load_misc_methods();\n\t\treturn cms_module_GetHelpPage($this);\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 getHelp()\n {\n return $this->help;\n }",
"function get_toolbars()\n {\n }",
"protected function cards()\n {\n return [\n new Help,\n ];\n }",
"public static function current() {\r\n $help_name = strtolower(str_replace('HW_HELP_','', get_called_class()));\r\n return self::get($help_name)->plugin_help;\r\n }",
"function cinerama_edge_get_admin_tab() {\n\t\treturn isset( $_GET['page'] ) ? cinerama_edge_strafter( $_GET['page'], 'tab' ) : null;\n\t}",
"private function _get_help_section_settings() {\r\n\r\n return array(\r\n\r\n array(\r\n 'title' => __( 'Help Options' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'title',\r\n 'desc' => '',\r\n 'id' => 'wwof_help_main_title'\r\n ),\r\n\r\n array(\r\n 'name' => '',\r\n 'type' => 'wwof_help_resources',\r\n 'desc' => '',\r\n 'id' => 'wwof_help_help_resources',\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Create Wholesale Ordering Page' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'wwof_button',\r\n 'desc' => '',\r\n 'id' => 'wwof_help_create_wholesale_page',\r\n 'class' => 'button button-primary'\r\n ),\r\n\r\n array(\r\n 'name' => __( 'Clean up plugin options on un-installation' , 'woocommerce-wholesale-prices-premium' ),\r\n 'type' => 'checkbox',\r\n 'desc' => __( 'If checked, removes all plugin options when this plugin is uninstalled. <b>Warning:</b> This process is irreversible.' , 'woocommerce-wholesale-prices-premium' ),\r\n 'id' => 'wwof_settings_help_clean_plugin_options_on_uninstall'\r\n ),\r\n \r\n array(\r\n 'type' => 'sectionend',\r\n 'id' => 'wwof_help_sectionend'\r\n )\r\n\r\n );\r\n\r\n }",
"public function get_help(){\n $tmp=self::_pipeExec('\"'.$this->cmd.'\" --extended-help');\n return $tmp['stdout'];\n }",
"public static function getShortcuts() {\n if (empty(self::$shortcuts)) {\n $shorts = file(\"helper/shortcuts.txt\");\n\n foreach ($shorts as $i => $line) {\n $line_arr = explode(\"/\", $line);\n self::$shortcuts[$line_arr[0]] = $line_arr[1];\n }\n }\n\n return self::$shortcuts;\n }",
"public function get_help_sidebar()\n {\n }",
"public function getHelp()\n {\n $this->parseDocBlock();\n return $this->help;\n }",
"public function help_tab() {\n $export_url = $this->get_property_export_url();\n\n if ( !$export_url ) {\n return;\n }\n\n $export_url = $export_url . '&limit=10&format=xml';\n\n $this->get_template_part( 'admin/settings-help-export', array(\n 'export_url' => $export_url,\n ) );\n }",
"public function getHelp() {\n $help = parent::getHelp();\n $global_options = $this->getGlobalOptions();\n if (!empty($global_options)) {\n $help .= PHP_EOL . 'Global options:';\n foreach ($global_options as $name => $value) {\n $help .= PHP_EOL . ' [' . $name . '=' . $value . ']';\n }\n }\n return $help;\n }",
"private function get_allowed_screens() {\n\t\t$screens = [\n\t\t\t'avada-fusion-patcher',\n\t\t\t'avada-registration',\n\t\t\t'avada-plugins',\n\t\t\t'avada-demos',\n\t\t];\n\n\t\treturn $screens;\n\t}",
"public function set_tabs() {\n\t\t\t$tabs = [\n\t\t\t\t[\n\t\t\t\t\t'id' => 'business_info',\n\t\t\t\t\t'title' => __( 'Business info', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'admin-home',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'opening_hours',\n\t\t\t\t\t'title' => __( 'Opening hours', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'clock',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'maps_settings',\n\t\t\t\t\t'title' => __( 'Map settings', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'location-alt',\n\t\t\t\t],\n\t\t\t];\n\n\t\t\t$tabs = apply_filters( 'wpseo-local-location-meta-tabs', $tabs );\n\n\t\t\t$this->tabs = $tabs;\n\t\t}",
"public function getToolbarEntries()\n {\n return $this->toolbar['entries'];\n }",
"public function help()\n {\n $help = file_get_contents(BUILTIN_SHELL_HELP . 'list.txt');\n $this->put($help);\n }",
"public function getHelpUrl()\n {\n return $this->helpPage;\n }",
"public function info()\n\t{\n\t\treturn [\n\t\t\t'name'\t\t\t=> [\n\t\t\t\t'cn'\t=> '帮助',\n\t\t\t],\n\n\t\t\t'description'\t=> [\n\t\t\t\t'cn'\t=> '一个能解决用户疑问的模组.',\n\t\t\t],\n\t\t\t'frontend'\t\t=> TRUE,\n\t\t\t'backend'\t\t=> TRUE,\n\t\t\t'user'\t\t\t=> TRUE,\n\t\t\t'menu'\t\t\t=> 'content',\n\t\t\t'roles'\t\t\t=> [\n\t\t\t],\n\t\t\t'sections' => [\n\t\t\t\t'helper'\t\t=> [\n\t\t\t\t\t'name'\t=> '帮助中心',\n\t\t\t\t\t'uri'\t=> 'content/helper',\n\t\t\t\t\t'shortcuts' => [\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'name'\t=> '创建帮助',\n\t\t\t\t\t\t\t'uri'\t=> 'content/helper/change',\n\t\t\t\t\t\t\t'class'\t=> 'btn btn-md btn-success',\n\t\t\t\t\t\t\t'modal'\t=> TRUE,\n\t\t\t\t\t\t\t'icon'\t=> 'plus',\n\t\t\t\t\t\t]\n\t\t\t\t\t],\n\t\t\t\t],\n\n\t\t\t\t'categories'\t\t=> [\n\t\t\t\t\t'name'\t=> '类别',\n\t\t\t\t\t'uri'\t=> 'content/helper/categories',\n\t\t\t\t\t'shortcuts' => [\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'name'\t=> '创建帮助类别',\n\t\t\t\t\t\t\t'uri'\t=> 'content/helper/categories/change',\n\t\t\t\t\t\t\t'class'\t=> 'btn btn-md btn-success',\n\t\t\t\t\t\t\t'modal'\t=> TRUE,\n\t\t\t\t\t\t\t'icon'\t=> 'plus',\n\t\t\t\t\t\t]\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t],\n\t\t];\n\t}",
"function getCustomTabsInfo(){\n $custom_tabs_info = array(array('name' => 'Tab1', 'url' => 'javascript://'),\n array('name' => 'Tab2', 'url' => 'javascript://'),\n array('name' => 'Tab3', 'url' => 'javascript://'), );\n $link = mysql_connect(DB_HOST, DB_USER, DB_PASS);\n mysql_select_db(DB_NAME);\n $sql = \"select * from healingcrystals_user_custom_tabs where user_id='\" . $this->getId() . \"'\";\n $result = mysql_query($sql);\n if (mysql_num_rows($result)){\n while($entry = mysql_fetch_assoc($result)){\n $custom_tabs_info[$entry['tab_index']-1]['name'] = $entry['tab_description'];\n $custom_tabs_info[$entry['tab_index']-1]['url'] = $entry['tab_link'];\n }\n }\n mysql_close($link);\n return $custom_tabs_info;\n }",
"public function get_settings_tabs() {\n\t\t// Sort by order, where higher number means earlier output.\n\t\tusort(\n\t\t\t$this->arr_settings_tabs,\n\t\t\tfunction( $a, $b ) {\n\t\t\t\t$a_order = $a['order'] ?? 0;\n\t\t\t\t$b_order = $b['order'] ?? 0;\n\t\t\t\treturn $b_order <=> $a_order;\n\t\t\t}\n\t\t);\n\n\t\treturn $this->arr_settings_tabs;\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$help [__CLASS__] [\"text\"] [] .= \"Zabbix Interface :\";\n\t\t$help [__CLASS__] [\"text\"] [] .= \"\\t--zabbix_interface_ip 10.10.10.10 IP du CI\";\n\t\t$help [__CLASS__] [\"text\"] [] .= \"\\t--zabbix_interface_fqdn ci.client.fr.ghc.local FQDN du CI\";\n\t\t$help [__CLASS__] [\"text\"] [] .= \"\\t--zabbix_interface_resolv_fqdn IP|FQDN Si l'IP et le FQDN son fourni, permet de connaitre la methode a utiliser pour contacter le CI\";\n\t\t\n\t\treturn $help;\n\t}",
"function acp_helps()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['acp_helps'] == 1 ) ? 'ACP Help Entry' : 'ACP Help Entries';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'removed' : 'created';\n\t\t$helpkeys = array();\n\t\t\n\t\tforeach ( $this->xml_array['acp_helps_group']['acp_help'] as $k => $v )\n\t\t{\n\t\t\t$helpkeys[] = \"'{$v['page_key']['VALUE']}'\";\n\t\t}\n\t\t\n\t\t$this->ipsclass->DB->do_delete( 'acp_help', \"page_key IN (\".implode( \",\", $helpkeys ).\")\" );\n\t\t\n\t\tif ( !$this->ipsclass->input['un'] )\n\t\t{\n\t\t\tforeach ( $this->xml_array['acp_helps_group']['acp_help'] as $k => $v )\n\t\t\t{\n\t\t\t\t$this->_add_acp_help( $v );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&code=work&mod={$this->ipsclass->input['mod']}&step={$this->ipsclass->input['step']}{$uninstall}{$group}&st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['acp_helps']} {$object} {$operation}....\" );\n\t}",
"public function getSupportTab($guide, $faq)\n {\n $content = __(\"<b>Need Help?</b> Please check out these resources first:\"\n .\"<ul>\"\n .\"<li><a href='https://snapcreek.com/duplicator/docs/guide{$guide}' target='_sc-faq'>Full Online User Guide</a></li>\"\n .\"<li><a href='https://snapcreek.com/duplicator/docs/faqs-tech{$faq}' target='_sc-faq'>Frequently Asked Questions</a></li>\"\n .\"</ul>\", 'duplicator');\n\n $this->screen->add_help_tab(array(\n 'id' => 'dup_help_tab_callback',\n 'title' => __('Support', 'duplicator'),\n 'content' => \"<p>{$content}</p>\"\n )\n );\n }",
"public function getGetHelpSubtabAllowableValues()\n {\n return [\n self::GET_HELP_SUBTAB_DEFAULT_OR_INHERIT,\n self::GET_HELP_SUBTAB_HIDE,\n self::GET_HELP_SUBTAB_SHOW,\n ];\n }",
"public function get_envira_tab_nav() {\n\n $tabs = array(\n 'images' => __( 'Images', 'envira-gallery' ),\n 'config' => __( 'Config', 'envira-gallery' ),\n 'lightbox' => __( 'Lightbox', 'envira-gallery' ),\n 'mobile' => __( 'Mobile', 'envira-gallery' ),\n );\n $tabs = apply_filters( 'envira_gallery_tab_nav', $tabs );\n\n // \"Misc\" tab is required.\n $tabs['misc'] = __( 'Misc', 'envira-gallery' );\n\n return $tabs;\n\n }",
"function getHelpTOC( $helpsearch )\n{\n\tjimport( 'joomla.filesystem.folder' );\n\n\t$helpurl = mosGetParam( $GLOBALS, 'mosConfig_helpurl', '' );\n\n\t$files = JFolder::files( JPATH_BASE . '/help/en-GB/', '\\.xml$|\\.html$' );\n\n\t$toc = array();\n\tforeach ($files as $file) {\n\t\t$buffer = file_get_contents( JPATH_BASE . '/help/en-GB/' . $file );\n\t\tif (preg_match( '#<title>(.*?)</title>#', $buffer, $m )) {\n\t\t\t$title = trim( $m[1] );\n\t\t\tif ($title) {\n\t\t\t\tif ($helpurl) {\n\t\t\t\t\t// strip the extension\n\t\t\t\t\t$file = preg_replace( '#\\.xml$|\\.html$#', '', $file );\n\t\t\t\t}\n\t\t\t\tif ($helpsearch) {\n\t\t\t\t\tif (JString::strpos( strip_tags( $buffer ), $helpsearch ) !== false) {\n\t\t\t\t\t\t$toc[$file] = $title;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$toc[$file] = $title;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tasort( $toc );\n\treturn $toc;\n}",
"public function add_tabs() {\n\t\t$screen = get_current_screen();\n\n\t\tif ( ! $screen || ! in_array( $screen->id, wc_get_screen_ids() ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$video_map = array(\n\t\t\t'wc-settings' => array(\n\t\t\t\t'title' => __( 'General Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/mz2l10u5f6?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-general' => array(\n\t\t\t\t'title' => __( 'General Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/mz2l10u5f6?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-products' => array(\n\t\t\t\t'title' => __( 'Product Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/lolkan4fxf?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-tax' => array(\n\t\t\t\t'title' => __( 'Tax Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/qp1v19dwrh?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-checkout' => array(\n\t\t\t\t'title' => __( 'Checkout Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/65yjv96z51?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-account' => array(\n\t\t\t\t'title' => __( 'Account Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/35mazq7il2?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-email' => array(\n\t\t\t\t'title' => __( 'Email Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/svcaftq4xv?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-api' => array(\n\t\t\t\t'title' => __( 'Webhook Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/1q0ny74vvq?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-checkout-wc_gateway_paypal' => array(\n\t\t\t\t'title' => __( 'PayPal Standard', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/rbl7e7l4k2?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-checkout-wc_gateway_simplify_commerce' => array(\n\t\t\t\t'title' => __( 'Simplify Commerce', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/jdfzjiiw61?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-shipping' => array(\n\t\t\t\t'title' => __( 'Shipping Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/9c9008dxnr?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-shipping-wc_shipping_free_shipping' => array(\n\t\t\t\t'title' => __( 'Free Shipping', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/po191fmvy9?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-shipping-wc_shipping_local_delivery' => array(\n\t\t\t\t'title' => __( 'Local Delivery', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/5qjepx9ozj?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-shipping-wc_shipping_local_pickup' => array(\n\t\t\t\t'title' => __( 'Local Pickup', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/pe95ph0apb?videoFoam=true'\n\t\t\t),\n\t\t\t'edit-product_cat' => array(\n\t\t\t\t'title' => __( 'Product Categories, Tags, Shipping Classes, & Attributes', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg?videoFoam=true'\n\t\t\t),\n\t\t\t'edit-product_tag' => array(\n\t\t\t\t'title' => __( 'Product Categories, Tags, Shipping Classes, & Attributes', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg?videoFoam=true'\n\t\t\t),\n\t\t\t'edit-product_shipping_class' => array(\n\t\t\t\t'title' => __( 'Product Categories, Tags, Shipping Classes, & Attributes', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg?videoFoam=true'\n\t\t\t),\n\t\t\t'product_attributes' => array(\n\t\t\t\t'title' => __( 'Product Categories, Tags, Shipping Classes, & Attributes', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg?videoFoam=true'\n\t\t\t),\n\t\t\t'product' => array(\n\t\t\t\t'title' => __( 'Simple Products', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/ziyjmd4kut?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-status' => array(\n\t\t\t\t'title' => __( 'System Status', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/xdn733nnhi?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-reports' => array(\n\t\t\t\t'title' => __( 'Reports', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/6aasex0w99?videoFoam=true'\n\t\t\t),\n\t\t\t'edit-shop_coupon' => array(\n\t\t\t\t'title' => __( 'Coupons', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/gupd4h8sit?videoFoam=true'\n\t\t\t),\n\t\t\t'shop_coupon' => array(\n\t\t\t\t'title' => __( 'Coupons', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/gupd4h8sit?videoFoam=true'\n\t\t\t),\n\t\t\t'edit-shop_order' => array(\n\t\t\t\t'title' => __( 'Managing Orders', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/n8n0sa8hee?videoFoam=true'\n\t\t\t),\n\t\t\t'shop_order' => array(\n\t\t\t\t'title' => __( 'Managing Orders', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/n8n0sa8hee?videoFoam=true'\n\t\t\t)\n\t\t);\n\n\t\t$page = empty( $_GET['page'] ) ? '' : sanitize_title( $_GET['page'] );\n\t\t$tab = empty( $_GET['tab'] ) ? '' : sanitize_title( $_GET['tab'] );\n\t\t$section = empty( $_REQUEST['section'] ) ? '' : sanitize_title( $_REQUEST['section'] );\n\t\t$video_key = $page ? implode( '-', array_filter( array( $page, $tab, $section ) ) ) : $screen->id;\n\n\t\t// Fallback for sections\n\t\tif ( ! isset( $video_map[ $video_key ] ) ) {\n\t\t\t$video_key = $page ? implode( '-', array_filter( array( $page, $tab ) ) ) : $screen->id;\n\t\t}\n\n\t\t// Fallback for tabs\n\t\tif ( ! isset( $video_map[ $video_key ] ) ) {\n\t\t\t$video_key = $page ? $page : $screen->id;\n\t\t}\n\n\t\tif ( isset( $video_map[ $video_key ] ) ) {\n\t\t\t$screen->add_help_tab( array(\n\t\t\t\t'id' => 'woocommerce_101_tab',\n\t\t\t\t'title' => __( 'WooCommerce 101', 'woocommerce' ),\n\t\t\t\t'content' =>\n\t\t\t\t\t'<h2><a href=\"http://docs.woothemes.com/document/woocommerce-101-video-series/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=Videos&utm_campaign=Onboarding\">' . __( 'WooCommerce 101', 'woocommerce' ) . '</a> – ' . esc_html( $video_map[ $video_key ]['title'] ) . '</h2>' .\n\t\t\t\t\t'<iframe data-src=\"' . esc_url( $video_map[ $video_key ]['url'] ) . '\" src=\"\" allowtransparency=\"true\" frameborder=\"0\" scrolling=\"no\" class=\"wistia_embed\" name=\"wistia_embed\" allowfullscreen mozallowfullscreen webkitallowfullscreen oallowfullscreen msallowfullscreen width=\"480\" height=\"298\"></iframe>'\n\t\t\t) );\n\t\t}\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'woocommerce_docs_tab',\n\t\t\t'title' => __( 'Documentation', 'woocommerce' ),\n\t\t\t'content' =>\n\t\t\t\t'<h2>' . __( 'Documentation', 'woocommerce' ) . '</h2>' .\n\t\t\t\t'<p>' . __( 'Should you need help understanding, using, or extending WooCommerce, please read our documentation. You will find all kinds of resources including snippets, tutorials and much more.' , 'woocommerce' ) . '</p>' .\n\t\t\t\t'<p><a href=\"' . 'http://docs.woothemes.com/documentation/plugins/woocommerce/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=Docs&utm_campaign=Onboarding' . '\" class=\"button button-primary\">' . __( 'WooCommerce Documentation', 'woocommerce' ) . '</a> <a href=\"' . 'http://docs.woothemes.com/wc-apidocs/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=APIDocs&utm_campaign=Onboarding' . '\" class=\"button\">' . __( 'Developer API Docs', 'woocommerce' ) . '</a></p>'\n\n\t\t) );\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'woocommerce_support_tab',\n\t\t\t'title' => __( 'Support', 'woocommerce' ),\n\t\t\t'content' =>\n\t\t\t\t'<h2>' . __( 'Support', 'woocommerce' ) . '</h2>' .\n\t\t\t\t'<p>' . sprintf( __( 'After %sreading the documentation%s, for further assistance you can use the %scommunity forums%s on WordPress.org to talk with other users. If however you are a WooThemes customer, or need help with premium add-ons sold by WooThemes, please %suse our helpdesk%s.', 'woocommerce' ), '<a href=\"http://docs.woothemes.com/documentation/plugins/woocommerce/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=Docs&utm_campaign=Onboarding\">', '</a>', '<a href=\"https://wordpress.org/support/plugin/woocommerce\">', '</a>', '<a href=\"http://www.woothemes.com/my-account/tickets/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=Tickets&utm_campaign=Onboarding\">', '</a>' ) . '</p>' .\n\t\t\t\t'<p>' . __( 'Before asking for help we recommend checking the system status page to identify any problems with your configuration.', 'woocommerce' ) . '</p>' .\n\t\t\t\t'<p><a href=\"' . admin_url( 'admin.php?page=wc-status' ) . '\" class=\"button button-primary\">' . __( 'System Status', 'woocommerce' ) . '</a> <a href=\"' . 'https://wordpress.org/support/plugin/woocommerce' . '\" class=\"button\">' . __( 'WordPress.org Forums', 'woocommerce' ) . '</a> <a href=\"' . 'http://www.woothemes.com/my-account/tickets/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=Tickets&utm_campaign=Onboarding' . '\" class=\"button\">' . __( 'WooThemes Customer Support', 'woocommerce' ) . '</a></p>'\n\t\t) );\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'woocommerce_education_tab',\n\t\t\t'title' => __( 'Education', 'woocommerce' ),\n\t\t\t'content' =>\n\t\t\t\t'<h2>' . __( 'Education', 'woocommerce' ) . '</h2>' .\n\t\t\t\t'<p>' . __( 'If you would like to learn about using WooCommerce from an expert, consider following a WooCommerce course ran by one of our educational partners.', 'woocommerce' ) . '</p>' .\n\t\t\t\t'<p><a href=\"' . 'http://www.woothemes.com/educational-partners/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=EduPartners&utm_campaign=Onboarding' . '\" class=\"button button-primary\">' . __( 'View Education Partners', 'woocommerce' ) . '</a></p>'\n\t\t) );\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'woocommerce_bugs_tab',\n\t\t\t'title' => __( 'Found a bug?', 'woocommerce' ),\n\t\t\t'content' =>\n\t\t\t\t'<h2>' . __( 'Found a bug?', 'woocommerce' ) . '</h2>' .\n\t\t\t\t'<p>' . sprintf( __( 'If you find a bug within WooCommerce core you can create a ticket via <a href=\"%s\">Github issues</a>. Ensure you read the <a href=\"%s\">contribution guide</a> prior to submitting your report. To help us solve your issue, please be as descriptive as possible and include your <a href=\"%s\">system status report</a>.', 'woocommerce' ), 'https://github.com/woothemes/woocommerce/issues?state=open', 'https://github.com/woothemes/woocommerce/blob/master/CONTRIBUTING.md', admin_url( 'admin.php?page=wc-status' ) ) . '</p>' .\n\t\t\t\t'<p><a href=\"' . 'https://github.com/woothemes/woocommerce/issues?state=open' . '\" class=\"button button-primary\">' . __( 'Report a bug', 'woocommerce' ) . '</a> <a href=\"' . admin_url( 'admin.php?page=wc-status' ) . '\" class=\"button\">' . __( 'System Status', 'woocommerce' ) . '</a></p>'\n\n\t\t) );\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'woocommerce_onboard_tab',\n\t\t\t'title' => __( 'Setup Wizard', 'woocommerce' ),\n\t\t\t'content' =>\n\t\t\t\t'<h2>' . __( 'Setup Wizard', 'woocommerce' ) . '</h2>' .\n\t\t\t\t'<p>' . __( 'If you need to access the setup wizard again, please click on the button below.', 'woocommerce' ) . '</p>' .\n\t\t\t\t'<p><a href=\"' . admin_url( 'index.php?page=wc-setup' ) . '\" class=\"button button-primary\">' . __( 'Setup Wizard', 'woocommerce' ) . '</a></p>'\n\n\t\t) );\n\n\t\t$screen->set_help_sidebar(\n\t\t\t'<p><strong>' . __( 'For more information:', 'woocommerce' ) . '</strong></p>' .\n\t\t\t'<p><a href=\"' . 'http://www.woothemes.com/woocommerce/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=WooCommerceProductPage&utm_campaign=Onboarding' . '\" target=\"_blank\">' . __( 'About WooCommerce', 'woocommerce' ) . '</a></p>' .\n\t\t\t'<p><a href=\"' . 'http://wordpress.org/extend/plugins/woocommerce/' . '\" target=\"_blank\">' . __( 'WordPress.org Project', 'woocommerce' ) . '</a></p>' .\n\t\t\t'<p><a href=\"' . 'https://github.com/woothemes/woocommerce' . '\" target=\"_blank\">' . __( 'Github Project', 'woocommerce' ) . '</a></p>' .\n\t\t\t'<p><a href=\"' . 'http://www.woothemes.com/product-category/themes/woocommerce/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=WCThemes&utm_campaign=Onboarding' . '\" target=\"_blank\">' . __( 'Official Themes', 'woocommerce' ) . '</a></p>' .\n\t\t\t'<p><a href=\"' . 'http://www.woothemes.com/product-category/woocommerce-extensions/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=WCExtensions&utm_campaign=Onboarding' . '\" target=\"_blank\">' . __( 'Official Extensions', 'woocommerce' ) . '</a></p>'\n\t\t);\n\t}",
"public function registerTabs()\n {\n\n Tab::put('promotion.promotion-code', function (TabItem $tab) {\n $tab->key('promotion.promotion-code.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::promotion.promotion-code._fields');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.product.cards._fields');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.image')\n ->label('avored::system.images')\n ->view('avored::catalog.product.cards.images');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.property')\n ->label('avored::system.property')\n ->view('avored::catalog.product.cards.property');\n });\n\n // Tab::put('catalog.product', function (TabItem $tab) {\n // $tab->key('catalog.product.attribute')\n // ->label('avored::system.tab.attribute')\n // ->view('avored::catalog.product.cards.attribute');\n // });\n\n /****** CATALOG CATEGORY TABS *******/\n Tab::put('catalog.category', function (TabItem $tab) {\n $tab->key('catalog.category.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.category._fields');\n });\n\n /****** CATALOG PROPERTY TABS *******/\n Tab::put('catalog.property', function (TabItem $tab) {\n $tab->key('catalog.property.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.property._fields');\n });\n\n /****** CATALOG ATTRIBUTE TABS *******/\n Tab::put('catalog.attribute', function (TabItem $tab) {\n $tab->key('catalog.attribute.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.attribute._fields');\n });\n\n /******CMS PAGES TABS *******/\n Tab::put('cms.page', function (TabItem $tab) {\n $tab->key('cms.page.info')\n ->label('avored::system.basic_info')\n ->view('avored::cms.page._fields');\n });\n\n /******ORDER ORDER STATUS TABS *******/\n Tab::put('order.order-status', function (TabItem $tab) {\n $tab->key('order.order-status.info')\n ->label('avored::system.basic_info')\n ->view('avored::order.order-status._fields');\n });\n\n /****** CUSTOMER GROUPS TABS *******/\n Tab::put('user.customer-group', function (TabItem $tab) {\n $tab->key('user.customer-group.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer-group._fields');\n });\n\n Tab::put('user.customer', function (TabItem $tab) {\n $tab->key('user.customer.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer._fields');\n });\n\n Tab::put('user.customer', function (TabItem $tab) {\n $tab->key('user.customer.address')\n ->label('avored::system.addresses')\n ->view('avored::user.customer._addresses');\n });\n\n Tab::put('user.address', function (TabItem $tab) {\n $tab->key('user.customer.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer.show');\n });\n Tab::put('user.address', function (TabItem $tab) {\n $tab->key('user.customer.address')\n ->label('avored::system.addresses')\n ->view('avored::user.address._fields');\n });\n\n /******USER ADMIN USER TABS *******/\n Tab::put('user.staff', function (TabItem $tab) {\n $tab->key('user.staff.info')\n ->label('avored::system.basic_info')\n ->view('avored::user.staff._fields');\n });\n Tab::put('user.subscriber', function (TabItem $tab) {\n $tab->key('user.subscriber.info')\n ->label('avored::system.basic_info')\n ->view('avored::user.subscriber._fields');\n });\n\n /******SYSTEM CURRENCY TABS *******/\n Tab::put('system.currency', function (TabItem $tab) {\n $tab->key('system.currency.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.currency._fields');\n });\n\n /******SYSTEM STATE TABS *******/\n Tab::put('system.state', function (TabItem $tab) {\n $tab->key('system.state.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.state._fields');\n });\n\n /******SYSTEM ROLE TABS *******/\n Tab::put('system.role', function (TabItem $tab) {\n $tab->key('system.role.info')\n ->label('avored::system.basic_info')\n ->view('avored::system.role._fields');\n });\n\n /******SYSTEM ROLE TABS *******/\n Tab::put('system.language', function (TabItem $tab) {\n $tab->key('system.language.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.language._fields');\n });\n\n /******SYSTEM CONFIGURATION TABS *******/\n Tab::put('system.configuration', function (TabItem $tab) {\n $tab->key('system.configuration.basic')\n ->label('avored::system.basic_configuration')\n ->view('avored::system.configuration.cards.basic');\n });\n\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.user')\n // ->label('avored::system.tab.user_configuration')\n // ->view('avored::system.configuration.cards.user');\n // });\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.tax')\n // ->label('avored::system.tax_configuration')\n // ->view('avored::system.configuration.cards.tax');\n // });\n\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.shipping')\n // ->label('avored::system.tab.shipping_configuration')\n // ->view('avored::system.configuration.cards.shipping');\n // });\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.payment')\n // ->label('avored::system.tab.payment_configuration')\n // ->view('avored::system.configuration.cards.payment');\n // });\n }",
"function helps()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['helps'] == 1 ) ? 'Help File' : 'Help Files';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'removed' : 'created';\n\t\t$helpkeys = array();\n\t\t\n\t\tforeach ( $this->xml_array['helps_group']['help'] as $k => $v )\n\t\t{\n\t\t\t$helpkeys[] = \"'{$v['title']['VALUE']}'\";\n\t\t}\n\t\t\n\t\t$this->ipsclass->DB->do_delete( 'faq', \"title IN (\".implode( \",\", $helpkeys ).\")\" );\n\t\t\n\t\tif ( !$this->ipsclass->input['un'] )\n\t\t{\n\t\t\tforeach ( $this->xml_array['helps_group']['help'] as $k => $v )\n\t\t\t{\n\t\t\t\t$this->_add_help( $v );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&code=work&mod={$this->ipsclass->input['mod']}&step={$this->ipsclass->input['step']}{$uninstall}{$group}&st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['helps']} {$object} {$operation}....\" );\n\t}",
"function settings_nav( $tabs ) {\n\n $tabs[ 'admin_tools' ] = array(\n 'slug' => 'admin_tools',\n 'title' => __( 'Developer', 'wpp' )\n );\n\n return $tabs;\n\n }",
"public function help();",
"public static function menus()\n {\n return [];\n }",
"function getTabs($action) \n { \n if (isset($this->m_results[\"getTabs\"])) \n return $this->m_results[\"getTabs\"]; \n return parent::getTabs($action);\n }",
"function _listRequestTab(){\r\n\t\r\n\tglobal $usertoken;\r\n\t\r\n\t$TABS='<table><tr>'\r\n\t.'<td>'._button('Erstellung','listWF(1)').'</td>'\r\n\t.'<td>'._button('Abgegeben','listWF(2)').'</td>'\r\n\t.'<td>'._button('Akzeptiert','listWF(3)').'</td>'\r\n\t.'<td>'._button('Abgelehnt','listWF(4)').'</td>'\r\n\t.'<td>'._button('Prozessiert','listWF(5)').'</td>'\r\n\t.'<td>'._button('Geschlossen','listWF(6)').'</td>'\r\n\t.'</tr></table><hr/>';\r\n\t\r\n\techo setPageTitle('Übersicht aller Anträge für Benutzer: '.$usertoken['uname']);\r\n\techo setPageControlTabs($TABS);\r\n}",
"public function IndexGet() {\n $resp = array();\n $dtos = SiteTabService::GetTabList(999);\n $resp['dtos'] = $dtos;\n $resp['dto'] = SiteTabService::NewTabGroup();\n return $resp;\n }",
"protected function _getNavigationTabs()\n {\n return array(\n 'bible' => array(\n 'title' => new XenForo_Phrase('th_bible_bible'),\n 'href' => XenForo_Link::buildPublicLink('bible'),\n 'position' => 'middle',\n 'linksTemplate' => 'th_navigation_tabs_bible'\n )\n );\n }",
"public function getMyTabs() {\n $aMyTabsByForm = [];\n\n # Build Query to get User Based Columns\n $oTabsSel = new Select(CoreEntityModel::$aEntityTables['user-form-tabs']->getTable());\n $oTabsSel->join(['core_tab'=>'core_form_tab'],'core_tab.Tab_ID = user_form_tab.tab_idfs');\n $oTabsSel->where(['user_idfs'=>$this->getID()]);\n\n # Get My Tabs from Database\n $oMyTabsDB = CoreEntityModel::$aEntityTables['user-form-tabs']->selectWith($oTabsSel);\n\n foreach($oMyTabsDB as $oTab) {\n # Order By Form\n if(!array_key_exists($oTab->form,$aMyTabsByForm)) {\n $aMyTabsByForm[$oTab->form] = [];\n }\n $aMyTabsByForm[$oTab->form][$oTab->Tab_ID] = $oTab;\n }\n\n return $aMyTabsByForm;\n }",
"protected function getGroupsFromShortcuts() {}",
"public function learndash_admin_tab_sets( array $tab_set = array(), string $tab_key = '', string $current_page_id = '' ) : array {\n\t\t\tif ( ( ! empty( $tab_set ) ) && ( ! empty( $tab_key ) ) && ( ! empty( $current_page_id ) ) ) {\n\t\t\t\tif ( 'admin_page_learndash-setup' === $current_page_id ) {\n\t\t\t\t\t?>\n\t\t\t\t\t<style> h1.nav-tab-wrapper { display: none; }</style>\n\t\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $tab_set;\n\t\t}",
"function siteorigin_panels_add_help_tab_content(){\n\tinclude 'tpl/help.php';\n}",
"public function getTabs(array $params)\n {\n $tabs = parent::getTabs($params);\n\n unset($tabs['usersadmin_add']);\n unset($tabs['usersadmin_search']);\n\n return $tabs;\n }"
] | [
"0.7963183",
"0.72298974",
"0.6886718",
"0.6857598",
"0.66774607",
"0.65425444",
"0.6511631",
"0.64730585",
"0.6200378",
"0.61676383",
"0.6166803",
"0.61609924",
"0.61111885",
"0.61008424",
"0.6059877",
"0.6056342",
"0.60297656",
"0.6019726",
"0.60016334",
"0.59942514",
"0.59867495",
"0.5922784",
"0.59071046",
"0.59021336",
"0.5896271",
"0.5884502",
"0.58806205",
"0.5871054",
"0.582836",
"0.5824699",
"0.58219373",
"0.5810972",
"0.5794994",
"0.5779442",
"0.5738762",
"0.572893",
"0.572613",
"0.5718432",
"0.5711497",
"0.5643275",
"0.56408405",
"0.5640763",
"0.56397295",
"0.5605162",
"0.55964154",
"0.55711955",
"0.5568094",
"0.55660343",
"0.5550183",
"0.5536076",
"0.5531519",
"0.5531519",
"0.55177957",
"0.5514225",
"0.5496",
"0.54936",
"0.54916763",
"0.54916763",
"0.54916763",
"0.54855096",
"0.54814464",
"0.5451909",
"0.5432854",
"0.54232204",
"0.5391191",
"0.5387215",
"0.5351213",
"0.5334182",
"0.5328015",
"0.53184175",
"0.53177005",
"0.53048974",
"0.5303652",
"0.52697825",
"0.5255866",
"0.5246413",
"0.52419484",
"0.52402073",
"0.52384007",
"0.52324134",
"0.52236253",
"0.52168816",
"0.5214783",
"0.52071196",
"0.52020127",
"0.51952434",
"0.5192452",
"0.51740485",
"0.51565236",
"0.51536024",
"0.5149259",
"0.5144996",
"0.5140998",
"0.5108793",
"0.5100631",
"0.5100559",
"0.509708",
"0.50763917",
"0.50748754",
"0.5068764"
] | 0.61180764 | 12 |
Gets the arguments for a help tab. | public function get_tab( $id ) {
if ( ! isset( $this->_tabs[ $id ] ) )
return null;
return $this->_tabs[ $id ];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_site_screen_help_tab_args()\n {\n }",
"public function get_help_tabs()\n {\n }",
"public function getArgument()\n {\n return 'help';\n }",
"public static function parse_args() {\n self::$args = getopt('ha:t:l', array('help'));\n\n switch(true) {\n case array_key_exists('h', self::$args):\n case array_key_exists('help', self::$args):\n print self::$help_usage . self::$help_short_desc . self::$help_args_list;\n exit;\n case array_key_exists('t', self::$args):\n case array_key_exists('l', self::$args):\n return self::$args;\n default:\n print self::$help_usage . PHP_EOL;\n exit;\n }\n }",
"public function setHelpTabs() {\n $this->args['help_tabs'][] = array(\n 'id' => 'redux-help-tab-1',\n 'title' => __( 'Theme Information 1', 'slova' ),\n 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'slova' )\n );\n\n $this->args['help_tabs'][] = array(\n 'id' => 'redux-help-tab-2',\n 'title' => __( 'Theme Information 2', 'slova' ),\n 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'slova' )\n );\n\n // Set the help sidebar\n $this->args['help_sidebar'] = __( '<p>This is the sidebar content, HTML is allowed.</p>', 'slova' );\n }",
"public function help_tab(){\r\n $screen = get_current_screen();\r\n\r\n foreach($this->what_helps as $help_id => $tab) {\r\n $callback_name = $this->generate_callback_name($help_id);\r\n if(method_exists($this, 'help_'.$callback_name.'_callback')) {\r\n $callback = array($this, 'help_'.$callback_name.'_callback');\r\n }\r\n else {\r\n $callback = array($this, 'help_callback');\r\n }\r\n // documentation tab\r\n $screen->add_help_tab( array(\r\n 'id' => 'hw-help-'.$help_id,\r\n 'title' => __( $tab['title'] ),\r\n //'content' => \"<p>sdfsgdgdfghfhfgh</p>\",\r\n 'callback' => $callback\r\n )\r\n );\r\n }\r\n }",
"public function getHelp()\n\t{\n\t\treturn $this->run(array('help'));\n\t}",
"public function drupal_help_arg($arg = array())\n {\n return drupal_help_arg($arg);\n }",
"public function get_help(){\n $tmp=self::_pipeExec('\"'.$this->cmd.'\" --extended-help');\n return $tmp['stdout'];\n }",
"public static function getHelpIndex() {\n return self::$_help_index;\n }",
"public function getHelp()\n {\n return $this->run(array(\n 'help'\n ));\n }",
"public static function getAllHelp()\n {\n return $this->_help;\n }",
"public function setup_help_tab()\n {\n }",
"public function getHelp() {\n\t\treturn $this->help;\n\t}",
"public function getHelp() {\n\t\treturn $this->help;\n\t}",
"public function getHelp() {\n $help = parent::getHelp();\n $global_options = $this->getGlobalOptions();\n if (!empty($global_options)) {\n $help .= PHP_EOL . 'Global options:';\n foreach ($global_options as $name => $value) {\n $help .= PHP_EOL . ' [' . $name . '=' . $value . ']';\n }\n }\n return $help;\n }",
"function getHelp()\n {\n return $this->help;\n }",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\tarray('step' , InputArgument::REQUIRED, 'Step of the demo.'),\n\t\t);\n\t}",
"public function getHelpLinks(){\n return $this->pluginDefinition['help_links'];\n }",
"public function menu_get_active_help()\n {\n return menu_get_active_help();\n }",
"function dfcg_plugin_help() {\n\t\n\tglobal $current_screen;\n\t\n\t$sidebar = dfcg_help_sidebar();\n\t\n\t$current_screen->set_help_sidebar( $sidebar );\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-general',\n\t\t'title' => __( 'General info', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_general'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-theme',\n\t\t'title' => __( 'Theme integration', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_theme'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-quick',\n\t\t'title' => __( 'Quick Start', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_quick'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-gallery',\n\t\t'title' => __( 'Gallery Method', DFCG_DOMAIN ),\n\t\t'callback' => \"dfcg_help_gallery\"\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-images',\n\t\t'title' => __( 'Image Management', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_images'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-desc',\n\t\t'title' => __( 'Descriptions', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_desc'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-css',\n\t\t'title' => __( 'Gallery CSS', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_css'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-scripts',\n\t\t'title' => __( 'Load Scripts', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_scripts'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-troubleshooting',\n\t\t'title' => __( 'Troubleshooting', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_trouble'\n\t));\n}",
"public function getArguments()\n {\n return sprintf(\n \"--%s %s \\\"%s\\\" %s %s %s %s\",\n $this->name,\n $this->getBoxOptionToString(),\n $this->message,\n $this->height,\n $this->width,\n $this->height - 8,\n $this->getListString()\n );\n }",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t//\tarray('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t);\n\t}",
"public function getArguments() {}",
"public function getArguments() {}",
"public function getArguments() {}",
"public function getArguments() {}",
"public function getHelpLines()\n {\n return array(\n 'Usage: php [function] [full]',\n '[function] - the PHP function you want to search for',\n //'[full] (optional) - add \"full\" after the function name to include the description',\n 'Returns information about the specified PHP function'\n );\n }",
"public function getArgs()\n {\n return $this->meta[Cli::ARGS] ?? [];\n }",
"public function get_help_tab($id)\n {\n }",
"function getArguments() ;",
"protected function getArguments()\n {\n return array(//\t\t\tarray('example', InputArgument::REQUIRED, 'An example argument.'),\n );\n }",
"protected function getArguments()\n {\n return array( //\t\t\tarray('example', InputArgument::REQUIRED, 'An example argument.'),\n );\n }",
"protected function getArguments()\n {\n return array( //\t\t\tarray('example', InputArgument::REQUIRED, 'An example argument.'),\n );\n }",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t//array('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t);\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t//array('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t);\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t//array('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t);\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t// array('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t);\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t// array('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t);\n\t}",
"protected function getArguments()\n {\n return array(\n array('action', InputOption::VALUE_REQUIRED, 'Bootstrap setup script')\n );\n }",
"protected function getArguments()\n {\n return [\n ['module', InputArgument::OPTIONAL, 'The module for the language file'],\n ['langFile', InputArgument::OPTIONAL, 'The language file to work on'],\n ['targetLocale', InputArgument::OPTIONAL, 'The target locale for which to add missing keys'],\n ];\n }",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}",
"protected function getArguments()\n {\n return array(\n //array('example', InputArgument::REQUIRED, 'An example argument.'),\n );\n }",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t/*['example', InputArgument::REQUIRED, 'An example argument.'],*/\n\t\t];\n\t}",
"public function getHelp()\n {\n $this->parseDocBlock();\n return $this->help;\n }",
"public function tab() {\n $args = func_get_args();\n\n if (count($args) == 0) {\n return $this->info['tab'];\n } else {\n $tab = array();\n\n if (!is_array($args[0])) {\n $tab['name'] = $args[0];\n } else {\n $tab = $args[0];\n }\n\n if (isset($args[1])) {\n $tab['plugin'] = $args[0];\n }\n\n if (isset($args[2])) {\n $tab['label'] = $args[2];\n }\n\n $tab = array_merge(array(\n 'plugin' => $this->id(),\n 'flag' => null,\n ), $tab);\n\n $this->hook('nav-tab', 'createNavTab', array(\n $tab['name'],\n $tab['plugin'],\n $tab['label'],\n $tab['flag'])\n );\n }\n }",
"public function getHelpTabAllowableValues()\n {\n return [\n self::HELP_TAB_DEFAULT_OR_INHERIT,\n self::HELP_TAB_HIDE,\n self::HELP_TAB_SHOW,\n ];\n }",
"protected function getArguments()\r\n\t{\r\n\t\treturn isset($this->arguments) ? $this->arguments : array();\r\n\t}",
"public function getHelpUrl()\n {\n return $this->helpPage;\n }",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\n\t}",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//['example', InputArgument::REQUIRED, 'An example argument.'],\n\t\t];\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$help [__CLASS__] [\"text\"] [] .= \"Zabbix Interface :\";\n\t\t$help [__CLASS__] [\"text\"] [] .= \"\\t--zabbix_interface_ip 10.10.10.10 IP du CI\";\n\t\t$help [__CLASS__] [\"text\"] [] .= \"\\t--zabbix_interface_fqdn ci.client.fr.ghc.local FQDN du CI\";\n\t\t$help [__CLASS__] [\"text\"] [] .= \"\\t--zabbix_interface_resolv_fqdn IP|FQDN Si l'IP et le FQDN son fourni, permet de connaitre la methode a utiliser pour contacter le CI\";\n\t\t\n\t\treturn $help;\n\t}",
"private function getArguments() {\n return array_slice($argv, 1);\n }",
"public function args()\n {\n return $this->arguments->get();\n }",
"public function getArguments()\n {\n return sprintf(\n \"--%s %s \\\"%s\\\" %s %s %s\",\n $this->name,\n $this->getBoxOptionToString(),\n $this->message,\n $this->height,\n $this->width,\n $this->default\n );\n }",
"public function cli_help() {}",
"public function getArguments();",
"public function getArguments();",
"public function getArguments();",
"public function getArguments();",
"protected function getArguments() {\n\t\treturn array(\n\t\t);\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}",
"public function getArguments() {\n return $_GET;\n }",
"protected function getArguments()\n\t{\n\t\treturn array();\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array();\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array();\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array();\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array();\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array();\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array();\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array();\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array();\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array();\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array();\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array();\n\t}",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t['weekOffset', InputArgument::OPTIONAL, 'An example argument.', 0],\n\t\t];\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}",
"public function getArgs();",
"public function getArgs();",
"protected function getArguments()\r\n\t{\r\n\t\treturn array();\r\n\t}",
"protected function getArguments()\r\n\t{\r\n\t\treturn array();\r\n\t}",
"protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t//TODO argument to do a single facade. Must be a valid facade\n\t\t\tarray('example', InputArgument::OPTIONAL, 'An example argument.'),\n\t\t);\n\t}",
"protected function getArguments() { return isset($this->_arguments) ? $this->_arguments : array();\n }",
"protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t//array('example', InputArgument::REQUIRED, 'An example argument.'),\n\t\t];\n\t}"
] | [
"0.8313436",
"0.707709",
"0.68023086",
"0.6565933",
"0.6457603",
"0.63509077",
"0.6349005",
"0.62868583",
"0.6285313",
"0.6273516",
"0.62369764",
"0.62027895",
"0.6162544",
"0.6073932",
"0.6073932",
"0.60512155",
"0.59730506",
"0.595808",
"0.5940854",
"0.5909085",
"0.5902336",
"0.5896606",
"0.5883854",
"0.5874907",
"0.5874907",
"0.5874907",
"0.5874907",
"0.58685416",
"0.58664495",
"0.5862976",
"0.5852518",
"0.5848081",
"0.5843537",
"0.5843537",
"0.58358455",
"0.58358455",
"0.58358455",
"0.5824433",
"0.5824433",
"0.5823422",
"0.5820695",
"0.5811501",
"0.5811501",
"0.5811501",
"0.5811501",
"0.5807566",
"0.5805897",
"0.5798593",
"0.57875896",
"0.5781961",
"0.5781642",
"0.5776313",
"0.57706815",
"0.57706815",
"0.57706815",
"0.57706815",
"0.57706815",
"0.57706815",
"0.57706815",
"0.57706815",
"0.57679397",
"0.57598346",
"0.5759436",
"0.57571596",
"0.57516783",
"0.57495046",
"0.57495046",
"0.57495046",
"0.57495046",
"0.57485646",
"0.5743437",
"0.5743437",
"0.5743437",
"0.5743437",
"0.5743437",
"0.5743437",
"0.5743437",
"0.5735468",
"0.5732067",
"0.5732067",
"0.5732067",
"0.5732067",
"0.5732067",
"0.5732067",
"0.5732067",
"0.5732067",
"0.5732067",
"0.5732067",
"0.5732067",
"0.5732067",
"0.57285583",
"0.5724414",
"0.5724414",
"0.5724414",
"0.5714582",
"0.5714582",
"0.5713702",
"0.5713702",
"0.5712354",
"0.5708591",
"0.57082665"
] | 0.0 | -1 |
Add a help tab to the contextual help for the screen. Call this on the load$pagenow hook for the relevant screen. | public function add_tab( $args ) {
$defaults = array(
'title' => false,
'id' => false,
'content' => '',
'callback' => false,
'url' => false
);
$args = wp_parse_args( $args, $defaults );
$args['id'] = sanitize_html_class( $args['id'] );
// Ensure we have an ID and title.
if ( ! $args['id'] || ! $args['title'] )
return;
// Allows for overriding an existing tab with that ID.
$this->_tabs[ $args['id'] ] = $args;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function add_help_tab() {\n\t\t$screen = get_current_screen();\n\t\t$screen->add_help_tab( array(\n\t\t\t\t'id' => 'support',\n\t\t\t\t'title' => 'Support',\n\t\t\t\t'content' => '',\n\t\t\t\t'callback' => array( $this, 'display' ),\n\t\t\t)\n\t\t);\n\t}",
"public function custom_help_tab() {\n\n\t\t\t$screen = get_current_screen();\n\n\t\t\t// Return early if we're not on the needed post type.\n\t\t\tif ( ( $this->object_type == 'post' && $this->object != $screen->post_type ) || \n\t\t\t\t ( $this->object_type == 'taxonomy' && $this->object != $screen->taxonomy ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Add the help tabs.\n\t\t\tforeach ( $this->args->help_tabs as $tab ) {\n\t\t\t\t$screen->add_help_tab( $tab );\n\t\t\t}\n\n\t\t\t// Add the help sidebar.\n\t\t\t$screen->set_help_sidebar( $this->args->help_sidebar );\n\t\t}",
"public function help_tab(){\r\n $screen = get_current_screen();\r\n\r\n foreach($this->what_helps as $help_id => $tab) {\r\n $callback_name = $this->generate_callback_name($help_id);\r\n if(method_exists($this, 'help_'.$callback_name.'_callback')) {\r\n $callback = array($this, 'help_'.$callback_name.'_callback');\r\n }\r\n else {\r\n $callback = array($this, 'help_callback');\r\n }\r\n // documentation tab\r\n $screen->add_help_tab( array(\r\n 'id' => 'hw-help-'.$help_id,\r\n 'title' => __( $tab['title'] ),\r\n //'content' => \"<p>sdfsgdgdfghfhfgh</p>\",\r\n 'callback' => $callback\r\n )\r\n );\r\n }\r\n }",
"public function setup_help_tab()\n {\n }",
"public static function add_help_tab() {\n\t\tif ( ! function_exists( 'wc_get_screen_ids' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$screen = get_current_screen();\n\n\t\tif ( ! $screen || ! in_array( $screen->id, wc_get_screen_ids(), true ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remove the old help tab if it exists.\n\t\t$help_tabs = $screen->get_help_tabs();\n\t\tforeach ( $help_tabs as $help_tab ) {\n\t\t\tif ( 'woocommerce_onboard_tab' !== $help_tab['id'] ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$screen->remove_help_tab( 'woocommerce_onboard_tab' );\n\t\t}\n\n\t\t// Add the new help tab.\n\t\t$help_tab = array(\n\t\t\t'title' => __( 'Setup wizard', 'woocommerce' ),\n\t\t\t'id' => 'woocommerce_onboard_tab',\n\t\t);\n\n\t\t$task_list_hidden = get_option( 'woocommerce_task_list_hidden', 'no' );\n\n\t\t$help_tab['content'] = '<h2>' . __( 'WooCommerce Onboarding', 'woocommerce' ) . '</h2>';\n\n\t\t$help_tab['content'] .= '<h3>' . __( 'Profile Setup Wizard', 'woocommerce' ) . '</h3>';\n\t\t$help_tab['content'] .= '<p>' . __( 'If you need to access the setup wizard again, please click on the button below.', 'woocommerce' ) . '</p>' .\n\t\t\t'<p><a href=\"' . wc_admin_url( '&path=/setup-wizard' ) . '\" class=\"button button-primary\">' . __( 'Setup wizard', 'woocommerce' ) . '</a></p>';\n\n\t\t$help_tab['content'] .= '<h3>' . __( 'Task List', 'woocommerce' ) . '</h3>';\n\t\t$help_tab['content'] .= '<p>' . __( 'If you need to enable or disable the task list, please click on the button below.', 'woocommerce' ) . '</p>' .\n\t\t( 'yes' === $task_list_hidden\n\t\t\t? '<p><a href=\"' . wc_admin_url( '&reset_task_list=1' ) . '\" class=\"button button-primary\">' . __( 'Enable', 'woocommerce' ) . '</a></p>'\n\t\t\t: '<p><a href=\"' . wc_admin_url( '&reset_task_list=0' ) . '\" class=\"button button-primary\">' . __( 'Disable', 'woocommerce' ) . '</a></p>'\n\t\t);\n\n\t\tif ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {\n\t\t\t$help_tab['content'] .= '<h3>' . __( 'Calypso / WordPress.com', 'woocommerce' ) . '</h3>';\n\t\t\tif ( class_exists( 'Jetpack' ) ) {\n\t\t\t\t$help_tab['content'] .= '<p>' . __( 'Quickly access the Jetpack connection flow in Calypso.', 'woocommerce' ) . '</p>';\n\t\t\t\t$help_tab['content'] .= '<p><a href=\"' . wc_admin_url( '&test_wc_jetpack_connect=1' ) . '\" class=\"button button-primary\">' . __( 'Connect', 'woocommerce' ) . '</a></p>';\n\t\t\t}\n\n\t\t\t$help_tab['content'] .= '<p>' . __( 'Quickly access the WooCommerce.com connection flow in Calypso.', 'woocommerce' ) . '</p>';\n\t\t\t$help_tab['content'] .= '<p><a href=\"' . wc_admin_url( '&test_wc_helper_connect=1' ) . '\" class=\"button button-primary\">' . __( 'Connect', 'woocommerce' ) . '</a></p>';\n\t\t}\n\n\t\t$screen->add_help_tab( $help_tab );\n\t}",
"function add_contextual_help($screen, $help)\n {\n }",
"public function setHelpTabs() {\n $this->args['help_tabs'][] = array(\n 'id' => 'redux-help-tab-1',\n 'title' => __( 'Theme Information 1', 'slova' ),\n 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'slova' )\n );\n\n $this->args['help_tabs'][] = array(\n 'id' => 'redux-help-tab-2',\n 'title' => __( 'Theme Information 2', 'slova' ),\n 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'slova' )\n );\n\n // Set the help sidebar\n $this->args['help_sidebar'] = __( '<p>This is the sidebar content, HTML is allowed.</p>', 'slova' );\n }",
"function dfcg_plugin_help() {\n\t\n\tglobal $current_screen;\n\t\n\t$sidebar = dfcg_help_sidebar();\n\t\n\t$current_screen->set_help_sidebar( $sidebar );\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-general',\n\t\t'title' => __( 'General info', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_general'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-theme',\n\t\t'title' => __( 'Theme integration', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_theme'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-quick',\n\t\t'title' => __( 'Quick Start', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_quick'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-gallery',\n\t\t'title' => __( 'Gallery Method', DFCG_DOMAIN ),\n\t\t'callback' => \"dfcg_help_gallery\"\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-images',\n\t\t'title' => __( 'Image Management', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_images'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-desc',\n\t\t'title' => __( 'Descriptions', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_desc'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-css',\n\t\t'title' => __( 'Gallery CSS', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_css'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-scripts',\n\t\t'title' => __( 'Load Scripts', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_scripts'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-troubleshooting',\n\t\t'title' => __( 'Troubleshooting', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_trouble'\n\t));\n}",
"function foodpress_admin_help_tab_content() {\r\n\t$screen = get_current_screen();\r\n\r\n\t$screen->add_help_tab( array(\r\n\t 'id'\t=> 'foodpress_overview_tab',\r\n\t 'title'\t=> __( 'Overview', 'foodpress' ),\r\n\t 'content'\t=>\r\n\r\n\t \t'<p>' . __( 'Thank you for using FoodPress plugin. ', 'foodpress' ). '</p>'\r\n\r\n\t) );\r\n\r\n\r\n\r\n\r\n\t$screen->set_help_sidebar(\r\n\t\t'<p><strong>' . __( 'For more information:', 'foodpress' ) . '</strong></p>' .\r\n\t\t'<p><a href=\"http://demo.myfoodpress.com/\" target=\"_blank\">' . __( 'foodpress Demo', 'foodpress' ) . '</a></p>' .\r\n\t\t\r\n\t\t'<p><a href=\"http://demo.myfoodpress.com/documentation/\" target=\"_blank\">' . __( 'Documentation', 'foodpress' ) . '</a></p>'.\r\n\t\t'<p><a href=\"https://foodpressplugin.freshdesk.com/support/home/\" target=\"_blank\">' . __( 'Support', 'foodpress' ) . '</a></p>'\r\n\t);\r\n}",
"function siteorigin_panels_add_help_tab($prefix) {\n\t$screen = get_current_screen();\n\tif(\n\t\t( $screen->base == 'post' && ( in_array( $screen->id, siteorigin_panels_setting( 'post-types' ) ) || $screen->id == '') )\n\t\t|| ($screen->id == 'appearance_page_so_panels_home_page')\n\t) {\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'panels-help-tab', //unique id for the tab\n\t\t\t'title' => __( 'Page Builder', 'positive-panels' ), //unique visible title for the tab\n\t\t\t'callback' => 'siteorigin_panels_add_help_tab_content'\n\t\t) );\n\t}\n}",
"public static function postHelpTab () {\n $screen = get_current_screen();\n\n if ( 'travelcard' != $screen->post_type )\n return;\n\n $args = [\n 'id' => 'travelcard',\n 'title' => 'Travel Cards Help',\n 'content' => file_get_contents(__DIR__ . '/templates/help.php'),\n ];\n\n $screen->add_help_tab( $args );\n }",
"function siteorigin_panels_add_help_tab_content(){\n\tinclude 'tpl/help.php';\n}",
"public function create_help_screen() {\n\t\t$this->admin_screen = WP_Screen::get( $this->admin_page );\n\n\t\t$this->admin_screen->add_help_tab(\n\t\t\tarray(\n\t\t\t\t'title' => 'Annotation Guide',\n\t\t\t\t'id' => 'annotation_tab',\n\t\t\t\t'content' => '<p>Drag the mouse and draw a rectangle around the object and the click save.</p>',\n\t\t\t\t'callback' => false\n\t\t\t)\n\t\t);\n\t}",
"public function help(){\n\t\t$screen = get_current_screen();\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/installing\" target=\"_blank\">' . __( 'Installing the Plugin', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/staying-updated\" target=\"_blank\">' . __( 'Staying Updated', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/glossary\" target=\"_blank\">' . __( 'Glossary', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-general-info',\n\t\t\t'title' => __( 'General Info', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-interface\" target=\"_blank\">' . __( 'Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-creating\" target=\"_blank\">' . __( 'Creating a New Form', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-sorting\" target=\"_blank\">' . __( 'Sorting Your Forms', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-building\" target=\"_blank\">' . __( 'Building Your Forms', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-forms',\n\t\t\t'title' => __( 'Forms', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-interface\" target=\"_blank\">' . __( 'Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-managing\" target=\"_blank\">' . __( 'Managing Your Entries', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-searching-filtering\" target=\"_blank\">' . __( 'Searching and Filtering Your Entries', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-entries',\n\t\t\t'title' => __( 'Entries', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/email-design\" target=\"_blank\">' . __( 'Email Design Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/analytics\" target=\"_blank\">' . __( 'Analytics Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-email-analytics',\n\t\t\t'title' => __( 'Email Design & Analytics', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/import\" target=\"_blank\">' . __( 'Import Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/export\" target=\"_blank\">' . __( 'Export Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-import-export',\n\t\t\t'title' => __( 'Import & Export', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/conditional-logic\" target=\"_blank\">' . __( 'Conditional Logic', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/templating\" target=\"_blank\">' . __( 'Templating', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/custom-capabilities\" target=\"_blank\">' . __( 'Custom Capabilities', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/hooks\" target=\"_blank\">' . __( 'Filters and Actions', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-advanced',\n\t\t\t'title' => __( 'Advanced Topics', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<p>' . __( '<strong>Always load CSS</strong> - Force Visual Form Builder Pro CSS to load on every page. Will override \"Disable CSS\" option, if selected.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable CSS</strong> - Disable CSS output for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable Email</strong> - Disable emails from sending for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable Notifications Email</strong> - Disable notification emails from sending for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Skip Empty Fields in Email</strong> - Fields that have no data will not be displayed in the email.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable saving new entry</strong> - Disable new entries from being saved.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable saving entry IP address</strong> - An entry will be saved, but the IP address will be removed.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Place Address labels above fields</strong> - The Address field labels will be placed above the inputs instead of below.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Remove default SPAM Verification</strong> - The default SPAM Verification question will be removed and only a submit button will be visible.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable meta tag version</strong> - Prevent the hidden Visual Form Builder Pro version number from printing in the source code.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Skip PayPal redirect if total is zero</strong> - If PayPal is configured, do not redirect if the total is zero.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Prepend Confirmation</strong> - Always display the form beneath the text confirmation after the form has been submitted.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Max Upload Size</strong> - Restrict the file upload size for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Sender Mail Header</strong> - Control the Sender attribute in the mail header. This is useful for certain server configurations that require an existing email on the domain to be used.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>reCAPTCHA Public Key</strong> - Required if \"Use reCAPTCHA\" option is selected in the Secret field.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>reCAPTCHA Private Key</strong> - Required if \"Use reCAPTCHA\" option is selected in the Secret field.', 'visual-form-builder-pro' ) . '</p>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-settings',\n\t\t\t'title' => __( 'Settings', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t}",
"function add_theme_help()\n{\n add_menu_page('Theme Help', 'Theme Help', 'manage_options', 'theme-help', 'theme_help');\n}",
"public function dashboard_page_mscr_intrusions() {\n\t\t// WordPress 3.3\n\t\tif ( function_exists( 'wp_suspend_cache_addition' ) ) {\n\t\t\t$args = array(\n\t\t\t\t'title' => 'Help',\n\t\t\t\t'id' => 'mscr_help',\n\t\t\t\t'content' => $this->get_contextual_help(),\n\t\t\t);\n\t\t\tget_current_screen()->add_help_tab( $args );\n\t\t}\n\t\t// WordPress 3.1 and later\n\t\telse if ( function_exists( 'get_current_screen' ) ) {\n\t\t\t// Add help to the intrusions list page\n\t\t\tadd_contextual_help( get_current_screen(), $this->get_contextual_help() );\n\t\t}\n\t}",
"public function __construct() {\n\t\tadd_action( 'current_screen', array( $this, 'add_help_tab' ) );\n\t}",
"private function help_style_tabs() {\n $help_sidebar = $this->get_sidebar();\n\n $help_class = '';\n if ( ! $help_sidebar ) :\n $help_class .= ' no-sidebar';\n endif;\n\n // Time to render!\n ?>\n <div id=\"screen-meta\" class=\"tr-options metabox-prefs\">\n\n <div id=\"contextual-help-wrap\" class=\"<?php echo esc_attr( $help_class ); ?>\" >\n <div id=\"contextual-help-back\"></div>\n <div id=\"contextual-help-columns\">\n <div class=\"contextual-help-tabs\">\n <ul>\n <?php\n $class = ' class=\"active\"';\n $tabs = $this->get_tabs();\n foreach ( $tabs as $tab ) :\n $link_id = \"tab-link-{$tab['id']}\";\n $panel_id = (!empty($tab['url'])) ? $tab['url'] : \"#tab-panel-{$tab['id']}\";\n ?>\n <li id=\"<?php echo esc_attr( $link_id ); ?>\"<?php echo $class; ?>>\n <a href=\"<?php echo esc_url( \"$panel_id\" ); ?>\">\n <?php echo esc_html( $tab['title'] ); ?>\n </a>\n </li>\n <?php\n $class = '';\n endforeach;\n ?>\n </ul>\n </div>\n\n <?php if ( $help_sidebar ) : ?>\n <div class=\"contextual-help-sidebar\">\n <?php echo $help_sidebar; ?>\n </div>\n <?php endif; ?>\n\n <div class=\"contextual-help-tabs-wrap\">\n <?php\n $classes = 'help-tab-content active';\n foreach ( $tabs as $tab ):\n $panel_id = \"tab-panel-{$tab['id']}\";\n ?>\n\n <div id=\"<?php echo esc_attr( $panel_id ); ?>\" class=\"inside <?php echo $classes; ?>\">\n <?php\n // Print tab content.\n echo $tab['content'];\n\n // If it exists, fire tab callback.\n if ( ! empty( $tab['callback'] ) )\n call_user_func_array( $tab['callback'], array( $this, $tab ) );\n ?>\n </div>\n <?php\n $classes = 'help-tab-content';\n endforeach;\n ?>\n </div>\n </div>\n </div>\n </div>\n <?php\n }",
"public function admin_head() {\n\t \t\t// Remove the fake Settings submenu\n\t \t\tremove_submenu_page( 'options-general.php', 'wc_talks' );\n\n\t \t\t//Generate help if one is available for the current screen\n\t \t\tif ( wct_is_admin() || ! empty( $this->is_plugin_settings ) ) {\n\n\t \t\t\t$screen = get_current_screen();\n\n\t \t\t\tif ( ! empty( $screen->id ) && ! $screen->get_help_tabs() ) {\n\t \t\t\t\t$help_tabs_list = $this->get_help_tabs( $screen->id );\n\n\t \t\t\t\tif ( ! empty( $help_tabs_list ) ) {\n\t \t\t\t\t\t// Loop through tabs\n\t \t\t\t\t\tforeach ( $help_tabs_list as $key => $help_tabs ) {\n\t \t\t\t\t\t\t// Make sure types are a screen method\n\t \t\t\t\t\t\tif ( ! in_array( $key, array( 'add_help_tab', 'set_help_sidebar' ) ) ) {\n\t \t\t\t\t\t\t\tcontinue;\n\t \t\t\t\t\t\t}\n\n\t \t\t\t\t\t\tforeach ( $help_tabs as $help_tab ) {\n\t \t\t\t\t\t\t\t$content = '';\n\n\t \t\t\t\t\t\t\tif ( empty( $help_tab['content'] ) || ! is_array( $help_tab['content'] ) ) {\n\t \t\t\t\t\t\t\t\tcontinue;\n\t \t\t\t\t\t\t\t}\n\n\t \t\t\t\t\t\t\tif ( ! empty( $help_tab['strong'] ) ) {\n\t \t\t\t\t\t\t\t\t$content .= '<p><strong>' . $help_tab['strong'] . '</strong></p>';\n\t \t\t\t\t\t\t\t}\n\n\t \t\t\t\t\t\t\tforeach ( $help_tab['content'] as $tab_content ) {\n\t\t\t\t\t\t\t\t\tif ( is_array( $tab_content ) ) {\n\t\t\t\t\t\t\t\t\t\t$content .= '<ul><li>' . join( '</li><li>', $tab_content ) . '</li></ul>';\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$content .= '<p>' . $tab_content . '</p>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$help_tab['content'] = $content;\n\n\t \t\t\t\t\t\t\tif ( 'add_help_tab' == $key ) {\n\t \t\t\t\t\t\t\t\t$screen->add_help_tab( $help_tab );\n\t \t\t\t\t\t\t\t} else {\n\t \t\t\t\t\t\t\t\t$screen->set_help_sidebar( $content );\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t}\n\t \t\t\t\t\t}\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t}\n\n\t \t\t// Add some css\n\t\t\t?>\n\n\t\t\t<style type=\"text/css\" media=\"screen\">\n\t\t\t/*<![CDATA[*/\n\n\t\t\t\t/* Bubble style for Main Post type menu */\n\t\t\t\t#adminmenu .wp-menu-open.menu-icon-<?php echo $this->post_type?> .awaiting-mod {\n\t\t\t\t\tbackground-color: #2ea2cc;\n\t\t\t\t\tcolor: #fff;\n\t\t\t\t}\n\n\t\t\t\t#wordcamp-talks-csv span.dashicons-media-spreadsheet {\n\t\t\t\t\tvertical-align: text-bottom;\n\t\t\t\t}\n\n\t\t\t\t<?php if ( wct_is_admin() && ! wct_is_rating_disabled() ) : ?>\n\t\t\t\t\t/* Rating stars in screen options and in talks WP List Table */\n\t\t\t\t\t.metabox-prefs .talk-rating-bubble:before,\n\t\t\t\t\tth .talk-rating-bubble:before {\n\t\t\t\t\t\tfont: normal 20px/.5 'dashicons';\n\t\t\t\t\t\tspeak: none;\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t\ttop: 4px;\n\t\t\t\t\t\tleft: -4px;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tvertical-align: top;\n\t\t\t\t\t\t-webkit-font-smoothing: antialiased;\n\t\t\t\t\t\t-moz-osx-font-smoothing: grayscale;\n\t\t\t\t\t\ttext-decoration: none !important;\n\t\t\t\t\t\tcolor: #444;\n\t\t\t\t\t}\n\n\t\t\t\t\tth .talk-rating-bubble:before,\n\t\t\t\t\t.metabox-prefs .talk-rating-bubble:before {\n\t\t\t\t\t\tcontent: '\\f155';\n\t\t\t\t\t}\n\n\t\t\t\t\t.metabox-prefs .talk-rating-bubble:before {\n\t\t\t\t\t\tvertical-align: baseline;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Rates management */\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\tlist-style: none;\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li {\n\t\t\t\t\t\tlist-style: none;\n\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tpadding:15px 0;\n\t\t\t\t\t\tborder-bottom:dotted 1px #ccc;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li:last-child {\n\t\t\t\t\t\tborder:none;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-star {\n\t\t\t\t\t\tfloat:left;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-star {\n\t\t\t\t\t\twidth:20%;\n\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users {\n\t\t\t\t\t\tmargin-left: 20%;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users span.user-rated {\n\t\t\t\t\t\tdisplay:inline-block;\n\t\t\t\t\t\tmargin:5px;\n\t\t\t\t\t\tpadding:5px;\n\t\t\t\t\t\t-webkit-box-shadow: 0 1px 1px 1px rgba(0,0,0,0.1);\n\t\t\t\t\t\tbox-shadow: 0 1px 1px 1px rgba(0,0,0,0.1);\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users a.del-rate {\n\t\t\t\t\t\ttext-decoration: none;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users a.del-rate div {\n\t\t\t\t\t\tvertical-align: baseline;\n\t\t\t\t\t}\n\t\t\t\t<?php endif; ?>\n\n\t\t\t/*]]>*/\n\t\t\t</style>\n\t\t\t<?php\n\t\t}",
"public function get_help_tabs( $screen_id = '' ) {\n\t\t\t// Help urls\n\t\t\t$plugin_forum = '<a href=\"http://wordpress.org/support/plugin/wordcamp-talks\">';\n\t\t\t$help_tabs = false;\n\t\t\t$nav_menu_page = '<a href=\"' . esc_url( admin_url( 'nav-menus.php' ) ) . '\">';\n\t\t\t$widgets_page = '<a href=\"' . esc_url( admin_url( 'widgets.php' ) ) . '\">';\n\n\t\t\t/**\n\t\t\t * @param array associative array to list the help tabs\n\t\t\t */\n\t\t\t$help = array(\n\t\t\t\t'edit-talks' => array(\n\t\t\t\t\t'add_help_tab' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'edit-talks-overview',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Overview', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'This screen provides access to all the talks users of your site shared. You can customize the display of this screen to suit your workflow.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'You can customize the display of this screen's contents in a number of ways:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\tesc_html__( 'You can hide/display columns based on your needs and decide how many talks to list per screen using the Screen Options tab.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'You can filter the list of talks by post status using the text links in the upper left to show All, Published, Private or Trashed talks. The default view is to show all talks.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'You can view talks in a simple title list or with an excerpt. Choose the view you prefer by clicking on the icons at the top of the list on the right.', 'wordcamp-talks' ),\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\tarray(\n\t\t\t\t\t\t\t'id' => 'edit-talks-row-actions',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Actions', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'Hovering over a row in the talks list will display action links that allow you to manage an talk. You can perform the following actions:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\tesc_html__( 'Edit takes you to the editing screen for that talk. You can also reach that screen by clicking on the talk title.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'Trash removes the talk from this list and places it in the trash, from which you can permanently delete it.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'View opens the talk in the WordCamp Talks's part of your site.', 'wordcamp-talks' ),\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\tarray(\n\t\t\t\t\t\t\t'id' => 'edit-talks-bulk-actions',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Bulk Actions', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'You can also move multiple talks to the trash at once. Select the talks you want to trash using the checkboxes, then select the "Move to Trash" action from the Bulk Actions menu and click Apply.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'edit-talks-sort-filter',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Sorting & filtering', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'Clicking on specific column headers will sort the talks list. You can sort the talks alphabetically using the Title column header or by popularity:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\tesc_html__( 'Click on the column header having a dialog buble icon to sort by number of comments.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'Click on the column header having a star icon to sort by rating.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tesc_html__( 'Inside the rows, you can filter the talks by categories or tags clicking on the corresponding terms.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'talks' => array(\n\t\t\t\t\t'add_help_tab' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'talks-overview',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Overview', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'The title field and the big Talk Editing Area are fixed in place, but you can reposition all the other boxes using drag and drop. You can also minimize or expand them by clicking the title bar of each box. Use the Screen Options tab to hide/show boxes.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'settings_page_wc_talks' => array(\n\t\t\t\t\t'add_help_tab' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'settings-overview',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Overview', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'This is the place where you can customize the behavior of WordCamp Talks.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'Please see the additional help tabs for more information on each individual section.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'settings-main',\n\t\t\t\t\t\t'title' => esc_html__( 'Main Settings', 'wordcamp-talks' ),\n\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\tsprintf( esc_html__( 'Just before the first option, you will find the link to the main archive page of the plugin. If you wish, you can use it to define a new custom link %1$smenu item%2$s.', 'wordcamp-talks' ), $nav_menu_page, '</a>' ),\n\t\t\t\t\t\t\tsprintf( esc_html__( 'If you do so, do not forget to update the link in case you change your permalink settings. Another possible option is to use the %1$sWordCamp Talks Navigation%2$s widget in one of your dynamic sidebars.', 'wordcamp-talks' ), $widgets_page, '</a>' ),\n\t\t\t\t\t\t\tesc_html__( 'In the Main Settings you have a number of options:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\tesc_html__( 'WordCamp Talks archive page: you can customize the title of this page. It will appear on every WordCamp Talks's page, except the single talk one.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'New talks status: this is the default status to apply to the talks submitted by the user. If this setting is set to "Pending", it will be possible to edit the moderation message once this setting has been saved.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'Moderation message: if New talks status is defined to Pending, it is the place to customize the awaiting moderation message the user will see once he submited his talk.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'Not logged in message: if a user reaches the WordCamp Talks's front end submit form without being logged in, a message will invite him to do so. If you wish to use a custom message, use this setting.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'Rating stars hover captions: fill a comma separated list of captions to replace default one. On front end, the number of rating stars will depend on the number of comma separated captions you defined in this setting.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'Talk comments: if on, comments about talks will be separated from other post types comments and you will be able to moderate comments about talks from the comments submenu of the WordCamp Talks's main Administration menu. If you uncheck this setting, talks comments will be mixed up with other post types comments into the main Comments Administration menu', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'Comments: you can completely disable commenting about talks by activating this option', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'edit-category-talks' => array(\n\t\t\t\t\t'add_help_tab' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'talks-category-overview',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Overview', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'Talk Categories can only be created by the site Administrator. To add a new talk category please fill the following fields:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\tesc_html__( 'Name - The name is how it appears on your site (in the category checkboxes of the talk front end submit form, in the talk's footer part or in the title of WordCamp Talks's category archive pages).', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'Slug - The "slug" is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'Description - If you set a description for your category, it will be displayed over the list of talks in the category archive page.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tesc_html__( 'You can change the display of this screen using the Screen Options tab to set how many items are displayed per screen and to display/hide columns in the table.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'edit-tag-talks' => array(\n\t\t\t\t\t'add_help_tab' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'talks-tag-overview',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Overview', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'Talk Tags can be created by any logged in user of the site from the talk front end submit form. From this screen, to add a new talk tag please fill the following fields:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\tesc_html__( 'Name - The name is how it appears on your site (in the tag cloud, in the tags editor of the talk front end submit form, in the talk's footer part or in the title of WordCamp Talks's tag archive pages).', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'Slug - The "slug" is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'Description - If you set a description for your tag, it will be displayed over the list of talks in the tag archive page.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tesc_html__( 'You can change the display of this screen using the Screen Options tab to set how many items are displayed per screen and to display/hide columns in the table.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * @param array $help associative array to list the help tabs\n\t\t\t */\n\t\t\t$help = apply_filters( 'wct_get_help_tabs', $help );\n\n\t\t\tif ( ! empty( $help[ $screen_id ] ) ) {\n\t\t\t\t$help_tabs = array_merge( $help[ $screen_id ], array(\n\t\t\t\t\t'set_help_sidebar' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'strong' => esc_html__( 'For more information:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tsprintf( esc_html_x( '%1$sSupport Forums (en)%2$s', 'help tab links', 'wordcamp-talks' ), $plugin_forum, '</a>' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t) );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @param array $help associative array to list the help tabs\n\t\t\t */\n\t\t\t$help = apply_filters( 'wct_get_help_tabs', $help );\n\n\t\t\tif ( ! empty( $help[ $screen_id ] ) ) {\n\t\t\t\t$help_tabs = array_merge( $help[ $screen_id ], array(\n\t\t\t\t\t'set_help_sidebar' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'strong' => esc_html__( 'For more information:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tsprintf( esc_html_x( '%1$sSupport Forums (en)%2$s', 'help tab links', 'wordcamp-talks' ), $plugin_forum, '</a>' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t) );\n\t\t\t}\n\n\t\t\treturn $help_tabs;\n\t\t}",
"function admin_hide_help() { \n $screen = get_current_screen();\n $screen->remove_help_tabs();\n}",
"public function help_theme_page() {\n\n\t\t// Add to the about page.\n\t\t$screen = get_current_screen();\n\t\tif ( $screen->id != $this->theme_page ) {\n\t\t\treturn;\n\t\t}\n\t}",
"function fgallery_plugin_help($contextual_help, $screen_id, $screen) {\n if ($screen_id == 'toplevel_page_fgallery' || $screen_id == '1-flash-gallery_page_fgallery_add'\n || $screen_id == '1-flash-gallery_page_fgallery_add' || $screen_id == '1-flash-gallery_page_fgallery_images'\n || $screen_id == '1-flash-gallery_page_fgallery_upload') {\n $contextual_help = '<p><a href=\"http://1plugin.com/faq\" target=\"_blank\">'.__('FAQ').'</a></p>';\n }\n return $contextual_help;\n}",
"public function get_help_tabs()\n {\n }",
"function codex_add_help_text( $contextual_help, $screen_id, $screen ) {\n if ( 'action_magnet_trails' == $screen->id ) {\n $contextual_help =\n '<p>' . __('Things to remember when adding or editing a trail:') . '</p>' .\n '<ul>' .\n '<li>' . __('The trail should exist and must be traversed atleast once.') . '</li>' .\n '<li>' . __('Don\\'t forget to add the difficulty level associated with each trail.') . '</li>' .\n '</ul>' .\n '<p><strong>' . __('For more information:') . '</strong></p>' .\n '<p>' . __('<a href=\"http://codex.wordpress.org/Posts_Edit_SubPanel\" target=\"_blank\">Edit Posts Documentation</a>') . '</p>' .\n '<p>' . __('<a href=\"http://wordpress.org/support/\" target=\"_blank\">Support Forums</a>') . '</p>' ;\n } elseif ( 'edit-action_magnet_trails' == $screen->id ) {\n $contextual_help = \n '<p>' . __('This screen displays a list of all trails published by the site user.') . '</p>' ;\n }\n return $contextual_help;\n}",
"function get_site_screen_help_tab_args()\n {\n }",
"public static function render_help() {\n\n // Grab the current screen\n $screen = get_current_screen();\n\n }",
"function my_contextual_help($contexual_help, $screen_id, $screen) {\n\tif('listing' == $screen->id) {\n\t\t$contextual_help = '<h2>Listings</h2>\n\t\t<p>Listings show the details of the items that we sell on the website. You can see a list of them on this page in reverse chronological order - the latest one we added is first.</p>\n\t\t<p>You can view/edit the details of each product by clicking on its name, or you can perform bulk actions using the dropdown menu and selecting multiple items.</p>';\n\t}elseif('edit-listing' == $screen->id) {\n\t\t$contextual_help = '<h2>Editing listings</h2>\n\t\t<p>This page allows you to view/modify listing details. Please make sure to fill out the available boxes with the appropriate details (listing image, price, brand) and <strong>not</strong> add these details to the listing description.</p>';\n\t}\n\treturn $contextual_help;\n}",
"function bi_add_help_text( $contextual_help, $screen_id, $screen ) {\n if ( 'library' == $screen->id ) {\n $contextual_help =\n '<p>' . __('Things to remember when adding or editing alibrary:') . '</p>' .\n '<p>' . __('If you want to schedule the library review to be published in the future:') . '</p>' .\n '<ul>' .\n '<li>' . __('Under the Publish module, click on the Edit link next to Publish.') . '</li>' .\n '<li>' . __('Change the date to the date to actual publish this article, then click on Ok.') . '</li>' .\n '</ul>';\n } elseif ( 'edit-library' == $screen->id ) {\n $contextual_help = \n '<p>' . __('This is the help screen displaying the table of library blah blah blah.') . '</p>' ;\n }\n return $contextual_help;\n}",
"public static function add_old_compat_help($screen, $help)\n {\n }",
"public function help() {\n $screen = get_current_screen();\n SwpmFbUtils::help($screen);\n }",
"public static function add_help_text()\n {\n }",
"public function help() \n {\n if (!isset($_SESSION)) { \n session_start(); \n }\n $title = 'Aide';\n $customStyle = $this->setCustomStyle('help');\n require('../src/View/HelpView.php');\n }",
"public function remove_help_tabs()\n {\n }",
"function ShowAdminHelp()\r\n{\r\n\tglobal $txt, $helptxt, $context, $scripturl;\r\n\r\n\tif (!isset($_GET['help']) || !is_string($_GET['help']))\r\n\t\tfatal_lang_error('no_access', false);\r\n\r\n\tif (!isset($helptxt))\r\n\t\t$helptxt = array();\r\n\r\n\t// Load the admin help language file and template.\r\n\tloadLanguage('Help');\r\n\r\n\t// Permission specific help?\r\n\tif (isset($_GET['help']) && substr($_GET['help'], 0, 14) == 'permissionhelp')\r\n\t\tloadLanguage('ManagePermissions');\r\n\r\n\tloadTemplate('Help');\r\n\r\n\t// Set the page title to something relevant.\r\n\t$context['page_title'] = $context['forum_name'] . ' - ' . $txt['help'];\r\n\r\n\t// Don't show any template layers, just the popup sub template.\r\n\t$context['template_layers'] = array();\r\n\t$context['sub_template'] = 'popup';\r\n\r\n\t// What help string should be used?\r\n\tif (isset($helptxt[$_GET['help']]))\r\n\t\t$context['help_text'] = $helptxt[$_GET['help']];\r\n\telseif (isset($txt[$_GET['help']]))\r\n\t\t$context['help_text'] = $txt[$_GET['help']];\r\n\telse\r\n\t\t$context['help_text'] = $_GET['help'];\r\n\r\n\t// Does this text contain a link that we should fill in?\r\n\tif (preg_match('~%([0-9]+\\$)?s\\?~', $context['help_text'], $match))\r\n\t\t$context['help_text'] = sprintf($context['help_text'], $scripturl, $context['session_id'], $context['session_var']);\r\n}",
"function setHelp($help)\n {\n $this->form->_help = true;\n $this->help = $help;\n }",
"function pre_load_reports_page() {\r\n\r\n //** Default Help items */\r\n $contextual_help['General Help'][] = '<h3>' . __('Reports', WPI) . '</h3>';\r\n $contextual_help['General Help'][] = '<p>' . __('This page allows you to manage your sales statistics.', WPI) . '</p>';\r\n\r\n //** Hook this action is you want to add info */\r\n $contextual_help = apply_filters('wpi_reports_page_help', $contextual_help);\r\n\r\n do_action('wpi_contextual_help', array('contextual_help' => $contextual_help));\r\n }",
"function ShowHelp()\r\n{\r\n\tglobal $settings, $user_info, $language, $context, $txt, $sourcedir, $options, $scripturl;\r\n\r\n\tloadTemplate('Help');\r\n\tloadLanguage('Manual');\r\n\r\n\t$manual_areas = array(\r\n\t\t'getting_started' => array(\r\n\t\t\t'title' => $txt['manual_category_getting_started'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'introduction' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_intro'],\r\n\t\t\t\t\t'template' => 'manual_intro',\r\n\t\t\t\t),\r\n\t\t\t\t'main_menu' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_main_menu'],\r\n\t\t\t\t\t'template' => 'manual_main_menu',\r\n\t\t\t\t),\r\n\t\t\t\t'board_index' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_board_index'],\r\n\t\t\t\t\t'template' => 'manual_board_index',\r\n\t\t\t\t),\r\n\t\t\t\t'message_view' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_message_view'],\r\n\t\t\t\t\t'template' => 'manual_message_view',\r\n\t\t\t\t),\r\n\t\t\t\t'topic_view' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_topic_view'],\r\n\t\t\t\t\t'template' => 'manual_topic_view',\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t),\r\n\t\t'registering' => array(\r\n\t\t\t'title' => $txt['manual_category_registering'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'when_how' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_when_how_register'],\r\n\t\t\t\t\t'template' => 'manual_when_how_register',\r\n\t\t\t\t),\r\n\t\t\t\t'registration_screen' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_registration_screen'],\r\n\t\t\t\t\t'template' => 'manual_registration_screen',\r\n\t\t\t\t),\r\n\t\t\t\t'activating_account' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_activating_account'],\r\n\t\t\t\t\t'template' => 'manual_activating_account',\r\n\t\t\t\t),\r\n\t\t\t\t'logging_in' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_logging_in_out'],\r\n\t\t\t\t\t'template' => 'manual_logging_in_out',\r\n\t\t\t\t),\r\n\t\t\t\t'password_reminders' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_password_reminders'],\r\n\t\t\t\t\t'template' => 'manual_password_reminders',\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t),\r\n\t\t'profile_features' => array(\r\n\t\t\t'title' => $txt['manual_category_profile_features'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'profile_info' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_profile_info'],\r\n\t\t\t\t\t'template' => 'manual_profile_info_summary',\r\n\t\t\t\t\t'description' => $txt['manual_entry_profile_info_desc'],\r\n\t\t\t\t\t'subsections' => array(\r\n\t\t\t\t\t\t'summary' => array($txt['manual_entry_profile_info_summary'], 'template' => 'manual_profile_info_summary'),\r\n\t\t\t\t\t\t'posts' => array($txt['manual_entry_profile_info_posts'], 'template' => 'manual_profile_info_posts'),\r\n\t\t\t\t\t\t'stats' => array($txt['manual_entry_profile_info_stats'], 'template' => 'manual_profile_info_stats'),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t\t'modify_profile' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_modify_profile'],\r\n\t\t\t\t\t'template' => 'manual_modify_profile_settings',\r\n\t\t\t\t\t'description' => $txt['manual_entry_modify_profile_desc'],\r\n\t\t\t\t\t'subsections' => array(\r\n\t\t\t\t\t\t'settings' => array($txt['manual_entry_modify_profile_settings'], 'template' => 'manual_modify_profile_settings'),\r\n\t\t\t\t\t\t'forum' => array($txt['manual_entry_modify_profile_forum'], 'template' => 'manual_modify_profile_forum'),\r\n\t\t\t\t\t\t'look' => array($txt['manual_entry_modify_profile_look'], 'template' => 'manual_modify_profile_look'),\r\n\t\t\t\t\t\t'auth' => array($txt['manual_entry_modify_profile_auth'], 'template' => 'manual_modify_profile_auth'),\r\n\t\t\t\t\t\t'notify' => array($txt['manual_entry_modify_profile_notify'], 'template' => 'manual_modify_profile_notify'),\r\n\t\t\t\t\t\t'pm' => array($txt['manual_entry_modify_profile_pm'], 'template' => 'manual_modify_profile_pm'),\r\n\t\t\t\t\t\t'buddies' => array($txt['manual_entry_modify_profile_buddies'], 'template' => 'manual_modify_profile_buddies'),\r\n\t\t\t\t\t\t'groups' => array($txt['manual_entry_modify_profile_groups'], 'template' => 'manual_modify_profile_groups'),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t\t'actions' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_profile_actions'],\r\n\t\t\t\t\t'template' => 'manual_profile_actions_subscriptions',\r\n\t\t\t\t\t'description' => $txt['manual_entry_modify_profile_desc'],\r\n\t\t\t\t\t'subsections' => array(\r\n\t\t\t\t\t\t'subscriptions' => array($txt['manual_entry_profile_actions_subscriptions'], 'template' => 'manual_profile_actions_subscriptions'),\r\n\t\t\t\t\t\t'delete' => array($txt['manual_entry_profile_actions_delete'], 'template' => 'manual_profile_actions_delete'),\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'posting_basics' => array(\r\n\t\t\t'title' => $txt['manual_category_posting_basics'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t/*'posting_screen' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_posting_screen'],\r\n\t\t\t\t\t'template' => 'manual_posting_screen',\r\n\t\t\t\t),*/\r\n\t\t\t\t'posting_topics' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_posting_topics'],\r\n\t\t\t\t\t'template' => 'manual_posting_topics',\r\n\t\t\t\t),\r\n\t\t\t\t/*'quoting_posts' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_quoting_posts'],\r\n\t\t\t\t\t'template' => 'manual_quoting_posts',\r\n\t\t\t\t),\r\n\t\t\t\t'modifying_posts' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_modifying_posts'],\r\n\t\t\t\t\t'template' => 'manual_modifying_posts',\r\n\t\t\t\t),*/\r\n\t\t\t\t'smileys' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_smileys'],\r\n\t\t\t\t\t'template' => 'manual_smileys',\r\n\t\t\t\t),\r\n\t\t\t\t'bbcode' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_bbcode'],\r\n\t\t\t\t\t'template' => 'manual_bbcode',\r\n\t\t\t\t),\r\n\t\t\t\t/*'wysiwyg' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_wysiwyg'],\r\n\t\t\t\t\t'template' => 'manual_wysiwyg',\r\n\t\t\t\t),*/\r\n\t\t\t),\r\n\t\t),\r\n\t\t'personal_messages' => array(\r\n\t\t\t'title' => $txt['manual_category_personal_messages'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'messages' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_pm_messages'],\r\n\t\t\t\t\t'template' => 'manual_pm_messages',\r\n\t\t\t\t),\r\n\t\t\t\t/*'actions' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_pm_actions'],\r\n\t\t\t\t\t'template' => 'manual_pm_actions',\r\n\t\t\t\t),\r\n\t\t\t\t'preferences' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_pm_preferences'],\r\n\t\t\t\t\t'template' => 'manual_pm_preferences',\r\n\t\t\t\t),*/\r\n\t\t\t),\r\n\t\t),\r\n\t\t'forum_tools' => array(\r\n\t\t\t'title' => $txt['manual_category_forum_tools'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'searching' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_searching'],\r\n\t\t\t\t\t'template' => 'manual_searching',\r\n\t\t\t\t),\r\n\t\t\t\t/*'memberlist' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_memberlist'],\r\n\t\t\t\t\t'template' => 'manual_memberlist',\r\n\t\t\t\t),\r\n\t\t\t\t'calendar' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_calendar'],\r\n\t\t\t\t\t'template' => 'manual_calendar',\r\n\t\t\t\t),*/\r\n\t\t\t),\r\n\t\t),\r\n\t);\r\n\r\n\t// Set a few options for the menu.\r\n\t$menu_options = array(\r\n\t\t'disable_url_session_check' => true,\r\n\t);\r\n\r\n\trequire_once($sourcedir . '/Subs-Menu.php');\r\n\t$manual_area_data = createMenu($manual_areas, $menu_options);\r\n\tunset($manual_areas);\r\n\r\n\t// Make a note of the Unique ID for this menu.\r\n\t$context['manual_menu_id'] = $context['max_menu_id'];\r\n\t$context['manual_menu_name'] = 'menu_data_' . $context['manual_menu_id'];\r\n\r\n\t// Get the selected item.\r\n\t$context['manual_area_data'] = $manual_area_data;\r\n\t$context['menu_item_selected'] = $manual_area_data['current_area'];\r\n\r\n\t// Set a title and description for the tab strip if subsections are present.\r\n\tif (isset($context['manual_area_data']['subsections']))\r\n\t\t$context[$context['manual_menu_name']]['tab_data'] = array(\r\n\t\t\t'title' => $manual_area_data['label'],\r\n\t\t\t'description' => isset($manual_area_data['description']) ? $manual_area_data['description'] : '',\r\n\t\t);\r\n\r\n\t// Bring it on!\r\n\t$context['sub_template'] = isset($manual_area_data['current_subsection'], $manual_area_data['subsections'][$manual_area_data['current_subsection']]['template']) ? $manual_area_data['subsections'][$manual_area_data['current_subsection']]['template'] : $manual_area_data['template'];\r\n\t$context['page_title'] = $manual_area_data['label'] . ' - ' . $txt['manual_smf_user_help'];\r\n\r\n\t// Build the link tree.\r\n\t$context['linktree'][] = array(\r\n\t\t'url' => $scripturl . '?action=help',\r\n\t\t'name' => $txt['help'],\r\n\t);\r\n\tif (isset($manual_area_data['current_area']) && $manual_area_data['current_area'] != 'index')\r\n\t\t$context['linktree'][] = array(\r\n\t\t\t'url' => $scripturl . '?action=admin;area=' . $manual_area_data['current_area'],\r\n\t\t\t'name' => $manual_area_data['label'],\r\n\t\t);\r\n\tif (!empty($manual_area_data['current_subsection']) && $manual_area_data['subsections'][$manual_area_data['current_subsection']][0] != $manual_area_data['label'])\r\n\t\t$context['linktree'][] = array(\r\n\t\t\t'url' => $scripturl . '?action=admin;area=' . $manual_area_data['current_area'] . ';sa=' . $manual_area_data['current_subsection'],\r\n\t\t\t'name' => $manual_area_data['subsections'][$manual_area_data['current_subsection']][0],\r\n\t\t);\r\n\r\n\t// We actually need a special style sheet for help ;)\r\n\t$context['template_layers'][] = 'manual';\r\n\r\n\t// The smiley info page needs some cheesy information.\r\n\tif ($manual_area_data['current_area'] == 'smileys')\r\n\t\tShowSmileyHelp();\r\n}",
"function my_admin_setup() {\r\n\t$text = '<p>' . __( 'This is an example of contextual help in WordPress, you could edit this to put information about your plugin or theme so that users will understand what the heck is going on.', 'example-textdomain' ) . '</p>';\r\n\r\n\t/* Add documentation and support forum links. */\r\n\t$text .= '<p><strong>' . __( 'For more information:', 'example-textdomain' ) . '</strong></p>';\r\n\r\n\t$text .= '<ul>';\r\n\t$text .= '<li><a href=\"http://yoursite.com/theme-documentation\">' . __( 'Documentation', 'example-textdomain' ) . '</a></li>';\r\n\t$text .= '<li><a href=\"http://yoursite.com/support\">' . __( 'Support Forums', 'example-textdomain' ) . '</a></li>';\r\n\t$text .= '</ul>';\r\n\r\n\tadd_contextual_help( 'appearance_page_theme-settings', $text );\r\n}",
"public function get_help_tab($id)\n {\n }",
"function TS_VCSC_Testimonials_Post_Help( $contextual_help, $screen_id, $screen ) { \r\n if ( 'edit-ts_testimonials' == $screen->id ) {\r\n $contextual_help = '<h2>Testimonials</h2>\r\n <p>Testimonials are an easy way to display feedback you received from your customers or to show any other quotes on your website.</p> \r\n <p>You can view/edit the details of each testimonial by clicking on its name, or you can perform bulk actions using the dropdown menu and selecting multiple items.</p>';\r\n } else if ('ts_testimonials' == $screen->id) {\r\n $contextual_help = '<h2>Editing Testimonials</h2>\r\n <p>This page allows you to view/modify testimonial details. Please make sure to fill out the available boxes with the appropriate details. Testimonial information can only be used with the \"Composium - WP Bakery Page Builder Extensions\" plugin.</p>';\r\n }\r\n return $contextual_help;\r\n }",
"function acp_helps()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['acp_helps'] == 1 ) ? 'ACP Help Entry' : 'ACP Help Entries';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'removed' : 'created';\n\t\t$helpkeys = array();\n\t\t\n\t\tforeach ( $this->xml_array['acp_helps_group']['acp_help'] as $k => $v )\n\t\t{\n\t\t\t$helpkeys[] = \"'{$v['page_key']['VALUE']}'\";\n\t\t}\n\t\t\n\t\t$this->ipsclass->DB->do_delete( 'acp_help', \"page_key IN (\".implode( \",\", $helpkeys ).\")\" );\n\t\t\n\t\tif ( !$this->ipsclass->input['un'] )\n\t\t{\n\t\t\tforeach ( $this->xml_array['acp_helps_group']['acp_help'] as $k => $v )\n\t\t\t{\n\t\t\t\t$this->_add_acp_help( $v );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&code=work&mod={$this->ipsclass->input['mod']}&step={$this->ipsclass->input['step']}{$uninstall}{$group}&st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['acp_helps']} {$object} {$operation}....\" );\n\t}",
"public function getSupportTab($guide, $faq)\n {\n $content = __(\"<b>Need Help?</b> Please check out these resources first:\"\n .\"<ul>\"\n .\"<li><a href='https://snapcreek.com/duplicator/docs/guide{$guide}' target='_sc-faq'>Full Online User Guide</a></li>\"\n .\"<li><a href='https://snapcreek.com/duplicator/docs/faqs-tech{$faq}' target='_sc-faq'>Frequently Asked Questions</a></li>\"\n .\"</ul>\", 'duplicator');\n\n $this->screen->add_help_tab(array(\n 'id' => 'dup_help_tab_callback',\n 'title' => __('Support', 'duplicator'),\n 'content' => \"<p>{$content}</p>\"\n )\n );\n }",
"public function remove_help_tab($id)\n {\n }",
"function add_sponsors_help_text($contextual_help, $screen_id, $screen) {\r\n if ('Sponsor' == $screen->id ) {\r\n $contextual_help =\r\n '<p>' . __('Things to remember when adding or editing a Sponsor:') . '</p>' .\r\n '<ul>' .\r\n '<li>' . __('Specify the correct genre such as Mystery, or Historic.') . '</li>' .\r\n '<li>' . __('Specify the correct writer of the Sponsor. Remember that the Author module refers to you, the author of this Sponsor review.') . '</li>' .\r\n '</ul>' .\r\n '<p>' . __('If you want to schedule the Sponsor review to be published in the future:') . '</p>' .\r\n '<ul>' .\r\n '<li>' . __('Under the Publish module, click on the Edit link next to Publish.') . '</li>' .\r\n '<li>' . __('Change the date to the date to actual publish this article, then click on Ok.') . '</li>' .\r\n '</ul>' .\r\n '<p><strong>' . __('For more information:') . '</strong></p>' .\r\n '<p>' . __('<a href=\"http://codex.wordpress.org/Posts_Edit_SubPanel\" target=\"_blank\">Edit Posts Documentation</a>') . '</p>' .\r\n '<p>' . __('<a href=\"http://wordpress.org/support/\" target=\"_blank\">Support Forums</a>') . '</p>' ;\r\n } elseif ( 'edit-Sponsor' == $screen->id ) {\r\n $contextual_help = \r\n '<p>' . __('This is the help screen displaying the table of Sponsor blah blah blah.') . '</p>' ;\r\n }\r\n return $contextual_help;\r\n}",
"public function help_tab() {\n $export_url = $this->get_property_export_url();\n\n if ( !$export_url ) {\n return;\n }\n\n $export_url = $export_url . '&limit=10&format=xml';\n\n $this->get_template_part( 'admin/settings-help-export', array(\n 'export_url' => $export_url,\n ) );\n }",
"public function makeHelpButton() {}",
"public function setHelp($help) {\n\t\t$this->help = $help;\n\t}",
"function bi_suggestion_help_text( $contextual_help, $screen_id, $screen ) {\n if ( 'library' == $screen->id ) {\n $contextual_help =\n '<p>' . __('Things to remember when adding or editing a suggestion:') . '</p>' .\n '<p>' . __('If you want to schedule the suggestion to be published in the future:') . '</p>' .\n '<ul>' .\n '<li>' . __('Under the Publish module, click on the Edit link next to Publish.') . '</li>' .\n '<li>' . __('Change the date to the date to actual publish this suggestion, then click on Ok.') . '</li>' .\n '</ul>';\n } elseif ( 'edit-suggestion' == $screen->id ) {\n $contextual_help = \n '<p>' . __('This is the help screen displaying the table of suggestion blah blah blah.') . '</p>' ;\n }\n return $contextual_help;\n}",
"function bizpanda_sts_help_page($manager)\n\t{\n\t\trequire BZDA_STS_ADN_PLUGIN_DIR . '/admin/pages/howtouse/quick-start.php';\n\t}",
"function acp_help_init()\n\t{\n\t\t//-----------------------------------------\n\t\t// Are we on 2.3?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( isset( $this->ipsclass->vars['acp_tutorial_mode'] ) )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Define our help sections\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$umi_acp_help = array( 'components_umi_'\t\t=> array( 'is_setting' => 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'help_title' => '(FSY23) Universal Mod Installer: Manage Mod Installations',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'help_body' => 'From this page, you can install, upgrade, and uninstall all compatible mods. Simply select the appropriate option from the box to the right of the mod in the table below.',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'help_mouseover' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t 'components_umi_view' => array( 'is_setting' => 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'help_title' => '(FSY23) Universal Mod Installer: Manage Mod Installations',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'help_body' => 'From this page, you can install, upgrade, and uninstall all compatible mods. Simply select the appropriate option from the box to the right of the mod in the table below.',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'help_mouseover' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t 'components_umi_install' => array( 'is_setting' => 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'help_title' => '(FSY23) Universal Mod Installer: XML Analysis',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'help_body' => 'The mod\\'s XML file has been analyzed and the proper steps have been determined.',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'help_mouseover' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t 'settinggroup_umi' => array( 'is_setting' => 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'help_title' => '(FSY23) Universal Mod Installer: Manage Settings',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'help_body' => 'Use the settings below to customize how the Universal Mod Installer behaves. If you experience any problems with the pages timing out when using the Universal Mod Installer, set the \"Use the \\'callback\\' functions?\" value to <b>No</b>.',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'help_mouseover' => '',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t );\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Ensure the help keys have been created\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$this->ipsclass->DB->build_query( array( 'select' => 'page_key',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'acp_help',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => \"page_key IN ('\".implode( \"','\", array_keys( $umi_acp_help ) ).\"')\",\n\t\t\t\t\t\t\t\t\t\t\t)\t );\n\t\t\t$this->ipsclass->DB->exec_query();\n\t\t\t\n\t\t\tif ( $this->ipsclass->DB->get_num_rows() )\n\t\t\t{\n\t\t\t\twhile ( $row = $this->ipsclass->DB->fetch_row() )\n\t\t\t\t{\n\t\t\t\t\t$helps[] = $row['page_key'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tforeach ( $umi_acp_help as $key => $value )\n\t\t\t{\n\t\t\t\tif ( is_array( $helps ) && count( $helps ) )\n\t\t\t\t{\n\t\t\t\t\tif ( !in_array( $key, $helps ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$insert = array( 'is_setting' => $value['is_setting'],\n\t\t\t\t\t\t\t\t\t\t 'page_key' => $key,\n\t\t\t\t\t\t\t\t\t\t 'help_title' => $value['help_title'],\n\t\t\t\t\t\t\t\t\t\t 'help_body' => $value['help_body'],\n\t\t\t\t\t\t\t\t\t\t 'help_mouseover' => $value['help_mouseover'],\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->ipsclass->DB->do_insert( 'acp_help', $insert );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t}",
"protected function renderHelp() {}",
"public function helpAction() {}",
"public function getHelp()\n {\n new Help('form');\n }",
"function bi_review_help_text( $contextual_help, $screen_id, $screen ) {\n if ( 'library' == $screen->id ) {\n $contextual_help =\n '<p>' . __('Things to remember when adding or editing a review:') . '</p>' .\n '<p>' . __('If you want to schedule the review to be published in the future:') . '</p>' .\n '<ul>' .\n '<li>' . __('Under the Publish module, click on the Edit link next to Publish.') . '</li>' .\n '<li>' . __('Change the date to the date to actual publish this review, then click on Ok.') . '</li>' .\n '</ul>';\n } elseif ( 'edit-review' == $screen->id ) {\n $contextual_help = \n '<p>' . __('This is the help screen displaying the table of review blah blah blah.') . '</p>' ;\n }\n return $contextual_help;\n}",
"public static function configureHelp(Help $help);",
"function builder_set_help_sidebar() {\n\tob_start();\n\t\n?>\n<p><strong><?php _e( 'For more information:', 'it-l10n-Builder-Everett' ); ?></strong></p>\n<p><?php _e( '<a href=\"http://ithemes.com/forum/\" target=\"_blank\">Support Forum</a>' ); ?></p>\n<p><?php _e( '<a href=\"http://ithemes.com/codex/page/Builder\" target=\"_blank\">Codex</a>' ); ?></p>\n<?php\n\t\n\t$help = ob_get_contents();\n\tob_end_clean();\n\t\n\t$help = apply_filters( 'builder_filter_help_sidebar', $help );\n\t\n\tif ( ! empty( $help ) ) {\n\t\t$screen = get_current_screen();\n\t\t\n\t\tif ( is_callable( array( $screen, 'set_help_sidebar' ) ) )\n\t\t\t$screen->set_help_sidebar( $help );\n\t}\n}",
"public function help()\n {\n $url = array('url' => current_url());\n\n $this->session->set_userdata($url);\n\n $this->data['help'] = $this->home_m->get_data('help')->row_array();\n\n $body = 'help' ;\n\n $this->load_pages($body,$this->data);\n }",
"public function get_help_sidebar()\n {\n }",
"function hankart_add_tech_spec( $tabs ) {\n\t$tabs['tech_spec'] = array(\n\t\t'title' \t=> __( 'Technical specifications', 'storefront' ),\n\t\t'priority' \t=> 50,\n\t\t'callback' \t=> 'hankart_add_tech_spec_content'\n\t);\n\treturn $tabs;\n}",
"function _add_help( $data=array() )\n\t{\n\t\t$help = array();\n\t\t\n\t\t$help['title'] = $data['title']['VALUE'];\n\t\t$help['text'] = $data['text']['VALUE'];\n\t\t$help['description'] = $data['description']['VALUE'];\n\t\t$help['position'] = $data['position']['VALUE'];\n\t\t\n\t\t$this->ipsclass->DB->do_insert( 'faq', $help );\n\t}",
"function helps()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['helps'] == 1 ) ? 'Help File' : 'Help Files';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'removed' : 'created';\n\t\t$helpkeys = array();\n\t\t\n\t\tforeach ( $this->xml_array['helps_group']['help'] as $k => $v )\n\t\t{\n\t\t\t$helpkeys[] = \"'{$v['title']['VALUE']}'\";\n\t\t}\n\t\t\n\t\t$this->ipsclass->DB->do_delete( 'faq', \"title IN (\".implode( \",\", $helpkeys ).\")\" );\n\t\t\n\t\tif ( !$this->ipsclass->input['un'] )\n\t\t{\n\t\t\tforeach ( $this->xml_array['helps_group']['help'] as $k => $v )\n\t\t\t{\n\t\t\t\t$this->_add_help( $v );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&code=work&mod={$this->ipsclass->input['mod']}&step={$this->ipsclass->input['step']}{$uninstall}{$group}&st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['helps']} {$object} {$operation}....\" );\n\t}",
"function setHelpInfo( $package, $context, $desc ) {\n\t\tglobal $gBitSmarty;\n\t\t$gBitSmarty->assign( 'TikiHelpInfo', array( 'URL' => 'http://doc.bitweaver.org/wiki/index.php?page=' . $package . $context , 'Desc' => $desc ) );\n\t}",
"public function helpPage()\n {\n $site = new SiteContainer($this->db);\n $page;\n\n if ($_SESSION['type'] == 'owner'){\n require_once('views/OwnerHelpPage.class.php');\n $page = new OwnerHelpPage();\n }\n else {\n require_once('views/CustHelpPage.class.php');\n $page = new CustHelpPage();\n }\n\n $site->printHeader();\n $site->printNav($_SESSION['type']);\n $page->printHtml();\n $site->printFooter(); \n\n }",
"public function get_contextual_help() {\n\t\treturn '<p>' . __( 'Hovering over a row in the intrusions list will display action links that allow you to manage the intrusion. You can perform the following actions:', 'mute-screamer' ) . '</p>' .\n\t\t\t'<ul>' .\n\t\t\t'<li>' . __( 'Exclude automatically adds the item to the Exception fields list.', 'mute-screamer' ) . '</li>' .\n\t\t\t'<li>' . __( 'Delete permanently deletes the intrusion.', 'mute-screamer' ) . '</li>' .\n\t\t\t'</ul>';\n\t}",
"function create_theme_options_page() {\n global $lulisaurus_settings_page;\n\n $lulisaurus_settings_page = add_menu_page('Optionen', 'Optionen', 'read', 'lulisaurus_settings', 'build_options_page', 'dashicons-lightbulb');\n\n // Add contextual help\n add_action( 'load-' . $lulisaurus_settings_page, 'add_contextual_theme_help' );\n}",
"function cmh_add_options_page() {\r\n\tadd_options_page('Correct My Headings Options Page', 'Correct My Headings', 'manage_options', __FILE__, 'cmh_render_form');\r\n}",
"function Show_Help($title,$ret_help)\n\t\t{\n\t\t\tglobal \t$Captions_arr,$ecom_siteid,$db,$ecom_hostname,$ecom_themename,\n\t\t\t\t\t$ecom_themeid,$default_layout,$inlineSiteComponents,$Settings_arr;\n\t\t\t// ** Fetch any captions for product details page\n\t\t\t$Captions_arr['HELP'] \t= getCaptions('HELP');\n\t\t\t// ** Check to see whether current user is logged in \n\t\t\t$cust_id \t= get_session_var(\"ecom_login_customer\");\n\t\t\twhile ($row_help = $db->fetch_array($ret_help))\n\t\t\t{\n\t\t\t\t$help_arr[$row_help['help_id']] = array (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'help_heading'=>stripslash_normal($row_help['help_heading']),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'help_description'=>stripslashes($row_help['help_description'])\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t}\n\t\t\n\t\t \t\t/*$HTML_treemenu = '\t<div class=\"row breadcrumbs\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"'.CONTAINER_CLASS.'\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"container-tree\">\n\t\t\t\t\t\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"'.url_link('',1).'\" title=\"'.stripslash_normal($Captions_arr['COMMON']['TREE_MENU_HOME_LINK']).'\">'.stripslash_normal($Captions_arr['COMMON']['TREE_MENU_HOME_LINK']).'</a></li>\n\t\t\t\t\t\t\t\t\t\t\t\t<li> → '.stripslash_normal($Captions_arr['HELP']['HELP_HEAD']).'</li>\n\n\t\t\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div></div>';*/\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$HTML_treemenu = '\t<div class=\"breadcrumbs\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"'.CONTAINER_CLASS.'\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"container-tree\">\n\t\t\t\t\t\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"'.url_link('',1).'\" title=\"'.stripslash_normal($Captions_arr['COMMON']['TREE_MENU_HOME_LINK']).'\">'.stripslash_normal($Captions_arr['COMMON']['TREE_MENU_HOME_LINK']).'</a></li>\n\t\t\t\t\t\t\t\t\t\t\t\t<li> → '.stripslash_normal($Captions_arr['HELP']['HELP_HEAD']).'</li>\n\n\t\t\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div></div>';\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo $HTML_treemenu;\t\n\t?>\n\t\t<div class='faq_outer'>\n\t\t<a name=\"top\"></a>\n\t\t<div class=\"<?php echo CONTAINER_CLASS;?>\">\n\t\t<div class=\"panel-group\" id=\"accordion\">\n\t\t\n\t\t<?php \n\t\t\t// Showing the headings and descriptions\n\t\t\t$cntr=1;\n\t\t\tforeach ($help_arr as $k=>$v)\n\t\t\t{ \n\t\t\t\t$help_id = $k;\n\t\t\t\techo \t\"<div class=\\\"panel panel-default\\\" >\n\t\t\t\t\t\t\t<div class=\\\"panel-heading\\\">\n\t\t\t\t\t\t\t<a class=\\\"accordion-toggle\\\" data-toggle=\\\"collapse\\\" data-parent=\\\"#accordion\\\" href=\\\"#collapseOne\".$help_id.\"\\\"><div class=\\\"panel-title\\\">\n\n\t\t\t\t\t\t\t\".$cntr.'. '.$v['help_heading'].\"<i class=\\\" pull-right caret\\\"></i>\n\t\t\t\t\t\t\t</div></a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div id=\\\"collapseOne\".$help_id.\"\\\" class=\\\"panel-collapse collapse out\\\">\n\t\t\t\t\t\t\t<div class=\\\"panel-body\\\">\n\t\t\t\t\t\t\t\";\n\t\t\t\t\t\t\t$cntr++;\n\t\t\t\t\t\t\t\n\t\t?>\t\n\t\t<?php \n\t\t\t\t$sr_array = array('rgb(0, 0, 0)','#000000');\n\t\t\t\t$rep_array = array('rgb(255,255,255)','#ffffff'); \n\t\t\t\t$ans_desc = str_replace($sr_array,$rep_array,$v['help_description']);\n\t\t\techo $ans_desc?>\t\t\t\n\t<?php\t\n\techo \"\n\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\t</div>\";\n\t\t\t}\n\t?>\n\t\t\t</div> \n\t\t</div> \n\t\t</div>\n\t<?php\t\t\n\t\t}",
"function _add_acp_help( $data = array() )\n\t{\n\t\t$acp_help = array();\n\t\t\n\t\t$acp_help['is_setting'] = $data['is_setting']['VALUE'];\n\t\t$acp_help['page_key'] = $data['page_key']['VALUE'];\n\t\t$acp_help['help_title'] = $data['help_title']['VALUE'];\n\t\t$acp_help['help_body'] = $data['help_body']['VALUE'];\n\t\t$acp_help['help_mouseover'] = $data['help_mouseover']['VALUE'];\n\t\t\t\t\t\n\t\t$this->ipsclass->DB->do_insert( 'acp_help', $acp_help );\n\t}",
"public function getHelpSidbar()\n {\n $txt_title = __(\"Resources\", 'duplicator');\n $txt_home = __(\"Knowledge Base\", 'duplicator');\n $txt_guide = __(\"Full User Guide\", 'duplicator');\n $txt_faq = __(\"Technical FAQs\", 'duplicator');\n\t\t$txt_sets = __(\"Package Settings\", 'duplicator');\n $this->screen->set_help_sidebar(\n \"<div class='dup-screen-hlp-info'><b>{$txt_title}:</b> <br/>\"\n .\"<i class='fa fa-home'></i> <a href='https://snapcreek.com/duplicator/docs/' target='_sc-home'>{$txt_home}</a> <br/>\"\n .\"<i class='fa fa-book'></i> <a href='https://snapcreek.com/duplicator/docs/guide/' target='_sc-guide'>{$txt_guide}</a> <br/>\"\n .\"<i class='fa fa-file-code-o'></i> <a href='https://snapcreek.com/duplicator/docs/faqs-tech/' target='_sc-faq'>{$txt_faq}</a> <br/>\"\n\t\t\t.\"<i class='fa fa-gear'></i> <a href='admin.php?page=duplicator-settings&tab=package'>{$txt_sets}</a></div>\"\n );\n }",
"function wpvideocoach_custom_support_title()\r\n{\r\n\tglobal $wpvideocoach_help_tabs_title;\r\n\treturn $wpvideocoach_help_tabs_title;\r\n}",
"public function get_help_page()\n\t{\n\t\t$this->load_misc_methods();\n\t\treturn cms_module_GetHelpPage($this);\n\t}",
"public function helpAndLearnmoreAction() {\n\n\t$this->view->navigation = Engine_Api::_()->getApi('menus', 'core')\n\t\t\t\t\t->getNavigation('communityad_main');\n\t$this->view->display_faq = $display_faq = $this->_getParam('display_faq');\n\t$this->view->page_id = $page_id = $this->_getParam('page_id', 0);\n\t$communityad_getfaq = Zend_Registry::get('communityad_getfaq');\n\tif (empty($communityad_getfaq)) {\n\t return;\n\t}\n\tif (empty($page_id)) {\n\t $helpInfoTable = Engine_Api::_()->getItemtable('communityad_infopage');\n\t $helpInfoTableName = $helpInfoTable->info('name');\n\t $select = $helpInfoTable->select()->from($helpInfoTableName)->where('status =?', 1);\n\t $fetchHelpTable = $select->query()->fetchAll();\n\t if (!empty($fetchHelpTable)) {\n\t\t$this->view->pageObject = $fetchHelpTable;\n\t\t$default_faq = $fetchHelpTable[0]['faq'];\n\t\t$default_contact = $fetchHelpTable[0]['contect_team'];\n\t\t$this->view->page_default = $fetchHelpTable[0]['page_default'];\n\t }\n\t} else {\n\t $helpInfoTable = Engine_Api::_()->getItemtable('communityad_infopage');\n\t $helpInfoTableName = $helpInfoTable->info('name');\n\t $select = $helpInfoTable->select()->from($helpInfoTableName, array('infopage_id', 'title', 'package', 'faq', 'contect_team'))->where('status =?', 1);\n\t $fetchHelpTable = $select->query()->fetchAll();\n\t if (!empty($fetchHelpTable)) {\n\t\t$this->view->pageObject = $fetchHelpTable;\n\t\t$page_info = Engine_Api::_()->getItem('communityad_infopage', $page_id);\n\t\tif (empty($page_info)) {\n\t\t return $this->_forward('notfound', 'error', 'core');\n\t\t}\n\t\t$display_faq = $default_faq = $page_info->faq;\n\t\t$default_contact = $page_info->contect_team;\n\t\t$this->view->page_default = $page_info->page_default;\n\t\tif (empty($default_faq) && empty($default_contact)) {\n\t\t $this->view->content_data = $page_info->description;\n\t\t $this->view->content_title = $page_info->title;\n\t\t}\n\t }\n\t}\n\tif (empty($display_faq)) {\n\t $this->view->display_faq = $display_faq = $default_faq;\n\t}\n\tif (!empty($display_faq)) {\n\t $pageIdSelect = $helpInfoTable->select()->from($helpInfoTableName, array('*'))\n\t\t\t\t\t ->where('faq =?', $display_faq)->where('status =?', 1)->limit(1);\n\t $result = $pageIdSelect->query()->fetchAll();\n\t $this->view->faqpage_id = $result[0]['infopage_id'];\n\t $communityadFaqTable = Engine_Api::_()->getItemTable('communityad_faq');\n\t $communityadFaqName = $communityadFaqTable->info('name');\n\n\t // fetch General or Design or Targeting FAQ according to the selected tab\n\t $communityadFaqSelect = $communityadFaqTable->select()->from($communityadFaqName, array('question', 'answer', 'type', 'faq_default'))\n\t\t\t\t\t ->where('status =?', 1)\n\t\t\t\t\t ->where('type =?', $display_faq)\n\t\t\t\t\t ->order('faq_id DESC');\n\t $this->view->viewFaq = $communityadFaqSelect->query()->fetchAll();\n\t} else if (!empty($default_contact)) { // Condition: Fetch data for 'Contact us' type.\n\t $contactTeam['numbers'] = Engine_Api::_()->getApi('settings', 'core')->ad_saleteam_con;\n\t $contactTeam['emails'] = Engine_Api::_()->getApi('settings', 'core')->ad_saleteam_email;\n\t $this->view->contactTeam = $contactTeam;\n\t}\n }",
"abstract public function displayHelp();",
"function bizpanda_sts_register_help($pages)\n\t{\n\t\tglobal $opanda_help_cats;\n\t\tif( !$opanda_help_cats ) {\n\t\t\t$opanda_help_cats = array();\n\t\t}\n\n\t\t$items = array(\n\t\t\tarray(\n\t\t\t\t'name' => 'bizpanda-sts-quick-start',\n\t\t\t\t'title' => __('Quick start', 'bizpanda-step-to-step-addon'),\n\t\t\t\t'hollow' => true,\n\t\t\t)\n\t\t);\n\n\t\t$items = apply_filters('bizpanda_sts_register_help_pages', $items);\n\n\t\tarray_unshift($pages, array(\n\t\t\t'name' => 'bizpanda-sts-addon',\n\t\t\t'title' => __('Step to step addon', 'bizpanda-step-to-step-addon'),\n\t\t\t'items' => $items\n\t\t));\n\n\t\treturn $pages;\n\t}",
"protected function isHelp() {}",
"private static function set_advanced_help_texts() {\n\t\tself::$help_texts['advanced'] = array(\n\t\t\t'pt_single' => __( 'Replaced with the content type single label', 'wordpress-seo' ),\n\t\t\t'pt_plural' => __( 'Replaced with the content type plural label', 'wordpress-seo' ),\n\t\t\t'modified' => __( 'Replaced with the post/page modified time', 'wordpress-seo' ),\n\t\t\t'id' => __( 'Replaced with the post/page ID', 'wordpress-seo' ),\n\t\t\t'name' => __( 'Replaced with the post/page author\\'s \\'nicename\\'', 'wordpress-seo' ),\n\t\t\t'user_description' => __( 'Replaced with the post/page author\\'s \\'Biographical Info\\'', 'wordpress-seo' ),\n\t\t\t'userid' => __( 'Replaced with the post/page author\\'s userid', 'wordpress-seo' ),\n\t\t\t'currenttime' => __( 'Replaced with the current time', 'wordpress-seo' ),\n\t\t\t'currentdate' => __( 'Replaced with the current date', 'wordpress-seo' ),\n\t\t\t'currentday' => __( 'Replaced with the current day', 'wordpress-seo' ),\n\t\t\t'currentmonth' => __( 'Replaced with the current month', 'wordpress-seo' ),\n\t\t\t'currentyear' => __( 'Replaced with the current year', 'wordpress-seo' ),\n\t\t\t'page' => __( 'Replaced with the current page number with context (i.e. page 2 of 4)', 'wordpress-seo' ),\n\t\t\t'pagetotal' => __( 'Replaced with the current page total', 'wordpress-seo' ),\n\t\t\t'pagenumber' => __( 'Replaced with the current page number', 'wordpress-seo' ),\n\t\t\t'caption' => __( 'Attachment caption', 'wordpress-seo' ),\n\t\t\t'focuskw' => __( 'Replaced with the posts focus keyword', 'wordpress-seo' ),\n\t\t\t'term404' => __( 'Replaced with the slug which caused the 404', 'wordpress-seo' ),\n\t\t\t'cf_<custom-field-name>' => __( 'Replaced with a posts custom field value', 'wordpress-seo' ),\n\t\t\t'ct_<custom-tax-name>' => __( 'Replaced with a posts custom taxonomies, comma separated.', 'wordpress-seo' ),\n\t\t\t'ct_desc_<custom-tax-name>' => __( 'Replaced with a custom taxonomies description', 'wordpress-seo' ),\n\t\t);\n\t}",
"protected function getQuickHelp() {\r\n $strOldAction = $this->getAction();\r\n $this->setAction($this->strOriginalAction);\r\n $strQuickhelp = parent::getQuickHelp();\r\n $this->setAction($strOldAction);\r\n return $strQuickhelp;\r\n }",
"function wpvideocoach_custom_support_url()\r\n{\r\n\tglobal $wpvideocoach_help_tabs_url;\r\n\treturn $wpvideocoach_help_tabs_url;\r\n}",
"function optinpanda_register_help( $pages ) {\r\n global $opanda_help_cats;\r\n if ( !$opanda_help_cats ) $opanda_help_cats = array();\r\n \r\n $items = array(\r\n array(\r\n 'name' => 'email-locker',\r\n 'title' => __('Email Locker', 'optinpanda'),\r\n 'hollow' => true,\r\n\r\n 'items' => array(\r\n array(\r\n 'name' => 'what-is-email-locker',\r\n 'title' => __('What is it?', 'optinpanda')\r\n ),\r\n array(\r\n 'name' => 'usage-example-email-locker',\r\n 'title' => __('Quick Start Guide', 'optinpanda')\r\n ),\r\n )\r\n )\r\n );\r\n \r\n $items[] = array(\r\n 'name' => 'connect-locker',\r\n 'title' => __('Sign-In Locker', 'optinpanda'),\r\n 'hollow' => true,\r\n\r\n 'items' => array(\r\n array(\r\n 'name' => 'what-is-signin-locker',\r\n 'title' => __('What is it?', 'optinpanda')\r\n ),\r\n array(\r\n 'name' => 'usage-example-signin-locker',\r\n 'title' => __('Quick Start Guide', 'optinpanda')\r\n ),\r\n )\r\n );\r\n \r\n\r\n \r\n array_unshift($pages, array(\r\n 'name' => 'optinpanda',\r\n 'title' => __('Plugin: Opt-In Panda', 'optinpanda'),\r\n 'items' => $items\r\n ));\r\n \r\n return $pages;\r\n}",
"public function rates_help_tabs( $help_tabs = array() ) {\n\t\t\tif ( ! empty( $help_tabs['talks']['add_help_tab'] ) ) {\n\t\t\t\t$talks_help_tabs = wp_list_pluck( $help_tabs['talks']['add_help_tab'], 'id' );\n\t\t\t\t$talks_overview = array_search( 'talks-overview', $talks_help_tabs );\n\n\t\t\t\tif ( isset( $help_tabs['talks']['add_help_tab'][ $talks_overview ]['content'] ) ) {\n\t\t\t\t\t$help_tabs['talks']['add_help_tab'][ $talks_overview ]['content'][] = esc_html__( 'The Ratings metabox allows you to manage the ratings the talk has received.', 'wordcamp-talks' );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $help_tabs;\n\t\t}",
"public static function hideHelpTab($memberid) {\r\n\t\t$result = self::$db->query('UPDATE sis2.member_options SET helptab=false WHERE memberid=$1',\r\n\t\t\t[$memberid]);\r\n\t}",
"function help_page() {\n\t\techo \"<div class=\\\"wrap\\\">\";\n\t\techo \"<h2>Help</h2>\";\n\t\techo \"<p>1. Upload your assets, to upload your assets go to the Piecemaker>Assets and click the <em>Upload New Asset</em> button.\n\t\t\\n</br>2. Once your assets are uploaded it is time to create your first Piecemaker go to Piecemaker>Piecemakers and click the <em>Add New Piecemaker</em>, fill all the option and click <em>Add Piecemaker</em> button.\n\t\t\\n </br>3. After creating new piecemaker you have to add Slides and Transitions. Go to Piecemaker>Piecemakers and click the icons next to your slider.\n\t\t\\n </br>4. To add your piecemaker into the post or page just simple type [piecemaker id='your_id'/] your_id = id of the piecemaker (it is displayed in the Piecemakers section).\"; \n\t\techo \"</div>\";\n\t}",
"public function help()\n {\n $help = file_get_contents(BUILTIN_SHELL_HELP . 'list.txt');\n $this->put($help);\n }",
"public function visitHelpPage()\n {\n $this->data .= \"\n /* --- visitHelpPage --- */\n _ra.visitHelpPage = {'visit': true};\n \n if (_ra.ready !== undefined) {\n _ra.visitHelpPage();\n }\n \";\n\n return $this->data;\n }",
"function bpfit_walk_subtab_show_screen() {\n\t\t\tadd_action( 'bp_template_title', array($this, 'bpfit_walk_subtab_function_to_show_title') );\n\t\t\tadd_action( 'bp_template_content', array($this, 'bpfit_walk_subtab_function_to_show_content') );\n\t\t\tbp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t\t}",
"function bpfit_weight_subtab_show_screen() {\n\t\t\tadd_action( 'bp_template_title', array($this, 'bpfit_weight_subtab_function_to_show_title') );\n\t\t\tadd_action( 'bp_template_content', array($this, 'bpfit_weight_subtab_function_to_show_content') );\n\t\t\tbp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t\t}",
"public function help();",
"public function help()\n\t{\n\t\t$this\n\t\t\t->output\n\t\t\t->addOverview(\n\t\t\t\t'Store shared configuration variables used by the command line tool.\n\t\t\t\tThese will, for example, be used to fill in docblock stubs when\n\t\t\t\tusing the scaffolding command.'\n\t\t\t)\n\t\t\t->addTasks($this)\n\t\t\t->addArgument(\n\t\t\t\t'--{keyName}',\n\t\t\t\t'Sets the variable keyName to the given value.',\n\t\t\t\t'Example: --name=\"John Doe\"'\n\t\t\t);\n\t}",
"public static function getShowHelpTab($memberid) {\r\n\t\t$result = self::$db->fetch_column('SELECT helptab FROM sis2.member_options WHERE memberid=$1 LIMIT 1',\r\n\t\t\t[$memberid]);\r\n\t\tif (empty($result)) {\r\n\t\t\tself::setHelpTab($memberid);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn ($result[0] === 't');\r\n\t}",
"function initlab_options_page() {\n add_menu_page(\n __('init Lab Options', 'initlab-addons'),\n __('init Lab', 'initlab-addons'),\n 'manage_options',\n 'initlab',\n 'initlab_options_page_html'\n );\n}",
"public function getHelpUrl()\n {\n return $this->helpPage;\n }",
"public function setHelp($help)\n {\n $this->help = $help;\n return $this;\n }",
"function support_toolbar_link($wp_admin_bar) {\n\tglobal $current_user;\n\t$args = array(\n\t\t'id' => 'wpbeginner',\n\t\t'title' => 'Help Desk',\n\t\t'href' => 'http://drumcreative.com/?scrollto=support&first_name=' . $current_user->user_firstname . '&last_name=' . $current_user->user_lastname . '&email=' . $current_user->user_email . '&website=' . get_site_url(),\n\t\t'meta' => array(\n\t\t\t'class' => 'help-desk',\n\t\t\t'title' => 'The Help Desk is for Drum Creative clients to submit Emergency, Change or Feature requests for their websites.',\n\t\t\t'target' => '_blank'\n\t\t\t)\n\t);\n\t$wp_admin_bar->add_node($args);\n}",
"function wpp_contextual_help( $data ) {\n\n $data[ 'Developer' ][ ] = '<h3>' . __( 'Developer', 'wpp' ) . '</h3>';\n $data[ 'Developer' ][ ] = '<p>' . __( 'The <b>slug</b> is automatically created from the title and is used in the back-end. It is also used for template selection, example: floorplan will look for a template called property-floorplan.php in your theme folder, or default to property.php if nothing is found.' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( 'If <b>Searchable</b> is checked then the property will be loaded for search, and available on the property search widget.' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( 'If <b>Location Matters</b> is checked, then an address field will be displayed for the property, and validated against Google Maps API. Additionally, the property will be displayed on the SuperMap, if the feature is installed.' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( '<b>Hidden Attributes</b> determine which attributes are not applicable to the given property type, and will be grayed out in the back-end.' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( '<b>Inheritance</b> determines which attributes should be automatically inherited from the parent property' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( 'Property attributes are meant to be short entries that can be searchable, on the back-end attributes will be displayed as single-line input boxes. On the front-end they are displayed using a definitions list.' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( 'Making an attribute as \"searchable\" will list it as one of the searchable options in the Property Search widget settings.' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( 'Be advised, attributes added via add_filter() function supercede the settings on this page.' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( '<b>Search Input:</b> Select and input type and enter comma-separated values that you would like to be used in property search, on the front-end.', 'wpp' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( '<b>Data Entry:</b> Enter comma-separated values that you would like to use on the back-end when editing properties.', 'wpp' ) . '</p>';\n\n return $data;\n\n }",
"function helpLink() {\n\t\t// By default it's an (external) URL, hence not a valid Title.\n\t\t// But because MediaWiki is by nature very customizable, someone\n\t\t// might've changed it to point to a local page. Tricky!\n\t\t// @see https://phabricator.wikimedia.org/T155319\n\t\t$helpPage = $this->msg( 'helppage' )->inContentLanguage()->plain();\n\t\tif ( preg_match( '/^(?:' . wfUrlProtocols() . ')/', $helpPage ) ) {\n\t\t\t$helpLink = Linker::makeExternalLink(\n\t\t\t\t$helpPage,\n\t\t\t\t$this->msg( 'help' )->plain()\n\t\t\t);\n\t\t} else {\n\t\t\t$helpLink = MediaWikiServices::getInstance()->getLinkRenderer()->makeKnownLink(\n\t\t\t\tTitle::newFromText( $helpPage ),\n\t\t\t\t$this->msg( 'help' )->text()\n\t\t\t);\n\t\t}\n\t\treturn $helpLink;\n\t\t// This doesn't work with the default value of 'helppage' which points to an external URL\n\t\t// return $this->footerLink( 'help', 'helppage' );\n\t}",
"function help ( $help='help text', $caption='') {\n\n\t\t$compath = JURI::root() . 'administrator/components/'.JEV_COM_COMPONENT;\n\t\t$imgpath = $compath . '/assets/images';\n\n\t\tif (empty($caption)) $caption = ' ';\n\n\t\tif (substr($help, 0, 7) == 'http://' || substr($help, 0, 8) == 'https://') {\n\t\t\t//help text is url, open new window\n\t\t\t$onclick_cmd = \"window.open(\\\"$help\\\", \\\"help\\\", \\\"height=700,width=800,resizable=yes,scrollbars\\\");return false\";\n\t\t} else {\n\t\t\t// help text is plain text with html tags\n\t\t\t// prepare text as overlib parameter\n\t\t\t// escape \", replace new line by space\n\t\t\t$help = htmlspecialchars($help, ENT_QUOTES);\n\t\t\t$help = str_replace('"', '\\"', $help);\n\t\t\t$help = str_replace(\"\\n\", \" \", $help);\n\n\t\t\t$ol_cmds = 'RIGHT, ABOVE, VAUTO, WRAP, STICKY, CLOSECLICK, CLOSECOLOR, \"white\"';\n\t\t\t$ol_cmds .= ', CLOSETEXT, \"<span style=\\\"border:solid white 1px;padding:0px;margin:1px;\\\"><b>X</b></span>\"';\n\t\t\t$onclick_cmd = 'return overlib(\"'.$help.'\", ' . $ol_cmds . ', CAPTION, \"'.$caption.'\")';\n\t\t}\n\n\t\t// RSH 10/11/10 - Added float:none for 1.6 compatiblity - The default template was floating images to the left\n\t\t$str = '<img border=\"0\" style=\"float: none; vertical-align:bottom; cursor:help;\" alt=\"'. JText::_('JEV_HELP') . '\"'\n\t\t. ' title=\"' . JText::_('JEV_HELP') .'\"'\n\t\t. ' src=\"' . $imgpath . '/help_ques_inact.gif\"'\n\t\t. ' onmouseover=\\'this.src=\"' . $imgpath . '/help_ques.gif\"\\''\n\t\t. ' onmouseout=\\'this.src=\"' . $imgpath . '/help_ques_inact.gif\"\\''\n\t\t. ' onclick=\\'' . $onclick_cmd . '\\' />';\n\n\t\treturn $str;\n\t}",
"public function __construct() {\n\t\t\t$this->parent_menu_page_url = 'admin.php?page=learndash-help';\n\t\t\t$this->menu_page_capability = LEARNDASH_ADMIN_CAPABILITY_CHECK;\n\t\t\t$this->settings_page_id = 'learndash-help';\n\t\t\t$this->settings_page_title = esc_html__( 'LearnDash Help', 'learndash' );\n\t\t\t$this->settings_tab_title = esc_html__( 'Help', 'learndash' );\n\t\t\t$this->settings_tab_priority = 100;\n\n\t\t\tif ( ! learndash_cloud_is_enabled() ) {\n\t\t\t\tadd_filter( 'learndash_submenu', array( $this, 'submenu_item' ), 200 );\n\n\t\t\t\tadd_filter( 'learndash_admin_tab_sets', array( $this, 'learndash_admin_tab_sets' ), 10, 3 );\n\t\t\t\tadd_filter( 'learndash_header_data', array( $this, 'admin_header' ), 40, 3 );\n\t\t\t\tadd_action( 'admin_head', array( $this, 'output_admin_inline_scripts' ) );\n\n\t\t\t\tparent::__construct();\n\t\t\t}\n\t\t}",
"function ren_help($mode = 1, $addtextfunc = \"addtext\", $helpfunc = \"help\")\n{\n return display_help(\"helpb\", $mode, $addtextfunc, $helpfunc = \"help\");\n}",
"function get_site_screen_help_sidebar_content()\n {\n }",
"public function help($slug)\n\t{\n\t\t$this->data->help = $this->module_m->help($slug);\n\n\t\t$this->template\n\t\t\t->set_layout('modal', 'admin')\n\t\t\t->build('admin/partials/help', $this->data);\n\t}"
] | [
"0.82833946",
"0.82551295",
"0.803806",
"0.78408676",
"0.7749806",
"0.77207017",
"0.77141136",
"0.7699011",
"0.76149815",
"0.76127243",
"0.758248",
"0.7342558",
"0.7290321",
"0.722917",
"0.71374273",
"0.7080678",
"0.69888884",
"0.6914647",
"0.68883723",
"0.6773787",
"0.6751689",
"0.67013055",
"0.6639792",
"0.66239166",
"0.6583263",
"0.6550421",
"0.6549142",
"0.65271515",
"0.6429511",
"0.642575",
"0.64089346",
"0.6400297",
"0.6358405",
"0.6299088",
"0.6288525",
"0.6279092",
"0.626935",
"0.6245138",
"0.623843",
"0.62348187",
"0.62199455",
"0.6175456",
"0.6154485",
"0.61526895",
"0.61109215",
"0.610947",
"0.61052567",
"0.6097668",
"0.60831857",
"0.6061222",
"0.602174",
"0.59503585",
"0.59371006",
"0.5896187",
"0.58737034",
"0.58721673",
"0.58406824",
"0.58356184",
"0.5815718",
"0.58139825",
"0.5803419",
"0.57732326",
"0.57576466",
"0.5750901",
"0.5735527",
"0.5730834",
"0.5715708",
"0.56981087",
"0.5693896",
"0.5689841",
"0.56813055",
"0.5669619",
"0.5667982",
"0.5660276",
"0.56468344",
"0.56434155",
"0.56264013",
"0.56244075",
"0.56164676",
"0.56164396",
"0.5610563",
"0.55850077",
"0.558489",
"0.55625314",
"0.5553236",
"0.55497265",
"0.5516663",
"0.5474545",
"0.5471395",
"0.5456326",
"0.54546636",
"0.5453193",
"0.5449679",
"0.5448664",
"0.5436759",
"0.54248714",
"0.54245275",
"0.54192346",
"0.54173887",
"0.5412644",
"0.539496"
] | 0.0 | -1 |
Removes a help tab from the contextual help for the screen. | public function remove_tab( $id ) {
unset( $this->_tabs[ $id ] );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function remove_help_tabs()\n {\n }",
"function admin_hide_help() { \n $screen = get_current_screen();\n $screen->remove_help_tabs();\n}",
"public function remove_help_tab($id)\n {\n }",
"public static function hideHelpTab($memberid) {\r\n\t\t$result = self::$db->query('UPDATE sis2.member_options SET helptab=false WHERE memberid=$1',\r\n\t\t\t[$memberid]);\r\n\t}",
"public function setup_help_tab()\n {\n }",
"public function custom_help_tab() {\n\n\t\t\t$screen = get_current_screen();\n\n\t\t\t// Return early if we're not on the needed post type.\n\t\t\tif ( ( $this->object_type == 'post' && $this->object != $screen->post_type ) || \n\t\t\t\t ( $this->object_type == 'taxonomy' && $this->object != $screen->taxonomy ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Add the help tabs.\n\t\t\tforeach ( $this->args->help_tabs as $tab ) {\n\t\t\t\t$screen->add_help_tab( $tab );\n\t\t\t}\n\n\t\t\t// Add the help sidebar.\n\t\t\t$screen->set_help_sidebar( $this->args->help_sidebar );\n\t\t}",
"public static function postHelpTab () {\n $screen = get_current_screen();\n\n if ( 'travelcard' != $screen->post_type )\n return;\n\n $args = [\n 'id' => 'travelcard',\n 'title' => 'Travel Cards Help',\n 'content' => file_get_contents(__DIR__ . '/templates/help.php'),\n ];\n\n $screen->add_help_tab( $args );\n }",
"public function add_help_tab() {\n\t\t$screen = get_current_screen();\n\t\t$screen->add_help_tab( array(\n\t\t\t\t'id' => 'support',\n\t\t\t\t'title' => 'Support',\n\t\t\t\t'content' => '',\n\t\t\t\t'callback' => array( $this, 'display' ),\n\t\t\t)\n\t\t);\n\t}",
"public function help_tab(){\r\n $screen = get_current_screen();\r\n\r\n foreach($this->what_helps as $help_id => $tab) {\r\n $callback_name = $this->generate_callback_name($help_id);\r\n if(method_exists($this, 'help_'.$callback_name.'_callback')) {\r\n $callback = array($this, 'help_'.$callback_name.'_callback');\r\n }\r\n else {\r\n $callback = array($this, 'help_callback');\r\n }\r\n // documentation tab\r\n $screen->add_help_tab( array(\r\n 'id' => 'hw-help-'.$help_id,\r\n 'title' => __( $tab['title'] ),\r\n //'content' => \"<p>sdfsgdgdfghfhfgh</p>\",\r\n 'callback' => $callback\r\n )\r\n );\r\n }\r\n }",
"function dfcg_plugin_help() {\n\t\n\tglobal $current_screen;\n\t\n\t$sidebar = dfcg_help_sidebar();\n\t\n\t$current_screen->set_help_sidebar( $sidebar );\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-general',\n\t\t'title' => __( 'General info', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_general'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-theme',\n\t\t'title' => __( 'Theme integration', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_theme'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-quick',\n\t\t'title' => __( 'Quick Start', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_quick'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-gallery',\n\t\t'title' => __( 'Gallery Method', DFCG_DOMAIN ),\n\t\t'callback' => \"dfcg_help_gallery\"\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-images',\n\t\t'title' => __( 'Image Management', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_images'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-desc',\n\t\t'title' => __( 'Descriptions', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_desc'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-css',\n\t\t'title' => __( 'Gallery CSS', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_css'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-scripts',\n\t\t'title' => __( 'Load Scripts', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_scripts'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-troubleshooting',\n\t\t'title' => __( 'Troubleshooting', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_trouble'\n\t));\n}",
"public function remove_tabs() {\n $this->_tabs = array();\n }",
"function foodpress_admin_help_tab_content() {\r\n\t$screen = get_current_screen();\r\n\r\n\t$screen->add_help_tab( array(\r\n\t 'id'\t=> 'foodpress_overview_tab',\r\n\t 'title'\t=> __( 'Overview', 'foodpress' ),\r\n\t 'content'\t=>\r\n\r\n\t \t'<p>' . __( 'Thank you for using FoodPress plugin. ', 'foodpress' ). '</p>'\r\n\r\n\t) );\r\n\r\n\r\n\r\n\r\n\t$screen->set_help_sidebar(\r\n\t\t'<p><strong>' . __( 'For more information:', 'foodpress' ) . '</strong></p>' .\r\n\t\t'<p><a href=\"http://demo.myfoodpress.com/\" target=\"_blank\">' . __( 'foodpress Demo', 'foodpress' ) . '</a></p>' .\r\n\t\t\r\n\t\t'<p><a href=\"http://demo.myfoodpress.com/documentation/\" target=\"_blank\">' . __( 'Documentation', 'foodpress' ) . '</a></p>'.\r\n\t\t'<p><a href=\"https://foodpressplugin.freshdesk.com/support/home/\" target=\"_blank\">' . __( 'Support', 'foodpress' ) . '</a></p>'\r\n\t);\r\n}",
"public function help() {\n $screen = get_current_screen();\n SwpmFbUtils::help($screen);\n }",
"public function setHelpTabs() {\n $this->args['help_tabs'][] = array(\n 'id' => 'redux-help-tab-1',\n 'title' => __( 'Theme Information 1', 'slova' ),\n 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'slova' )\n );\n\n $this->args['help_tabs'][] = array(\n 'id' => 'redux-help-tab-2',\n 'title' => __( 'Theme Information 2', 'slova' ),\n 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'slova' )\n );\n\n // Set the help sidebar\n $this->args['help_sidebar'] = __( '<p>This is the sidebar content, HTML is allowed.</p>', 'slova' );\n }",
"public function get_help_tabs()\n {\n }",
"public function uninstall() {\n\t\tdelete_option('hotlink-no-more');\n\t}",
"function add_contextual_help($screen, $help)\n {\n }",
"public static function render_help() {\n\n // Grab the current screen\n $screen = get_current_screen();\n\n }",
"public static function add_help_tab() {\n\t\tif ( ! function_exists( 'wc_get_screen_ids' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$screen = get_current_screen();\n\n\t\tif ( ! $screen || ! in_array( $screen->id, wc_get_screen_ids(), true ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remove the old help tab if it exists.\n\t\t$help_tabs = $screen->get_help_tabs();\n\t\tforeach ( $help_tabs as $help_tab ) {\n\t\t\tif ( 'woocommerce_onboard_tab' !== $help_tab['id'] ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$screen->remove_help_tab( 'woocommerce_onboard_tab' );\n\t\t}\n\n\t\t// Add the new help tab.\n\t\t$help_tab = array(\n\t\t\t'title' => __( 'Setup wizard', 'woocommerce' ),\n\t\t\t'id' => 'woocommerce_onboard_tab',\n\t\t);\n\n\t\t$task_list_hidden = get_option( 'woocommerce_task_list_hidden', 'no' );\n\n\t\t$help_tab['content'] = '<h2>' . __( 'WooCommerce Onboarding', 'woocommerce' ) . '</h2>';\n\n\t\t$help_tab['content'] .= '<h3>' . __( 'Profile Setup Wizard', 'woocommerce' ) . '</h3>';\n\t\t$help_tab['content'] .= '<p>' . __( 'If you need to access the setup wizard again, please click on the button below.', 'woocommerce' ) . '</p>' .\n\t\t\t'<p><a href=\"' . wc_admin_url( '&path=/setup-wizard' ) . '\" class=\"button button-primary\">' . __( 'Setup wizard', 'woocommerce' ) . '</a></p>';\n\n\t\t$help_tab['content'] .= '<h3>' . __( 'Task List', 'woocommerce' ) . '</h3>';\n\t\t$help_tab['content'] .= '<p>' . __( 'If you need to enable or disable the task list, please click on the button below.', 'woocommerce' ) . '</p>' .\n\t\t( 'yes' === $task_list_hidden\n\t\t\t? '<p><a href=\"' . wc_admin_url( '&reset_task_list=1' ) . '\" class=\"button button-primary\">' . __( 'Enable', 'woocommerce' ) . '</a></p>'\n\t\t\t: '<p><a href=\"' . wc_admin_url( '&reset_task_list=0' ) . '\" class=\"button button-primary\">' . __( 'Disable', 'woocommerce' ) . '</a></p>'\n\t\t);\n\n\t\tif ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {\n\t\t\t$help_tab['content'] .= '<h3>' . __( 'Calypso / WordPress.com', 'woocommerce' ) . '</h3>';\n\t\t\tif ( class_exists( 'Jetpack' ) ) {\n\t\t\t\t$help_tab['content'] .= '<p>' . __( 'Quickly access the Jetpack connection flow in Calypso.', 'woocommerce' ) . '</p>';\n\t\t\t\t$help_tab['content'] .= '<p><a href=\"' . wc_admin_url( '&test_wc_jetpack_connect=1' ) . '\" class=\"button button-primary\">' . __( 'Connect', 'woocommerce' ) . '</a></p>';\n\t\t\t}\n\n\t\t\t$help_tab['content'] .= '<p>' . __( 'Quickly access the WooCommerce.com connection flow in Calypso.', 'woocommerce' ) . '</p>';\n\t\t\t$help_tab['content'] .= '<p><a href=\"' . wc_admin_url( '&test_wc_helper_connect=1' ) . '\" class=\"button button-primary\">' . __( 'Connect', 'woocommerce' ) . '</a></p>';\n\t\t}\n\n\t\t$screen->add_help_tab( $help_tab );\n\t}",
"public function help(){\n\t\t$screen = get_current_screen();\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/installing\" target=\"_blank\">' . __( 'Installing the Plugin', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/staying-updated\" target=\"_blank\">' . __( 'Staying Updated', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/glossary\" target=\"_blank\">' . __( 'Glossary', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-general-info',\n\t\t\t'title' => __( 'General Info', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-interface\" target=\"_blank\">' . __( 'Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-creating\" target=\"_blank\">' . __( 'Creating a New Form', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-sorting\" target=\"_blank\">' . __( 'Sorting Your Forms', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-building\" target=\"_blank\">' . __( 'Building Your Forms', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-forms',\n\t\t\t'title' => __( 'Forms', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-interface\" target=\"_blank\">' . __( 'Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-managing\" target=\"_blank\">' . __( 'Managing Your Entries', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-searching-filtering\" target=\"_blank\">' . __( 'Searching and Filtering Your Entries', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-entries',\n\t\t\t'title' => __( 'Entries', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/email-design\" target=\"_blank\">' . __( 'Email Design Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/analytics\" target=\"_blank\">' . __( 'Analytics Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-email-analytics',\n\t\t\t'title' => __( 'Email Design & Analytics', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/import\" target=\"_blank\">' . __( 'Import Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/export\" target=\"_blank\">' . __( 'Export Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-import-export',\n\t\t\t'title' => __( 'Import & Export', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/conditional-logic\" target=\"_blank\">' . __( 'Conditional Logic', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/templating\" target=\"_blank\">' . __( 'Templating', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/custom-capabilities\" target=\"_blank\">' . __( 'Custom Capabilities', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/hooks\" target=\"_blank\">' . __( 'Filters and Actions', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-advanced',\n\t\t\t'title' => __( 'Advanced Topics', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<p>' . __( '<strong>Always load CSS</strong> - Force Visual Form Builder Pro CSS to load on every page. Will override \"Disable CSS\" option, if selected.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable CSS</strong> - Disable CSS output for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable Email</strong> - Disable emails from sending for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable Notifications Email</strong> - Disable notification emails from sending for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Skip Empty Fields in Email</strong> - Fields that have no data will not be displayed in the email.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable saving new entry</strong> - Disable new entries from being saved.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable saving entry IP address</strong> - An entry will be saved, but the IP address will be removed.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Place Address labels above fields</strong> - The Address field labels will be placed above the inputs instead of below.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Remove default SPAM Verification</strong> - The default SPAM Verification question will be removed and only a submit button will be visible.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable meta tag version</strong> - Prevent the hidden Visual Form Builder Pro version number from printing in the source code.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Skip PayPal redirect if total is zero</strong> - If PayPal is configured, do not redirect if the total is zero.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Prepend Confirmation</strong> - Always display the form beneath the text confirmation after the form has been submitted.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Max Upload Size</strong> - Restrict the file upload size for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Sender Mail Header</strong> - Control the Sender attribute in the mail header. This is useful for certain server configurations that require an existing email on the domain to be used.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>reCAPTCHA Public Key</strong> - Required if \"Use reCAPTCHA\" option is selected in the Secret field.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>reCAPTCHA Private Key</strong> - Required if \"Use reCAPTCHA\" option is selected in the Secret field.', 'visual-form-builder-pro' ) . '</p>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-settings',\n\t\t\t'title' => __( 'Settings', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t}",
"public function create_help_screen() {\n\t\t$this->admin_screen = WP_Screen::get( $this->admin_page );\n\n\t\t$this->admin_screen->add_help_tab(\n\t\t\tarray(\n\t\t\t\t'title' => 'Annotation Guide',\n\t\t\t\t'id' => 'annotation_tab',\n\t\t\t\t'content' => '<p>Drag the mouse and draw a rectangle around the object and the click save.</p>',\n\t\t\t\t'callback' => false\n\t\t\t)\n\t\t);\n\t}",
"function get_site_screen_help_tab_args()\n {\n }",
"function shift_admin_menu_cleanup() {\n remove_menu_page( 'edit.php' );\n remove_menu_page( 'edit-comments.php' );\n}",
"function add_theme_help()\n{\n add_menu_page('Theme Help', 'Theme Help', 'manage_options', 'theme-help', 'theme_help');\n}",
"public function htmleditorAction()\r\n {\r\n $this->_view->unsetMain();\r\n }",
"public static function deactivate() {\n delete_option('haa_admin_area');\n delete_option('haa_secret_key');\n\n unregister_setting('permalink', 'haa_admin_area');\n }",
"function lgm_theme_remove_tags_menu() {\n\t global $submenu;\n\t unset($submenu['edit.php'][16]);\n\t}",
"public function get_help_tab($id)\n {\n }",
"public function help_theme_page() {\n\n\t\t// Add to the about page.\n\t\t$screen = get_current_screen();\n\t\tif ( $screen->id != $this->theme_page ) {\n\t\t\treturn;\n\t\t}\n\t}",
"private function help_style_tabs() {\n $help_sidebar = $this->get_sidebar();\n\n $help_class = '';\n if ( ! $help_sidebar ) :\n $help_class .= ' no-sidebar';\n endif;\n\n // Time to render!\n ?>\n <div id=\"screen-meta\" class=\"tr-options metabox-prefs\">\n\n <div id=\"contextual-help-wrap\" class=\"<?php echo esc_attr( $help_class ); ?>\" >\n <div id=\"contextual-help-back\"></div>\n <div id=\"contextual-help-columns\">\n <div class=\"contextual-help-tabs\">\n <ul>\n <?php\n $class = ' class=\"active\"';\n $tabs = $this->get_tabs();\n foreach ( $tabs as $tab ) :\n $link_id = \"tab-link-{$tab['id']}\";\n $panel_id = (!empty($tab['url'])) ? $tab['url'] : \"#tab-panel-{$tab['id']}\";\n ?>\n <li id=\"<?php echo esc_attr( $link_id ); ?>\"<?php echo $class; ?>>\n <a href=\"<?php echo esc_url( \"$panel_id\" ); ?>\">\n <?php echo esc_html( $tab['title'] ); ?>\n </a>\n </li>\n <?php\n $class = '';\n endforeach;\n ?>\n </ul>\n </div>\n\n <?php if ( $help_sidebar ) : ?>\n <div class=\"contextual-help-sidebar\">\n <?php echo $help_sidebar; ?>\n </div>\n <?php endif; ?>\n\n <div class=\"contextual-help-tabs-wrap\">\n <?php\n $classes = 'help-tab-content active';\n foreach ( $tabs as $tab ):\n $panel_id = \"tab-panel-{$tab['id']}\";\n ?>\n\n <div id=\"<?php echo esc_attr( $panel_id ); ?>\" class=\"inside <?php echo $classes; ?>\">\n <?php\n // Print tab content.\n echo $tab['content'];\n\n // If it exists, fire tab callback.\n if ( ! empty( $tab['callback'] ) )\n call_user_func_array( $tab['callback'], array( $this, $tab ) );\n ?>\n </div>\n <?php\n $classes = 'help-tab-content';\n endforeach;\n ?>\n </div>\n </div>\n </div>\n </div>\n <?php\n }",
"function remove_admin_bar() {\n\tshow_admin_bar(false);\n}",
"public static function add_old_compat_help($screen, $help)\n {\n }",
"public function dashboard_page_mscr_intrusions() {\n\t\t// WordPress 3.3\n\t\tif ( function_exists( 'wp_suspend_cache_addition' ) ) {\n\t\t\t$args = array(\n\t\t\t\t'title' => 'Help',\n\t\t\t\t'id' => 'mscr_help',\n\t\t\t\t'content' => $this->get_contextual_help(),\n\t\t\t);\n\t\t\tget_current_screen()->add_help_tab( $args );\n\t\t}\n\t\t// WordPress 3.1 and later\n\t\telse if ( function_exists( 'get_current_screen' ) ) {\n\t\t\t// Add help to the intrusions list page\n\t\t\tadd_contextual_help( get_current_screen(), $this->get_contextual_help() );\n\t\t}\n\t}",
"function siteorigin_panels_add_help_tab($prefix) {\n\t$screen = get_current_screen();\n\tif(\n\t\t( $screen->base == 'post' && ( in_array( $screen->id, siteorigin_panels_setting( 'post-types' ) ) || $screen->id == '') )\n\t\t|| ($screen->id == 'appearance_page_so_panels_home_page')\n\t) {\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'panels-help-tab', //unique id for the tab\n\t\t\t'title' => __( 'Page Builder', 'positive-panels' ), //unique visible title for the tab\n\t\t\t'callback' => 'siteorigin_panels_add_help_tab_content'\n\t\t) );\n\t}\n}",
"function remove_meta_box($id, $screen, $context)\n {\n }",
"function woo_remove_product_tabs( $tabs ) {\n // unset( $tabs['reviews'] ); \t\t\t// Remove the reviews tab\n unset( $tabs['additional_information'] ); \t// Remove the additional information tab\n\n return $tabs;\n}",
"function remove_tab($tabs){\n unset($tabs['general']);\n unset($tabs['shipping']);\n //unset($tabs['inventory']); // it is to remove inventory tab\n unset($tabs['advanced']); // it is to remove advanced tab\n unset($tabs['linked_product']); // it is to remove linked_product tab\n //unset($tabs['attribute']); // it is to remove attribute tab\n //unset($tabs['variations']); // it is to remove variations tab\n return($tabs);\n}",
"protected function renderHelp() {}",
"public function remove_admin_bar_item() {\n\t\tglobal $wp_admin_bar;\n\n\t\tif ( is_tax( 'ctrs-groups' ) ) {\n\t\t\t$wp_admin_bar->remove_menu( 'edit' );\n\t\t}\n\t}",
"function remove_demo() {\n\n // Used to hide the demo mode link from the plugin page. Only used when Redux is a plugin.\n if ( class_exists( 'ReduxFrameworkPlugin' ) ) {\n remove_filter( 'plugin_row_meta', array(\n ReduxFrameworkPlugin::instance(),\n 'plugin_metalinks'\n ), null, 2 );\n\n // Used to hide the activation notice informing users of the demo panel. Only used when Redux is a plugin.\n remove_action( 'admin_notices', array( ReduxFrameworkPlugin::instance(), 'admin_notices' ) );\n }\n }",
"function remove_demo() {\n\n // Used to hide the demo mode link from the plugin page. Only used when Redux is a plugin.\n if ( class_exists( 'ReduxFrameworkPlugin' ) ) {\n remove_filter( 'plugin_row_meta', array(\n ReduxFrameworkPlugin::instance(),\n 'plugin_metalinks'\n ), null, 2 );\n\n // Used to hide the activation notice informing users of the demo panel. Only used when Redux is a plugin.\n remove_action( 'admin_notices', array( ReduxFrameworkPlugin::instance(), 'admin_notices' ) );\n }\n }",
"function remove_admin_bar_options() {\n global $wp_admin_bar;\n\n $wp_admin_bar->remove_menu('wp-logo');\n\t$wp_admin_bar->remove_menu('comments');\n\t$wp_admin_bar->remove_menu('updates');\n $wp_admin_bar->remove_menu('new-content');\n $wp_admin_bar->remove_menu('wpseo-menu');\n}",
"public function makeHelpButton() {}",
"function remove_editor_menu() {\n remove_action('admin_menu', '_add_themes_utility_last', 101);\n}",
"protected function getQuickHelp() {\r\n $strOldAction = $this->getAction();\r\n $this->setAction($this->strOriginalAction);\r\n $strQuickhelp = parent::getQuickHelp();\r\n $this->setAction($strOldAction);\r\n return $strQuickhelp;\r\n }",
"function remove_demo() {\n\n // Used to hide the demo mode link from the plugin page. Only used when Redux is a plugin.\n if (class_exists('ReduxFrameworkPlugin')) {\n remove_filter('plugin_row_meta', array(ReduxFrameworkPlugin::instance(), 'plugin_metalinks'), null, 2);\n\n // Used to hide the activation notice informing users of the demo panel. Only used when Redux is a plugin.\n remove_action('admin_notices', array(ReduxFrameworkPlugin::instance(), 'admin_notices'));\n }\n }",
"public function remove_admin_bar_items() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu(\"comments\");\n }",
"public static function removeTabs(\\Elgg\\Hook $hook) {\n\t\t\n\t\t/* @var $return \\Elgg\\Menu\\MenuItems */\n\t\t$return = $hook->getValue();\n\t\t\n\t\t$remove_items = [\n\t\t\t'newest',\n\t\t\t'popular',\n\t\t\t'alpha',\n\t\t];\n\t\tforeach ($remove_items as $name) {\n\t\t\t$return->remove($name);\n\t\t}\n\t\t\n\t\treturn $return;\n\t}",
"function remove_quick_edit( $actions ) {\r\n\t\tunset($actions['inline hide-if-no-js']);\r\n\t\treturn $actions;\r\n\t}",
"public function admin_head() {\n\t \t\t// Remove the fake Settings submenu\n\t \t\tremove_submenu_page( 'options-general.php', 'wc_talks' );\n\n\t \t\t//Generate help if one is available for the current screen\n\t \t\tif ( wct_is_admin() || ! empty( $this->is_plugin_settings ) ) {\n\n\t \t\t\t$screen = get_current_screen();\n\n\t \t\t\tif ( ! empty( $screen->id ) && ! $screen->get_help_tabs() ) {\n\t \t\t\t\t$help_tabs_list = $this->get_help_tabs( $screen->id );\n\n\t \t\t\t\tif ( ! empty( $help_tabs_list ) ) {\n\t \t\t\t\t\t// Loop through tabs\n\t \t\t\t\t\tforeach ( $help_tabs_list as $key => $help_tabs ) {\n\t \t\t\t\t\t\t// Make sure types are a screen method\n\t \t\t\t\t\t\tif ( ! in_array( $key, array( 'add_help_tab', 'set_help_sidebar' ) ) ) {\n\t \t\t\t\t\t\t\tcontinue;\n\t \t\t\t\t\t\t}\n\n\t \t\t\t\t\t\tforeach ( $help_tabs as $help_tab ) {\n\t \t\t\t\t\t\t\t$content = '';\n\n\t \t\t\t\t\t\t\tif ( empty( $help_tab['content'] ) || ! is_array( $help_tab['content'] ) ) {\n\t \t\t\t\t\t\t\t\tcontinue;\n\t \t\t\t\t\t\t\t}\n\n\t \t\t\t\t\t\t\tif ( ! empty( $help_tab['strong'] ) ) {\n\t \t\t\t\t\t\t\t\t$content .= '<p><strong>' . $help_tab['strong'] . '</strong></p>';\n\t \t\t\t\t\t\t\t}\n\n\t \t\t\t\t\t\t\tforeach ( $help_tab['content'] as $tab_content ) {\n\t\t\t\t\t\t\t\t\tif ( is_array( $tab_content ) ) {\n\t\t\t\t\t\t\t\t\t\t$content .= '<ul><li>' . join( '</li><li>', $tab_content ) . '</li></ul>';\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$content .= '<p>' . $tab_content . '</p>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$help_tab['content'] = $content;\n\n\t \t\t\t\t\t\t\tif ( 'add_help_tab' == $key ) {\n\t \t\t\t\t\t\t\t\t$screen->add_help_tab( $help_tab );\n\t \t\t\t\t\t\t\t} else {\n\t \t\t\t\t\t\t\t\t$screen->set_help_sidebar( $content );\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t}\n\t \t\t\t\t\t}\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t}\n\n\t \t\t// Add some css\n\t\t\t?>\n\n\t\t\t<style type=\"text/css\" media=\"screen\">\n\t\t\t/*<![CDATA[*/\n\n\t\t\t\t/* Bubble style for Main Post type menu */\n\t\t\t\t#adminmenu .wp-menu-open.menu-icon-<?php echo $this->post_type?> .awaiting-mod {\n\t\t\t\t\tbackground-color: #2ea2cc;\n\t\t\t\t\tcolor: #fff;\n\t\t\t\t}\n\n\t\t\t\t#wordcamp-talks-csv span.dashicons-media-spreadsheet {\n\t\t\t\t\tvertical-align: text-bottom;\n\t\t\t\t}\n\n\t\t\t\t<?php if ( wct_is_admin() && ! wct_is_rating_disabled() ) : ?>\n\t\t\t\t\t/* Rating stars in screen options and in talks WP List Table */\n\t\t\t\t\t.metabox-prefs .talk-rating-bubble:before,\n\t\t\t\t\tth .talk-rating-bubble:before {\n\t\t\t\t\t\tfont: normal 20px/.5 'dashicons';\n\t\t\t\t\t\tspeak: none;\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t\ttop: 4px;\n\t\t\t\t\t\tleft: -4px;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tvertical-align: top;\n\t\t\t\t\t\t-webkit-font-smoothing: antialiased;\n\t\t\t\t\t\t-moz-osx-font-smoothing: grayscale;\n\t\t\t\t\t\ttext-decoration: none !important;\n\t\t\t\t\t\tcolor: #444;\n\t\t\t\t\t}\n\n\t\t\t\t\tth .talk-rating-bubble:before,\n\t\t\t\t\t.metabox-prefs .talk-rating-bubble:before {\n\t\t\t\t\t\tcontent: '\\f155';\n\t\t\t\t\t}\n\n\t\t\t\t\t.metabox-prefs .talk-rating-bubble:before {\n\t\t\t\t\t\tvertical-align: baseline;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Rates management */\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\tlist-style: none;\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li {\n\t\t\t\t\t\tlist-style: none;\n\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tpadding:15px 0;\n\t\t\t\t\t\tborder-bottom:dotted 1px #ccc;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li:last-child {\n\t\t\t\t\t\tborder:none;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-star {\n\t\t\t\t\t\tfloat:left;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-star {\n\t\t\t\t\t\twidth:20%;\n\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users {\n\t\t\t\t\t\tmargin-left: 20%;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users span.user-rated {\n\t\t\t\t\t\tdisplay:inline-block;\n\t\t\t\t\t\tmargin:5px;\n\t\t\t\t\t\tpadding:5px;\n\t\t\t\t\t\t-webkit-box-shadow: 0 1px 1px 1px rgba(0,0,0,0.1);\n\t\t\t\t\t\tbox-shadow: 0 1px 1px 1px rgba(0,0,0,0.1);\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users a.del-rate {\n\t\t\t\t\t\ttext-decoration: none;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users a.del-rate div {\n\t\t\t\t\t\tvertical-align: baseline;\n\t\t\t\t\t}\n\t\t\t\t<?php endif; ?>\n\n\t\t\t/*]]>*/\n\t\t\t</style>\n\t\t\t<?php\n\t\t}",
"public static function hide_screen_options() {\n if (!is_admin())\n add_filter('screen_options_show_screen', 'remove_screen_options');\n }",
"function cpt_remove_demo() {\n\n // Used to hide the demo mode link from the plugin page. Only used when Redux is a plugin.\n if (class_exists('ReduxFrameworkPlugin')) {\n remove_filter('plugin_row_meta', array(ReduxFrameworkPlugin::instance(), 'plugin_metalinks'), null, 2);\n\n // Used to hide the activation notice informing users of the demo panel. Only used when Redux is a plugin.\n remove_action('admin_notices', array(ReduxFrameworkPlugin::instance(), 'admin_notices'));\n }\n }",
"function fgallery_plugin_help($contextual_help, $screen_id, $screen) {\n if ($screen_id == 'toplevel_page_fgallery' || $screen_id == '1-flash-gallery_page_fgallery_add'\n || $screen_id == '1-flash-gallery_page_fgallery_add' || $screen_id == '1-flash-gallery_page_fgallery_images'\n || $screen_id == '1-flash-gallery_page_fgallery_upload') {\n $contextual_help = '<p><a href=\"http://1plugin.com/faq\" target=\"_blank\">'.__('FAQ').'</a></p>';\n }\n return $contextual_help;\n}",
"function helps()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['helps'] == 1 ) ? 'Help File' : 'Help Files';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'removed' : 'created';\n\t\t$helpkeys = array();\n\t\t\n\t\tforeach ( $this->xml_array['helps_group']['help'] as $k => $v )\n\t\t{\n\t\t\t$helpkeys[] = \"'{$v['title']['VALUE']}'\";\n\t\t}\n\t\t\n\t\t$this->ipsclass->DB->do_delete( 'faq', \"title IN (\".implode( \",\", $helpkeys ).\")\" );\n\t\t\n\t\tif ( !$this->ipsclass->input['un'] )\n\t\t{\n\t\t\tforeach ( $this->xml_array['helps_group']['help'] as $k => $v )\n\t\t\t{\n\t\t\t\t$this->_add_help( $v );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&code=work&mod={$this->ipsclass->input['mod']}&step={$this->ipsclass->input['step']}{$uninstall}{$group}&st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['helps']} {$object} {$operation}....\" );\n\t}",
"function hook_uninstall() {\r\n\t\tupdate_options('foliamaptool', '');\r\n\t}",
"function wpvideocoach_hide_help_tabs() {\r\n\tglobal $wpvideocoach_help_tabs;\r\n\tif($wpvideocoach_help_tabs == 1){\r\n\t\techo \"checked='checked'\";\r\n\t}\r\n}",
"function siteorigin_panels_add_help_tab_content(){\n\tinclude 'tpl/help.php';\n}",
"public function hideMoveToTechPanel()\n\t{\n\t\t$this->ConfirmMoveToTechWindow->Display = \"None\";\n\t}",
"public function helpAction() {}",
"function my_contextual_help($contexual_help, $screen_id, $screen) {\n\tif('listing' == $screen->id) {\n\t\t$contextual_help = '<h2>Listings</h2>\n\t\t<p>Listings show the details of the items that we sell on the website. You can see a list of them on this page in reverse chronological order - the latest one we added is first.</p>\n\t\t<p>You can view/edit the details of each product by clicking on its name, or you can perform bulk actions using the dropdown menu and selecting multiple items.</p>';\n\t}elseif('edit-listing' == $screen->id) {\n\t\t$contextual_help = '<h2>Editing listings</h2>\n\t\t<p>This page allows you to view/modify listing details. Please make sure to fill out the available boxes with the appropriate details (listing image, price, brand) and <strong>not</strong> add these details to the listing description.</p>';\n\t}\n\treturn $contextual_help;\n}",
"public function testHelpUnexisting(): void\n {\n // setup\n $this->setCommand([\n 'help',\n 'unexpected'\n ]);\n\n // test body\n $commandLineOutput = $this->testBody();\n\n // assertions\n $this->validateOutput($commandLineOutput, [\n 'Usage: mezon <verb> <entity> [<options>]',\n 'Verbs:',\n 'Entities:'\n ]);\n }",
"function theme_remove_admin_bar() {\r\n\treturn false;\r\n}",
"function remove_woocommerce_setting_tabs( $tabs ) {\n $tabs_to_hide = array(\n 'Tax',\n 'Shipping',\n 'Products',\n 'Checkout',\n //'Emails',\n 'API',\n 'Accounts',\n );\n \n // Get the current user\n $user = wp_get_current_user();\n\n // Remove the tabs we want to hide\n $tabs = array_diff($tabs, $tabs_to_hide);\n\n return $tabs;\n}",
"public function get_help_tabs( $screen_id = '' ) {\n\t\t\t// Help urls\n\t\t\t$plugin_forum = '<a href=\"http://wordpress.org/support/plugin/wordcamp-talks\">';\n\t\t\t$help_tabs = false;\n\t\t\t$nav_menu_page = '<a href=\"' . esc_url( admin_url( 'nav-menus.php' ) ) . '\">';\n\t\t\t$widgets_page = '<a href=\"' . esc_url( admin_url( 'widgets.php' ) ) . '\">';\n\n\t\t\t/**\n\t\t\t * @param array associative array to list the help tabs\n\t\t\t */\n\t\t\t$help = array(\n\t\t\t\t'edit-talks' => array(\n\t\t\t\t\t'add_help_tab' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'edit-talks-overview',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Overview', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'This screen provides access to all the talks users of your site shared. You can customize the display of this screen to suit your workflow.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'You can customize the display of this screen's contents in a number of ways:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\tesc_html__( 'You can hide/display columns based on your needs and decide how many talks to list per screen using the Screen Options tab.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'You can filter the list of talks by post status using the text links in the upper left to show All, Published, Private or Trashed talks. The default view is to show all talks.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'You can view talks in a simple title list or with an excerpt. Choose the view you prefer by clicking on the icons at the top of the list on the right.', 'wordcamp-talks' ),\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\tarray(\n\t\t\t\t\t\t\t'id' => 'edit-talks-row-actions',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Actions', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'Hovering over a row in the talks list will display action links that allow you to manage an talk. You can perform the following actions:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\tesc_html__( 'Edit takes you to the editing screen for that talk. You can also reach that screen by clicking on the talk title.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'Trash removes the talk from this list and places it in the trash, from which you can permanently delete it.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'View opens the talk in the WordCamp Talks's part of your site.', 'wordcamp-talks' ),\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\tarray(\n\t\t\t\t\t\t\t'id' => 'edit-talks-bulk-actions',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Bulk Actions', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'You can also move multiple talks to the trash at once. Select the talks you want to trash using the checkboxes, then select the "Move to Trash" action from the Bulk Actions menu and click Apply.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'edit-talks-sort-filter',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Sorting & filtering', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'Clicking on specific column headers will sort the talks list. You can sort the talks alphabetically using the Title column header or by popularity:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\tesc_html__( 'Click on the column header having a dialog buble icon to sort by number of comments.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'Click on the column header having a star icon to sort by rating.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tesc_html__( 'Inside the rows, you can filter the talks by categories or tags clicking on the corresponding terms.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'talks' => array(\n\t\t\t\t\t'add_help_tab' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'talks-overview',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Overview', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'The title field and the big Talk Editing Area are fixed in place, but you can reposition all the other boxes using drag and drop. You can also minimize or expand them by clicking the title bar of each box. Use the Screen Options tab to hide/show boxes.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'settings_page_wc_talks' => array(\n\t\t\t\t\t'add_help_tab' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'settings-overview',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Overview', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'This is the place where you can customize the behavior of WordCamp Talks.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'Please see the additional help tabs for more information on each individual section.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'settings-main',\n\t\t\t\t\t\t'title' => esc_html__( 'Main Settings', 'wordcamp-talks' ),\n\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\tsprintf( esc_html__( 'Just before the first option, you will find the link to the main archive page of the plugin. If you wish, you can use it to define a new custom link %1$smenu item%2$s.', 'wordcamp-talks' ), $nav_menu_page, '</a>' ),\n\t\t\t\t\t\t\tsprintf( esc_html__( 'If you do so, do not forget to update the link in case you change your permalink settings. Another possible option is to use the %1$sWordCamp Talks Navigation%2$s widget in one of your dynamic sidebars.', 'wordcamp-talks' ), $widgets_page, '</a>' ),\n\t\t\t\t\t\t\tesc_html__( 'In the Main Settings you have a number of options:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\tesc_html__( 'WordCamp Talks archive page: you can customize the title of this page. It will appear on every WordCamp Talks's page, except the single talk one.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'New talks status: this is the default status to apply to the talks submitted by the user. If this setting is set to "Pending", it will be possible to edit the moderation message once this setting has been saved.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'Moderation message: if New talks status is defined to Pending, it is the place to customize the awaiting moderation message the user will see once he submited his talk.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'Not logged in message: if a user reaches the WordCamp Talks's front end submit form without being logged in, a message will invite him to do so. If you wish to use a custom message, use this setting.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'Rating stars hover captions: fill a comma separated list of captions to replace default one. On front end, the number of rating stars will depend on the number of comma separated captions you defined in this setting.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'Talk comments: if on, comments about talks will be separated from other post types comments and you will be able to moderate comments about talks from the comments submenu of the WordCamp Talks's main Administration menu. If you uncheck this setting, talks comments will be mixed up with other post types comments into the main Comments Administration menu', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'Comments: you can completely disable commenting about talks by activating this option', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'edit-category-talks' => array(\n\t\t\t\t\t'add_help_tab' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'talks-category-overview',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Overview', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'Talk Categories can only be created by the site Administrator. To add a new talk category please fill the following fields:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\tesc_html__( 'Name - The name is how it appears on your site (in the category checkboxes of the talk front end submit form, in the talk's footer part or in the title of WordCamp Talks's category archive pages).', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'Slug - The "slug" is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'Description - If you set a description for your category, it will be displayed over the list of talks in the category archive page.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tesc_html__( 'You can change the display of this screen using the Screen Options tab to set how many items are displayed per screen and to display/hide columns in the table.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'edit-tag-talks' => array(\n\t\t\t\t\t'add_help_tab' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'talks-tag-overview',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Overview', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'Talk Tags can be created by any logged in user of the site from the talk front end submit form. From this screen, to add a new talk tag please fill the following fields:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\tesc_html__( 'Name - The name is how it appears on your site (in the tag cloud, in the tags editor of the talk front end submit form, in the talk's footer part or in the title of WordCamp Talks's tag archive pages).', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'Slug - The "slug" is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'Description - If you set a description for your tag, it will be displayed over the list of talks in the tag archive page.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tesc_html__( 'You can change the display of this screen using the Screen Options tab to set how many items are displayed per screen and to display/hide columns in the table.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * @param array $help associative array to list the help tabs\n\t\t\t */\n\t\t\t$help = apply_filters( 'wct_get_help_tabs', $help );\n\n\t\t\tif ( ! empty( $help[ $screen_id ] ) ) {\n\t\t\t\t$help_tabs = array_merge( $help[ $screen_id ], array(\n\t\t\t\t\t'set_help_sidebar' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'strong' => esc_html__( 'For more information:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tsprintf( esc_html_x( '%1$sSupport Forums (en)%2$s', 'help tab links', 'wordcamp-talks' ), $plugin_forum, '</a>' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t) );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @param array $help associative array to list the help tabs\n\t\t\t */\n\t\t\t$help = apply_filters( 'wct_get_help_tabs', $help );\n\n\t\t\tif ( ! empty( $help[ $screen_id ] ) ) {\n\t\t\t\t$help_tabs = array_merge( $help[ $screen_id ], array(\n\t\t\t\t\t'set_help_sidebar' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'strong' => esc_html__( 'For more information:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tsprintf( esc_html_x( '%1$sSupport Forums (en)%2$s', 'help tab links', 'wordcamp-talks' ), $plugin_forum, '</a>' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t) );\n\t\t\t}\n\n\t\t\treturn $help_tabs;\n\t\t}",
"public function get_help_sidebar()\n {\n }",
"function remove($options='') {\n $sql = array();\n\n\tdolibarr_set_const($this->db,'MAIN_THEME','eldy');\n\tdolibarr_set_const($this->db,'MAIN_MENU_INVERT',0);\n\t\n\tdolibarr_del_const($this->db,'MAIN_MENU_STANDARD_FORCED');\n\tdolibarr_del_const($this->db,'MAIN_MENUFRONT_STANDARD_FORCED');\n\tdolibarr_del_const($this->db,'MAIN_MENU_SMARTPHONE_FORCED');\n\tdolibarr_del_const($this->db,'MAIN_MENUFRONT_SMARTPHONE_FORCED');\n\t\t\n return $this->_remove($sql, $options);\n }",
"function gtags_remove_tags_from_admin_bar() {\n\tglobal $bp;\n\tunset ( $bp->bp_options_nav['groups']['98564'] );\n}",
"function pilkie_remove_admin_menu () {\n\tremove_menu_page('edit-comments.php');\n\tremove_menu_page('edit.php');\n}",
"function dashboard_tweaks() {\n\tglobal $wp_admin_bar;\n\t$wp_admin_bar->remove_menu('comments');\n\t$wp_admin_bar->remove_menu('about');\n\t$wp_admin_bar->remove_menu('wporg');\n\t$wp_admin_bar->remove_menu('documentation');\n\t$wp_admin_bar->remove_menu('support-forums');\n\t$wp_admin_bar->remove_menu('feedback');\n\t$wp_admin_bar->remove_menu('view-site');\n\t$wp_admin_bar->remove_menu('new-content');\n\t$wp_admin_bar->remove_menu('customize');\n\t$wp_admin_bar->remove_menu('search'); \n}",
"public function removeAction()\n {\n Zend_Controller_Action_HelperBroker::removeHelper('Layout');\n $this->view->id = $this->_getParam(\"id\");\n }",
"function kadence_remove_demo() {\n if ( class_exists( 'ReduxFrameworkPlugin' ) ) {\n remove_filter( 'plugin_row_meta', array(\n ReduxFrameworkPlugin::instance(),\n 'plugin_metalinks'\n ), null, 2 );\n\n // Used to hide the activation notice informing users of the demo panel. Only used when Redux is a plugin.\n remove_action( 'admin_notices', array( ReduxFrameworkPlugin::instance(), 'admin_notices' ) );\n }\n }",
"public static function end_help()\n\t{\n\t\treturn <<<HTML\n\t</div>\n</div>\nHTML;\n\t}",
"function remove_yoast_seo_admin_bar() {\n\tglobal $wp_admin_bar;\n\t$wp_admin_bar->remove_menu('wpseo-menu');\n}",
"abstract public function displayHelp();",
"function my_admin_bar_remove_menu() {\n\tglobal $wp_admin_bar;\n\tif (!current_user_can('manage_options')) {\n\t\t$wp_admin_bar->remove_menu('new-post');\n\t\t$wp_admin_bar->remove_menu('new-media');\n\t\t$wp_admin_bar->remove_menu('new-page');\n\t\t$wp_admin_bar->remove_menu('comments');\n\t\t$wp_admin_bar->remove_menu('wporg');\n \t$wp_admin_bar->remove_menu('documentation');\n \t$wp_admin_bar->remove_menu('support-forums');\n \t$wp_admin_bar->remove_menu('feedback');\n \t$wp_admin_bar->remove_menu('wp-logo');\n \t$wp_admin_bar->remove_menu('view-site');\n\t}\n}",
"function fes_remove_posts_admin_bar() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('new-post');\n}",
"public function deactivate()\n {\n $this->setTheme(null);\n $this->removeSymlink();\n }",
"function clean_admin_bar() {\n global $wp_admin_bar;\n /* Remove their stuff */\n $wp_admin_bar->remove_menu('wp-logo');\n $wp_admin_bar->remove_menu( 'about' ); // Remove the about WordPress link\n $wp_admin_bar->remove_menu( 'wporg' ); // Remove the WordPress.org link\n $wp_admin_bar->remove_menu( 'documentation' ); // Remove the WordPress documentation link\n $wp_admin_bar->remove_menu( 'support-forums' ); // Remove the support forums link\n $wp_admin_bar->remove_menu( 'feedback' ); // Remove the feedback link\n $wp_admin_bar->remove_menu( 'updates' ); // Remove the updates link\n $wp_admin_bar->remove_menu( 'comments' ); // Remove the comments link\n}",
"public function removeFromWelcomeScreen(Template $template)\n {\n if ('be_welcome' !== $template->getName()) {\n return;\n }\n\n $template->versions = array_filter(\n $template->versions,\n function ($version) {\n return !\\in_array($version['fromTable'], static::$hiddenTables, true);\n }\n );\n }",
"function custom_remove() { \n remove_meta_box('add-sfwd-certificates', 'nav-menus', 'side');\n remove_meta_box('add-sfwd-assignment', 'nav-menus', 'side'); \n}",
"function remove_thematic_blogtitle() {\n\n remove_action('thematic_header','thematic_blogtitle', 3);\n\n}",
"public function get_contextual_help() {\n\t\treturn '<p>' . __( 'Hovering over a row in the intrusions list will display action links that allow you to manage the intrusion. You can perform the following actions:', 'mute-screamer' ) . '</p>' .\n\t\t\t'<ul>' .\n\t\t\t'<li>' . __( 'Exclude automatically adds the item to the Exception fields list.', 'mute-screamer' ) . '</li>' .\n\t\t\t'<li>' . __( 'Delete permanently deletes the intrusion.', 'mute-screamer' ) . '</li>' .\n\t\t\t'</ul>';\n\t}",
"function woodstock_removeDemoModeLink() {\n if ( class_exists('ReduxFrameworkPlugin') ) {\n remove_filter( 'plugin_row_meta', array( ReduxFrameworkPlugin::get_instance(), 'plugin_metalinks'), null, 2 );\n }\n if ( class_exists('ReduxFrameworkPlugin') ) {\n remove_action('admin_notices', array( ReduxFrameworkPlugin::get_instance(), 'admin_notices' ) ); \n }\n }",
"function remove_admin() {\n\tremove_menu_page('link-manager.php');\n\tremove_menu_page('edit-comments.php');\n\tremove_menu_page('upload.php');\n}",
"function ren_help($mode = 1, $addtextfunc = \"addtext\", $helpfunc = \"help\")\n{\n return display_help(\"helpb\", $mode, $addtextfunc, $helpfunc = \"help\");\n}",
"public function getHelpSidbar()\n {\n $txt_title = __(\"Resources\", 'duplicator');\n $txt_home = __(\"Knowledge Base\", 'duplicator');\n $txt_guide = __(\"Full User Guide\", 'duplicator');\n $txt_faq = __(\"Technical FAQs\", 'duplicator');\n\t\t$txt_sets = __(\"Package Settings\", 'duplicator');\n $this->screen->set_help_sidebar(\n \"<div class='dup-screen-hlp-info'><b>{$txt_title}:</b> <br/>\"\n .\"<i class='fa fa-home'></i> <a href='https://snapcreek.com/duplicator/docs/' target='_sc-home'>{$txt_home}</a> <br/>\"\n .\"<i class='fa fa-book'></i> <a href='https://snapcreek.com/duplicator/docs/guide/' target='_sc-guide'>{$txt_guide}</a> <br/>\"\n .\"<i class='fa fa-file-code-o'></i> <a href='https://snapcreek.com/duplicator/docs/faqs-tech/' target='_sc-faq'>{$txt_faq}</a> <br/>\"\n\t\t\t.\"<i class='fa fa-gear'></i> <a href='admin.php?page=duplicator-settings&tab=package'>{$txt_sets}</a></div>\"\n );\n }",
"public function help_tab() {\n $export_url = $this->get_property_export_url();\n\n if ( !$export_url ) {\n return;\n }\n\n $export_url = $export_url . '&limit=10&format=xml';\n\n $this->get_template_part( 'admin/settings-help-export', array(\n 'export_url' => $export_url,\n ) );\n }",
"public function remove_screen_reader_content()\n {\n }",
"function top10_remove() {\r\n//delete_option('omekafeedpull_omekaroot');\r\n}",
"public function getHelp()\n {\n new Help('form');\n }",
"public function unset_legend() {\n $this->legend = null;\n }",
"function isf_remove_unused_menu_options() {\n\n\tremove_menu_page( 'edit.php' ); // Removes Posts.\n\tremove_menu_page( 'edit.php?post_type=page' ); // Removes Pages.\n\tremove_menu_page( 'edit-comments.php' ); // Removes Comments.\n\n}",
"public function remove() {\n remove_action( 'wp_head', 'print_emoji_detection_script', 7 );\n remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );\n remove_action( 'wp_print_styles', 'print_emoji_styles' );\n remove_action( 'admin_print_styles', 'print_emoji_styles' );\n }",
"function hello_world_remove() {\ndelete_option('ernaehrungsnews_anzahl');\ndelete_option('ernaehrungsnews_trimmer');\ndelete_option('ernaehrungsnews_kategorieId');\n\n}",
"function remove_theme_mods()\n {\n }",
"function cmh_delete_plugin_options() {\r\n\tdelete_option('cmh_options');\r\n}",
"function hide_developer(){\n\tadd_action( 'admin_menu', 'devhelper_remove_developer_options', 999 );\n}",
"function onUninstall(){\n\tdelete_option( 'stackoverflowUser' );\n\tdelete_option( 'StackoverflowData' );\n}",
"public function help() \n {\n if (!isset($_SESSION)) { \n session_start(); \n }\n $title = 'Aide';\n $customStyle = $this->setCustomStyle('help');\n require('../src/View/HelpView.php');\n }",
"function builder_set_help_sidebar() {\n\tob_start();\n\t\n?>\n<p><strong><?php _e( 'For more information:', 'it-l10n-Builder-Everett' ); ?></strong></p>\n<p><?php _e( '<a href=\"http://ithemes.com/forum/\" target=\"_blank\">Support Forum</a>' ); ?></p>\n<p><?php _e( '<a href=\"http://ithemes.com/codex/page/Builder\" target=\"_blank\">Codex</a>' ); ?></p>\n<?php\n\t\n\t$help = ob_get_contents();\n\tob_end_clean();\n\t\n\t$help = apply_filters( 'builder_filter_help_sidebar', $help );\n\t\n\tif ( ! empty( $help ) ) {\n\t\t$screen = get_current_screen();\n\t\t\n\t\tif ( is_callable( array( $screen, 'set_help_sidebar' ) ) )\n\t\t\t$screen->set_help_sidebar( $help );\n\t}\n}"
] | [
"0.7959784",
"0.7906398",
"0.75371873",
"0.63767254",
"0.6038886",
"0.60280806",
"0.6026473",
"0.59671885",
"0.5940667",
"0.57445705",
"0.5729235",
"0.568795",
"0.56050205",
"0.56028825",
"0.5562708",
"0.5561273",
"0.55612534",
"0.5453361",
"0.5436315",
"0.5431066",
"0.5407422",
"0.5356825",
"0.53518194",
"0.53189033",
"0.53155816",
"0.52428895",
"0.5237811",
"0.5230349",
"0.5225076",
"0.520459",
"0.5201376",
"0.51989144",
"0.51718116",
"0.5169955",
"0.51611215",
"0.51576036",
"0.5152214",
"0.51448923",
"0.51288474",
"0.5124578",
"0.5118575",
"0.5117075",
"0.5114058",
"0.50828916",
"0.50646126",
"0.5044394",
"0.50350344",
"0.503195",
"0.502876",
"0.5025546",
"0.5009575",
"0.500311",
"0.4993725",
"0.49812835",
"0.4978495",
"0.49775717",
"0.49726048",
"0.49708638",
"0.49696782",
"0.49690616",
"0.4962678",
"0.4960639",
"0.4957279",
"0.49347708",
"0.49237224",
"0.49195468",
"0.4919268",
"0.49190393",
"0.4916073",
"0.49078315",
"0.4905295",
"0.4905139",
"0.4903588",
"0.49021763",
"0.48996955",
"0.48927101",
"0.4892597",
"0.48885718",
"0.48875025",
"0.4883823",
"0.4881966",
"0.48783767",
"0.48738226",
"0.48719546",
"0.48713452",
"0.48704106",
"0.4868065",
"0.48626757",
"0.4862125",
"0.4861405",
"0.48608914",
"0.48575154",
"0.48562568",
"0.48556453",
"0.48555154",
"0.48443976",
"0.4842771",
"0.483254",
"0.48301908",
"0.4818915"
] | 0.5489316 | 17 |
Removes all help tabs from the contextual help for the screen. | public function remove_tabs() {
$this->_tabs = array();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function remove_help_tabs()\n {\n }",
"function admin_hide_help() { \n $screen = get_current_screen();\n $screen->remove_help_tabs();\n}",
"public function remove_help_tab($id)\n {\n }",
"public function clearExperts()\n\t{\n\t\t$this->collExperts = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function setup_help_tab()\n {\n }",
"public function help_tab(){\r\n $screen = get_current_screen();\r\n\r\n foreach($this->what_helps as $help_id => $tab) {\r\n $callback_name = $this->generate_callback_name($help_id);\r\n if(method_exists($this, 'help_'.$callback_name.'_callback')) {\r\n $callback = array($this, 'help_'.$callback_name.'_callback');\r\n }\r\n else {\r\n $callback = array($this, 'help_callback');\r\n }\r\n // documentation tab\r\n $screen->add_help_tab( array(\r\n 'id' => 'hw-help-'.$help_id,\r\n 'title' => __( $tab['title'] ),\r\n //'content' => \"<p>sdfsgdgdfghfhfgh</p>\",\r\n 'callback' => $callback\r\n )\r\n );\r\n }\r\n }",
"public function setHelpTabs() {\n $this->args['help_tabs'][] = array(\n 'id' => 'redux-help-tab-1',\n 'title' => __( 'Theme Information 1', 'slova' ),\n 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'slova' )\n );\n\n $this->args['help_tabs'][] = array(\n 'id' => 'redux-help-tab-2',\n 'title' => __( 'Theme Information 2', 'slova' ),\n 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'slova' )\n );\n\n // Set the help sidebar\n $this->args['help_sidebar'] = __( '<p>This is the sidebar content, HTML is allowed.</p>', 'slova' );\n }",
"public function get_help_tabs()\n {\n }",
"function dfcg_plugin_help() {\n\t\n\tglobal $current_screen;\n\t\n\t$sidebar = dfcg_help_sidebar();\n\t\n\t$current_screen->set_help_sidebar( $sidebar );\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-general',\n\t\t'title' => __( 'General info', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_general'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-theme',\n\t\t'title' => __( 'Theme integration', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_theme'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-quick',\n\t\t'title' => __( 'Quick Start', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_quick'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-gallery',\n\t\t'title' => __( 'Gallery Method', DFCG_DOMAIN ),\n\t\t'callback' => \"dfcg_help_gallery\"\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-images',\n\t\t'title' => __( 'Image Management', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_images'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-desc',\n\t\t'title' => __( 'Descriptions', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_desc'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-css',\n\t\t'title' => __( 'Gallery CSS', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_css'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-scripts',\n\t\t'title' => __( 'Load Scripts', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_scripts'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-troubleshooting',\n\t\t'title' => __( 'Troubleshooting', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_trouble'\n\t));\n}",
"public function help() {\n $screen = get_current_screen();\n SwpmFbUtils::help($screen);\n }",
"public function clearExpertCategorys()\n\t{\n\t\t$this->collExpertCategorys = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"function shift_admin_menu_cleanup() {\n remove_menu_page( 'edit.php' );\n remove_menu_page( 'edit-comments.php' );\n}",
"public function htmleditorAction()\r\n {\r\n $this->_view->unsetMain();\r\n }",
"public function uninstall() {\n\t\tdelete_option('hotlink-no-more');\n\t}",
"protected function unsetHiddenModules() {}",
"public function custom_help_tab() {\n\n\t\t\t$screen = get_current_screen();\n\n\t\t\t// Return early if we're not on the needed post type.\n\t\t\tif ( ( $this->object_type == 'post' && $this->object != $screen->post_type ) || \n\t\t\t\t ( $this->object_type == 'taxonomy' && $this->object != $screen->taxonomy ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Add the help tabs.\n\t\t\tforeach ( $this->args->help_tabs as $tab ) {\n\t\t\t\t$screen->add_help_tab( $tab );\n\t\t\t}\n\n\t\t\t// Add the help sidebar.\n\t\t\t$screen->set_help_sidebar( $this->args->help_sidebar );\n\t\t}",
"public function clearResources()\n {\n AM_Tools::clearContent($this->_getIssueHelpPage()->getThumbnailPresetType(), $this->_getIssueHelpPage()->id_issue);\n AM_Tools::clearResizerCache($this->_getIssueHelpPage()->getThumbnailPresetType(), $this->_getIssueHelpPage()->id_issue);\n }",
"public function dashboard_page_mscr_intrusions() {\n\t\t// WordPress 3.3\n\t\tif ( function_exists( 'wp_suspend_cache_addition' ) ) {\n\t\t\t$args = array(\n\t\t\t\t'title' => 'Help',\n\t\t\t\t'id' => 'mscr_help',\n\t\t\t\t'content' => $this->get_contextual_help(),\n\t\t\t);\n\t\t\tget_current_screen()->add_help_tab( $args );\n\t\t}\n\t\t// WordPress 3.1 and later\n\t\telse if ( function_exists( 'get_current_screen' ) ) {\n\t\t\t// Add help to the intrusions list page\n\t\t\tadd_contextual_help( get_current_screen(), $this->get_contextual_help() );\n\t\t}\n\t}",
"public function tear_down(): void {\n\t\tremove_action( 'wp_body_open', [ $this->instance, 'embed_web_stories' ] );\n\n\t\tremove_theme_support( 'web-stories' );\n\n\t\tdelete_option( Customizer::STORY_OPTION );\n\t\tupdate_option( 'stylesheet', $this->stylesheet );\n\n\t\tparent::tear_down();\n\t}",
"function dashboard_tweaks() {\n\tglobal $wp_admin_bar;\n\t$wp_admin_bar->remove_menu('comments');\n\t$wp_admin_bar->remove_menu('about');\n\t$wp_admin_bar->remove_menu('wporg');\n\t$wp_admin_bar->remove_menu('documentation');\n\t$wp_admin_bar->remove_menu('support-forums');\n\t$wp_admin_bar->remove_menu('feedback');\n\t$wp_admin_bar->remove_menu('view-site');\n\t$wp_admin_bar->remove_menu('new-content');\n\t$wp_admin_bar->remove_menu('customize');\n\t$wp_admin_bar->remove_menu('search'); \n}",
"function removeAllHiddenTabs()\r\n\t{\r\n\t\t$this->hidden_tab = array();\r\n\t}",
"function isf_remove_unused_menu_options() {\n\n\tremove_menu_page( 'edit.php' ); // Removes Posts.\n\tremove_menu_page( 'edit.php?post_type=page' ); // Removes Pages.\n\tremove_menu_page( 'edit-comments.php' ); // Removes Comments.\n\n}",
"function get_site_screen_help_tab_args()\n {\n }",
"public static function render_help() {\n\n // Grab the current screen\n $screen = get_current_screen();\n\n }",
"public static function hideHelpTab($memberid) {\r\n\t\t$result = self::$db->query('UPDATE sis2.member_options SET helptab=false WHERE memberid=$1',\r\n\t\t\t[$memberid]);\r\n\t}",
"function clean_admin_bar() {\n global $wp_admin_bar;\n /* Remove their stuff */\n $wp_admin_bar->remove_menu('wp-logo');\n $wp_admin_bar->remove_menu( 'about' ); // Remove the about WordPress link\n $wp_admin_bar->remove_menu( 'wporg' ); // Remove the WordPress.org link\n $wp_admin_bar->remove_menu( 'documentation' ); // Remove the WordPress documentation link\n $wp_admin_bar->remove_menu( 'support-forums' ); // Remove the support forums link\n $wp_admin_bar->remove_menu( 'feedback' ); // Remove the feedback link\n $wp_admin_bar->remove_menu( 'updates' ); // Remove the updates link\n $wp_admin_bar->remove_menu( 'comments' ); // Remove the comments link\n}",
"function add_contextual_help($screen, $help)\n {\n }",
"function remove_admin_bar_options() {\n global $wp_admin_bar;\n\n $wp_admin_bar->remove_menu('wp-logo');\n\t$wp_admin_bar->remove_menu('comments');\n\t$wp_admin_bar->remove_menu('updates');\n $wp_admin_bar->remove_menu('new-content');\n $wp_admin_bar->remove_menu('wpseo-menu');\n}",
"public static function getAllHelp()\n {\n return $this->_help;\n }",
"function d4tw_remove_sidebars () {\r\n\tunregister_sidebar( 'statichero' );\r\n\tunregister_sidebar( 'hero' );\r\n\tunregister_sidebar( 'footerfull' );\r\n\tunregister_sidebar( 'left-sidebar' );\r\n unregister_sidebar( 'right-sidebar' );\r\n unregister_sidebar( 'herocanvas' );\r\n}",
"public function help(){\n\t\t$screen = get_current_screen();\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/installing\" target=\"_blank\">' . __( 'Installing the Plugin', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/staying-updated\" target=\"_blank\">' . __( 'Staying Updated', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/glossary\" target=\"_blank\">' . __( 'Glossary', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-general-info',\n\t\t\t'title' => __( 'General Info', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-interface\" target=\"_blank\">' . __( 'Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-creating\" target=\"_blank\">' . __( 'Creating a New Form', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-sorting\" target=\"_blank\">' . __( 'Sorting Your Forms', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-building\" target=\"_blank\">' . __( 'Building Your Forms', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-forms',\n\t\t\t'title' => __( 'Forms', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-interface\" target=\"_blank\">' . __( 'Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-managing\" target=\"_blank\">' . __( 'Managing Your Entries', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-searching-filtering\" target=\"_blank\">' . __( 'Searching and Filtering Your Entries', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-entries',\n\t\t\t'title' => __( 'Entries', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/email-design\" target=\"_blank\">' . __( 'Email Design Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/analytics\" target=\"_blank\">' . __( 'Analytics Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-email-analytics',\n\t\t\t'title' => __( 'Email Design & Analytics', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/import\" target=\"_blank\">' . __( 'Import Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/export\" target=\"_blank\">' . __( 'Export Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-import-export',\n\t\t\t'title' => __( 'Import & Export', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/conditional-logic\" target=\"_blank\">' . __( 'Conditional Logic', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/templating\" target=\"_blank\">' . __( 'Templating', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/custom-capabilities\" target=\"_blank\">' . __( 'Custom Capabilities', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/hooks\" target=\"_blank\">' . __( 'Filters and Actions', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-advanced',\n\t\t\t'title' => __( 'Advanced Topics', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<p>' . __( '<strong>Always load CSS</strong> - Force Visual Form Builder Pro CSS to load on every page. Will override \"Disable CSS\" option, if selected.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable CSS</strong> - Disable CSS output for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable Email</strong> - Disable emails from sending for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable Notifications Email</strong> - Disable notification emails from sending for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Skip Empty Fields in Email</strong> - Fields that have no data will not be displayed in the email.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable saving new entry</strong> - Disable new entries from being saved.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable saving entry IP address</strong> - An entry will be saved, but the IP address will be removed.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Place Address labels above fields</strong> - The Address field labels will be placed above the inputs instead of below.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Remove default SPAM Verification</strong> - The default SPAM Verification question will be removed and only a submit button will be visible.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable meta tag version</strong> - Prevent the hidden Visual Form Builder Pro version number from printing in the source code.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Skip PayPal redirect if total is zero</strong> - If PayPal is configured, do not redirect if the total is zero.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Prepend Confirmation</strong> - Always display the form beneath the text confirmation after the form has been submitted.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Max Upload Size</strong> - Restrict the file upload size for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Sender Mail Header</strong> - Control the Sender attribute in the mail header. This is useful for certain server configurations that require an existing email on the domain to be used.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>reCAPTCHA Public Key</strong> - Required if \"Use reCAPTCHA\" option is selected in the Secret field.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>reCAPTCHA Private Key</strong> - Required if \"Use reCAPTCHA\" option is selected in the Secret field.', 'visual-form-builder-pro' ) . '</p>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-settings',\n\t\t\t'title' => __( 'Settings', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t}",
"public function admin_head() {\n\t \t\t// Remove the fake Settings submenu\n\t \t\tremove_submenu_page( 'options-general.php', 'wc_talks' );\n\n\t \t\t//Generate help if one is available for the current screen\n\t \t\tif ( wct_is_admin() || ! empty( $this->is_plugin_settings ) ) {\n\n\t \t\t\t$screen = get_current_screen();\n\n\t \t\t\tif ( ! empty( $screen->id ) && ! $screen->get_help_tabs() ) {\n\t \t\t\t\t$help_tabs_list = $this->get_help_tabs( $screen->id );\n\n\t \t\t\t\tif ( ! empty( $help_tabs_list ) ) {\n\t \t\t\t\t\t// Loop through tabs\n\t \t\t\t\t\tforeach ( $help_tabs_list as $key => $help_tabs ) {\n\t \t\t\t\t\t\t// Make sure types are a screen method\n\t \t\t\t\t\t\tif ( ! in_array( $key, array( 'add_help_tab', 'set_help_sidebar' ) ) ) {\n\t \t\t\t\t\t\t\tcontinue;\n\t \t\t\t\t\t\t}\n\n\t \t\t\t\t\t\tforeach ( $help_tabs as $help_tab ) {\n\t \t\t\t\t\t\t\t$content = '';\n\n\t \t\t\t\t\t\t\tif ( empty( $help_tab['content'] ) || ! is_array( $help_tab['content'] ) ) {\n\t \t\t\t\t\t\t\t\tcontinue;\n\t \t\t\t\t\t\t\t}\n\n\t \t\t\t\t\t\t\tif ( ! empty( $help_tab['strong'] ) ) {\n\t \t\t\t\t\t\t\t\t$content .= '<p><strong>' . $help_tab['strong'] . '</strong></p>';\n\t \t\t\t\t\t\t\t}\n\n\t \t\t\t\t\t\t\tforeach ( $help_tab['content'] as $tab_content ) {\n\t\t\t\t\t\t\t\t\tif ( is_array( $tab_content ) ) {\n\t\t\t\t\t\t\t\t\t\t$content .= '<ul><li>' . join( '</li><li>', $tab_content ) . '</li></ul>';\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$content .= '<p>' . $tab_content . '</p>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$help_tab['content'] = $content;\n\n\t \t\t\t\t\t\t\tif ( 'add_help_tab' == $key ) {\n\t \t\t\t\t\t\t\t\t$screen->add_help_tab( $help_tab );\n\t \t\t\t\t\t\t\t} else {\n\t \t\t\t\t\t\t\t\t$screen->set_help_sidebar( $content );\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t}\n\t \t\t\t\t\t}\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t}\n\n\t \t\t// Add some css\n\t\t\t?>\n\n\t\t\t<style type=\"text/css\" media=\"screen\">\n\t\t\t/*<![CDATA[*/\n\n\t\t\t\t/* Bubble style for Main Post type menu */\n\t\t\t\t#adminmenu .wp-menu-open.menu-icon-<?php echo $this->post_type?> .awaiting-mod {\n\t\t\t\t\tbackground-color: #2ea2cc;\n\t\t\t\t\tcolor: #fff;\n\t\t\t\t}\n\n\t\t\t\t#wordcamp-talks-csv span.dashicons-media-spreadsheet {\n\t\t\t\t\tvertical-align: text-bottom;\n\t\t\t\t}\n\n\t\t\t\t<?php if ( wct_is_admin() && ! wct_is_rating_disabled() ) : ?>\n\t\t\t\t\t/* Rating stars in screen options and in talks WP List Table */\n\t\t\t\t\t.metabox-prefs .talk-rating-bubble:before,\n\t\t\t\t\tth .talk-rating-bubble:before {\n\t\t\t\t\t\tfont: normal 20px/.5 'dashicons';\n\t\t\t\t\t\tspeak: none;\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t\ttop: 4px;\n\t\t\t\t\t\tleft: -4px;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tvertical-align: top;\n\t\t\t\t\t\t-webkit-font-smoothing: antialiased;\n\t\t\t\t\t\t-moz-osx-font-smoothing: grayscale;\n\t\t\t\t\t\ttext-decoration: none !important;\n\t\t\t\t\t\tcolor: #444;\n\t\t\t\t\t}\n\n\t\t\t\t\tth .talk-rating-bubble:before,\n\t\t\t\t\t.metabox-prefs .talk-rating-bubble:before {\n\t\t\t\t\t\tcontent: '\\f155';\n\t\t\t\t\t}\n\n\t\t\t\t\t.metabox-prefs .talk-rating-bubble:before {\n\t\t\t\t\t\tvertical-align: baseline;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Rates management */\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\tlist-style: none;\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li {\n\t\t\t\t\t\tlist-style: none;\n\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tpadding:15px 0;\n\t\t\t\t\t\tborder-bottom:dotted 1px #ccc;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li:last-child {\n\t\t\t\t\t\tborder:none;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-star {\n\t\t\t\t\t\tfloat:left;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-star {\n\t\t\t\t\t\twidth:20%;\n\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users {\n\t\t\t\t\t\tmargin-left: 20%;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users span.user-rated {\n\t\t\t\t\t\tdisplay:inline-block;\n\t\t\t\t\t\tmargin:5px;\n\t\t\t\t\t\tpadding:5px;\n\t\t\t\t\t\t-webkit-box-shadow: 0 1px 1px 1px rgba(0,0,0,0.1);\n\t\t\t\t\t\tbox-shadow: 0 1px 1px 1px rgba(0,0,0,0.1);\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users a.del-rate {\n\t\t\t\t\t\ttext-decoration: none;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users a.del-rate div {\n\t\t\t\t\t\tvertical-align: baseline;\n\t\t\t\t\t}\n\t\t\t\t<?php endif; ?>\n\n\t\t\t/*]]>*/\n\t\t\t</style>\n\t\t\t<?php\n\t\t}",
"function foodpress_admin_help_tab_content() {\r\n\t$screen = get_current_screen();\r\n\r\n\t$screen->add_help_tab( array(\r\n\t 'id'\t=> 'foodpress_overview_tab',\r\n\t 'title'\t=> __( 'Overview', 'foodpress' ),\r\n\t 'content'\t=>\r\n\r\n\t \t'<p>' . __( 'Thank you for using FoodPress plugin. ', 'foodpress' ). '</p>'\r\n\r\n\t) );\r\n\r\n\r\n\r\n\r\n\t$screen->set_help_sidebar(\r\n\t\t'<p><strong>' . __( 'For more information:', 'foodpress' ) . '</strong></p>' .\r\n\t\t'<p><a href=\"http://demo.myfoodpress.com/\" target=\"_blank\">' . __( 'foodpress Demo', 'foodpress' ) . '</a></p>' .\r\n\t\t\r\n\t\t'<p><a href=\"http://demo.myfoodpress.com/documentation/\" target=\"_blank\">' . __( 'Documentation', 'foodpress' ) . '</a></p>'.\r\n\t\t'<p><a href=\"https://foodpressplugin.freshdesk.com/support/home/\" target=\"_blank\">' . __( 'Support', 'foodpress' ) . '</a></p>'\r\n\t);\r\n}",
"function remove_woocommerce_setting_tabs( $tabs ) {\n $tabs_to_hide = array(\n 'Tax',\n 'Shipping',\n 'Products',\n 'Checkout',\n //'Emails',\n 'API',\n 'Accounts',\n );\n \n // Get the current user\n $user = wp_get_current_user();\n\n // Remove the tabs we want to hide\n $tabs = array_diff($tabs, $tabs_to_hide);\n\n return $tabs;\n}",
"private function cleanHead()\n {\n remove_action('wp_head', 'print_emoji_detection_script', 7);\n remove_action('wp_print_styles', 'print_emoji_styles');\n remove_action('wp_head', 'rsd_link'); //removes EditURI/RSD (Really Simple Discovery) link.\n remove_action('wp_head', 'wlwmanifest_link'); //removes wlwmanifest (Windows Live Writer) link.\n remove_action('wp_head', 'wp_generator'); //removes meta name generator.\n remove_action('wp_head', 'wp_shortlink_wp_head'); //removes shortlink.\n remove_action('wp_head', 'feed_links', 2); //removes feed links.\n remove_action('wp_head', 'feed_links_extra', 3); //removes comments feed.\n }",
"private function help_style_tabs() {\n $help_sidebar = $this->get_sidebar();\n\n $help_class = '';\n if ( ! $help_sidebar ) :\n $help_class .= ' no-sidebar';\n endif;\n\n // Time to render!\n ?>\n <div id=\"screen-meta\" class=\"tr-options metabox-prefs\">\n\n <div id=\"contextual-help-wrap\" class=\"<?php echo esc_attr( $help_class ); ?>\" >\n <div id=\"contextual-help-back\"></div>\n <div id=\"contextual-help-columns\">\n <div class=\"contextual-help-tabs\">\n <ul>\n <?php\n $class = ' class=\"active\"';\n $tabs = $this->get_tabs();\n foreach ( $tabs as $tab ) :\n $link_id = \"tab-link-{$tab['id']}\";\n $panel_id = (!empty($tab['url'])) ? $tab['url'] : \"#tab-panel-{$tab['id']}\";\n ?>\n <li id=\"<?php echo esc_attr( $link_id ); ?>\"<?php echo $class; ?>>\n <a href=\"<?php echo esc_url( \"$panel_id\" ); ?>\">\n <?php echo esc_html( $tab['title'] ); ?>\n </a>\n </li>\n <?php\n $class = '';\n endforeach;\n ?>\n </ul>\n </div>\n\n <?php if ( $help_sidebar ) : ?>\n <div class=\"contextual-help-sidebar\">\n <?php echo $help_sidebar; ?>\n </div>\n <?php endif; ?>\n\n <div class=\"contextual-help-tabs-wrap\">\n <?php\n $classes = 'help-tab-content active';\n foreach ( $tabs as $tab ):\n $panel_id = \"tab-panel-{$tab['id']}\";\n ?>\n\n <div id=\"<?php echo esc_attr( $panel_id ); ?>\" class=\"inside <?php echo $classes; ?>\">\n <?php\n // Print tab content.\n echo $tab['content'];\n\n // If it exists, fire tab callback.\n if ( ! empty( $tab['callback'] ) )\n call_user_func_array( $tab['callback'], array( $this, $tab ) );\n ?>\n </div>\n <?php\n $classes = 'help-tab-content';\n endforeach;\n ?>\n </div>\n </div>\n </div>\n </div>\n <?php\n }",
"function pluton_remove_actions() {\n\t$hooks = pluton_theme_hooks();\n\tforeach ( $hooks as $section => $array ) {\n\t\tif ( ! empty( $array['hooks'] ) && is_array( $array['hooks'] ) ) {\n\t\t\tforeach ( $array['hooks'] as $hook ) {\n\t\t\t\tremove_all_actions( $hook, false );\n\t\t\t}\n\t\t}\n\t}\n}",
"public function remove() {\n remove_action( 'wp_head', 'print_emoji_detection_script', 7 );\n remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );\n remove_action( 'wp_print_styles', 'print_emoji_styles' );\n remove_action( 'admin_print_styles', 'print_emoji_styles' );\n }",
"public static function _uninstall()\n\t{\n\t\tif( empty(self::$page_ids) )\n\t\t\terror_log('ABNOT@uninstall: Empty $page_ids!');\n\n\t\tforeach( self::$tools as $tool => $t )\n\t\t{\n\t\t\t$pid = get_page_by_title($t['title'], 'OBJECT', 'page');\n\t\t\twp_delete_post($pid->ID, true); // forced\n\t\t}\n\t}",
"public function clear_menu( )\n {\n $this->variables = array();\n }",
"function woo_remove_product_tabs( $tabs ) {\n // unset( $tabs['reviews'] ); \t\t\t// Remove the reviews tab\n unset( $tabs['additional_information'] ); \t// Remove the additional information tab\n\n return $tabs;\n}",
"function helps()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['helps'] == 1 ) ? 'Help File' : 'Help Files';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'removed' : 'created';\n\t\t$helpkeys = array();\n\t\t\n\t\tforeach ( $this->xml_array['helps_group']['help'] as $k => $v )\n\t\t{\n\t\t\t$helpkeys[] = \"'{$v['title']['VALUE']}'\";\n\t\t}\n\t\t\n\t\t$this->ipsclass->DB->do_delete( 'faq', \"title IN (\".implode( \",\", $helpkeys ).\")\" );\n\t\t\n\t\tif ( !$this->ipsclass->input['un'] )\n\t\t{\n\t\t\tforeach ( $this->xml_array['helps_group']['help'] as $k => $v )\n\t\t\t{\n\t\t\t\t$this->_add_help( $v );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&code=work&mod={$this->ipsclass->input['mod']}&step={$this->ipsclass->input['step']}{$uninstall}{$group}&st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['helps']} {$object} {$operation}....\" );\n\t}",
"function remove_theme_mods()\n {\n }",
"function remove_admin_bar() {\n\tshow_admin_bar(false);\n}",
"function lgm_theme_remove_tags_menu() {\n\t global $submenu;\n\t unset($submenu['edit.php'][16]);\n\t}",
"public static function deactivate() {\n delete_option('haa_admin_area');\n delete_option('haa_secret_key');\n\n unregister_setting('permalink', 'haa_admin_area');\n }",
"public function cleanup() {\n\t\tforeach ( array(\n\t\t\t'leadin_portal_domain',\n\t\t\t'leadin_portalId',\n\t\t\t'leadin_pluginVersion',\n\t\t\t'hubspot_affiliate_code',\n\t\t\t'hubspot_acquisition_attribution',\n\t\t) as $option_name\n\t\t) {\n\t\t\tif ( get_option( $option_name ) ) {\n\t\t\t\tdelete_option( $option_name );\n\t\t\t}\n\t\t}\n\t}",
"protected function _clean()\n {\n if ($this->_defaultOptions['clean'] === FALSE) {\n return;\n }\n\n if (class_exists('tracer_class')) {\n tracer_class::marker(array(\n 'remove unused markers',\n debug_backtrace(),\n '#006400'\n ));\n }\n\n $this->_cleanMarkers('loop');\n $this->_cleanMarkers('optional');\n\n $this->DISPLAY = preg_replace(\n $this->_contentMarkers,\n '',\n $this->DISPLAY\n );\n }",
"public static function hide_screen_options() {\n if (!is_admin())\n add_filter('screen_options_show_screen', 'remove_screen_options');\n }",
"function tear_down() {\n\t\tglobal $current_screen;\n\t\tparent::tear_down();\n\t\t$current_screen = $this->current_screen;\n\t}",
"function remove_quick_edit( $actions ) {\r\n\t\tunset($actions['inline hide-if-no-js']);\r\n\t\treturn $actions;\r\n\t}",
"public function clearCategories()\n {\n $scenario = Scenarios::getOrCreateUserScenario();\n $scenario->categories()->detach();\n }",
"public function clear()\n {\n $this->climate->clear();\n }",
"protected function removeDefaults()\n {\n \\remove_action('wp_head', 'print_emoji_detection_script', 7);\n \\remove_action('admin_print_scripts', 'print_emoji_detection_script');\n \\remove_action('wp_print_styles', 'print_emoji_styles');\n \\remove_action('admin_print_styles', 'print_emoji_styles');\n }",
"public function remove_admin_bar_items() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu(\"comments\");\n }",
"public function get_help_tabs( $screen_id = '' ) {\n\t\t\t// Help urls\n\t\t\t$plugin_forum = '<a href=\"http://wordpress.org/support/plugin/wordcamp-talks\">';\n\t\t\t$help_tabs = false;\n\t\t\t$nav_menu_page = '<a href=\"' . esc_url( admin_url( 'nav-menus.php' ) ) . '\">';\n\t\t\t$widgets_page = '<a href=\"' . esc_url( admin_url( 'widgets.php' ) ) . '\">';\n\n\t\t\t/**\n\t\t\t * @param array associative array to list the help tabs\n\t\t\t */\n\t\t\t$help = array(\n\t\t\t\t'edit-talks' => array(\n\t\t\t\t\t'add_help_tab' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'edit-talks-overview',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Overview', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'This screen provides access to all the talks users of your site shared. You can customize the display of this screen to suit your workflow.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'You can customize the display of this screen's contents in a number of ways:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\tesc_html__( 'You can hide/display columns based on your needs and decide how many talks to list per screen using the Screen Options tab.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'You can filter the list of talks by post status using the text links in the upper left to show All, Published, Private or Trashed talks. The default view is to show all talks.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'You can view talks in a simple title list or with an excerpt. Choose the view you prefer by clicking on the icons at the top of the list on the right.', 'wordcamp-talks' ),\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\tarray(\n\t\t\t\t\t\t\t'id' => 'edit-talks-row-actions',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Actions', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'Hovering over a row in the talks list will display action links that allow you to manage an talk. You can perform the following actions:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\tesc_html__( 'Edit takes you to the editing screen for that talk. You can also reach that screen by clicking on the talk title.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'Trash removes the talk from this list and places it in the trash, from which you can permanently delete it.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'View opens the talk in the WordCamp Talks's part of your site.', 'wordcamp-talks' ),\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\tarray(\n\t\t\t\t\t\t\t'id' => 'edit-talks-bulk-actions',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Bulk Actions', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'You can also move multiple talks to the trash at once. Select the talks you want to trash using the checkboxes, then select the "Move to Trash" action from the Bulk Actions menu and click Apply.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'edit-talks-sort-filter',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Sorting & filtering', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'Clicking on specific column headers will sort the talks list. You can sort the talks alphabetically using the Title column header or by popularity:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\tesc_html__( 'Click on the column header having a dialog buble icon to sort by number of comments.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'Click on the column header having a star icon to sort by rating.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tesc_html__( 'Inside the rows, you can filter the talks by categories or tags clicking on the corresponding terms.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'talks' => array(\n\t\t\t\t\t'add_help_tab' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'talks-overview',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Overview', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'The title field and the big Talk Editing Area are fixed in place, but you can reposition all the other boxes using drag and drop. You can also minimize or expand them by clicking the title bar of each box. Use the Screen Options tab to hide/show boxes.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'settings_page_wc_talks' => array(\n\t\t\t\t\t'add_help_tab' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'settings-overview',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Overview', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'This is the place where you can customize the behavior of WordCamp Talks.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'Please see the additional help tabs for more information on each individual section.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'settings-main',\n\t\t\t\t\t\t'title' => esc_html__( 'Main Settings', 'wordcamp-talks' ),\n\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\tsprintf( esc_html__( 'Just before the first option, you will find the link to the main archive page of the plugin. If you wish, you can use it to define a new custom link %1$smenu item%2$s.', 'wordcamp-talks' ), $nav_menu_page, '</a>' ),\n\t\t\t\t\t\t\tsprintf( esc_html__( 'If you do so, do not forget to update the link in case you change your permalink settings. Another possible option is to use the %1$sWordCamp Talks Navigation%2$s widget in one of your dynamic sidebars.', 'wordcamp-talks' ), $widgets_page, '</a>' ),\n\t\t\t\t\t\t\tesc_html__( 'In the Main Settings you have a number of options:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\tesc_html__( 'WordCamp Talks archive page: you can customize the title of this page. It will appear on every WordCamp Talks's page, except the single talk one.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'New talks status: this is the default status to apply to the talks submitted by the user. If this setting is set to "Pending", it will be possible to edit the moderation message once this setting has been saved.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'Moderation message: if New talks status is defined to Pending, it is the place to customize the awaiting moderation message the user will see once he submited his talk.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'Not logged in message: if a user reaches the WordCamp Talks's front end submit form without being logged in, a message will invite him to do so. If you wish to use a custom message, use this setting.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'Rating stars hover captions: fill a comma separated list of captions to replace default one. On front end, the number of rating stars will depend on the number of comma separated captions you defined in this setting.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'Talk comments: if on, comments about talks will be separated from other post types comments and you will be able to moderate comments about talks from the comments submenu of the WordCamp Talks's main Administration menu. If you uncheck this setting, talks comments will be mixed up with other post types comments into the main Comments Administration menu', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tesc_html__( 'Comments: you can completely disable commenting about talks by activating this option', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'edit-category-talks' => array(\n\t\t\t\t\t'add_help_tab' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'talks-category-overview',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Overview', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'Talk Categories can only be created by the site Administrator. To add a new talk category please fill the following fields:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\tesc_html__( 'Name - The name is how it appears on your site (in the category checkboxes of the talk front end submit form, in the talk's footer part or in the title of WordCamp Talks's category archive pages).', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'Slug - The "slug" is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'Description - If you set a description for your category, it will be displayed over the list of talks in the category archive page.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tesc_html__( 'You can change the display of this screen using the Screen Options tab to set how many items are displayed per screen and to display/hide columns in the table.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'edit-tag-talks' => array(\n\t\t\t\t\t'add_help_tab' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'talks-tag-overview',\n\t\t\t\t\t\t\t'title' => esc_html__( 'Overview', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tesc_html__( 'Talk Tags can be created by any logged in user of the site from the talk front end submit form. From this screen, to add a new talk tag please fill the following fields:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\tesc_html__( 'Name - The name is how it appears on your site (in the tag cloud, in the tags editor of the talk front end submit form, in the talk's footer part or in the title of WordCamp Talks's tag archive pages).', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'Slug - The "slug" is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t\tesc_html__( 'Description - If you set a description for your tag, it will be displayed over the list of talks in the tag archive page.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tesc_html__( 'You can change the display of this screen using the Screen Options tab to set how many items are displayed per screen and to display/hide columns in the table.', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t/**\n\t\t\t * @param array $help associative array to list the help tabs\n\t\t\t */\n\t\t\t$help = apply_filters( 'wct_get_help_tabs', $help );\n\n\t\t\tif ( ! empty( $help[ $screen_id ] ) ) {\n\t\t\t\t$help_tabs = array_merge( $help[ $screen_id ], array(\n\t\t\t\t\t'set_help_sidebar' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'strong' => esc_html__( 'For more information:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tsprintf( esc_html_x( '%1$sSupport Forums (en)%2$s', 'help tab links', 'wordcamp-talks' ), $plugin_forum, '</a>' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t) );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @param array $help associative array to list the help tabs\n\t\t\t */\n\t\t\t$help = apply_filters( 'wct_get_help_tabs', $help );\n\n\t\t\tif ( ! empty( $help[ $screen_id ] ) ) {\n\t\t\t\t$help_tabs = array_merge( $help[ $screen_id ], array(\n\t\t\t\t\t'set_help_sidebar' => array(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'strong' => esc_html__( 'For more information:', 'wordcamp-talks' ),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\tsprintf( esc_html_x( '%1$sSupport Forums (en)%2$s', 'help tab links', 'wordcamp-talks' ), $plugin_forum, '</a>' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t) );\n\t\t\t}\n\n\t\t\treturn $help_tabs;\n\t\t}",
"public function remove_screen_reader_content()\n {\n }",
"function hook_uninstall() {\r\n\t\tupdate_options('foliamaptool', '');\r\n\t}",
"function plasso_remove_menus() {\n\n\t// Removes unused top level menus.\n\tremove_menu_page('edit.php');\n\tremove_menu_page('edit-comments.php');\n}",
"function remove_admin_bar_links() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('wp-logo'); // Remove the WordPress logo\n $wp_admin_bar->remove_menu('about'); // Remove the about WordPress link\n $wp_admin_bar->remove_menu('wporg'); // Remove the WordPress.org link\n $wp_admin_bar->remove_menu('documentation'); // Remove the WordPress documentation link\n $wp_admin_bar->remove_menu('support-forums'); // Remove the support forums link\n $wp_admin_bar->remove_menu('feedback'); // Remove the feedback link\n $wp_admin_bar->remove_menu('site-name'); // Remove the site name menu\n $wp_admin_bar->remove_menu('view-site'); // Remove the view site link\n $wp_admin_bar->remove_menu('updates'); // Remove the updates link\n $wp_admin_bar->remove_menu('comments'); // Remove the comments link\n $wp_admin_bar->remove_menu('new-content'); // Remove the content link\n $wp_admin_bar->remove_menu('w3tc'); // If you use w3 total cache remove the performance link\n //$wp_admin_bar->remove_menu('my-account'); // Remove the user details tab\n}",
"function ti_wp_foundation_theme_head_cleanup() {\n\t// Remove category feeds\n\t// remove_action( 'wp_head', 'feed_links_extra', 3 );\n\t// Remove post and comment feeds\n\t// remove_action( 'wp_head', 'feed_links', 2 );\n\t// Remove EditURI link\n\tremove_action( 'wp_head', 'rsd_link' );\n\t// Remove Windows live writer\n\tremove_action( 'wp_head', 'wlwmanifest_link' );\n\t// Remove index link\n\tremove_action( 'wp_head', 'index_rel_link' );\n\t// Remove previous link\n\tremove_action( 'wp_head', 'parent_post_rel_link', 10, 0 );\n\t// Remove start link\n\tremove_action( 'wp_head', 'start_post_rel_link', 10, 0 );\n\t// Remove links for adjacent posts\n\tremove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );\n\t// Remove WP version\n\tremove_action( 'wp_head', 'wp_generator' );\n}",
"function remove_demo() {\n\n // Used to hide the demo mode link from the plugin page. Only used when Redux is a plugin.\n if ( class_exists( 'ReduxFrameworkPlugin' ) ) {\n remove_filter( 'plugin_row_meta', array(\n ReduxFrameworkPlugin::instance(),\n 'plugin_metalinks'\n ), null, 2 );\n\n // Used to hide the activation notice informing users of the demo panel. Only used when Redux is a plugin.\n remove_action( 'admin_notices', array( ReduxFrameworkPlugin::instance(), 'admin_notices' ) );\n }\n }",
"function remove_genesis_features() {\n remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );\n remove_action('genesis_footer', 'genesis_do_footer');\n remove_action('genesis_footer', 'genesis_footer_markup_open', 5);\n remove_action('genesis_footer', 'genesis_footer_markup_close', 15);\n remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );\n remove_action( 'genesis_entry_footer', 'genesis_post_meta' );\n}",
"public static function delete_font_selectors_cache() {\n\t\t$theme_mods = array_keys( get_theme_mods() );\n\n\t\tforeach ( $theme_mods as $theme_mod ) {\n\t\t\tif ( false !== strpos( $theme_mod, 'typolab_font_variants_and_sizes_output_' ) ) {\n\t\t\t\tremove_theme_mod( $theme_mod );\n\t\t\t}\n\t\t}\n\t}",
"public static function uninstall()\n\t{\n\t\t$db = XenForo_Application::get('db');\n\n\t\t$db->query(\"DROP TABLE IF EXISTS xf_faq_question\");\n\t\t$db->query(\"DROP TABLE IF EXISTS xf_faq_category\");\n\n\t\t// Bye caches!\n\t\tXenForo_Model::create('XenForo_Model_DataRegistry')->delete('faqCache');\n\t\tXenForo_Model::create('XenForo_Model_DataRegistry')->delete('faqStats');\n\t}",
"protected function _cleanContexts(){\n\n //remove no more present contexts\n foreach( $this->_destroyContext as $_context ){\n\n self::_TimeStampMsg( \"(parent \" . self::$tHandlerPID . \") : need to delete a context\" );\n $this->_killPids( $_context );\n\n }\n $this->_destroyContext = array();\n\n }",
"function full_reset(){\n\t/**\n\t* This function will reset all the header links\n\t* http://wordpress.stackexchange.com/questions/207104/edit-theme-wp-head\n\t*/\n\t// Removes the wlwmanifest link\n\tremove_action( 'wp_head', 'wlwmanifest_link' );\n\t// Removes the RSD link\n\tremove_action( 'wp_head', 'rsd_link' );\n\t// Removes the WP shortlink\n\t//remove_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 );\n\t// Removes the canonical links\n\t//remove_action( 'wp_head', 'rel_canonical' );\n\t// Removes the links to the extra feeds such as category feeds\n\t//remove_action( 'wp_head', 'feed_links_extra', 3 ); \n\t// Removes links to the general feeds: Post and Comment Feed\n\t//remove_action( 'wp_head', 'feed_links', 2 ); \n\t// Removes the index link\n\tremove_action( 'wp_head', 'index_rel_link' ); \n\t// Removes the prev link\n\tremove_action( 'wp_head', 'parent_post_rel_link' ); \n\t// Removes the start link\n\tremove_action( 'wp_head', 'start_post_rel_link' ); \n\t// Removes the relational links for the posts adjacent to the current post\n\tremove_action( 'wp_head', 'adjacent_posts_rel_link' );\n\tremove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head' );\n\t// Removes the WordPress version i.e. -\n\tremove_action( 'wp_head', 'wp_generator' );\n\t\n\tremove_action( 'wp_head', 'print_emoji_detection_script', 7 );\n\tremove_action( 'admin_print_scripts', 'print_emoji_detection_script' );\n\tremove_action( 'wp_print_styles', 'print_emoji_styles' );\n\tremove_action( 'admin_print_styles', 'print_emoji_styles' );\n\t\n\t/**\n\t*https://wordpress.org/support/topic/wp-44-remove-json-api-and-x-pingback-from-http-headers\n\t*/\n\tadd_filter('rest_enabled', '_return_false');\n\tadd_filter('rest_jsonp_enabled', '_return_false');\n\t\n\tremove_action( 'wp_head', 'rest_output_link_wp_head', 10 );\n\tremove_action( 'wp_head', 'wp_oembed_add_discovery_links', 10 );\n\t\n\tremove_action('wp_head', 'wp_print_scripts');\n //remove_action('wp_head', 'wp_print_head_scripts', 9);\n add_action('wp_footer', 'wp_print_scripts', 5);\n add_action('wp_footer', 'wp_print_head_scripts', 5);\n}",
"function remove_admin_bar_links() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('themes');\n $wp_admin_bar->remove_menu('background');\n $wp_admin_bar->remove_menu('header');\n $wp_admin_bar->remove_menu('documentation');\n $wp_admin_bar->remove_menu('about');\n $wp_admin_bar->remove_menu('wporg');\n $wp_admin_bar->remove_menu('support-forums');\n $wp_admin_bar->remove_menu('feedback');\n}",
"function ShowHelp()\r\n{\r\n\tglobal $settings, $user_info, $language, $context, $txt, $sourcedir, $options, $scripturl;\r\n\r\n\tloadTemplate('Help');\r\n\tloadLanguage('Manual');\r\n\r\n\t$manual_areas = array(\r\n\t\t'getting_started' => array(\r\n\t\t\t'title' => $txt['manual_category_getting_started'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'introduction' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_intro'],\r\n\t\t\t\t\t'template' => 'manual_intro',\r\n\t\t\t\t),\r\n\t\t\t\t'main_menu' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_main_menu'],\r\n\t\t\t\t\t'template' => 'manual_main_menu',\r\n\t\t\t\t),\r\n\t\t\t\t'board_index' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_board_index'],\r\n\t\t\t\t\t'template' => 'manual_board_index',\r\n\t\t\t\t),\r\n\t\t\t\t'message_view' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_message_view'],\r\n\t\t\t\t\t'template' => 'manual_message_view',\r\n\t\t\t\t),\r\n\t\t\t\t'topic_view' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_topic_view'],\r\n\t\t\t\t\t'template' => 'manual_topic_view',\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t),\r\n\t\t'registering' => array(\r\n\t\t\t'title' => $txt['manual_category_registering'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'when_how' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_when_how_register'],\r\n\t\t\t\t\t'template' => 'manual_when_how_register',\r\n\t\t\t\t),\r\n\t\t\t\t'registration_screen' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_registration_screen'],\r\n\t\t\t\t\t'template' => 'manual_registration_screen',\r\n\t\t\t\t),\r\n\t\t\t\t'activating_account' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_activating_account'],\r\n\t\t\t\t\t'template' => 'manual_activating_account',\r\n\t\t\t\t),\r\n\t\t\t\t'logging_in' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_logging_in_out'],\r\n\t\t\t\t\t'template' => 'manual_logging_in_out',\r\n\t\t\t\t),\r\n\t\t\t\t'password_reminders' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_password_reminders'],\r\n\t\t\t\t\t'template' => 'manual_password_reminders',\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t),\r\n\t\t'profile_features' => array(\r\n\t\t\t'title' => $txt['manual_category_profile_features'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'profile_info' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_profile_info'],\r\n\t\t\t\t\t'template' => 'manual_profile_info_summary',\r\n\t\t\t\t\t'description' => $txt['manual_entry_profile_info_desc'],\r\n\t\t\t\t\t'subsections' => array(\r\n\t\t\t\t\t\t'summary' => array($txt['manual_entry_profile_info_summary'], 'template' => 'manual_profile_info_summary'),\r\n\t\t\t\t\t\t'posts' => array($txt['manual_entry_profile_info_posts'], 'template' => 'manual_profile_info_posts'),\r\n\t\t\t\t\t\t'stats' => array($txt['manual_entry_profile_info_stats'], 'template' => 'manual_profile_info_stats'),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t\t'modify_profile' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_modify_profile'],\r\n\t\t\t\t\t'template' => 'manual_modify_profile_settings',\r\n\t\t\t\t\t'description' => $txt['manual_entry_modify_profile_desc'],\r\n\t\t\t\t\t'subsections' => array(\r\n\t\t\t\t\t\t'settings' => array($txt['manual_entry_modify_profile_settings'], 'template' => 'manual_modify_profile_settings'),\r\n\t\t\t\t\t\t'forum' => array($txt['manual_entry_modify_profile_forum'], 'template' => 'manual_modify_profile_forum'),\r\n\t\t\t\t\t\t'look' => array($txt['manual_entry_modify_profile_look'], 'template' => 'manual_modify_profile_look'),\r\n\t\t\t\t\t\t'auth' => array($txt['manual_entry_modify_profile_auth'], 'template' => 'manual_modify_profile_auth'),\r\n\t\t\t\t\t\t'notify' => array($txt['manual_entry_modify_profile_notify'], 'template' => 'manual_modify_profile_notify'),\r\n\t\t\t\t\t\t'pm' => array($txt['manual_entry_modify_profile_pm'], 'template' => 'manual_modify_profile_pm'),\r\n\t\t\t\t\t\t'buddies' => array($txt['manual_entry_modify_profile_buddies'], 'template' => 'manual_modify_profile_buddies'),\r\n\t\t\t\t\t\t'groups' => array($txt['manual_entry_modify_profile_groups'], 'template' => 'manual_modify_profile_groups'),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t\t'actions' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_profile_actions'],\r\n\t\t\t\t\t'template' => 'manual_profile_actions_subscriptions',\r\n\t\t\t\t\t'description' => $txt['manual_entry_modify_profile_desc'],\r\n\t\t\t\t\t'subsections' => array(\r\n\t\t\t\t\t\t'subscriptions' => array($txt['manual_entry_profile_actions_subscriptions'], 'template' => 'manual_profile_actions_subscriptions'),\r\n\t\t\t\t\t\t'delete' => array($txt['manual_entry_profile_actions_delete'], 'template' => 'manual_profile_actions_delete'),\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'posting_basics' => array(\r\n\t\t\t'title' => $txt['manual_category_posting_basics'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t/*'posting_screen' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_posting_screen'],\r\n\t\t\t\t\t'template' => 'manual_posting_screen',\r\n\t\t\t\t),*/\r\n\t\t\t\t'posting_topics' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_posting_topics'],\r\n\t\t\t\t\t'template' => 'manual_posting_topics',\r\n\t\t\t\t),\r\n\t\t\t\t/*'quoting_posts' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_quoting_posts'],\r\n\t\t\t\t\t'template' => 'manual_quoting_posts',\r\n\t\t\t\t),\r\n\t\t\t\t'modifying_posts' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_modifying_posts'],\r\n\t\t\t\t\t'template' => 'manual_modifying_posts',\r\n\t\t\t\t),*/\r\n\t\t\t\t'smileys' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_smileys'],\r\n\t\t\t\t\t'template' => 'manual_smileys',\r\n\t\t\t\t),\r\n\t\t\t\t'bbcode' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_bbcode'],\r\n\t\t\t\t\t'template' => 'manual_bbcode',\r\n\t\t\t\t),\r\n\t\t\t\t/*'wysiwyg' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_wysiwyg'],\r\n\t\t\t\t\t'template' => 'manual_wysiwyg',\r\n\t\t\t\t),*/\r\n\t\t\t),\r\n\t\t),\r\n\t\t'personal_messages' => array(\r\n\t\t\t'title' => $txt['manual_category_personal_messages'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'messages' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_pm_messages'],\r\n\t\t\t\t\t'template' => 'manual_pm_messages',\r\n\t\t\t\t),\r\n\t\t\t\t/*'actions' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_pm_actions'],\r\n\t\t\t\t\t'template' => 'manual_pm_actions',\r\n\t\t\t\t),\r\n\t\t\t\t'preferences' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_pm_preferences'],\r\n\t\t\t\t\t'template' => 'manual_pm_preferences',\r\n\t\t\t\t),*/\r\n\t\t\t),\r\n\t\t),\r\n\t\t'forum_tools' => array(\r\n\t\t\t'title' => $txt['manual_category_forum_tools'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'searching' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_searching'],\r\n\t\t\t\t\t'template' => 'manual_searching',\r\n\t\t\t\t),\r\n\t\t\t\t/*'memberlist' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_memberlist'],\r\n\t\t\t\t\t'template' => 'manual_memberlist',\r\n\t\t\t\t),\r\n\t\t\t\t'calendar' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_calendar'],\r\n\t\t\t\t\t'template' => 'manual_calendar',\r\n\t\t\t\t),*/\r\n\t\t\t),\r\n\t\t),\r\n\t);\r\n\r\n\t// Set a few options for the menu.\r\n\t$menu_options = array(\r\n\t\t'disable_url_session_check' => true,\r\n\t);\r\n\r\n\trequire_once($sourcedir . '/Subs-Menu.php');\r\n\t$manual_area_data = createMenu($manual_areas, $menu_options);\r\n\tunset($manual_areas);\r\n\r\n\t// Make a note of the Unique ID for this menu.\r\n\t$context['manual_menu_id'] = $context['max_menu_id'];\r\n\t$context['manual_menu_name'] = 'menu_data_' . $context['manual_menu_id'];\r\n\r\n\t// Get the selected item.\r\n\t$context['manual_area_data'] = $manual_area_data;\r\n\t$context['menu_item_selected'] = $manual_area_data['current_area'];\r\n\r\n\t// Set a title and description for the tab strip if subsections are present.\r\n\tif (isset($context['manual_area_data']['subsections']))\r\n\t\t$context[$context['manual_menu_name']]['tab_data'] = array(\r\n\t\t\t'title' => $manual_area_data['label'],\r\n\t\t\t'description' => isset($manual_area_data['description']) ? $manual_area_data['description'] : '',\r\n\t\t);\r\n\r\n\t// Bring it on!\r\n\t$context['sub_template'] = isset($manual_area_data['current_subsection'], $manual_area_data['subsections'][$manual_area_data['current_subsection']]['template']) ? $manual_area_data['subsections'][$manual_area_data['current_subsection']]['template'] : $manual_area_data['template'];\r\n\t$context['page_title'] = $manual_area_data['label'] . ' - ' . $txt['manual_smf_user_help'];\r\n\r\n\t// Build the link tree.\r\n\t$context['linktree'][] = array(\r\n\t\t'url' => $scripturl . '?action=help',\r\n\t\t'name' => $txt['help'],\r\n\t);\r\n\tif (isset($manual_area_data['current_area']) && $manual_area_data['current_area'] != 'index')\r\n\t\t$context['linktree'][] = array(\r\n\t\t\t'url' => $scripturl . '?action=admin;area=' . $manual_area_data['current_area'],\r\n\t\t\t'name' => $manual_area_data['label'],\r\n\t\t);\r\n\tif (!empty($manual_area_data['current_subsection']) && $manual_area_data['subsections'][$manual_area_data['current_subsection']][0] != $manual_area_data['label'])\r\n\t\t$context['linktree'][] = array(\r\n\t\t\t'url' => $scripturl . '?action=admin;area=' . $manual_area_data['current_area'] . ';sa=' . $manual_area_data['current_subsection'],\r\n\t\t\t'name' => $manual_area_data['subsections'][$manual_area_data['current_subsection']][0],\r\n\t\t);\r\n\r\n\t// We actually need a special style sheet for help ;)\r\n\t$context['template_layers'][] = 'manual';\r\n\r\n\t// The smiley info page needs some cheesy information.\r\n\tif ($manual_area_data['current_area'] == 'smileys')\r\n\t\tShowSmileyHelp();\r\n}",
"function ft_hook_destroy() {}",
"public function reset()\n {\n $this->env = array();\n $this->object_handlers = array();\n $this->pagetitle = '';\n }",
"public static function add_help_tab() {\n\t\tif ( ! function_exists( 'wc_get_screen_ids' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$screen = get_current_screen();\n\n\t\tif ( ! $screen || ! in_array( $screen->id, wc_get_screen_ids(), true ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remove the old help tab if it exists.\n\t\t$help_tabs = $screen->get_help_tabs();\n\t\tforeach ( $help_tabs as $help_tab ) {\n\t\t\tif ( 'woocommerce_onboard_tab' !== $help_tab['id'] ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$screen->remove_help_tab( 'woocommerce_onboard_tab' );\n\t\t}\n\n\t\t// Add the new help tab.\n\t\t$help_tab = array(\n\t\t\t'title' => __( 'Setup wizard', 'woocommerce' ),\n\t\t\t'id' => 'woocommerce_onboard_tab',\n\t\t);\n\n\t\t$task_list_hidden = get_option( 'woocommerce_task_list_hidden', 'no' );\n\n\t\t$help_tab['content'] = '<h2>' . __( 'WooCommerce Onboarding', 'woocommerce' ) . '</h2>';\n\n\t\t$help_tab['content'] .= '<h3>' . __( 'Profile Setup Wizard', 'woocommerce' ) . '</h3>';\n\t\t$help_tab['content'] .= '<p>' . __( 'If you need to access the setup wizard again, please click on the button below.', 'woocommerce' ) . '</p>' .\n\t\t\t'<p><a href=\"' . wc_admin_url( '&path=/setup-wizard' ) . '\" class=\"button button-primary\">' . __( 'Setup wizard', 'woocommerce' ) . '</a></p>';\n\n\t\t$help_tab['content'] .= '<h3>' . __( 'Task List', 'woocommerce' ) . '</h3>';\n\t\t$help_tab['content'] .= '<p>' . __( 'If you need to enable or disable the task list, please click on the button below.', 'woocommerce' ) . '</p>' .\n\t\t( 'yes' === $task_list_hidden\n\t\t\t? '<p><a href=\"' . wc_admin_url( '&reset_task_list=1' ) . '\" class=\"button button-primary\">' . __( 'Enable', 'woocommerce' ) . '</a></p>'\n\t\t\t: '<p><a href=\"' . wc_admin_url( '&reset_task_list=0' ) . '\" class=\"button button-primary\">' . __( 'Disable', 'woocommerce' ) . '</a></p>'\n\t\t);\n\n\t\tif ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {\n\t\t\t$help_tab['content'] .= '<h3>' . __( 'Calypso / WordPress.com', 'woocommerce' ) . '</h3>';\n\t\t\tif ( class_exists( 'Jetpack' ) ) {\n\t\t\t\t$help_tab['content'] .= '<p>' . __( 'Quickly access the Jetpack connection flow in Calypso.', 'woocommerce' ) . '</p>';\n\t\t\t\t$help_tab['content'] .= '<p><a href=\"' . wc_admin_url( '&test_wc_jetpack_connect=1' ) . '\" class=\"button button-primary\">' . __( 'Connect', 'woocommerce' ) . '</a></p>';\n\t\t\t}\n\n\t\t\t$help_tab['content'] .= '<p>' . __( 'Quickly access the WooCommerce.com connection flow in Calypso.', 'woocommerce' ) . '</p>';\n\t\t\t$help_tab['content'] .= '<p><a href=\"' . wc_admin_url( '&test_wc_helper_connect=1' ) . '\" class=\"button button-primary\">' . __( 'Connect', 'woocommerce' ) . '</a></p>';\n\t\t}\n\n\t\t$screen->add_help_tab( $help_tab );\n\t}",
"function remove_tab($tabs){\n unset($tabs['general']);\n unset($tabs['shipping']);\n //unset($tabs['inventory']); // it is to remove inventory tab\n unset($tabs['advanced']); // it is to remove advanced tab\n unset($tabs['linked_product']); // it is to remove linked_product tab\n //unset($tabs['attribute']); // it is to remove attribute tab\n //unset($tabs['variations']); // it is to remove variations tab\n return($tabs);\n}",
"public function help_theme_page() {\n\n\t\t// Add to the about page.\n\t\t$screen = get_current_screen();\n\t\tif ( $screen->id != $this->theme_page ) {\n\t\t\treturn;\n\t\t}\n\t}",
"function cec29_ald_functions_uninstall() {\n\t\t// remove all options and custom tables\n\t}",
"function remove_demo() {\n\n // Used to hide the demo mode link from the plugin page. Only used when Redux is a plugin.\n if ( class_exists( 'ReduxFrameworkPlugin' ) ) {\n remove_filter( 'plugin_row_meta', array(\n ReduxFrameworkPlugin::instance(),\n 'plugin_metalinks'\n ), null, 2 );\n\n // Used to hide the activation notice informing users of the demo panel. Only used when Redux is a plugin.\n remove_action( 'admin_notices', array( ReduxFrameworkPlugin::instance(), 'admin_notices' ) );\n }\n }",
"public function reset(): void\n {\n $this->titleLetters = [];\n $this->currentTitleLevel = 0;\n $this->levels = [];\n $this->counters = [];\n\n for ($level = 0; $level < 16; $level++) {\n $this->levels[$level] = 1;\n $this->counters[$level] = 0;\n }\n }",
"public static function postHelpTab () {\n $screen = get_current_screen();\n\n if ( 'travelcard' != $screen->post_type )\n return;\n\n $args = [\n 'id' => 'travelcard',\n 'title' => 'Travel Cards Help',\n 'content' => file_get_contents(__DIR__ . '/templates/help.php'),\n ];\n\n $screen->add_help_tab( $args );\n }",
"protected function renderHelp() {}",
"public function add_help_tab() {\n\t\t$screen = get_current_screen();\n\t\t$screen->add_help_tab( array(\n\t\t\t\t'id' => 'support',\n\t\t\t\t'title' => 'Support',\n\t\t\t\t'content' => '',\n\t\t\t\t'callback' => array( $this, 'display' ),\n\t\t\t)\n\t\t);\n\t}",
"function cmh_delete_plugin_options() {\r\n\tdelete_option('cmh_options');\r\n}",
"function theme_remove_admin_bar() {\r\n\treturn false;\r\n}",
"function removeAllButLongDescription(){\n # Remove Description Tab menu\n remove_action( 'woocommerce_after_single_product_summary', 'woocommerce_output_product_data_tabs', 10 );\n add_action( 'woocommerce_after_single_product_summary', 'longDescriptionReplay', 10 );\n remove_action( 'woocommerce_before_single_product_summary', 'woocommerce_show_product_images', 20 );\n remove_action( 'woocommerce_product_thumbnails', 'woocommerce_show_product_thumbnails', 20 );\n \n # Remove variations add to cart\n remove_action( 'woocommerce_single_variation', 'woocommerce_single_variation', 10 );\n remove_action( 'woocommerce_single_variation', 'woocommerce_single_variation_add_to_cart_button', 20 );\n remove_action( 'woocommerce_variable_add_to_cart', 'woocommerce_variable_add_to_cart', 30 );\n \n # Remove SKU\n add_filter( 'wc_product_sku_enabled', '__return_false' );\n\t\n // Right column\n remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_title', 5 );\n remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_rating', 10 );\n remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_price', 10 );\n remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 ); \n}",
"function remove_demo() {\n\n // Used to hide the demo mode link from the plugin page. Only used when Redux is a plugin.\n if (class_exists('ReduxFrameworkPlugin')) {\n remove_filter('plugin_row_meta', array(ReduxFrameworkPlugin::instance(), 'plugin_metalinks'), null, 2);\n\n // Used to hide the activation notice informing users of the demo panel. Only used when Redux is a plugin.\n remove_action('admin_notices', array(ReduxFrameworkPlugin::instance(), 'admin_notices'));\n }\n }",
"function acp_helps()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['acp_helps'] == 1 ) ? 'ACP Help Entry' : 'ACP Help Entries';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'removed' : 'created';\n\t\t$helpkeys = array();\n\t\t\n\t\tforeach ( $this->xml_array['acp_helps_group']['acp_help'] as $k => $v )\n\t\t{\n\t\t\t$helpkeys[] = \"'{$v['page_key']['VALUE']}'\";\n\t\t}\n\t\t\n\t\t$this->ipsclass->DB->do_delete( 'acp_help', \"page_key IN (\".implode( \",\", $helpkeys ).\")\" );\n\t\t\n\t\tif ( !$this->ipsclass->input['un'] )\n\t\t{\n\t\t\tforeach ( $this->xml_array['acp_helps_group']['acp_help'] as $k => $v )\n\t\t\t{\n\t\t\t\t$this->_add_acp_help( $v );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&code=work&mod={$this->ipsclass->input['mod']}&step={$this->ipsclass->input['step']}{$uninstall}{$group}&st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['acp_helps']} {$object} {$operation}....\" );\n\t}",
"function onUninstall(){\n\tdelete_option( 'stackoverflowUser' );\n\tdelete_option( 'StackoverflowData' );\n}",
"private function delete_all_plugin_options() {\n\t\t// Deletes all options from the options table.\n\t\t$this->options->delete( Activation::OPTION_SHOW_ACTIVATION_NOTICE );\n\t\t$this->options->delete( Activation::OPTION_NEW_SITE_POSTS );\n\t\t$this->options->delete( Credentials::OPTION );\n\t\t$this->options->delete( 'googlesitekit-active-modules' );\n\t\t$this->options->delete( Search_Console::PROPERTY_OPTION );\n\t\t$this->options->delete( AdSense::OPTION );\n\t\t$this->options->delete( Analytics::OPTION );\n\t\t$this->options->delete( 'googlesitekit_analytics_adsense_linked' );\n\t\t$this->options->delete( PageSpeed_Insights::OPTION );\n\t\t$this->options->delete( Optimize::OPTION );\n\t\t$this->options->delete( Tag_Manager::OPTION );\n\t\t$this->options->delete( First_Admin::OPTION );\n\t\t$this->options->delete( OAuth_Client::OPTION_PROXY_NONCE );\n\t\t$this->options->delete( Beta_Migration::OPTION_IS_PRE_PROXY_INSTALL );\n\n\t\t// Clean up old site verification data, moved to user options.\n\t\t// Also clean up other old unused options.\n\t\t// @todo remove after RC.\n\t\t$this->options->delete( Verification::OPTION );\n\t\t$this->options->delete( Verification_Tag::OPTION );\n\t\t$this->options->delete( 'googlesitekit_api_key' );\n\t\t$this->options->delete( 'googlesitekit_available_modules' );\n\t\t$this->options->delete( 'googlesitekit_secret_token' );\n\t\t$this->options->delete( 'googlesitekit_project_id' );\n\t\t$this->options->delete( 'googlesitekit_gcp_project' );\n\t}",
"function flex_head_cleanup() {\r\n\t// Remove category feeds\r\n remove_action( 'wp_head', 'feed_links_extra', 3 );\r\n\t// Remove post and comment feeds\r\n remove_action( 'wp_head', 'feed_links', 2 );\r\n\t// Remove EditURI link\r\n\tremove_action( 'wp_head', 'rsd_link' );\r\n\t// Remove Windows live writer\r\n\tremove_action( 'wp_head', 'wlwmanifest_link' );\r\n\t// Remove index link\r\n\tremove_action( 'wp_head', 'index_rel_link' );\r\n\t// Remove previous link\r\n\tremove_action( 'wp_head', 'parent_post_rel_link', 10, 0 );\r\n\t// Remove start link\r\n\tremove_action( 'wp_head', 'start_post_rel_link', 10, 0 );\r\n\t// Remove links for adjacent posts\r\n\tremove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );\r\n\t// Remove WP version\r\n\tremove_action( 'wp_head', 'wp_generator' );\r\n}",
"public function cleanModuleList()\n {\n /**\n * @var \\Magento\\TestFramework\\ObjectManager $objectManager\n */\n $objectManager = \\Magento\\TestFramework\\Helper\\Bootstrap::getObjectManager();\n $objectManager->removeSharedInstance(ModuleList::class);\n $objectManager->removeSharedInstance(ModuleListInterface::class);\n }",
"function base_admin_bar_remove_menu_links_bloom() {\n\tglobal $wp_admin_bar;\n\n\t$wp_admin_bar->remove_menu( 'about' );\n\t$wp_admin_bar->remove_menu( 'wporg' );\n\t$wp_admin_bar->remove_menu( 'documentation' );\n\t$wp_admin_bar->remove_menu( 'support-forums' );\n\t$wp_admin_bar->remove_menu( 'feedback' );\n}",
"function realanswers_uninstall_options() {\r\n delete_option('real_apikey');\r\n delete_option('real_max_results');\r\n delete_option('real_custom_css');\r\n delete_option('real_captcha_public');\r\n delete_option('real_captcha_private');\r\n delete_option('real_location_count');\r\n delete_option('real_location_value');\r\n}",
"function remove_admin_bar_links() {\n global $wp_admin_bar;\n $wp_admin_bar->remove_menu('wp-logo');\n $wp_admin_bar->remove_menu('about');\n $wp_admin_bar->remove_menu('wporg');\n $wp_admin_bar->remove_menu('documentation');\n $wp_admin_bar->remove_menu('support-forums');\n $wp_admin_bar->remove_menu('feedback');\n $wp_admin_bar->remove_menu('updates');\n $wp_admin_bar->remove_menu('comments');\n $wp_admin_bar->remove_menu('new-content');\n}",
"function remove_dashboard_widgets() {\n global $wp_meta_boxes;\n \n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_drafts']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\n unset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\n unset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_activity']);\n remove_action( 'welcome_panel', 'wp_welcome_panel' );\n \n}",
"public function destroy()\n {\n $this->registry = array();\n\n $this->adaptor->deleteIndex($this->section);\n }",
"function my_contextual_help($contexual_help, $screen_id, $screen) {\n\tif('listing' == $screen->id) {\n\t\t$contextual_help = '<h2>Listings</h2>\n\t\t<p>Listings show the details of the items that we sell on the website. You can see a list of them on this page in reverse chronological order - the latest one we added is first.</p>\n\t\t<p>You can view/edit the details of each product by clicking on its name, or you can perform bulk actions using the dropdown menu and selecting multiple items.</p>';\n\t}elseif('edit-listing' == $screen->id) {\n\t\t$contextual_help = '<h2>Editing listings</h2>\n\t\t<p>This page allows you to view/modify listing details. Please make sure to fill out the available boxes with the appropriate details (listing image, price, brand) and <strong>not</strong> add these details to the listing description.</p>';\n\t}\n\treturn $contextual_help;\n}",
"function GTPress_unset_dashboard() {\r\n\t$disabled_menu_items = get_option('gtpressMenu_disabled_menu_items');\r\n\t$disabled_submenu_items = get_option('gtpressMenu_disabled_submenu_items');\r\n\tif (in_array('index.php', $disabled_menu_items)) {\r\n\t\tglobal $wp_meta_boxes;\r\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_right_now']);\r\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_plugins']);\r\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_incoming_links']);\r\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_wordpress_blog']);\r\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_recent_comments']);\r\n\t\tunset($wp_meta_boxes['dashboard']['normal']['core']['dashboard_other_wordpress_news']);\r\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_recent_drafts']);\t\r\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_quick_press']);\r\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_secondary']);\r\n\t\tunset($wp_meta_boxes['dashboard']['side']['core']['dashboard_primary']);\r\n\t}\r\n}",
"function fuzzloc_unload() {\n\n\tunregister_hook('post_local', 'addon/fuzzloc/fuzzloc.php', 'fuzzloc_post_hook');\n\tunregister_hook('feature_settings', 'addon/fuzzloc/fuzzloc.php', 'fuzzloc_settings');\n\tunregister_hook('feature_settings_post', 'addon/fuzzloc/fuzzloc.php', 'fuzzloc_settings_post');\n\n\n\tlogger(\"removed fuzzloc\");\n}",
"function tac_remove_menus() {\n\tglobal $menu;\n\t$restricted = array( __( 'Links' ),__( 'Comments' ) );\n\tend( $menu );\n\twhile ( prev( $menu ) ) {\n\t\t$value = explode( ' ', $menu[ key( $menu ) ] [0] );\n\t\tif ( in_array( $value[0] !== null?$value[0] : '' , $restricted ) ) {\n\t\t\tunset( $menu[ key( $menu ) ] );\n\t\t}\n\t}\n}",
"function cpt_remove_demo() {\n\n // Used to hide the demo mode link from the plugin page. Only used when Redux is a plugin.\n if (class_exists('ReduxFrameworkPlugin')) {\n remove_filter('plugin_row_meta', array(ReduxFrameworkPlugin::instance(), 'plugin_metalinks'), null, 2);\n\n // Used to hide the activation notice informing users of the demo panel. Only used when Redux is a plugin.\n remove_action('admin_notices', array(ReduxFrameworkPlugin::instance(), 'admin_notices'));\n }\n }",
"public function unsetAll() {\n\t\tparent::unsetAll();\n\t}"
] | [
"0.79559785",
"0.7526708",
"0.65100294",
"0.5804657",
"0.5787942",
"0.578178",
"0.5763128",
"0.5736307",
"0.5721354",
"0.55874944",
"0.55856746",
"0.5572879",
"0.5565632",
"0.5552036",
"0.5541662",
"0.55283314",
"0.55003875",
"0.5495352",
"0.5484615",
"0.5462737",
"0.54360265",
"0.54207605",
"0.5416505",
"0.54161054",
"0.53844357",
"0.5381876",
"0.53759265",
"0.534069",
"0.53227663",
"0.5316563",
"0.5303416",
"0.53021187",
"0.5299601",
"0.5295699",
"0.5263101",
"0.5259079",
"0.5253865",
"0.5237652",
"0.5227437",
"0.5220885",
"0.52200174",
"0.52171165",
"0.5214438",
"0.52137816",
"0.5212166",
"0.520338",
"0.5203017",
"0.516539",
"0.516328",
"0.5157765",
"0.51498616",
"0.51437163",
"0.5131326",
"0.5130621",
"0.5123625",
"0.51160586",
"0.51115084",
"0.51014924",
"0.5101467",
"0.5099979",
"0.5076146",
"0.50637007",
"0.506201",
"0.5061139",
"0.5059282",
"0.50579613",
"0.5053977",
"0.5052313",
"0.5043315",
"0.50396365",
"0.503937",
"0.5032409",
"0.50310606",
"0.5030227",
"0.50258785",
"0.5022967",
"0.5017654",
"0.501619",
"0.50159764",
"0.5011174",
"0.5008783",
"0.49986425",
"0.49893552",
"0.4986318",
"0.49833483",
"0.49787423",
"0.49763986",
"0.49701127",
"0.4968613",
"0.49666348",
"0.4966022",
"0.49640435",
"0.49509057",
"0.49459243",
"0.49398455",
"0.49321973",
"0.49299046",
"0.49241143",
"0.49176234",
"0.49175858"
] | 0.59107137 | 3 |
Gets the content from a contextual help sidebar. | public function get_sidebar() {
return $this->_sidebar;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_site_screen_help_sidebar_content()\n {\n }",
"public function get_help_sidebar()\n {\n }",
"function builder_set_help_sidebar() {\n\tob_start();\n\t\n?>\n<p><strong><?php _e( 'For more information:', 'it-l10n-Builder-Everett' ); ?></strong></p>\n<p><?php _e( '<a href=\"http://ithemes.com/forum/\" target=\"_blank\">Support Forum</a>' ); ?></p>\n<p><?php _e( '<a href=\"http://ithemes.com/codex/page/Builder\" target=\"_blank\">Codex</a>' ); ?></p>\n<?php\n\t\n\t$help = ob_get_contents();\n\tob_end_clean();\n\t\n\t$help = apply_filters( 'builder_filter_help_sidebar', $help );\n\t\n\tif ( ! empty( $help ) ) {\n\t\t$screen = get_current_screen();\n\t\t\n\t\tif ( is_callable( array( $screen, 'set_help_sidebar' ) ) )\n\t\t\t$screen->set_help_sidebar( $help );\n\t}\n}",
"private function info()\n\t{\n\t\t$data = file_get_contents(DATAPATH.'sidebar.md');\n\t\t$result = $this->parsedown->text($data);\n\t\t$result = $this->parser->parse_string($result, $this->data, true);\n\t\treturn $result;\n\t}",
"function dfcg_help_sidebar() {\n\n\t$sidebar = '<h3>'.__( 'DCG Resources', DFCG_DOMAIN ) . '</h3>';\n\t\n\t$sidebar .= 'Version: ' . DFCG_VER;\n\t\n\t$sidebar .= '<ul>';\n\t$sidebar .= '<li><a target=\"_blank\" href=\"'.DFCG_HOME .'quick-start-guide/\">'. __( 'Quick Start', DFCG_DOMAIN ) .'</a></li>'; \n\t$sidebar .= '<li><a target=\"_blank\" href=\"'.DFCG_HOME .'configuration-guide/\">'. __( 'Configuration Guide', DFCG_DOMAIN ) . '</a></li>';\n\t$sidebar .= '<li><a target=\"_blank\" href=\"'.DFCG_HOME .'documentation/\">'. __( 'Documentation', DFCG_DOMAIN ) . '</a></li>';\n\t$sidebar .= '<li><a target=\"_blank\" href=\"'.DFCG_HOME .'faq/\">'. __( 'FAQ', DFCG_DOMAIN ) . '</a></li>';\n\t$sidebar .= '<li><a target=\"_blank\" href=\"'.DFCG_HOME .'error-messages/\">'. __( 'Error Messages', DFCG_DOMAIN ) . '</a></li>';\n\t$sidebar .= '<li><a target=\"_blank\" href=\"'.DFCG_HOME .'changelog/\">'. __( 'Change Log', DFCG_DOMAIN ) . '</a></li>';\n\t$sidebar .= '<li><a target=\"_blank\" href=\"http://www.studiograsshopper.ch/forum/\">'. __( 'Support Forum', DFCG_DOMAIN ) . '</a></li>';\n\t$sidebar .= '</ul>';\n\t\n\t\n\t$sidebar .= '<ul>';\n\t$sidebar .= '<li><a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=10131319\">';\n\t$sidebar .= __( 'Donate', DFCG_DOMAIN ) . '</a></li>';\n\t$sidebar .= '</ul>';\n\n\treturn $sidebar;\n}",
"function foodpress_admin_help_tab_content() {\r\n\t$screen = get_current_screen();\r\n\r\n\t$screen->add_help_tab( array(\r\n\t 'id'\t=> 'foodpress_overview_tab',\r\n\t 'title'\t=> __( 'Overview', 'foodpress' ),\r\n\t 'content'\t=>\r\n\r\n\t \t'<p>' . __( 'Thank you for using FoodPress plugin. ', 'foodpress' ). '</p>'\r\n\r\n\t) );\r\n\r\n\r\n\r\n\r\n\t$screen->set_help_sidebar(\r\n\t\t'<p><strong>' . __( 'For more information:', 'foodpress' ) . '</strong></p>' .\r\n\t\t'<p><a href=\"http://demo.myfoodpress.com/\" target=\"_blank\">' . __( 'foodpress Demo', 'foodpress' ) . '</a></p>' .\r\n\t\t\r\n\t\t'<p><a href=\"http://demo.myfoodpress.com/documentation/\" target=\"_blank\">' . __( 'Documentation', 'foodpress' ) . '</a></p>'.\r\n\t\t'<p><a href=\"https://foodpressplugin.freshdesk.com/support/home/\" target=\"_blank\">' . __( 'Support', 'foodpress' ) . '</a></p>'\r\n\t);\r\n}",
"public function get_contextual_help() {\n\t\treturn '<p>' . __( 'Hovering over a row in the intrusions list will display action links that allow you to manage the intrusion. You can perform the following actions:', 'mute-screamer' ) . '</p>' .\n\t\t\t'<ul>' .\n\t\t\t'<li>' . __( 'Exclude automatically adds the item to the Exception fields list.', 'mute-screamer' ) . '</li>' .\n\t\t\t'<li>' . __( 'Delete permanently deletes the intrusion.', 'mute-screamer' ) . '</li>' .\n\t\t\t'</ul>';\n\t}",
"public function set_help_sidebar($content)\n {\n }",
"function hybrid_get_utility_after_content() {\n\tget_sidebar( 'after-content' );\n}",
"function get_sidebar() {\n require_once(COMP_DIR . 'sidebars.php');\n }",
"function sc_sidebar_content( $attr, $content ) {\n\t$content = do_shortcode( $content );\n\n\tob_start();\n\t?>\n\t<div class=\"page-sidebar-content\">\n\t\t<?php echo( $content ); ?>\n\t</div>\n\t<?php\n\treturn ob_get_clean();\n}",
"function wpex_header_aside_content() {\n\n\t// Get header aside content\n\t$content = wpex_get_translated_theme_mod( 'header_aside' );\n\n\t// Check if content is a page ID and get page content\n\tif ( is_numeric( $content ) ) {\n\t\t$post_id = $content;\n\t\t$post = get_post( $post_id );\n\t\tif ( $post && ! is_wp_error( $post ) ) {\n\t\t\t$content = $post->post_content;\n\t\t}\n\t}\n\n\t// Apply filters and return content\n\treturn apply_filters( 'wpex_header_aside_content', $content );\n\n}",
"function ft_hook_sidebar() {}",
"public function quickSidebarAction();",
"public function content(){\n\t\treturn mvc_service_Front::getInstance()->getCurrentActionHtml();\n\t}",
"function hybrid_get_utility_before_content() {\n\tget_sidebar( 'before-content' );\n}",
"function wp_get_sidebar($id)\n {\n }",
"public function getHelpSidbar()\n {\n $txt_title = __(\"Resources\", 'duplicator');\n $txt_home = __(\"Knowledge Base\", 'duplicator');\n $txt_guide = __(\"Full User Guide\", 'duplicator');\n $txt_faq = __(\"Technical FAQs\", 'duplicator');\n\t\t$txt_sets = __(\"Package Settings\", 'duplicator');\n $this->screen->set_help_sidebar(\n \"<div class='dup-screen-hlp-info'><b>{$txt_title}:</b> <br/>\"\n .\"<i class='fa fa-home'></i> <a href='https://snapcreek.com/duplicator/docs/' target='_sc-home'>{$txt_home}</a> <br/>\"\n .\"<i class='fa fa-book'></i> <a href='https://snapcreek.com/duplicator/docs/guide/' target='_sc-guide'>{$txt_guide}</a> <br/>\"\n .\"<i class='fa fa-file-code-o'></i> <a href='https://snapcreek.com/duplicator/docs/faqs-tech/' target='_sc-faq'>{$txt_faq}</a> <br/>\"\n\t\t\t.\"<i class='fa fa-gear'></i> <a href='admin.php?page=duplicator-settings&tab=package'>{$txt_sets}</a></div>\"\n );\n }",
"function hybrid_get_secondary() {\n\tget_sidebar( 'secondary' );\n}",
"public function sidebarAction();",
"public function getHelp()\n {\n $this->parseDocBlock();\n return $this->help;\n }",
"public function menu_get_active_help()\n {\n return menu_get_active_help();\n }",
"function monitis_addon_sidebar() {\n $modulelink = $vars['modulelink'];\n $sidebar = <<<EOF\n <span class=\"header\">\n <img src=\"images/icons/addonmodules.png\" class=\"absmiddle\" width=\"16\" height=\"16\" />Monitis Links</span>\n <ul class=\"menu\">\n <li><a href=\"http://portal.monitis.com/\">Monitis Dashboard</a></li>\n </ul>\nEOF;\n return $sidebar;\n}",
"function wp_sidebar_description($id)\n {\n }",
"public function getContent() {\n\t\treturn $this->current_content;\n\t}",
"public static function current() {\r\n $help_name = strtolower(str_replace('HW_HELP_','', get_called_class()));\r\n return self::get($help_name)->plugin_help;\r\n }",
"function GetSidebar () {\n \t$return = '';\n\n \tif (is_array($this->sidebar_buttons)) {\n\t \tforeach ($this->sidebar_buttons as $button) {\n$return .= '<div class=\"pull-right\"> <a style=\"text-align:right;margin-right:6px;\" class=\"' . $button[''] . '\" href=\"' . $button['link'] . '\">' . $button['text'] . '</a></div>';\n\t \t}\n\t }\n \tif (is_array($this->quicklink_buttons)) {\n\t \tforeach ($this->quicklink_buttons as $button) {\n$return .= '<div class=\"pull-right\"> <a style=\"text-align:right;\" class=\"' . $button['btn btn-circle btn-sm'] . '\" href=\"' . $button['link'] . '\">' . $button['text'] . '</a></div>';\n\t \t}\n\t }\n\n \tif (is_array($this->sidebar_notes)) {\n\t \tforeach ($this->sidebar_notes as $note) {\n\t \t\t$return .= '<div class=\"well\">' . $note['text'] . '</div>';\n\t \t}\n\t }\n\n \treturn $return;\n }",
"public function getTOC()\n {\n $devhelp = new Devhelp(@file_get_contents($this->DevhelpFile));\n return $devhelp->process() ? $devhelp->getTOC() : array();\n }",
"function theme_styleguide_content($variables) {\n return $variables['content'];\n}",
"function ShowAdminHelp()\r\n{\r\n\tglobal $txt, $helptxt, $context, $scripturl;\r\n\r\n\tif (!isset($_GET['help']) || !is_string($_GET['help']))\r\n\t\tfatal_lang_error('no_access', false);\r\n\r\n\tif (!isset($helptxt))\r\n\t\t$helptxt = array();\r\n\r\n\t// Load the admin help language file and template.\r\n\tloadLanguage('Help');\r\n\r\n\t// Permission specific help?\r\n\tif (isset($_GET['help']) && substr($_GET['help'], 0, 14) == 'permissionhelp')\r\n\t\tloadLanguage('ManagePermissions');\r\n\r\n\tloadTemplate('Help');\r\n\r\n\t// Set the page title to something relevant.\r\n\t$context['page_title'] = $context['forum_name'] . ' - ' . $txt['help'];\r\n\r\n\t// Don't show any template layers, just the popup sub template.\r\n\t$context['template_layers'] = array();\r\n\t$context['sub_template'] = 'popup';\r\n\r\n\t// What help string should be used?\r\n\tif (isset($helptxt[$_GET['help']]))\r\n\t\t$context['help_text'] = $helptxt[$_GET['help']];\r\n\telseif (isset($txt[$_GET['help']]))\r\n\t\t$context['help_text'] = $txt[$_GET['help']];\r\n\telse\r\n\t\t$context['help_text'] = $_GET['help'];\r\n\r\n\t// Does this text contain a link that we should fill in?\r\n\tif (preg_match('~%([0-9]+\\$)?s\\?~', $context['help_text'], $match))\r\n\t\t$context['help_text'] = sprintf($context['help_text'], $scripturl, $context['session_id'], $context['session_var']);\r\n}",
"public function get_help_page()\n\t{\n\t\t$this->load_misc_methods();\n\t\treturn cms_module_GetHelpPage($this);\n\t}",
"public function get_content() {\n\n if ($this->content !== null) {\n return $this->content;\n }\n\n if (empty($this->instance)) {\n $this->content = '';\n return $this->content;\n }\n\n $this->content = new stdClass();\n $this->content->items = array();\n $this->content->icons = array();\n $this->content->footer = '';\n\n // User/index.php expect course context, so get one if page has module context.\n $currentcontext = $this->page->context->get_course_context(false);\n\n if (!empty($this->config->text)) {\n $this->content->text = $this->config->text;\n }\n\n $this->content = '';\n if (empty($currentcontext)) {\n return $this->content;\n }\n if ($this->page->course->id == SITEID) {\n $this->context->text .= \"site context\";\n }\n\n if (!empty($this->config->text)) {\n $this->content->text .= $this->config->text;\n }\n\n return $this->content;\n }",
"public static function help_inner () \n { \n $html = null;\n\n $top = __( 'Instruction Manual', 'label' );\n $inner = self::help_center();\n $bottom = self::page_foot();\n\n $html .= self::page_body( 'help', $top, $inner, $bottom );\n\n return $html;\n }",
"function getHelp()\n {\n return $this->help;\n }",
"public function getSidebar($name = null)\n {\n do_action('get_sidebar', $name);\n $this->getPartial('sidebar', $name);\n }",
"public static function getAllHelp()\n {\n return $this->_help;\n }",
"public function sidebar() {\n $args = func_get_args();\n $sidebar = $args[0];\n\n if (!is_array($sidebar)) {\n $sidebar = array('label' => $sidebar);\n }\n\n if (isset($args[1]) && is_string($args[1])) {\n $sidebar['action'] = $args[1];\n }\n\n $sidebar = array_merge(array(\n 'tab' => $this->tab(),\n 'action' => null,\n 'flag' => true,\n 'id' => $this->id(),\n ), $sidebar);\n\n $this->hook($sidebar['tab'] . '-sidebar', 'createSideMenu', array(\n $sidebar['id'],\n $sidebar['label'],\n $sidebar['action'],\n $sidebar['flag'])\n );\n }",
"public function getHelp()\n\t{\n\t\treturn $this->run(array('help'));\n\t}",
"function get_sidebar($name = \\null, $args = array())\n {\n }",
"public function getHelp()\n {\n return $this->run(array(\n 'help'\n ));\n }",
"public function getPageHelp()\n {\n switch ($this->_page)\n {\n case 'indexindex':\n return $this->_help['Login']['help'];\n\n case 'queueindex':\n return $this->_help['Rig Selection']['help'];\n\n case 'queuequeuing':\n return $this->_help['Queue']['help'];\n\n case 'bookingsindex':\n return $this->_help['Reservation']['help'];\n\n case 'bookingswaiting':\n return $this->_help['Reservation Waiting']['help'];\n\n case 'bookingsexisting':\n return $this->_help['Existing Reservations']['help'];\n\n case 'sessionindex':\n return $this->_help['Session']['help'];\n\n default:\n return 'This page has no help.';\n }\n }",
"function sidebar(){\n\n\t\t\t//code for checking the trial period days left for Provider/AA\n\t\t\t$freetrialstr=$this->getFreeTrialDaysLeft($this->userInfo('user_id'));\n\t\t\t$data = array(\n\n\t\t\t\t'name_first' => $this->userInfo('name_first'),\n\n\t\t\t\t'name_last' => $this->userInfo('name_last'),\n\n\t\t\t\t'sysadmin_link' => $this->sysadmin_link(),\n\n\t\t\t\t'therapist_link' => $this->therapist_link(),\n\n\t\t\t\t'freetrial_link' => $freetrialstr\n\n\t\t\t);\n\n\t\t\t\n\n\t\t\treturn $this->build_template($this->get_template(\"sidebar\"),$data);\n\n\t\t}",
"function my_contextual_help($contexual_help, $screen_id, $screen) {\n\tif('listing' == $screen->id) {\n\t\t$contextual_help = '<h2>Listings</h2>\n\t\t<p>Listings show the details of the items that we sell on the website. You can see a list of them on this page in reverse chronological order - the latest one we added is first.</p>\n\t\t<p>You can view/edit the details of each product by clicking on its name, or you can perform bulk actions using the dropdown menu and selecting multiple items.</p>';\n\t}elseif('edit-listing' == $screen->id) {\n\t\t$contextual_help = '<h2>Editing listings</h2>\n\t\t<p>This page allows you to view/modify listing details. Please make sure to fill out the available boxes with the appropriate details (listing image, price, brand) and <strong>not</strong> add these details to the listing description.</p>';\n\t}\n\treturn $contextual_help;\n}",
"function ShowHelp()\r\n{\r\n\tglobal $settings, $user_info, $language, $context, $txt, $sourcedir, $options, $scripturl;\r\n\r\n\tloadTemplate('Help');\r\n\tloadLanguage('Manual');\r\n\r\n\t$manual_areas = array(\r\n\t\t'getting_started' => array(\r\n\t\t\t'title' => $txt['manual_category_getting_started'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'introduction' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_intro'],\r\n\t\t\t\t\t'template' => 'manual_intro',\r\n\t\t\t\t),\r\n\t\t\t\t'main_menu' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_main_menu'],\r\n\t\t\t\t\t'template' => 'manual_main_menu',\r\n\t\t\t\t),\r\n\t\t\t\t'board_index' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_board_index'],\r\n\t\t\t\t\t'template' => 'manual_board_index',\r\n\t\t\t\t),\r\n\t\t\t\t'message_view' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_message_view'],\r\n\t\t\t\t\t'template' => 'manual_message_view',\r\n\t\t\t\t),\r\n\t\t\t\t'topic_view' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_topic_view'],\r\n\t\t\t\t\t'template' => 'manual_topic_view',\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t),\r\n\t\t'registering' => array(\r\n\t\t\t'title' => $txt['manual_category_registering'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'when_how' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_when_how_register'],\r\n\t\t\t\t\t'template' => 'manual_when_how_register',\r\n\t\t\t\t),\r\n\t\t\t\t'registration_screen' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_registration_screen'],\r\n\t\t\t\t\t'template' => 'manual_registration_screen',\r\n\t\t\t\t),\r\n\t\t\t\t'activating_account' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_activating_account'],\r\n\t\t\t\t\t'template' => 'manual_activating_account',\r\n\t\t\t\t),\r\n\t\t\t\t'logging_in' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_logging_in_out'],\r\n\t\t\t\t\t'template' => 'manual_logging_in_out',\r\n\t\t\t\t),\r\n\t\t\t\t'password_reminders' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_password_reminders'],\r\n\t\t\t\t\t'template' => 'manual_password_reminders',\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t),\r\n\t\t'profile_features' => array(\r\n\t\t\t'title' => $txt['manual_category_profile_features'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'profile_info' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_profile_info'],\r\n\t\t\t\t\t'template' => 'manual_profile_info_summary',\r\n\t\t\t\t\t'description' => $txt['manual_entry_profile_info_desc'],\r\n\t\t\t\t\t'subsections' => array(\r\n\t\t\t\t\t\t'summary' => array($txt['manual_entry_profile_info_summary'], 'template' => 'manual_profile_info_summary'),\r\n\t\t\t\t\t\t'posts' => array($txt['manual_entry_profile_info_posts'], 'template' => 'manual_profile_info_posts'),\r\n\t\t\t\t\t\t'stats' => array($txt['manual_entry_profile_info_stats'], 'template' => 'manual_profile_info_stats'),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t\t'modify_profile' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_modify_profile'],\r\n\t\t\t\t\t'template' => 'manual_modify_profile_settings',\r\n\t\t\t\t\t'description' => $txt['manual_entry_modify_profile_desc'],\r\n\t\t\t\t\t'subsections' => array(\r\n\t\t\t\t\t\t'settings' => array($txt['manual_entry_modify_profile_settings'], 'template' => 'manual_modify_profile_settings'),\r\n\t\t\t\t\t\t'forum' => array($txt['manual_entry_modify_profile_forum'], 'template' => 'manual_modify_profile_forum'),\r\n\t\t\t\t\t\t'look' => array($txt['manual_entry_modify_profile_look'], 'template' => 'manual_modify_profile_look'),\r\n\t\t\t\t\t\t'auth' => array($txt['manual_entry_modify_profile_auth'], 'template' => 'manual_modify_profile_auth'),\r\n\t\t\t\t\t\t'notify' => array($txt['manual_entry_modify_profile_notify'], 'template' => 'manual_modify_profile_notify'),\r\n\t\t\t\t\t\t'pm' => array($txt['manual_entry_modify_profile_pm'], 'template' => 'manual_modify_profile_pm'),\r\n\t\t\t\t\t\t'buddies' => array($txt['manual_entry_modify_profile_buddies'], 'template' => 'manual_modify_profile_buddies'),\r\n\t\t\t\t\t\t'groups' => array($txt['manual_entry_modify_profile_groups'], 'template' => 'manual_modify_profile_groups'),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t\t'actions' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_profile_actions'],\r\n\t\t\t\t\t'template' => 'manual_profile_actions_subscriptions',\r\n\t\t\t\t\t'description' => $txt['manual_entry_modify_profile_desc'],\r\n\t\t\t\t\t'subsections' => array(\r\n\t\t\t\t\t\t'subscriptions' => array($txt['manual_entry_profile_actions_subscriptions'], 'template' => 'manual_profile_actions_subscriptions'),\r\n\t\t\t\t\t\t'delete' => array($txt['manual_entry_profile_actions_delete'], 'template' => 'manual_profile_actions_delete'),\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'posting_basics' => array(\r\n\t\t\t'title' => $txt['manual_category_posting_basics'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t/*'posting_screen' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_posting_screen'],\r\n\t\t\t\t\t'template' => 'manual_posting_screen',\r\n\t\t\t\t),*/\r\n\t\t\t\t'posting_topics' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_posting_topics'],\r\n\t\t\t\t\t'template' => 'manual_posting_topics',\r\n\t\t\t\t),\r\n\t\t\t\t/*'quoting_posts' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_quoting_posts'],\r\n\t\t\t\t\t'template' => 'manual_quoting_posts',\r\n\t\t\t\t),\r\n\t\t\t\t'modifying_posts' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_modifying_posts'],\r\n\t\t\t\t\t'template' => 'manual_modifying_posts',\r\n\t\t\t\t),*/\r\n\t\t\t\t'smileys' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_smileys'],\r\n\t\t\t\t\t'template' => 'manual_smileys',\r\n\t\t\t\t),\r\n\t\t\t\t'bbcode' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_bbcode'],\r\n\t\t\t\t\t'template' => 'manual_bbcode',\r\n\t\t\t\t),\r\n\t\t\t\t/*'wysiwyg' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_wysiwyg'],\r\n\t\t\t\t\t'template' => 'manual_wysiwyg',\r\n\t\t\t\t),*/\r\n\t\t\t),\r\n\t\t),\r\n\t\t'personal_messages' => array(\r\n\t\t\t'title' => $txt['manual_category_personal_messages'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'messages' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_pm_messages'],\r\n\t\t\t\t\t'template' => 'manual_pm_messages',\r\n\t\t\t\t),\r\n\t\t\t\t/*'actions' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_pm_actions'],\r\n\t\t\t\t\t'template' => 'manual_pm_actions',\r\n\t\t\t\t),\r\n\t\t\t\t'preferences' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_pm_preferences'],\r\n\t\t\t\t\t'template' => 'manual_pm_preferences',\r\n\t\t\t\t),*/\r\n\t\t\t),\r\n\t\t),\r\n\t\t'forum_tools' => array(\r\n\t\t\t'title' => $txt['manual_category_forum_tools'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'searching' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_searching'],\r\n\t\t\t\t\t'template' => 'manual_searching',\r\n\t\t\t\t),\r\n\t\t\t\t/*'memberlist' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_memberlist'],\r\n\t\t\t\t\t'template' => 'manual_memberlist',\r\n\t\t\t\t),\r\n\t\t\t\t'calendar' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_calendar'],\r\n\t\t\t\t\t'template' => 'manual_calendar',\r\n\t\t\t\t),*/\r\n\t\t\t),\r\n\t\t),\r\n\t);\r\n\r\n\t// Set a few options for the menu.\r\n\t$menu_options = array(\r\n\t\t'disable_url_session_check' => true,\r\n\t);\r\n\r\n\trequire_once($sourcedir . '/Subs-Menu.php');\r\n\t$manual_area_data = createMenu($manual_areas, $menu_options);\r\n\tunset($manual_areas);\r\n\r\n\t// Make a note of the Unique ID for this menu.\r\n\t$context['manual_menu_id'] = $context['max_menu_id'];\r\n\t$context['manual_menu_name'] = 'menu_data_' . $context['manual_menu_id'];\r\n\r\n\t// Get the selected item.\r\n\t$context['manual_area_data'] = $manual_area_data;\r\n\t$context['menu_item_selected'] = $manual_area_data['current_area'];\r\n\r\n\t// Set a title and description for the tab strip if subsections are present.\r\n\tif (isset($context['manual_area_data']['subsections']))\r\n\t\t$context[$context['manual_menu_name']]['tab_data'] = array(\r\n\t\t\t'title' => $manual_area_data['label'],\r\n\t\t\t'description' => isset($manual_area_data['description']) ? $manual_area_data['description'] : '',\r\n\t\t);\r\n\r\n\t// Bring it on!\r\n\t$context['sub_template'] = isset($manual_area_data['current_subsection'], $manual_area_data['subsections'][$manual_area_data['current_subsection']]['template']) ? $manual_area_data['subsections'][$manual_area_data['current_subsection']]['template'] : $manual_area_data['template'];\r\n\t$context['page_title'] = $manual_area_data['label'] . ' - ' . $txt['manual_smf_user_help'];\r\n\r\n\t// Build the link tree.\r\n\t$context['linktree'][] = array(\r\n\t\t'url' => $scripturl . '?action=help',\r\n\t\t'name' => $txt['help'],\r\n\t);\r\n\tif (isset($manual_area_data['current_area']) && $manual_area_data['current_area'] != 'index')\r\n\t\t$context['linktree'][] = array(\r\n\t\t\t'url' => $scripturl . '?action=admin;area=' . $manual_area_data['current_area'],\r\n\t\t\t'name' => $manual_area_data['label'],\r\n\t\t);\r\n\tif (!empty($manual_area_data['current_subsection']) && $manual_area_data['subsections'][$manual_area_data['current_subsection']][0] != $manual_area_data['label'])\r\n\t\t$context['linktree'][] = array(\r\n\t\t\t'url' => $scripturl . '?action=admin;area=' . $manual_area_data['current_area'] . ';sa=' . $manual_area_data['current_subsection'],\r\n\t\t\t'name' => $manual_area_data['subsections'][$manual_area_data['current_subsection']][0],\r\n\t\t);\r\n\r\n\t// We actually need a special style sheet for help ;)\r\n\t$context['template_layers'][] = 'manual';\r\n\r\n\t// The smiley info page needs some cheesy information.\r\n\tif ($manual_area_data['current_area'] == 'smileys')\r\n\t\tShowSmileyHelp();\r\n}",
"function dfcg_plugin_help() {\n\t\n\tglobal $current_screen;\n\t\n\t$sidebar = dfcg_help_sidebar();\n\t\n\t$current_screen->set_help_sidebar( $sidebar );\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-general',\n\t\t'title' => __( 'General info', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_general'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-theme',\n\t\t'title' => __( 'Theme integration', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_theme'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-quick',\n\t\t'title' => __( 'Quick Start', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_quick'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-gallery',\n\t\t'title' => __( 'Gallery Method', DFCG_DOMAIN ),\n\t\t'callback' => \"dfcg_help_gallery\"\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-images',\n\t\t'title' => __( 'Image Management', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_images'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-desc',\n\t\t'title' => __( 'Descriptions', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_desc'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-css',\n\t\t'title' => __( 'Gallery CSS', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_css'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-scripts',\n\t\t'title' => __( 'Load Scripts', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_scripts'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-troubleshooting',\n\t\t'title' => __( 'Troubleshooting', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_trouble'\n\t));\n}",
"function sidebar() {\n\t\t}",
"public function getHelp() {\n\t\treturn $this->help;\n\t}",
"public function getHelp() {\n\t\treturn $this->help;\n\t}",
"protected function displayHelp()\n {\n return $this->context->smarty->fetch($this->module->getLocalPath().'views/templates/admin/rewards_info.tpl');\n }",
"function scm_should_this_get_sidebar() {\n echo \" \";\n}",
"public function getGeneralDocumentation();",
"public function helpContent( $title, $message ) {\n\n $content = <<<CONTENT\n<div class=\"wpxdeflector-help-box\">\n<div class=\"wpxdeflector-help-title\">\nCONTENT;\n\n $content .= $title;\n\n $content .= <<<CONTENT\n<span class=\"wpxdeflector-accordion-selector\">Read more...</span>\n</div>\n<div id=\"wpxdeflector-accordion-help\">\n <p>\nCONTENT;\n\n $content .= $message;\n\n $content .= <<<CONTENT\n </p>\n</div>\n</div>\nCONTENT;\n\n return $content;\n\n }",
"public function showContextualLink() {\n return $this->configuration['show_contextual_link'];\n }",
"private function help_style_tabs() {\n $help_sidebar = $this->get_sidebar();\n\n $help_class = '';\n if ( ! $help_sidebar ) :\n $help_class .= ' no-sidebar';\n endif;\n\n // Time to render!\n ?>\n <div id=\"screen-meta\" class=\"tr-options metabox-prefs\">\n\n <div id=\"contextual-help-wrap\" class=\"<?php echo esc_attr( $help_class ); ?>\" >\n <div id=\"contextual-help-back\"></div>\n <div id=\"contextual-help-columns\">\n <div class=\"contextual-help-tabs\">\n <ul>\n <?php\n $class = ' class=\"active\"';\n $tabs = $this->get_tabs();\n foreach ( $tabs as $tab ) :\n $link_id = \"tab-link-{$tab['id']}\";\n $panel_id = (!empty($tab['url'])) ? $tab['url'] : \"#tab-panel-{$tab['id']}\";\n ?>\n <li id=\"<?php echo esc_attr( $link_id ); ?>\"<?php echo $class; ?>>\n <a href=\"<?php echo esc_url( \"$panel_id\" ); ?>\">\n <?php echo esc_html( $tab['title'] ); ?>\n </a>\n </li>\n <?php\n $class = '';\n endforeach;\n ?>\n </ul>\n </div>\n\n <?php if ( $help_sidebar ) : ?>\n <div class=\"contextual-help-sidebar\">\n <?php echo $help_sidebar; ?>\n </div>\n <?php endif; ?>\n\n <div class=\"contextual-help-tabs-wrap\">\n <?php\n $classes = 'help-tab-content active';\n foreach ( $tabs as $tab ):\n $panel_id = \"tab-panel-{$tab['id']}\";\n ?>\n\n <div id=\"<?php echo esc_attr( $panel_id ); ?>\" class=\"inside <?php echo $classes; ?>\">\n <?php\n // Print tab content.\n echo $tab['content'];\n\n // If it exists, fire tab callback.\n if ( ! empty( $tab['callback'] ) )\n call_user_func_array( $tab['callback'], array( $this, $tab ) );\n ?>\n </div>\n <?php\n $classes = 'help-tab-content';\n endforeach;\n ?>\n </div>\n </div>\n </div>\n </div>\n <?php\n }",
"public function sidebarAction()\n\t{\n\t $em = $this->getDoctrine()\n\t ->getManager();\n\n\t $tags = $em->getRepository(Blog::class)\n\t ->getTags();\n\n\t $tagWeights = $em->getRepository(Blog::class)\n\t ->getTagWeights($tags);\n\n\t\n\n\t\t$commentLimit = $this->getParameter('blogger_blog.comments.latest_comment_limit');\n\n\t\t//$commentLimit = 10 ;\n \t$latestComments = $em->getRepository(Comment::class)\n ->getLatestComments($commentLimit);\n\n\t return $this->render('Page/sidebar.html.twig', array(\n\t \t'latestComments' => $latestComments,\n\t 'tags' => $tagWeights\n\t ));\n\t}",
"function get_content() {\r\n\t\treturn $this->content;\r\n\t}",
"public function get_content() {\n global $DB, $OUTPUT, $PAGE;\n if (!is_null($this->content)) {\n return $this->content;\n }\n\n $selected = optional_param('section', null, PARAM_INT);\n $intab = optional_param('dtab', null, PARAM_TEXT);\n\n $this->content = new stdClass();\n $this->content->footer = '';\n $this->content->text = '';\n\n if (empty($this->instance)) {\n return $this->content;\n }\n\n if ($PAGE->pagelayout == 'admin') {\n return $this->content;\n }\n\n $format = course_get_format($this->page->course);\n $course = $format->get_course(); // Needed to have numsections property available.\n\n if (!$format->uses_sections()) {\n if (debugging()) {\n $this->content->text = get_string('notusingsections', 'block_course_modulenavigation');\n }\n return $this->content;\n }\n\n if ($format instanceof format_dynamictabs) {\n // Dont show the menu in a tab.\n if ($intab) {\n return $this->content;\n }\n $sections = $format->tabs_get_sections();\n } else {\n $sections = $format->get_sections();\n }\n\n if (empty($sections)) {\n return $this->content;\n }\n\n $context = context_course::instance($course->id);\n\n $modinfo = get_fast_modinfo($course);\n\n $template = new stdClass();\n\n $completioninfo = new completion_info($course);\n\n if ($completioninfo->is_enabled()) {\n $template->completionon = 'completion';\n }\n\n $completionok = array(COMPLETION_COMPLETE, COMPLETION_COMPLETE_PASS);\n\n $thiscontext = context::instance_by_id($this->page->context->id);\n\n $inactivity = false;\n $myactivityid = 0;\n\n if ($thiscontext->get_level_name() == get_string('activitymodule')) {\n // Uh-oh we are in a activity.\n $inactivity = true;\n if ($cm = $DB->get_record_sql(\"SELECT cm.*, md.name AS modname\n FROM {course_modules} cm\n JOIN {modules} md ON md.id = cm.module\n WHERE cm.id = ?\", array($thiscontext->instanceid))) {\n $myactivityid = $cm->id;\n }\n }\n\n if ($format instanceof format_dynamictabs) {\n $coursesections = $DB->get_records('course_sections', array('course' => $course->id));\n $mysection = 0;\n foreach ($coursesections as $cs) {\n $csmodules = explode(',', $cs->sequence);\n if (in_array($myactivityid, $csmodules)) {\n $mysection = $cs->id;\n }\n }\n if ($mysection) {\n if ($DB->get_records('format_dynamictabs_tabs', array('courseid' => $course->id,\n 'sectionid' => $mysection))) {\n // This is a module inside a tab of the Dynamic tabs course format.\n // Prevent showing of this menu.\n return $this->content;\n }\n }\n }\n\n $template->inactivity = $inactivity;\n\n if (count($sections) > 1) {\n $template->hasprevnext = true;\n $template->hasnext = true;\n $template->hasprev = true;\n }\n\n $courseurl = new moodle_url('/course/view.php', array('id' => $course->id));\n $template->courseurl = $courseurl->out();\n $sectionnums = array();\n foreach ($sections as $section) {\n $sectionnums[] = $section->section;\n }\n $template->arrowpixurl = $OUTPUT->pix_url('arrow-down', 'block_course_modulenavigation');\n foreach ($sections as $section) {\n $i = $section->section;\n if ($i > $course->numsections) {\n break;\n }\n if (!$section->uservisible) {\n continue;\n }\n\n if (!empty($section->name)) {\n $title = format_string($section->name, true, array('context' => $context));\n\n } else {\n $summary = file_rewrite_pluginfile_urls($section->summary, 'pluginfile.php', $context->id, 'course',\n 'section', $section->id);\n $summary = format_text($summary, $section->summaryformat, array('para' => false, 'context' => $context));\n $title = $format->get_section_name($section);\n }\n\n $thissection = new stdClass();\n $thissection->number = $i;\n $thissection->title = $title;\n $thissection->url = $format->get_view_url($section);\n $thissection->selected = false;\n\n if ($i == $selected && !$inactivity) {\n $thissection->selected = true;\n }\n\n $thissection->modules = array();\n if (!empty($modinfo->sections[$i])) {\n foreach ($modinfo->sections[$i] as $modnumber) {\n $module = $modinfo->cms[$modnumber];\n if ($module->modname == 'label' || $module->modname == 'url') {\n continue;\n }\n if (! $module->uservisible) {\n continue;\n }\n $thismod = new stdClass();\n\n if ($inactivity) {\n if ($myactivityid == $module->id) {\n $thissection->selected = true;\n $thismod->active = 'active';\n }\n }\n\n $thismod->name = $module->name;\n $thismod->url = $module->url;\n $hascompletion = $completioninfo->is_enabled($module);\n if ($hascompletion) {\n $thismod->completeclass = 'incomplete';\n }\n\n $completiondata = $completioninfo->get_data($module, true);\n if (in_array($completiondata->completionstate, $completionok)) {\n $thismod->completeclass = 'completed';\n }\n $thissection->modules[] = $thismod;\n }\n $thissection->hasmodules = (count($thissection->modules) > 0);\n $template->sections[] = $thissection;\n }\n\n if ($thissection->selected) {\n\n $pn = $this->get_prev_next($sectionnums, $thissection->number);\n\n $courseurl = new moodle_url('/course/view.php', array('id' => $course->id, 'section' => $i));\n $template->courseurl = $courseurl->out();\n\n if ($pn->next === false) {\n $template->hasnext = false;\n }\n if ($pn->prev === false) {\n $template->hasprev = false;\n }\n\n $prevurl = new moodle_url('/course/view.php', array('id' => $course->id, 'section' => $pn->prev));\n $template->prevurl = $prevurl->out(false);\n\n $currurl = new moodle_url('/course/view.php', array('id' => $course->id, 'section' => $thissection->number));\n $template->currurl = $currurl->out(false);\n\n $nexturl = new moodle_url('/course/view.php', array('id' => $course->id, 'section' => $pn->next));\n $template->nexturl = $nexturl->out(false);\n }\n }\n if ($intab) {\n $template->inactivity = true;\n }\n\n $template->coursename = $course->fullname;\n $template->config = $this->config;\n $renderer = $this->page->get_renderer('block_course_modulenavigation', 'nav');\n $this->content->text = $renderer->render_nav($template);\n return $this->content;\n }",
"abstract public function getSidebarUpgrade();",
"public function getPopupContent();",
"public function helpAndLearnmoreAction() {\n\n\t$this->view->navigation = Engine_Api::_()->getApi('menus', 'core')\n\t\t\t\t\t->getNavigation('communityad_main');\n\t$this->view->display_faq = $display_faq = $this->_getParam('display_faq');\n\t$this->view->page_id = $page_id = $this->_getParam('page_id', 0);\n\t$communityad_getfaq = Zend_Registry::get('communityad_getfaq');\n\tif (empty($communityad_getfaq)) {\n\t return;\n\t}\n\tif (empty($page_id)) {\n\t $helpInfoTable = Engine_Api::_()->getItemtable('communityad_infopage');\n\t $helpInfoTableName = $helpInfoTable->info('name');\n\t $select = $helpInfoTable->select()->from($helpInfoTableName)->where('status =?', 1);\n\t $fetchHelpTable = $select->query()->fetchAll();\n\t if (!empty($fetchHelpTable)) {\n\t\t$this->view->pageObject = $fetchHelpTable;\n\t\t$default_faq = $fetchHelpTable[0]['faq'];\n\t\t$default_contact = $fetchHelpTable[0]['contect_team'];\n\t\t$this->view->page_default = $fetchHelpTable[0]['page_default'];\n\t }\n\t} else {\n\t $helpInfoTable = Engine_Api::_()->getItemtable('communityad_infopage');\n\t $helpInfoTableName = $helpInfoTable->info('name');\n\t $select = $helpInfoTable->select()->from($helpInfoTableName, array('infopage_id', 'title', 'package', 'faq', 'contect_team'))->where('status =?', 1);\n\t $fetchHelpTable = $select->query()->fetchAll();\n\t if (!empty($fetchHelpTable)) {\n\t\t$this->view->pageObject = $fetchHelpTable;\n\t\t$page_info = Engine_Api::_()->getItem('communityad_infopage', $page_id);\n\t\tif (empty($page_info)) {\n\t\t return $this->_forward('notfound', 'error', 'core');\n\t\t}\n\t\t$display_faq = $default_faq = $page_info->faq;\n\t\t$default_contact = $page_info->contect_team;\n\t\t$this->view->page_default = $page_info->page_default;\n\t\tif (empty($default_faq) && empty($default_contact)) {\n\t\t $this->view->content_data = $page_info->description;\n\t\t $this->view->content_title = $page_info->title;\n\t\t}\n\t }\n\t}\n\tif (empty($display_faq)) {\n\t $this->view->display_faq = $display_faq = $default_faq;\n\t}\n\tif (!empty($display_faq)) {\n\t $pageIdSelect = $helpInfoTable->select()->from($helpInfoTableName, array('*'))\n\t\t\t\t\t ->where('faq =?', $display_faq)->where('status =?', 1)->limit(1);\n\t $result = $pageIdSelect->query()->fetchAll();\n\t $this->view->faqpage_id = $result[0]['infopage_id'];\n\t $communityadFaqTable = Engine_Api::_()->getItemTable('communityad_faq');\n\t $communityadFaqName = $communityadFaqTable->info('name');\n\n\t // fetch General or Design or Targeting FAQ according to the selected tab\n\t $communityadFaqSelect = $communityadFaqTable->select()->from($communityadFaqName, array('question', 'answer', 'type', 'faq_default'))\n\t\t\t\t\t ->where('status =?', 1)\n\t\t\t\t\t ->where('type =?', $display_faq)\n\t\t\t\t\t ->order('faq_id DESC');\n\t $this->view->viewFaq = $communityadFaqSelect->query()->fetchAll();\n\t} else if (!empty($default_contact)) { // Condition: Fetch data for 'Contact us' type.\n\t $contactTeam['numbers'] = Engine_Api::_()->getApi('settings', 'core')->ad_saleteam_con;\n\t $contactTeam['emails'] = Engine_Api::_()->getApi('settings', 'core')->ad_saleteam_email;\n\t $this->view->contactTeam = $contactTeam;\n\t}\n }",
"public function getSidebar() {\n $keys = array_keys($this->modulesInTopMenu);\n foreach ($keys as $key) {\n if (in_array(Yii::app()->controller->module->id, $this->modulesInTopMenu[$key]))\n return $key;\n }\n }",
"function add_contextual_help($screen, $help)\n {\n }",
"function _scholar_polls_context_default_contexts() {\n $items = array();\n\n $items[] = array(\n 'namespace' => 'scholar',\n 'attribute' => 'feature',\n 'value' => 'polls',\n 'description' => 'Polls feature context',\n 'node' => array(\n '0' => 'poll',\n ),\n 'views' => array(\n '0' => 'scholar_polls',\n ),\n 'menu' => 'polls',\n 'block' => array(\n 'vsite_taxonomy_0' => array(\n 'module' => 'vsite_taxonomy',\n 'delta' => '0',\n 'weight' => 41,\n 'region' => 'right',\n 'status' => '0',\n 'label' => 'Categories - Filter categorized content',\n 'type' => 'context_ui',\n ),\n 'vsite_widgets_2' => array(\n 'module' => 'vsite_widgets',\n 'delta' => '2',\n 'weight' => 42,\n 'region' => 'right',\n 'status' => '0',\n 'label' => 'ShareThis Button - Allows you to share posts using popular online services',\n 'type' => 'context_ui',\n ),\n ),\n );\n return $items;\n}",
"public function testContextual() {\n return [\n '#markup' => 'testContextual',\n 'stuff' => [\n '#type' => 'contextual_links',\n '#contextual_links' => [\n 'menu_test_menu' => [\n 'route_parameters' => ['bar' => 1],\n ],\n ],\n ],\n ];\n }",
"public function contextualData()\n {\n return $this->taxonomy->data();\n }",
"function siteorigin_panels_add_help_tab_content(){\n\tinclude 'tpl/help.php';\n}",
"public static function get_sidebar_from_php( $sidebar = '', $data = array() ) {\n\t\t$caller = LocationManager::get_calling_script_dir(1);\n\t\t$uris = LocationManager::get_locations($caller);\n\t\tob_start();\n\t\t$found = false;\n\t\tforeach ( $uris as $uri ) {\n\t\t\tif ( file_exists(trailingslashit($uri).$sidebar) ) {\n\t\t\t\tinclude trailingslashit($uri).$sidebar;\n\t\t\t\t$found = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif ( !$found ) {\n\t\t\tHelper::error_log('error loading your sidebar, check to make sure the file exists');\n\t\t}\n\t\t$ret = ob_get_contents();\n\t\tob_end_clean();\n\t\treturn $ret;\n\t}",
"public function getInfoHelp()\n {\n // what would its help file be named?\n $class = get_class($this);\n $file = str_replace('_', DIRECTORY_SEPARATOR, $class)\n . DIRECTORY_SEPARATOR . 'Info'\n . DIRECTORY_SEPARATOR . 'help.txt';\n \n // does that file exist?\n $file = Solar_File::exists($file);\n if ($file) {\n return file_get_contents($file);\n }\n }",
"public function PostsSideBar()\n\t{\tob_start();\n\t\techo '<div id=\"sidebar\" class=\"col\">', \n\t\t\t$this->GetCategorySubmenu(), \n\t\t\t$this->GetArchiveSubmenu(), \n\t\t\t$this->GetSidebarCourses(), \n\t\t\t$this->GetSidebarQuote(), '</div>';\n\t\treturn ob_get_clean();\n\t}",
"function wpp_contextual_help( $data ) {\n\n $data[ 'Developer' ][ ] = '<h3>' . __( 'Developer', 'wpp' ) . '</h3>';\n $data[ 'Developer' ][ ] = '<p>' . __( 'The <b>slug</b> is automatically created from the title and is used in the back-end. It is also used for template selection, example: floorplan will look for a template called property-floorplan.php in your theme folder, or default to property.php if nothing is found.' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( 'If <b>Searchable</b> is checked then the property will be loaded for search, and available on the property search widget.' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( 'If <b>Location Matters</b> is checked, then an address field will be displayed for the property, and validated against Google Maps API. Additionally, the property will be displayed on the SuperMap, if the feature is installed.' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( '<b>Hidden Attributes</b> determine which attributes are not applicable to the given property type, and will be grayed out in the back-end.' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( '<b>Inheritance</b> determines which attributes should be automatically inherited from the parent property' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( 'Property attributes are meant to be short entries that can be searchable, on the back-end attributes will be displayed as single-line input boxes. On the front-end they are displayed using a definitions list.' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( 'Making an attribute as \"searchable\" will list it as one of the searchable options in the Property Search widget settings.' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( 'Be advised, attributes added via add_filter() function supercede the settings on this page.' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( '<b>Search Input:</b> Select and input type and enter comma-separated values that you would like to be used in property search, on the front-end.', 'wpp' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( '<b>Data Entry:</b> Enter comma-separated values that you would like to use on the back-end when editing properties.', 'wpp' ) . '</p>';\n\n return $data;\n\n }",
"public function visitHelpPage()\n {\n $this->data .= \"\n /* --- visitHelpPage --- */\n _ra.visitHelpPage = {'visit': true};\n \n if (_ra.ready !== undefined) {\n _ra.visitHelpPage();\n }\n \";\n\n return $this->data;\n }",
"function _content()\n {\n $html = '<h2>Menu</h2>';\n return $html;\n }",
"protected function renderHelp() {}",
"public function getContent(){\n return $this->getPage();\n }",
"public function getHelp()\n {\n new Help('form');\n }",
"public function dashboard_page_mscr_intrusions() {\n\t\t// WordPress 3.3\n\t\tif ( function_exists( 'wp_suspend_cache_addition' ) ) {\n\t\t\t$args = array(\n\t\t\t\t'title' => 'Help',\n\t\t\t\t'id' => 'mscr_help',\n\t\t\t\t'content' => $this->get_contextual_help(),\n\t\t\t);\n\t\t\tget_current_screen()->add_help_tab( $args );\n\t\t}\n\t\t// WordPress 3.1 and later\n\t\telse if ( function_exists( 'get_current_screen' ) ) {\n\t\t\t// Add help to the intrusions list page\n\t\t\tadd_contextual_help( get_current_screen(), $this->get_contextual_help() );\n\t\t}\n\t}",
"public function getDetailedDocumentation();",
"protected function get_sidebar($id)\n {\n }",
"function the_content() {\n\tglobal $discussion;\n\treturn Parsedown::instance()->parse($discussion['content']);\n}",
"public function get_help_tabs()\n {\n }",
"public function business_info_panel_content() {\n\t\t\t$business_types_repo = new WPSEO_Local_Business_Types_Repository();\n\t\t\t$flattened_business_types = $business_types_repo->get_business_types();\n\t\t\t$business_types_help = new WPSEO_Local_Admin_Help_Panel(\n\t\t\t\t'business_types_help',\n\t\t\t\t__( 'Help with: Business types', 'yoast-local-seo' ),\n\t\t\t\tsprintf(\n\t\t\t\t/* translators: 1: HTML <a> open tag; 2: <a> close tag. */\n\t\t\t\t\t__( 'If your business type is not listed, please read %1$sthe FAQ entry%2$s.', 'yoast-local-seo' ),\n\t\t\t\t\t'<a href=\"https://yoa.st/business-listing\" target=\"_blank\">',\n\t\t\t\t\t'</a>'\n\t\t\t\t),\n\t\t\t\t'has-wrapper'\n\t\t\t);\n\n\t\t\t$price_indication_help = new WPSEO_Local_Admin_Help_Panel(\n\t\t\t\t'price_indication_help',\n\t\t\t\t__( 'Help with: Price indication', 'yoast-local-seo' ),\n\t\t\t\tesc_html__( 'Select the price indication of your business, where $ is cheap and $$$$$ is expensive.', 'yoast-local-seo' ),\n\t\t\t\t'has-wrapper'\n\t\t\t);\n\n\t\t\t$area_served_help = new WPSEO_Local_Admin_Help_Panel(\n\t\t\t\t'area_served_help',\n\t\t\t\t__( 'Help with: Area served', 'yoast-local-seo' ),\n\t\t\t\tesc_html__( 'The geographic area where a service or offered item is provided.', 'yoast-local-seo' ),\n\t\t\t\t'has-wrapper'\n\t\t\t);\n\n\t\t\t$api_key = $this->api_repository->get_api_key( 'browser' );\n\n\t\t\tif ( count( $this->locations ) > 0 ) {\n\n\t\t\t\techo '<label for=\"wpseo_copy_from_location\" class=\"textinput\">' . esc_html__( 'Copy data from another location:', 'yoast-local-seo' ) . '</label>';\n\t\t\t\techo '<select class=\"select2-select\" name=\"_wpseo_copy_from_location\" id=\"wpseo_copy_from_location\" style=\"width: 400px;\" data-placeholder=\"' . esc_attr__( 'Choose your location', 'yoast-local-seo' ) . '\">';\n\t\t\t\techo $this->get_location_select_options( false );\n\t\t\t\techo '</select>';\n\n\t\t\t\techo '<p class=\"yoast-local-seo-field-desc\"><em><strong>' . esc_html__( 'Note:', 'yoast-local-seo' ) . '</strong> ' . esc_html__( 'selecting a location will overwrite all data below. If you accidently selected a location, just refresh the page and make sure you don\\'t save it.', 'yoast-local-seo' ) . '</em></p>';\n\t\t\t\techo '<br class=\"clear\">';\n\t\t\t}\n\n\t\t\techo '<p><label class=\"textinput\" for=\"wpseo_business_type\">' . esc_html__( 'Business type', 'yoast-local-seo' ) . $business_types_help->get_button_html() . ' </label>';\n\t\t\techo '<select class=\"select2-select\" name=\"_wpseo_business_type\" id=\"wpseo_business_type\" style=\"width: 400px;\" data-placeholder=\"' . esc_attr__( 'Choose your business type', 'yoast-local-seo' ) . '\">';\n\t\t\tforeach ( $flattened_business_types as $bt_option => $bt_label ) {\n\t\t\t\techo '<option ' . selected( $this->location_meta['business_type'], $bt_option, false ) . ' value=\"' . $bt_option . '\">' . $bt_label . '</option>';\n\t\t\t}\n\t\t\techo '</select></p>';\n\t\t\t/* translators: First %s extends to link opening tag with a link to Yoast knowledge base; Second %s closes the link tag. */\n\t\t\techo $business_types_help->get_panel_html();\n\n\t\t\techo '<p class=\"wpseo-local-input-wrap\"><label class=\"textinput\" for=\"wpseo_business_address\">' . esc_html__( 'Business address', 'yoast-local-seo' ) . '</label>';\n\t\t\techo '<input type=\"text\" name=\"_wpseo_business_address\" id=\"wpseo_business_address\" value=\"' . esc_attr( $this->location_meta['business_address'] ) . '\" class=\"wpseo_local_address_input\" /></p>';\n\t\t\techo '<p class=\"wpseo-local-input-wrap\"><label class=\"textinput\" for=\"wpseo_business_address_2\">' . esc_html__( 'Business address line 2', 'yoast-local-seo' ) . '</label>';\n\t\t\techo '<input type=\"text\" name=\"_wpseo_business_address_2\" id=\"wpseo_business_address_2\" value=\"' . esc_attr( $this->location_meta['business_address_2'] ) . '\" /></p>';\n\t\t\techo '<p class=\"wpseo-local-input-wrap\"><label class=\"textinput\" for=\"wpseo_business_city\">' . esc_html__( 'Business city', 'yoast-local-seo' ) . '</label>';\n\t\t\techo '<input type=\"text\" name=\"_wpseo_business_city\" id=\"wpseo_business_city\" value=\"' . esc_attr( $this->location_meta['business_city'] ) . '\" class=\"wpseo_local_city_input\" /></p>';\n\t\t\techo '<p class=\"wpseo-local-input-wrap\"><label class=\"textinput\" for=\"wpseo_business_state\">' . esc_html__( 'Business state', 'yoast-local-seo' ) . '</label>';\n\t\t\techo '<input type=\"text\" name=\"_wpseo_business_state\" id=\"wpseo_business_state\" value=\"' . esc_attr( $this->location_meta['business_state'] ) . '\" class=\"wpseo_local_state_input\" /></p>';\n\t\t\techo '<p class=\"wpseo-local-input-wrap\"><label class=\"textinput\" for=\"wpseo_business_zipcode\">' . esc_html__( 'Business zipcode', 'yoast-local-seo' ) . '</label>';\n\t\t\techo '<input type=\"text\" name=\"_wpseo_business_zipcode\" id=\"wpseo_business_zipcode\" value=\"' . esc_attr( $this->location_meta['business_zipcode'] ) . '\" class=\"wpseo_local_zipcode_input\" /></p>';\n\t\t\techo '<p class=\"wpseo-local-input-wrap\"><label class=\"textinput\" for=\"wpseo_business_country\">' . esc_html__( 'Business country', 'yoast-local-seo' ) . '</label>';\n\t\t\techo '<select class=\"select select2-select\" name=\"_wpseo_business_country\" id=\"wpseo_business_country\" style=\"width: 400px;\" data-placeholder=\"' . esc_attr__( 'Choose your country', 'yoast-local-seo' ) . '\">';\n\t\t\techo '<option></option>';\n\t\t\t$countries = WPSEO_Local_Frontend::get_country_array();\n\t\t\tforeach ( $countries as $key => $val ) {\n\t\t\t\techo '<option value=\"' . $key . '\"' . ( ( $this->location_meta['business_country'] == $key ) ? ' selected=\"selected\"' : '' ) . '>' . $countries[ $key ] . '</option>';\n\t\t\t}\n\t\t\techo '</select></p>';\n\t\t\techo '<div id=\"location-coordinates-settings\">';\n\t\t\tif ( $api_key !== '' && empty( $this->location_meta['coords']['lat'] ) && empty( $this->location_meta['coords']['long'] ) ) {\n\t\t\t\tWPSEO_Local_Admin::display_notification( esc_html__( 'You\\'ve set a Google Maps API Key. By using the button below, you can automatically calculate the coordinates that match the entered business address', 'yoast-local-seo' ), 'info' );\n\t\t\t}\n\t\t\tif ( $api_key === '' ) {\n\t\t\t\techo '<p>';\n\t\t\t\tprintf(\n\t\t\t\t/* translators: 1: HTML <a> open tag; 2: <a> close tag; 3: HTML <a> open tag; 4: <a> close tag. */\n\t\t\t\t\tesc_html__( 'To determine the exact location of your business, search engines need to know its latitude and longitude coordinates. You can %1$smanually enter%2$s these coordinates below. If you\\'ve entered a %3$sGoogle Maps API Key%4$s the coordinates will automatically be calculated.', 'yoast-local-seo' ),\n\t\t\t\t\t'<a href=\"https://support.google.com/maps/answer/18539?co=GENIE.Platform%3DDesktop&hl=en\" target=\"_blank\">',\n\t\t\t\t\t'</a>',\n\t\t\t\t\t'<a href=\"' . esc_url( admin_url( 'admin.php?page=wpseo_local#top#api_keys' ) ) . '\" data-action=\"link-to-tab\" data-tab-id=\"api_keys\">',\n\t\t\t\t\t'</a>'\n\t\t\t\t);\n\t\t\t\techo '</p>';\n\t\t\t}\n\t\t\techo '<div id=\"location-coordinates-settings-lat-lng-wrapper\">';\n\t\t\techo '<p class=\"wpseo-local-input-wrap\"><label class=\"textinput\" for=\"wpseo_coordinates_lat\">' . esc_html__( 'Latitude', 'yoast-local-seo' ) . '</label>';\n\t\t\techo '<input type=\"text\" name=\"_wpseo_coordinates_lat\" id=\"wpseo_coordinates_lat\" value=\"' . esc_attr( $this->location_meta['coords']['lat'] ) . '\" class=\"wpseo_local_lat_input\" /></p>';\n\t\t\techo '<p class=\"wpseo-local-input-wrap\"><label class=\"textinput\" for=\"wpseo_coordinates_long\">' . esc_html__( 'Longitude', 'yoast-local-seo' ) . '</label>';\n\t\t\techo '<input type=\"text\" name=\"_wpseo_coordinates_long\" id=\"wpseo_coordinates_long\" value=\"' . esc_attr( $this->location_meta['coords']['long'] ) . '\" class=\"wpseo_local_lng_input\" /></p>';\n\t\t\tif ( ! empty( $api_key ) ) {\n\t\t\t\techo '<button class=\"button calculate_lat_lng_button\" id=\"calculate_lat_lng_button\" type=\"button\">' . esc_html__( 'Calculate coordinates', 'yoast-local-seo' ) . '</button>';\n\t\t\t}\n\t\t\techo '</div>';\n\t\t\techo '</div>';\n\t\t\techo '<p class=\"wpseo-local-input-wrap\"><label class=\"textinput\" for=\"wpseo_business_phone\">' . esc_html__( 'Business phone', 'yoast-local-seo' ) . '</label>';\n\t\t\techo '<input type=\"text\" name=\"_wpseo_business_phone\" id=\"wpseo_business_phone\" value=\"' . esc_attr( $this->location_meta['business_phone'] ) . '\" /></p>';\n\t\t\techo '<p class=\"wpseo-local-input-wrap\"><label class=\"textinput\" for=\"wpseo_business_phone_2nd\">' . esc_html__( '2nd Business phone', 'yoast-local-seo' ) . '</label>';\n\t\t\techo '<input type=\"text\" name=\"_wpseo_business_phone_2nd\" id=\"wpseo_business_phone_2nd\" value=\"' . esc_attr( $this->location_meta['business_phone_2nd'] ) . '\" /></p>';\n\t\t\techo '<p class=\"wpseo-local-input-wrap\"><label class=\"textinput\" for=\"wpseo_business_fax\">' . esc_html__( 'Business fax', 'yoast-local-seo' ) . '</label>';\n\t\t\techo '<input type=\"text\" name=\"_wpseo_business_fax\" id=\"wpseo_business_fax\" value=\"' . esc_attr( $this->location_meta['business_fax'] ) . '\" /></p>';\n\t\t\techo '<p class=\"wpseo-local-input-wrap\"><label class=\"textinput\" for=\"wpseo_business_email\">' . esc_html__( 'Business email', 'yoast-local-seo' ) . '</label>';\n\t\t\techo '<input type=\"text\" name=\"_wpseo_business_email\" id=\"wpseo_business_email\" value=\"' . esc_attr( $this->location_meta['business_email'] ) . '\" /></p>';\n\t\t\techo '<p class=\"wpseo-local-input-wrap\"><label class=\"textinput\" for=\"wpseo_business_url\">' . esc_html__( 'URL', 'yoast-local-seo' ) . '</label>';\n\t\t\techo '<input type=\"text\" name=\"_wpseo_business_url\" id=\"wpseo_business_url\" value=\"' . esc_url( $this->location_meta['business_url'] ) . '\" /></p>';\n\t\t\techo '<p class=\"wpseo-local-input-wrap\"><label class=\"textinput\" for=\"wpseo_business_vat_id\">' . esc_html__( 'VAT ID', 'yoast-local-seo' ) . '</label>';\n\t\t\techo '<input type=\"text\" name=\"_wpseo_business_vat_id\" id=\"wpseo_business_vat_id\" value=\"' . esc_attr( $this->location_meta['business_vat'] ) . '\" /></p>';\n\t\t\techo '<p class=\"wpseo-local-input-wrap\"><label class=\"textinput\" for=\"wpseo_business_tax_id\">' . esc_html__( 'Tax ID', 'yoast-local-seo' ) . '</label>';\n\t\t\techo '<input type=\"text\" name=\"_wpseo_business_tax_id\" id=\"wpseo_business_tax_id\" value=\"' . esc_attr( $this->location_meta['business_tax'] ) . '\" /></p>';\n\t\t\techo '<p class=\"wpseo-local-input-wrap\"><label class=\"textinput\" for=\"wpseo_business_coc_id\">' . esc_html__( 'Chamber of Commerce ID', 'yoast-local-seo' ) . '</label>';\n\t\t\techo '<input type=\"text\" name=\"_wpseo_business_coc_id\" id=\"wpseo_business_coc_id\" value=\"' . esc_attr( $this->location_meta['business_coc'] ) . '\" /></p>';\n\n\t\t\techo '<p class=\"wpseo-local-input-wrap\"><label class=\"textinput\" for=\"wpseo_business_price_range\">' . esc_html__( 'Price indication', 'yoast-local-seo' ) . $price_indication_help->get_button_html() . ' </label>';\n\t\t\techo '<select class=\"select2-select\" name=\"_wpseo_business_price_range\" id=\"wpseo_business_price_range\" style=\"width: 400px;\" data-placeholder=\"' . esc_attr__( 'Select your price indication', 'yoast-local-seo' ) . '\">';\n\t\t\techo '<option></option>';\n\t\t\t$pricerange = $this->get_pricerange_array();\n\t\t\tforeach ( $pricerange as $key => $val ) {\n\t\t\t\techo '<option value=\"' . $key . '\"' . ( ( $this->location_meta['business_price_range'] == $key ) ? ' selected=\"selected\"' : '' ) . '>' . $pricerange[ $key ] . '</option>';\n\t\t\t}\n\t\t\techo '</select></p>';\n\t\t\techo $price_indication_help->get_panel_html();\n\n\t\t\techo '<p class=\"wpseo-local-input-wrap\"><label class=\"textinput\" for=\"wpseo_business_currencies_accepted\">' . esc_html__( 'Currencies accepted', 'yoast-local-seo' ) . '</label>';\n\t\t\techo '<input type=\"text\" name=\"_wpseo_business_currencies_accepted\" id=\"wpseo_business_currencies_accepted\" value=\"' . esc_attr( $this->location_meta['business_currencies_accepted'] ) . '\" /></p>';\n\n\t\t\techo '<p class=\"wpseo-local-input-wrap\"><label class=\"textinput\" for=\"wpseo_business_payment_accepted\">' . esc_html__( 'Payment methods accepted', 'yoast-local-seo' ) . '</label>';\n\t\t\techo '<input type=\"text\" name=\"_wpseo_business_payment_accepted\" id=\"wpseo_business_payment_accepted\" value=\"' . esc_attr( $this->location_meta['business_payment_accepted'] ) . '\" /></p>';\n\n\t\t\techo '<p class=\"wpseo-local-input-wrap\"><label class=\"textinput\" for=\"wpseo_business_area_served\">' . esc_html__( 'Area served', 'yoast-local-seo' ) . $area_served_help->get_button_html() . ' </label>';\n\t\t\techo '<input type=\"text\" name=\"_wpseo_business_area_served\" id=\"wpseo_business_area_served\" value=\"' . esc_attr( $this->location_meta['business_area_served'] ) . '\" /></p>';\n\t\t\techo $area_served_help->get_panel_html();\n\n\t\t\t$is_postal_address = get_post_meta( $this->location_id, '_wpseo_is_postal_address', true );\n\t\t\t$is_postal_address = wpseo_check_falses( $is_postal_address );\n\t\t\techo '<p>' . $this->wpseo_local_checkbox( __( 'This address is a postal address (not a physical location)', 'yoast-local-seo' ), $is_postal_address, '_wpseo_is_postal_address', 'wpseo_is_postal_address' ) . '</p>';\n\n\t\t\tif ( ! empty( $api_key ) && ( $this->location_meta['coords']['lat'] !== '' && $this->location_meta['coords']['lat'] !== '' ) ) {\n\n\t\t\t\techo '<p class=\"yoast-local-seo-field-desc\">' . esc_html__( 'If the marker is not in the right location for your store, you can drag the pin to the location where you want it.', 'yoast-local-seo' ) . '</p>';\n\n\t\t\t\t$atts = [\n\t\t\t\t\t'id' => $this->location_id,\n\t\t\t\t\t'echo' => true,\n\t\t\t\t\t'show_route' => false,\n\t\t\t\t\t'map_style' => 'roadmap',\n\t\t\t\t\t'draggable' => true,\n\t\t\t\t];\n\t\t\t\twpseo_local_show_map( $atts );\n\t\t\t}\n\n\t\t\techo '<br class=\"clear\">';\n\t\t\techo '<p class=\"wpseo-local-input-wrap\">';\n\t\t\techo '<label class=\"textinput\" for=\"wpseo_business_location_logo\">' . esc_html__( 'Location logo', 'yoast-local-seo' ) . '</label>';\n\t\t\techo '<input class=\"textinput\" id=\"wpseo_business_location_logo\" type=\"text\" size=\"36\" name=\"_wpseo_business_location_logo\" value=\"' . wp_get_attachment_image_url( $this->location_meta['business_logo'], 'full' ) . '\">';\n\t\t\techo '<input id=\"wpseo_business_location_logo_button\" class=\"wpseo_image_upload_button button\" type=\"button\" value=\"' . esc_attr__( 'Upload image', 'yoast-local-seo' ) . '\">';\n\t\t\techo '<br class=\"clear\">';\n\t\t\techo esc_html__( 'This logo will override the logo set in the Yoast SEO Company Info tab', 'yoast-local-seo' );\n\t\t\techo '</p>';\n\t\t}",
"function master_get_sidebar_attachment_markup( $sidebar_id ) {\n\n\t// Make sure user has the required access level\n\tif ( ! current_user_can( 'edit_theme_options' ) )\n\t\twp_die( -1 );\n\t\n\t$sidebar = master_get_sidebar_instance( $sidebar_id );\n\t$sidebar_attachments = array();\n\t$sidebar_data = array();\n\t$output = '';\n\n\tif ( $sidebar ) {\n\n\t\t// Get sidebar attachment data\n\t\t$sidebar_attachments = get_post_meta( $sidebar->ID, 'sidebar_attachments', true );\n\n\t\t// Build sidebar data\n\t\tforeach ( $sidebar_attachments as $attachment ) {\n\n\t\t\t// Check what type of object we are working with\n\t\t\tif ( \n\t\t\t\t! empty( $attachment['menu-item-type'] ) &&\n\t\t\t\t! empty( $attachment['menu-item-object-id'] ) &&\n\t\t\t\t'custom' != $attachment['menu-item-type'] \n\t\t\t) {\n\t\t\t\tswitch ( $attachment['menu-item-type'] ) {\n\t\t\t\t\tcase 'post_type':\n\t\t\t\t\t\t$_object = get_post( $attachment['menu-item-object-id'] );\n\t\t\t\t\t\t// unset( $attachment['menu-item-title'] );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 'taxonomy':\n\t\t\t\t\t\t$_object = get_term( $attachment['menu-item-object-id'], $attachment['menu-item-object'] );\n\t\t\t\t\t\t//unset( $attachment['menu-item-title'] );\n\t\t\t\t\t\tbreak;\n\t\t\t\t} // end switch\n\n\t\t\t\t// Prepare object if it exists\n\t\t\t\tif ( $attachment['menu-item-type'] == 'post_type' || $attachment['menu-item-type'] == 'taxonomy') {\n\t\t\t\t\t$sidebar_items = array_map( 'wp_setup_nav_menu_item', array( $_object ) );\n\t\t\t\t\t$sidebar_item = array_shift( $sidebar_items );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$sidebar_data[] = $attachment;\n\t\t}\n\n\t\t$sidebar_ids = wp_save_nav_menu_items( 0, $sidebar_data );\n\n\t\tif ( is_wp_error( $sidebar_ids ) ) {\n\t\t\twp_die( 0 );\n\t\t}\n\n\t\t$sidebar_items = array();\n\n\t\tforeach ( $sidebar_ids as $sidebar_item_id ) {\n\t\t\t$menu_obj = get_post( $sidebar_item_id );\n\t\t\tif ( ! empty( $menu_obj->ID ) ) {\n\t\t\t\t$menu_obj = wp_setup_nav_menu_item( $menu_obj );\n\t\t\t\t$menu_obj->label = $menu_obj->title; // don't show \"(pending)\" in ajax-added items\n\t\t\t\t$sidebar_items[] = $menu_obj;\n\t\t\t}\t\t\t\n\t\t}\n\n\t\t$walker_class_name = apply_filters( 'master_edit_sidebar_walker', 'Master_Walker_Sidebar_Edit', $sidebar_attachments );\n\n\t\tif ( ! class_exists( $walker_class_name ) ) {\n\t\t\twp_die( 0 );\n\t\t}\n\t\t\n\t\tif ( ! empty( $sidebar_items ) ) {\n\t\t\t$args = array(\n\t\t\t\t'after' => '',\n\t\t\t\t'before' => '',\n\t\t\t\t'link_after' => '',\n\t\t\t\t'link_before' => '',\n\t\t\t\t'walker' => new $walker_class_name,\n\t\t\t\t'pending' => false\n\t\t\t);\n\n\t\t\t$output .= walk_nav_menu_tree( $sidebar_items, 0, (object) $args );\n\t\t}\t\t\n\n\t} // end if\n\n\treturn $output;\n}",
"public function get_help(){\n $tmp=self::_pipeExec('\"'.$this->cmd.'\" --extended-help');\n return $tmp['stdout'];\n }",
"public function get_content_html()\n {\n\n ob_start();\n RP_SUB_Help::include_template($this->template_html, array_merge($this->template_variables, array('plain_text' => false)));\n return ob_get_clean();\n }",
"function get_content() {\n\t\treturn $this->get_data( 'comment_content' );\n\t}",
"public static function getSystemsMenu()\n {\n $filePath = Help::getDocsDirectory().'/_systems_menu.html';\n return file_get_contents($filePath);\n\n }",
"public function help(){\n\t\t$screen = get_current_screen();\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/installing\" target=\"_blank\">' . __( 'Installing the Plugin', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/staying-updated\" target=\"_blank\">' . __( 'Staying Updated', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/glossary\" target=\"_blank\">' . __( 'Glossary', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-general-info',\n\t\t\t'title' => __( 'General Info', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-interface\" target=\"_blank\">' . __( 'Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-creating\" target=\"_blank\">' . __( 'Creating a New Form', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-sorting\" target=\"_blank\">' . __( 'Sorting Your Forms', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-building\" target=\"_blank\">' . __( 'Building Your Forms', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-forms',\n\t\t\t'title' => __( 'Forms', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-interface\" target=\"_blank\">' . __( 'Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-managing\" target=\"_blank\">' . __( 'Managing Your Entries', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-searching-filtering\" target=\"_blank\">' . __( 'Searching and Filtering Your Entries', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-entries',\n\t\t\t'title' => __( 'Entries', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/email-design\" target=\"_blank\">' . __( 'Email Design Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/analytics\" target=\"_blank\">' . __( 'Analytics Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-email-analytics',\n\t\t\t'title' => __( 'Email Design & Analytics', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/import\" target=\"_blank\">' . __( 'Import Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/export\" target=\"_blank\">' . __( 'Export Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-import-export',\n\t\t\t'title' => __( 'Import & Export', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/conditional-logic\" target=\"_blank\">' . __( 'Conditional Logic', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/templating\" target=\"_blank\">' . __( 'Templating', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/custom-capabilities\" target=\"_blank\">' . __( 'Custom Capabilities', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/hooks\" target=\"_blank\">' . __( 'Filters and Actions', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-advanced',\n\t\t\t'title' => __( 'Advanced Topics', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<p>' . __( '<strong>Always load CSS</strong> - Force Visual Form Builder Pro CSS to load on every page. Will override \"Disable CSS\" option, if selected.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable CSS</strong> - Disable CSS output for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable Email</strong> - Disable emails from sending for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable Notifications Email</strong> - Disable notification emails from sending for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Skip Empty Fields in Email</strong> - Fields that have no data will not be displayed in the email.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable saving new entry</strong> - Disable new entries from being saved.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable saving entry IP address</strong> - An entry will be saved, but the IP address will be removed.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Place Address labels above fields</strong> - The Address field labels will be placed above the inputs instead of below.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Remove default SPAM Verification</strong> - The default SPAM Verification question will be removed and only a submit button will be visible.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable meta tag version</strong> - Prevent the hidden Visual Form Builder Pro version number from printing in the source code.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Skip PayPal redirect if total is zero</strong> - If PayPal is configured, do not redirect if the total is zero.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Prepend Confirmation</strong> - Always display the form beneath the text confirmation after the form has been submitted.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Max Upload Size</strong> - Restrict the file upload size for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Sender Mail Header</strong> - Control the Sender attribute in the mail header. This is useful for certain server configurations that require an existing email on the domain to be used.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>reCAPTCHA Public Key</strong> - Required if \"Use reCAPTCHA\" option is selected in the Secret field.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>reCAPTCHA Private Key</strong> - Required if \"Use reCAPTCHA\" option is selected in the Secret field.', 'visual-form-builder-pro' ) . '</p>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-settings',\n\t\t\t'title' => __( 'Settings', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t}",
"function getSidebar($uName='', $uID='', $uPriv='', $str=''){\n\n\t$str .= '<div class=\"row row-offcanvas row-offcanvas-left\">\n\t <div class=\"col-sm-3 col-md-2 sidebar-offcanvas\" id=\"sidebar\" role=\"navigation\">\n\n\t\t\t<ul class=\"nav nav-sidebar\">\n\t\t\t\t<li class=\"' . isActive('dashboard') . '\"><a href=\"dashboard.php\">My Homepage</a></li>\n\t\t\t\t<li class=\"' . isActive('userStart') . '\">\n\t\t\t\t\t<a href=\"' . VIRTUAL_PATH . 'users/userStart.php\">My Startpage</a>\n\t\t\t\t</li>\n\t\t\t\t<li class=\"' . isActive('userChars') . '\">\n\t\t\t\t\t<a href=\"' . VIRTUAL_PATH . 'users/userChars.php\" >My Characters</a>\n\t\t\t\t</li>\n\t\t\t\t<li class=\"' . isActive('userPosts') . '\" target=\"_ext\"> My Posts*</li>\n\t\t\t\t<li class=\"' . isActive('userTags') . '\"> My Tags*</li>\n\t\t\t\t<li class=\"' . isActive('userUpdatePassword') . '\"><a href=\"' . VIRTUAL_PATH . 'users/userUpdatePassword.php?act=edit&uID=' . $uID . '\">My Password*</a></li>\n\t\t\t\t<li class=\"' . isActive('userPrefs') . '\"><a href=\"' . VIRTUAL_PATH . 'users/userPrefs.php?act=edit&uID=' . $uID . '\">My Preferences*</a></li>\n\t\t\t\t<li class=\"' . isActive('userProfile') . '\"><a href=\"' . VIRTUAL_PATH . 'users/userProfile.php\">My Profile</a></li>\n\t\t\t\t<li class=\"' . isActive('userContact') . '\"><a href=\"' . VIRTUAL_PATH . 'users/userContact.php\">Contact Staff</a></li>\n\t\t\t</ul>';\n\n\n\tif($uPriv >= 4){\n\t\t$str .= '<h4>Moderator Tools<br />\n\t\t<small class=\"text-muted\">for managing threads/characters</small></h4>\n\t\t<ul class=\"nav nav-sidebar\">\n\n\t\t\t<li class=\"' . isActive('modCreateChars') . '\"><a href=\"' . VIRTUAL_PATH . 'users/modCreateChars.php\">Create Characters</a></li>\n\n\t\t\t<li class=\"' . isActive('modReviewChars') . '\"><a href=\"' . VIRTUAL_PATH . 'users/modReviewChars.php\">Review Characters</a></li>\n\n\t\t\t<li class=\"' . isActive('modReviewPosts') . '\"> Review Posts*</li>\n\n\t\t</ul>';\n\t}\n\n\tif($uPriv >= 5){\n\t\t$str .= '<h4>Admin Tools<br />\n\t\t<small class=\"text-muted\">for managing user\\'s needs</small></h4>\n\t\t<ul class=\"nav nav-sidebar\">\n\t\t<li class=\"text-muted\"><a href=\"' . VIRTUAL_PATH . 'users/adminReviewUsers.php\">Review Members</a></li>\n\t\t<li class=\"text-danger\"><a href=\"' . VIRTUAL_PATH . 'users/adminAddUser.php\">Add User</a></li>\n\t\t<li class=\"text-danger\"><a href=\"' . VIRTUAL_PATH . 'users/adminEditUser.php\">Edit User</a></li>\n\t\t<li class=\"text-danger\"><a href=\"' . VIRTUAL_PATH . 'users/adminResetPassword.php\">Reset User Password</a></li>\n\t\t<li class=\"text-muted\"> Ban User*</li>\n\t</ul>';\n\t}\n\n\tif($uPriv == 7){\n\t\t$str .= \"<h4>Monkee's Tools</h4>\";\n\t\t$str .= '<ul class=\"nav nav-sidebar\">\n\t\t\t<li><a href=\"' . VIRTUAL_PATH . 'users/maxAdminer.php\">Adminer</a></li>\n\t\t\t<li><a href=\"' . VIRTUAL_PATH . 'users/maxSessions.php\">Session Nuke</a></li>\n\t\t\t<li><a href=\"' . VIRTUAL_PATH . 'users/maxInfo.php\">PHP_INFO</a></li>\n\t\t\t<li><a href=\"' . VIRTUAL_PATH . 'users/maxLogs.php\">View Logs</a></li>\n\t\t\t<li><a href=\"' . VIRTUAL_PATH . 'users/maxLogs.php\">Create Poll</a></li>\n\t\t</ul>';\n\t}\n\n\t$str .= '\t<!-- BEGIN row --></div><!--/span-->';\n\n\treturn $str;\n\n}",
"function GetAdminSection()\n {\n return 'content';\n }",
"protected function show_contents()\n\t\t{\n\t\t\t//echo(\"<a href='javascript:setTimeout(window.location.href=\\\"\". $_SERVER['PHP_SELF']. \"?\". $this->paramname. \"=\". $this->menuvalue. \"\\\",5000);'>\". $this->menutext. \"</a>\");\n\t\t\techo(\"<a href='javascript:openhelp(\\\"helppage.php?context=\". (isset($_GET['Page']) ? $_GET['Page'] : \"\"). \"\\\")'>\". $this->menutext. \"</a>\");\t\n\t\t\techo(\"<SCRIPT> function openhelp(aurl) { window.open(aurl,'_blank'); } </SCRIPT>\");\n\t\t}",
"function example_widget( $content ) {\n\tif ( is_home() && is_active_sidebar( 'example' ) && is_main_query() ) {\n\t\tdynamic_sidebar('example');\n\t}\n\treturn $content;\n}",
"public final function get_content()\n {\n }",
"public final function get_content()\n {\n }",
"public final function get_content()\n {\n }",
"function activate_bitwise_sidebar_content() {\n\trequire_once __DIR__ . '/includes/class-bitwise-sidebar-content-activator.php';\n\tBitwise_Sidebar_Content_Activator::activate();\n}",
"public static function getSidebarHTML() {\n\t\tglobal $wgAdConfig;\n\n\t\t$skinName = 'monaco';\n\t\t$id = \"{$skinName}-sidebar-ad\";\n\t\t$classes = \"{$skinName}-ad noprint\";\n\t\t// The code below might be useful, but it's not necessary currently\n\t\t// as Monobook cannot support this type of ad (Monobook has right\n\t\t// column and toolbox ads only)\n\t\t/*\n\t\t$skinName = self::determineSkin();\n\n\t\t$id = \"{$skinName}-sidebar-ad\";\n\t\t$classes = \"{$skinName}-ad noprint\";\n\t\t// Different IDs and classes for Monaco and Monobook\n\t\tif ( $skinName == 'monobook' ) {\n\t\t\t$id = 'column-google';\n\t\t\t$classes = 'noprint';\n\t\t} elseif ( $skinName == 'monaco' ) {\n\t\t\t$id = \"{$skinName}-sidebar-ad\";\n\t\t\t$classes = \"{$skinName}-ad noprint\";\n\t\t}\n\t\t*/\n\n\t\t$adSlot = '';\n\t\tif ( isset( $wgAdConfig[$skinName . '-small-square-ad-slot'] ) ) {\n\t\t\t$adSlot = $wgAdConfig[$skinName . '-small-square-ad-slot'];\n\t\t}\n\n\t\tif ( isset( $wgAdConfig['debug'] ) && $wgAdConfig['debug'] === true ) {\n\t\t\treturn '<!-- Begin sidebar ad (ShoutWikiAds) -->\n\t\t<div id=\"' . $id . '\" class=\"' . $classes . '\">\n\t\t\t<img src=\"http://www.google.com/help/hc/images/adsense_185665_adformat-text_200x200.png\" alt=\"\" />\n\t\t</div>\n<!-- End sidebar ad (ShoutWikiAds) -->' . \"\\n\";\n\t\t}\n\n\t\tif ( isset( $wgAdConfig['mode'] ) && $wgAdConfig['mode'] == 'responsive' ) {\n\t\t\t$adHTML = '<ins class=\"adsbygoogle\"\n\t\t\t\tstyle=\"display:block\"\n\t\t\t\tdata-ad-client=\"ca-pub-' . $wgAdConfig['adsense-client'] . '\"\n\t\t\t\tdata-ad-slot=\"' . $adSlot . '\"\n\t\t\t\tdata-ad-format=\"rectangle\"></ins>\n\t\t\t<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>';\n\t\t} else {\n\t\t\t$borderColorMsg = wfMessage( 'shoutwiki-' . $skinName . '-sidebar-ad-color-border' )->inContentLanguage();\n\t\t\t$colorBGMsg = wfMessage( 'shoutwiki-' . $skinName . '-sidebar-ad-color-bg' )->inContentLanguage();\n\t\t\t$colorLinkMsg = wfMessage( 'shoutwiki-' . $skinName . '-sidebar-ad-color-link' )->inContentLanguage();\n\t\t\t$colorTextMsg = wfMessage( 'shoutwiki-' . $skinName . '-sidebar-ad-color-text' )->inContentLanguage();\n\t\t\t$colorURLMsg = wfMessage( 'shoutwiki-' . $skinName . '-sidebar-ad-color-url' )->inContentLanguage();\n\n\t\t\t$adHTML = '<script type=\"text/javascript\">\ngoogle_ad_client = \"pub-' . $wgAdConfig['adsense-client'] . '\";\ngoogle_ad_slot = \"' . $adSlot . '\";\ngoogle_ad_width = 200;\ngoogle_ad_height = 200;\ngoogle_ad_format = \"200x200_as\";\ngoogle_ad_type = \"text\";\ngoogle_ad_channel = \"\";\ngoogle_color_border = ' . Xml::encodeJsVar( $borderColorMsg->isDisabled() ? 'F6F4C4' : $borderColorMsg->text() ) . ';\ngoogle_color_bg = ' . Xml::encodeJsVar( $colorBGMsg->isDisabled() ? 'FFFFE0' : $colorBGMsg->text() ) . ';\ngoogle_color_link = ' . Xml::encodeJsVar( $colorLinkMsg->isDisabled() ? '000000' : $colorLinkMsg->text() ) . ';\ngoogle_color_text = ' . Xml::encodeJsVar( $colorTextMsg->isDisabled() ? '000000' : $colorTextMsg->text() ) . ';\ngoogle_color_url = ' . Xml::encodeJsVar( $colorURLMsg->isDisabled() ? '002BB8' : $colorURLMsg->text() ) . ';\n</script>\n<script type=\"text/javascript\" src=\"https://pagead2.googlesyndication.com/pagead/show_ads.js\"></script>';\n\t\t}\n\n\t\treturn '<!-- Begin sidebar ad (ShoutWikiAds) -->\n\t\t<div id=\"' . $id . '\" class=\"' . $classes . '\">' . $adHTML . '</div>\n\t\t<!-- End sidebar ad (ShoutWikiAds) -->' . \"\\n\";\n\t}",
"public function getContent(Context $context)\n {\n if ($this->getConfig()->type != 'regular') {\n return '';\n }\n\n // for now only supporting the \"index.md\" file\n $path = $this->getPath();\n $path .= (($path !== '') ? '/' : '') . 'index.md';\n\n $path = sprintf('%s/system/cache/isotope/docrobot-mirror/%s/%s/%s/%s',\n TL_ROOT,\n $context->getVersion(),\n $context->getLanguage(),\n $context->getBook(),\n $path);\n\n if (!is_file($path)) {\n return '';\n }\n\n return file_get_contents($path);\n }",
"function bi_suggestion_help_text( $contextual_help, $screen_id, $screen ) {\n if ( 'library' == $screen->id ) {\n $contextual_help =\n '<p>' . __('Things to remember when adding or editing a suggestion:') . '</p>' .\n '<p>' . __('If you want to schedule the suggestion to be published in the future:') . '</p>' .\n '<ul>' .\n '<li>' . __('Under the Publish module, click on the Edit link next to Publish.') . '</li>' .\n '<li>' . __('Change the date to the date to actual publish this suggestion, then click on Ok.') . '</li>' .\n '</ul>';\n } elseif ( 'edit-suggestion' == $screen->id ) {\n $contextual_help = \n '<p>' . __('This is the help screen displaying the table of suggestion blah blah blah.') . '</p>' ;\n }\n return $contextual_help;\n}",
"public function getMainContentOfPage()\n {\n return $this->mainContentOfPage;\n }",
"public static function render_help() {\n\n // Grab the current screen\n $screen = get_current_screen();\n\n }"
] | [
"0.80342025",
"0.709943",
"0.65156335",
"0.63593435",
"0.63433313",
"0.62239885",
"0.5980004",
"0.5939041",
"0.5920281",
"0.58345157",
"0.5824672",
"0.57913804",
"0.57712674",
"0.5764266",
"0.5739191",
"0.5737227",
"0.5670195",
"0.5656013",
"0.5648569",
"0.56321084",
"0.5621195",
"0.5607114",
"0.5594869",
"0.5581216",
"0.55734855",
"0.5570557",
"0.55648524",
"0.55564594",
"0.5555728",
"0.5546417",
"0.5466682",
"0.5463102",
"0.5442468",
"0.54418874",
"0.54405105",
"0.5438347",
"0.5431505",
"0.5413675",
"0.53789014",
"0.53698015",
"0.5369183",
"0.53615624",
"0.53566086",
"0.53490746",
"0.53439814",
"0.532523",
"0.53244734",
"0.53244734",
"0.5323808",
"0.5321944",
"0.5309303",
"0.5301396",
"0.5279213",
"0.5276678",
"0.5267611",
"0.52660835",
"0.5254139",
"0.5243119",
"0.52358955",
"0.5233476",
"0.5232063",
"0.52290446",
"0.52250254",
"0.5222973",
"0.521939",
"0.5215983",
"0.52119297",
"0.5209317",
"0.52065575",
"0.51955914",
"0.5190982",
"0.518878",
"0.5188198",
"0.51879627",
"0.5178237",
"0.5171151",
"0.515208",
"0.5127045",
"0.5119081",
"0.5114164",
"0.5113868",
"0.5094897",
"0.5094604",
"0.5089658",
"0.50889105",
"0.5073364",
"0.5057027",
"0.50516033",
"0.5050972",
"0.5048329",
"0.50450045",
"0.50425136",
"0.50425136",
"0.5042507",
"0.5042312",
"0.50406146",
"0.503661",
"0.50347126",
"0.50308067",
"0.5028484"
] | 0.56694406 | 17 |
Add a sidebar to the contextual help for the screen. Call this in template files after admin.php is loaded and before adminheader.php is loaded to add a sidebar to the contextual help. | public function set_sidebar( $content ) {
$this->_sidebar = $content;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function builder_set_help_sidebar() {\n\tob_start();\n\t\n?>\n<p><strong><?php _e( 'For more information:', 'it-l10n-Builder-Everett' ); ?></strong></p>\n<p><?php _e( '<a href=\"http://ithemes.com/forum/\" target=\"_blank\">Support Forum</a>' ); ?></p>\n<p><?php _e( '<a href=\"http://ithemes.com/codex/page/Builder\" target=\"_blank\">Codex</a>' ); ?></p>\n<?php\n\t\n\t$help = ob_get_contents();\n\tob_end_clean();\n\t\n\t$help = apply_filters( 'builder_filter_help_sidebar', $help );\n\t\n\tif ( ! empty( $help ) ) {\n\t\t$screen = get_current_screen();\n\t\t\n\t\tif ( is_callable( array( $screen, 'set_help_sidebar' ) ) )\n\t\t\t$screen->set_help_sidebar( $help );\n\t}\n}",
"public function get_help_sidebar()\n {\n }",
"function get_site_screen_help_sidebar_content()\n {\n }",
"function ft_hook_sidebar() {}",
"function dfcg_help_sidebar() {\n\n\t$sidebar = '<h3>'.__( 'DCG Resources', DFCG_DOMAIN ) . '</h3>';\n\t\n\t$sidebar .= 'Version: ' . DFCG_VER;\n\t\n\t$sidebar .= '<ul>';\n\t$sidebar .= '<li><a target=\"_blank\" href=\"'.DFCG_HOME .'quick-start-guide/\">'. __( 'Quick Start', DFCG_DOMAIN ) .'</a></li>'; \n\t$sidebar .= '<li><a target=\"_blank\" href=\"'.DFCG_HOME .'configuration-guide/\">'. __( 'Configuration Guide', DFCG_DOMAIN ) . '</a></li>';\n\t$sidebar .= '<li><a target=\"_blank\" href=\"'.DFCG_HOME .'documentation/\">'. __( 'Documentation', DFCG_DOMAIN ) . '</a></li>';\n\t$sidebar .= '<li><a target=\"_blank\" href=\"'.DFCG_HOME .'faq/\">'. __( 'FAQ', DFCG_DOMAIN ) . '</a></li>';\n\t$sidebar .= '<li><a target=\"_blank\" href=\"'.DFCG_HOME .'error-messages/\">'. __( 'Error Messages', DFCG_DOMAIN ) . '</a></li>';\n\t$sidebar .= '<li><a target=\"_blank\" href=\"'.DFCG_HOME .'changelog/\">'. __( 'Change Log', DFCG_DOMAIN ) . '</a></li>';\n\t$sidebar .= '<li><a target=\"_blank\" href=\"http://www.studiograsshopper.ch/forum/\">'. __( 'Support Forum', DFCG_DOMAIN ) . '</a></li>';\n\t$sidebar .= '</ul>';\n\t\n\t\n\t$sidebar .= '<ul>';\n\t$sidebar .= '<li><a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=10131319\">';\n\t$sidebar .= __( 'Donate', DFCG_DOMAIN ) . '</a></li>';\n\t$sidebar .= '</ul>';\n\n\treturn $sidebar;\n}",
"public function set_help_sidebar($content)\n {\n }",
"function add_contextual_help($screen, $help)\n {\n }",
"function foodpress_admin_help_tab_content() {\r\n\t$screen = get_current_screen();\r\n\r\n\t$screen->add_help_tab( array(\r\n\t 'id'\t=> 'foodpress_overview_tab',\r\n\t 'title'\t=> __( 'Overview', 'foodpress' ),\r\n\t 'content'\t=>\r\n\r\n\t \t'<p>' . __( 'Thank you for using FoodPress plugin. ', 'foodpress' ). '</p>'\r\n\r\n\t) );\r\n\r\n\r\n\r\n\r\n\t$screen->set_help_sidebar(\r\n\t\t'<p><strong>' . __( 'For more information:', 'foodpress' ) . '</strong></p>' .\r\n\t\t'<p><a href=\"http://demo.myfoodpress.com/\" target=\"_blank\">' . __( 'foodpress Demo', 'foodpress' ) . '</a></p>' .\r\n\t\t\r\n\t\t'<p><a href=\"http://demo.myfoodpress.com/documentation/\" target=\"_blank\">' . __( 'Documentation', 'foodpress' ) . '</a></p>'.\r\n\t\t'<p><a href=\"https://foodpressplugin.freshdesk.com/support/home/\" target=\"_blank\">' . __( 'Support', 'foodpress' ) . '</a></p>'\r\n\t);\r\n}",
"function elhero_sidebar()\r\n{\r\n register_sidebar( array(\r\n 'name' => 'MainSidebar',\r\n 'id' => 'main-sidebar',\r\n 'description' => 'appear evry were',\r\n 'class' => 'main_sidebar',\r\n 'before_widget' => '<div class=\"widget-content\">',\r\n 'after_widget' => '</div>',\r\n 'before_title' => '<h3 class=\"widget-title\">',\r\n 'after_title' => '</h3>'\r\n ));\r\n}",
"public function quickSidebarAction();",
"public function renderAdminSidebar()\r\n\t{\r\n\t\treturn;\r\n\t}",
"public function renderAdminSidebar()\r\n\t{\r\n\t\treturn;\r\n\t}",
"public function sidebar() {\n $args = func_get_args();\n $sidebar = $args[0];\n\n if (!is_array($sidebar)) {\n $sidebar = array('label' => $sidebar);\n }\n\n if (isset($args[1]) && is_string($args[1])) {\n $sidebar['action'] = $args[1];\n }\n\n $sidebar = array_merge(array(\n 'tab' => $this->tab(),\n 'action' => null,\n 'flag' => true,\n 'id' => $this->id(),\n ), $sidebar);\n\n $this->hook($sidebar['tab'] . '-sidebar', 'createSideMenu', array(\n $sidebar['id'],\n $sidebar['label'],\n $sidebar['action'],\n $sidebar['flag'])\n );\n }",
"function sidebars_admin_menu() \n{\n\tadd_submenu_page( 'duotive-panel', 'Duotive Sidebars', 'Sidebars', 'manage_options', 'duotive-sidebars', 'sidebars_page');\n}",
"function mocca_main_sidebar() {\n register_sidebar(array(\n 'name' => 'Mocca Sidebar',\n 'id' => 'mocca-sidebar', \n 'description' => 'Wordpress Apper SideBar',\n 'class' => 'sidebar-wordpress',\n 'before_widget' => '<div class=\"widget-content\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>'\n ));\n }",
"function dfcg_plugin_help() {\n\t\n\tglobal $current_screen;\n\t\n\t$sidebar = dfcg_help_sidebar();\n\t\n\t$current_screen->set_help_sidebar( $sidebar );\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-general',\n\t\t'title' => __( 'General info', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_general'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-theme',\n\t\t'title' => __( 'Theme integration', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_theme'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-quick',\n\t\t'title' => __( 'Quick Start', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_quick'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-gallery',\n\t\t'title' => __( 'Gallery Method', DFCG_DOMAIN ),\n\t\t'callback' => \"dfcg_help_gallery\"\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-images',\n\t\t'title' => __( 'Image Management', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_images'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-desc',\n\t\t'title' => __( 'Descriptions', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_desc'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-css',\n\t\t'title' => __( 'Gallery CSS', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_css'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-scripts',\n\t\t'title' => __( 'Load Scripts', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_scripts'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-troubleshooting',\n\t\t'title' => __( 'Troubleshooting', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_trouble'\n\t));\n}",
"public function custom_help_tab() {\n\n\t\t\t$screen = get_current_screen();\n\n\t\t\t// Return early if we're not on the needed post type.\n\t\t\tif ( ( $this->object_type == 'post' && $this->object != $screen->post_type ) || \n\t\t\t\t ( $this->object_type == 'taxonomy' && $this->object != $screen->taxonomy ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Add the help tabs.\n\t\t\tforeach ( $this->args->help_tabs as $tab ) {\n\t\t\t\t$screen->add_help_tab( $tab );\n\t\t\t}\n\n\t\t\t// Add the help sidebar.\n\t\t\t$screen->set_help_sidebar( $this->args->help_sidebar );\n\t\t}",
"function wpdocs_theme_slug_widgets_init() {\nregister_sidebar( array(\n'name' => __( 'Main Sidebar' ),\n'id' => 'sidebar_1',\n'description' => __( 'aprafiq is a man' ),\n'before_widget' => '<aside id=\"main_sidebar\">',\n'after_widget' => '</aside>',\n'before_title' => '<h2>',\n'after_title' => '</h2>',\n) );\n}",
"function add_sidebars() {\n\tregister_sidebar( array(\n\t\t'name' => 'Main Sidebar',\n\t\t'id' => 'main-sidebar',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</li>',\n\t\t'before_title' => '<h2 class=\"sidebar-title\">',\n\t\t'after_title' => '</h2>',\n\t) );\n}",
"function msdlab_add_homepage_callout_sidebars(){\n genesis_register_sidebar(array(\n 'name' => 'Homepage Callout',\n 'description' => 'Homepage call to action',\n 'id' => 'homepage-callout'\n ));\n}",
"function sidebar() {\n\t\t}",
"public function new_sidebar() {\n\t\t?>\n\t\t<form method=\"post\" action=\"options.php\" id=\"add-new-sidebar\">\n\t\t\t<?php settings_fields( 'ups_sidebars_options' ); ?>\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\">Name</th>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<input id=\"ups_sidebars[add_sidebar]\" class=\"text\" type=\"text\" name=\"ups_sidebars[add_sidebar]\" value=\"\" />\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\t<p class=\"submit\" style=\"padding: 0;\">\n\t\t\t\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Add Sidebar', self::TEXT_DOMAIN) ?>\" />\n\t\t\t</p>\n\t\t</form>\n\t\t<?php\n\t}",
"function get_sidebar() {\n require_once(COMP_DIR . 'sidebars.php');\n }",
"public function admin_page() {\n\t\tif ( ! isset( $_REQUEST['settings-updated'] ) )\n\t\t\t$_REQUEST['settings-updated'] = false;\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h2><?php _e('Manage Sidebars', self::TEXT_DOMAIN) ?></h2>\n\t\t\t<?php if ( false !== $_REQUEST['settings-updated'] ) : ?>\n\t\t\t<div class=\"updated fade\"><p><strong><?php _e('Sidebar settings saved.', self::TEXT_DOMAIN) ?></strong> <?php printf( __('You can now go manage the <a href=\"%swidgets.php\">widgets</a> for your sidebars.', self::TEXT_DOMAIN), get_admin_url()) ?></p></div>\n\t\t\t<?php endif; ?>\n\t\t\t<div id=\"poststuff\" class=\"metabox-holder has-right-sidebar\">\n\t\t\t\t<div id=\"post-body\" class=\"has-sidebar\">\n\t\t\t\t\t<div id=\"post-body-content\" class=\"has-sidebar-content\">\n\t\t\t\t\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t\t\t\t\t<?php settings_fields( 'ups_sidebars_options' ); ?>\n\t\t\t\t\t\t\t<?php do_meta_boxes( 'ups_sidebars', 'normal', null ); ?>\n\t\t\t\t\t\t</form>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div id=\"side-info-column\" class=\"inner-sidebar\">\n\t\t\t\t\t<?php do_meta_boxes( 'ups_sidebars', 'side', null ); ?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}",
"function add_widget_Support() {\n register_sidebar( array(\n 'name' => 'Sidebar',\n 'id' => 'sidebar',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n ) );\n}",
"function aton_qodef_add_support_custom_sidebar() {\n add_theme_support('AtonQodefSidebar');\n if (get_theme_support('AtonQodefSidebar')) new AtonQodefSidebar();\n }",
"function learn_press_single_quiz_sidebar() {\n\t\tlearn_press_get_template( 'content-quiz/sidebar.php' );\n\t}",
"function pickleplease_sidebars_init() {\n\n // Register the New Footer Sidebar\n register_sidebar(array(\n \n // Title for the Widget Dashboard\n 'name' => 'New Sidebar',\n \n // ID for the XHTML Markup\n 'id' => 'new-sidebar',\n\n // Description for the Widget Dashboard Box\n 'description' => __('This is a right column widget area.', 'thematic'),\n\n // Do not edit these. It keeps Headers and lists consistent for Thematic\n 'before_widget' => thematic_before_widget(),\n 'after_widget' => thematic_after_widget(),\n 'before_title' => thematic_before_title(),\n 'after_title' => thematic_after_title(),\n ));\n\n\n // Unregister and sidebars you donŐt need based on its ID.\n // For a full list of Thematic sidebar IDs, look at /thematc/library/extensions/widgets-extensions.php\n //unregister_sidebar('primary-aside');\n unregister_sidebar('secondary-aside');\n unregister_sidebar('index-top');\n unregister_sidebar('index-insert');\n unregister_sidebar('index-bottom');\n unregister_sidebar('single-top');\n unregister_sidebar('single-insert');\n unregister_sidebar('single-bottom');\n unregister_sidebar('page-top');\n unregister_sidebar('page-bottom');\n }",
"function mintshow_sidebar_widget_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Left Sidebar',\n\t\t'id' => 'left_sidebar_1',\n\t\t// 'before_widget' => '<div>',\n\t\t// 'after_widget' => '</div>',\n\t\t// 'before_title' => '<h2 class=\"rounded\">',\n\t\t// 'after_title' => '</h2>',\n\t) );\n\n}",
"public function dashboard_page_mscr_intrusions() {\n\t\t// WordPress 3.3\n\t\tif ( function_exists( 'wp_suspend_cache_addition' ) ) {\n\t\t\t$args = array(\n\t\t\t\t'title' => 'Help',\n\t\t\t\t'id' => 'mscr_help',\n\t\t\t\t'content' => $this->get_contextual_help(),\n\t\t\t);\n\t\t\tget_current_screen()->add_help_tab( $args );\n\t\t}\n\t\t// WordPress 3.1 and later\n\t\telse if ( function_exists( 'get_current_screen' ) ) {\n\t\t\t// Add help to the intrusions list page\n\t\t\tadd_contextual_help( get_current_screen(), $this->get_contextual_help() );\n\t\t}\n\t}",
"function dft_register_sidebars() {\n register_sidebar(array(\n 'name' => 'Blog Sidebar',\n 'id' => 'sidebar-blog',\n 'description' => 'Sidebar visível apenas na página de blog.'\n ));\n\n register_sidebar(array(\n 'name' => 'Single Post Sidebar',\n 'id' => 'sidebar-singlepost',\n 'description' => 'Sidebar visível apenas no single post.'\n ));\n}",
"function naked_register_sidebars() {\n register_sidebar(array( // Start a series of sidebars to register\n 'id' => 'sidebar', // Make an ID\n 'name' => 'Sidebar', // Name it\n 'description' => 'Take it on the side...', // Dumb description for the admin side\n 'before_widget' => '<div>', // What to display before each widget\n 'after_widget' => '</div>', // What to display following each widget\n 'before_title' => '<h1 class=\"title\">', // What to display before each widget's title\n 'after_title' => '</h1>', // What to display following each widget's title\n 'empty_title'=> '', // What to display in the case of no title defined for a widget\n // Copy and paste the lines above right here if you want to make another sidebar,\n // just change the values of id and name to another word/name\n ));\n}",
"function sidebars_page() \n{\n?>\t\n <?php if(isset($_POST['name']) && $_POST['name'] != '') : ?>\n\t\t<?php if(isset($_POST['name']) && $_POST['name'] != '') $name = $_POST['name']; ?>\n <?php if(isset($_POST['description'])) $desc = $_POST['description']; else 'Sidebar created by duotive sidebar generator.' ?> \n <?php if(isset($_POST['name'])) insert_sidebar_in_db($name,$desc); ?>\n <?php if(isset($_GET['delete'])) delete_sidebar($_GET['delete']); // IF CALLED DELETES A SIDEBAR ?> \n <?php endif; ?>\n <?php if(isset($_GET['delete'])) delete_sidebar($_GET['delete']); // IF CALLED DELETES A SIDEBAR ?> \n <?php // ADD INCLUDED CSS AND JS FILES ?>\n\t<script language=\"javascript\">\n\t/* function for confirming you want to delete */\n function confirmAction() {\n return confirm(\"Are you sure you want to delete this sidebar?\")\n }\n\t</script> \n <link rel=\"stylesheet\" type=\"text/css\" href=\"<?php echo get_bloginfo('template_directory'); ?>/includes/duotive-admin-skin/css/duotive-admin.css\" />\n <link rel=\"stylesheet\" type=\"text/css\" href=\"<?php echo get_bloginfo('template_directory'); ?>/includes/duotive-admin-skin/css/jqtransform.css\" /> \n <script type=\"text/javascript\" src=\"<?php echo get_bloginfo('template_directory'); ?>/includes/duotive-admin-skin/js/jquery.js\" /></script>\n <script type=\"text/javascript\" src=\"<?php echo get_bloginfo('template_directory'); ?>/includes/duotive-admin-skin/js/jquery.jqtransform.js\" /></script>\n <script type=\"text/javascript\" src=\"<?php echo get_bloginfo('template_directory'); ?>/includes/duotive-admin-skin/js/jquery.tools.min.js\" /></script>\n <script type=\"text/javascript\" src=\"<?php echo get_bloginfo('template_directory'); ?>/includes/duotive-admin-skin/js/jquery-ui.min.js\" /></script> \n <script type=\"text/javascript\">\n\t\t$(document).ready(function() {\n\t\t\t$(\".transform\").jqTransform();\n\t\t\t$( \"#duotive-admin-panel\" ).tabs();\n\t\t\t$(\"#duotive-admin-panel div.table-row:even\").addClass('table-row-alternative');\n\t\t\t$('#addsidebar .table-row-last').prev('div').addClass('table-row-beforelast');\n\t\t\t$('#sidebars .table-row-last').prev('div').addClass('table-row-beforelast');\n\t\t});\n\t</script> \n<div class=\"wrap\">\n <div id=\"duotive-logo\">Duotive Admin Panel</div>\n <div id=\"duotive-main-menu\">\n <ul>\n <li><a href=\"admin.php?page=duotive-panel\">General settings</a></li>\n <li><a href=\"admin.php?page=duotive-front-page-manager\">Frontpage</a></li>\n <li><a href=\"admin.php?page=duotive-slider\">Slideshow</a></li>\n <li class=\"active\"><a href=\"admin.php?page=duotive-sidebars\">Sidebars</a></li>\n\t\t\t<li><a href=\"admin.php?page=duotive-portfolios\">Portfolios</a></li> \n\t\t\t<li><a href=\"admin.php?page=duotive-blogs\">Blogs</a></li>\n\t\t\t<li><a href=\"admin.php?page=duotive-pricing-table\">Pricing tables</a></li>\n <li><a href=\"admin.php?page=duotive-contact\">Contact page</a></li> \n </ul>\n </div>\n <div id=\"duotive-admin-panel\">\n <h3>Sidebars</h3>\n <ul>\n <li><a href=\"#sidebars\">Current sidebars</a></li> \n <li class=\"plus\"><a class=\"plus\" href=\"#addsidebar\"><span class=\"deco\"></span>Add a new sidebars</a></li> \n\t</ul> \n <div id=\"sidebars\">\n\t\t\t<?php $sidebars = sidebars_require();?>\n <?php if ( count($sidebars) > 0 ): ?>\n <table cellpadding=\"0\">\n <thead>\n <tr>\n <th>Name</th>\n <th>Description</th>\n <th align=\"center\">Delete</th> \n </tr>\n </thead>\n <tbody> \n <?php $i = 0; ?>\n <?php foreach ( $sidebars as $sidebar): ?>\n <tr <?php if ( $i%2 == 0 ) echo ' class = \"alternate\"'; ?>>\n <td align=\"center\">\n <?php echo $sidebar->NAME; ?>\n </td>\n <td align=\"center\">\n <?php echo $sidebar->DESCRIPTION; ?>\n </td>\n <td align=\"center\">\n <a class=\"delete\" title=\"Delete Sidebar\" onClick=\"return confirmAction()\" href=\"?page=duotive-sidebars&delete=<?php echo $sidebar->ID; ?>\">DELETE</a> \n </td>\n </tr>\n <?php $i++; ?> \n <?php endforeach; ?> \n </tbody> \n <tfoot>\n <tr>\n <th>Name</th>\n <th>Description</th>\n <th>Delete</th> \n </tr>\n </tfoot> \n </table> \n\t\t\t<?php else: ?>\n <div class=\"page-error\">There aren't any custom sidebars added yet.</div> \n <?php endif; ?> \n </div>\n <div id=\"addsidebar\">\n <form action=\"\" method=\"post\" class=\"transform\">\n <div class=\"table-row clearfix\">\n <label for=\"name\">Sidebar name:</label>\n <input size=\"50\" name=\"name\" type=\"text\" />\n </div>\n <div class=\"table-row clearfix\">\n <label for=\"description\">Sidebar description:</label>\n <textarea class=\"fullwidth\" name=\"description\" cols=\"50\" rows=\"4\"></textarea>\n </div>\n <div class=\"table-row table-row-last clearfix\">\n <input type=\"submit\" name=\"search\" value=\"Add sidebar\" class=\"button\" />\t\n </div>\t \n </form>\n </div> \n </ul>\n </div>\n</div>\n<?php\n}",
"public function sidebarAction();",
"function my_admin_setup() {\r\n\t$text = '<p>' . __( 'This is an example of contextual help in WordPress, you could edit this to put information about your plugin or theme so that users will understand what the heck is going on.', 'example-textdomain' ) . '</p>';\r\n\r\n\t/* Add documentation and support forum links. */\r\n\t$text .= '<p><strong>' . __( 'For more information:', 'example-textdomain' ) . '</strong></p>';\r\n\r\n\t$text .= '<ul>';\r\n\t$text .= '<li><a href=\"http://yoursite.com/theme-documentation\">' . __( 'Documentation', 'example-textdomain' ) . '</a></li>';\r\n\t$text .= '<li><a href=\"http://yoursite.com/support\">' . __( 'Support Forums', 'example-textdomain' ) . '</a></li>';\r\n\t$text .= '</ul>';\r\n\r\n\tadd_contextual_help( 'appearance_page_theme-settings', $text );\r\n}",
"function add_widgets() {\n\n register_sidebar( array(\n 'name' => 'Right Sidebar',\n 'id' => 'right_sidebar',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n ) );\n}",
"function register_sidebar_init() {\n\n\t}",
"function humcore_register_sidebars() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Deposits Directory Sidebar',\n\t\t'id' => 'deposits-directory-sidebar',\n\t\t'description' => __( 'The Deposits directory widget area', 'humcore_domain' ),\n\t\t'before_widget' => '',\n\t\t'after_widget' => '',\n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t) );\n\n\tregister_sidebar( array(\n\t\t'name' => 'Deposits Search Sidebar',\n\t\t'id' => 'deposits-search-sidebar',\n\t\t'description' => __( 'The Deposits faceted search widget area', 'humcore_domain' ),\n\t\t'before_widget' => '',\n\t\t'after_widget' => '',\n\t\t'before_title' => '<h4>',\n\t\t'after_title' => '</h4>',\n\t) );\n\n}",
"function add_some_widgets()\r\n{\r\n register_sidebar( array(\r\n 'name' => __( 'Sidebar', 'sidebar' ),\r\n 'id' => 'sidebar',\r\n 'description' => __( 'This will be displayed followed by the regular sidebar', 'spd' ),\r\n 'before_widget' => '<div id=\"sidebar-%i\" class=\"widget\"><div class=\"widgetcontent\">',\r\n 'after_widget' => '</div></div>',\r\n 'before_title' => '<h5>',\r\n 'after_title' => '</h5>',\r\n ) );\r\n}",
"function monitis_addon_sidebar() {\n $modulelink = $vars['modulelink'];\n $sidebar = <<<EOF\n <span class=\"header\">\n <img src=\"images/icons/addonmodules.png\" class=\"absmiddle\" width=\"16\" height=\"16\" />Monitis Links</span>\n <ul class=\"menu\">\n <li><a href=\"http://portal.monitis.com/\">Monitis Dashboard</a></li>\n </ul>\nEOF;\n return $sidebar;\n}",
"public function admin_head() {\n\t \t\t// Remove the fake Settings submenu\n\t \t\tremove_submenu_page( 'options-general.php', 'wc_talks' );\n\n\t \t\t//Generate help if one is available for the current screen\n\t \t\tif ( wct_is_admin() || ! empty( $this->is_plugin_settings ) ) {\n\n\t \t\t\t$screen = get_current_screen();\n\n\t \t\t\tif ( ! empty( $screen->id ) && ! $screen->get_help_tabs() ) {\n\t \t\t\t\t$help_tabs_list = $this->get_help_tabs( $screen->id );\n\n\t \t\t\t\tif ( ! empty( $help_tabs_list ) ) {\n\t \t\t\t\t\t// Loop through tabs\n\t \t\t\t\t\tforeach ( $help_tabs_list as $key => $help_tabs ) {\n\t \t\t\t\t\t\t// Make sure types are a screen method\n\t \t\t\t\t\t\tif ( ! in_array( $key, array( 'add_help_tab', 'set_help_sidebar' ) ) ) {\n\t \t\t\t\t\t\t\tcontinue;\n\t \t\t\t\t\t\t}\n\n\t \t\t\t\t\t\tforeach ( $help_tabs as $help_tab ) {\n\t \t\t\t\t\t\t\t$content = '';\n\n\t \t\t\t\t\t\t\tif ( empty( $help_tab['content'] ) || ! is_array( $help_tab['content'] ) ) {\n\t \t\t\t\t\t\t\t\tcontinue;\n\t \t\t\t\t\t\t\t}\n\n\t \t\t\t\t\t\t\tif ( ! empty( $help_tab['strong'] ) ) {\n\t \t\t\t\t\t\t\t\t$content .= '<p><strong>' . $help_tab['strong'] . '</strong></p>';\n\t \t\t\t\t\t\t\t}\n\n\t \t\t\t\t\t\t\tforeach ( $help_tab['content'] as $tab_content ) {\n\t\t\t\t\t\t\t\t\tif ( is_array( $tab_content ) ) {\n\t\t\t\t\t\t\t\t\t\t$content .= '<ul><li>' . join( '</li><li>', $tab_content ) . '</li></ul>';\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$content .= '<p>' . $tab_content . '</p>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$help_tab['content'] = $content;\n\n\t \t\t\t\t\t\t\tif ( 'add_help_tab' == $key ) {\n\t \t\t\t\t\t\t\t\t$screen->add_help_tab( $help_tab );\n\t \t\t\t\t\t\t\t} else {\n\t \t\t\t\t\t\t\t\t$screen->set_help_sidebar( $content );\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t}\n\t \t\t\t\t\t}\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t}\n\n\t \t\t// Add some css\n\t\t\t?>\n\n\t\t\t<style type=\"text/css\" media=\"screen\">\n\t\t\t/*<![CDATA[*/\n\n\t\t\t\t/* Bubble style for Main Post type menu */\n\t\t\t\t#adminmenu .wp-menu-open.menu-icon-<?php echo $this->post_type?> .awaiting-mod {\n\t\t\t\t\tbackground-color: #2ea2cc;\n\t\t\t\t\tcolor: #fff;\n\t\t\t\t}\n\n\t\t\t\t#wordcamp-talks-csv span.dashicons-media-spreadsheet {\n\t\t\t\t\tvertical-align: text-bottom;\n\t\t\t\t}\n\n\t\t\t\t<?php if ( wct_is_admin() && ! wct_is_rating_disabled() ) : ?>\n\t\t\t\t\t/* Rating stars in screen options and in talks WP List Table */\n\t\t\t\t\t.metabox-prefs .talk-rating-bubble:before,\n\t\t\t\t\tth .talk-rating-bubble:before {\n\t\t\t\t\t\tfont: normal 20px/.5 'dashicons';\n\t\t\t\t\t\tspeak: none;\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t\ttop: 4px;\n\t\t\t\t\t\tleft: -4px;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tvertical-align: top;\n\t\t\t\t\t\t-webkit-font-smoothing: antialiased;\n\t\t\t\t\t\t-moz-osx-font-smoothing: grayscale;\n\t\t\t\t\t\ttext-decoration: none !important;\n\t\t\t\t\t\tcolor: #444;\n\t\t\t\t\t}\n\n\t\t\t\t\tth .talk-rating-bubble:before,\n\t\t\t\t\t.metabox-prefs .talk-rating-bubble:before {\n\t\t\t\t\t\tcontent: '\\f155';\n\t\t\t\t\t}\n\n\t\t\t\t\t.metabox-prefs .talk-rating-bubble:before {\n\t\t\t\t\t\tvertical-align: baseline;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Rates management */\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\tlist-style: none;\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li {\n\t\t\t\t\t\tlist-style: none;\n\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tpadding:15px 0;\n\t\t\t\t\t\tborder-bottom:dotted 1px #ccc;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li:last-child {\n\t\t\t\t\t\tborder:none;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-star {\n\t\t\t\t\t\tfloat:left;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-star {\n\t\t\t\t\t\twidth:20%;\n\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users {\n\t\t\t\t\t\tmargin-left: 20%;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users span.user-rated {\n\t\t\t\t\t\tdisplay:inline-block;\n\t\t\t\t\t\tmargin:5px;\n\t\t\t\t\t\tpadding:5px;\n\t\t\t\t\t\t-webkit-box-shadow: 0 1px 1px 1px rgba(0,0,0,0.1);\n\t\t\t\t\t\tbox-shadow: 0 1px 1px 1px rgba(0,0,0,0.1);\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users a.del-rate {\n\t\t\t\t\t\ttext-decoration: none;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users a.del-rate div {\n\t\t\t\t\t\tvertical-align: baseline;\n\t\t\t\t\t}\n\t\t\t\t<?php endif; ?>\n\n\t\t\t/*]]>*/\n\t\t\t</style>\n\t\t\t<?php\n\t\t}",
"function wp_admin_bar_sidebar_toggle($wp_admin_bar)\n {\n }",
"function templ_add_mainadmin_menu_()\r\n{\r\n\t$menu_title = __('Tevolution', 'templatic');\r\n\tif (function_exists('add_object_page'))\r\n\t{\r\n\t\t$hook = add_menu_page(\"Admin Menu\", $menu_title, 'administrator', 'templatic_system_menu', 'dashboard_bundles', '',25); /* title of new sidebar*/\r\n\t}else{\r\n\t\tadd_menu_page(\"Admin Menu\", $menu_title, 'administrator', 'templatic_wp_admin_menu', 'design','');\t\t\r\n\t} \r\n}",
"function thirty_eight_sidebar_options(){\n\n echo 'Customize your sidebar!';\n\n}",
"public function setHelpTabs() {\n $this->args['help_tabs'][] = array(\n 'id' => 'redux-help-tab-1',\n 'title' => __( 'Theme Information 1', 'slova' ),\n 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'slova' )\n );\n\n $this->args['help_tabs'][] = array(\n 'id' => 'redux-help-tab-2',\n 'title' => __( 'Theme Information 2', 'slova' ),\n 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'slova' )\n );\n\n // Set the help sidebar\n $this->args['help_sidebar'] = __( '<p>This is the sidebar content, HTML is allowed.</p>', 'slova' );\n }",
"function chandelier_elated_add_support_custom_sidebar() {\n add_theme_support('ChandelierSidebar');\n if (get_theme_support('ChandelierSidebar')) new ChandelierSidebar();\n }",
"public function create_help_screen() {\n\t\t$this->admin_screen = WP_Screen::get( $this->admin_page );\n\n\t\t$this->admin_screen->add_help_tab(\n\t\t\tarray(\n\t\t\t\t'title' => 'Annotation Guide',\n\t\t\t\t'id' => 'annotation_tab',\n\t\t\t\t'content' => '<p>Drag the mouse and draw a rectangle around the object and the click save.</p>',\n\t\t\t\t'callback' => false\n\t\t\t)\n\t\t);\n\t}",
"public function getHelpSidbar()\n {\n $txt_title = __(\"Resources\", 'duplicator');\n $txt_home = __(\"Knowledge Base\", 'duplicator');\n $txt_guide = __(\"Full User Guide\", 'duplicator');\n $txt_faq = __(\"Technical FAQs\", 'duplicator');\n\t\t$txt_sets = __(\"Package Settings\", 'duplicator');\n $this->screen->set_help_sidebar(\n \"<div class='dup-screen-hlp-info'><b>{$txt_title}:</b> <br/>\"\n .\"<i class='fa fa-home'></i> <a href='https://snapcreek.com/duplicator/docs/' target='_sc-home'>{$txt_home}</a> <br/>\"\n .\"<i class='fa fa-book'></i> <a href='https://snapcreek.com/duplicator/docs/guide/' target='_sc-guide'>{$txt_guide}</a> <br/>\"\n .\"<i class='fa fa-file-code-o'></i> <a href='https://snapcreek.com/duplicator/docs/faqs-tech/' target='_sc-faq'>{$txt_faq}</a> <br/>\"\n\t\t\t.\"<i class='fa fa-gear'></i> <a href='admin.php?page=duplicator-settings&tab=package'>{$txt_sets}</a></div>\"\n );\n }",
"function hybrid_get_utility_after_content() {\n\tget_sidebar( 'after-content' );\n}",
"function sidebar(){\n\n\t\t\t//code for checking the trial period days left for Provider/AA\n\t\t\t$freetrialstr=$this->getFreeTrialDaysLeft($this->userInfo('user_id'));\n\t\t\t$data = array(\n\n\t\t\t\t'name_first' => $this->userInfo('name_first'),\n\n\t\t\t\t'name_last' => $this->userInfo('name_last'),\n\n\t\t\t\t'sysadmin_link' => $this->sysadmin_link(),\n\n\t\t\t\t'therapist_link' => $this->therapist_link(),\n\n\t\t\t\t'freetrial_link' => $freetrialstr\n\n\t\t\t);\n\n\t\t\t\n\n\t\t\treturn $this->build_template($this->get_template(\"sidebar\"),$data);\n\n\t\t}",
"public function display_primary_sidebar()\n\t{\n\t\tdynamic_sidebar(static::PRIMARY_SIDEBAR_SLUG);\n\t}",
"function naked_register_sidebars() {\n\tregister_sidebar(array(\t\t\t\t// Start a series of sidebars to register\n\t\t'id' => 'sidebar', \t\t\t\t\t// Make an ID\n\t\t'name' => 'Sidebar',\t\t\t\t// Name it\n\t\t'description' => 'Take it on the side...', // Dumb description for the admin side\n\t\t'before_widget' => '<div>',\t// What to display before each widget\n\t\t'after_widget' => '</div>',\t// What to display following each widget\n\t\t'before_title' => '<h3 class=\"side-title\">',\t// What to display before each widget's title\n\t\t'after_title' => '</h3>',\t\t// What to display following each widget's title\n\t\t'empty_title'=> '',\t\t\t\t\t// What to display in the case of no title defined for a widget\n\t\t// Copy and paste the lines above right here if you want to make another sidebar, \n\t\t// just change the values of id and name to another word/name\n\t));\n}",
"function registerSidebars() {\n\t\t\tregister_sidebar(array(\n\t\t\t\t'name' => __( 'Sidebar', 'titan' ),\n\t\t\t\t'id' => 'normal_sidebar',\n\t\t\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t\t'after_widget' => '</li>',\n\t\t\t\t'before_title' => '<h2 class=\"widgettitle\">',\n\t\t\t\t'after_title' => '</h2>',\n\t\t\t));\n\t\t}",
"function ourWidgetsInit(){\n\n register_sidebar(array(\n 'name' => 'Sidebar',\n 'id' => 'sidebar1',\n 'before_widget' => '<div class=\"widget-item\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"my-special-class\">',\n 'after_title' => '</h4>'\n\n ));\n}",
"public function no_sidebars() {\n\t\techo '<p>'. __('You haven’t added any sidebars yet. Add one using the form on the right hand side!',self::TEXT_DOMAIN) .'</p>';\n\t}",
"function udesign_sidebar_top() {\r\n do_action('udesign_sidebar_top');\r\n}",
"public function single_sidebar_options() {\n\n\t\t\trequire_once get_template_directory() . '/extra/single/sidebar/options/single-sidebar-options.php';\n\n\t\t}",
"function happy_register_sidebars() {\n\n\tregister_sidebar( array( 'name' => __( 'Feature', hybrid_get_textdomain() ), 'id' => 'feature', 'description' => __( 'Displayed in the feature area.', hybrid_get_textdomain() ), 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s widget-%2$s\"><div class=\"widget-inside\">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class=\"widget-title\">', 'after_title' => '</h3>' ) );\n\n}",
"function gymfitness_widgets(){\n register_sidebar( array(\n 'name'=>'Sidebar 1',\n 'id' => 'sidebar_1',\n 'before-widget' => '<div class=\"widget\">', \n 'after-widget' => '</div>', \n 'before_title' => '<h3 class=\"text-center texto-primario\">',\n 'after_title' => '</h3>'\n\n\n ));\n register_sidebar( array(\n 'name'=>'Sidebar 2',\n 'id' => 'sidebar_2',\n 'before-widget' => '<div class=\"widget\">', \n 'after-widget' => '</div>', \n 'before_title' => '<h3 class=\"text-center texto-primario\">',\n 'after_title' => '</h3>'\n\n\n ));\n}",
"function add_widget_sidebar()\r\n{\r\n register_sidebar(\r\n array(\r\n 'name' => 'Sidebar',\r\n 'id' => 'main-sidebar',\r\n )\r\n );\r\n register_sidebar(\r\n array(\r\n 'name' => 'Sidebar du footer',\r\n 'id' => 'footer-sidebar',\r\n )\r\n );\r\n}",
"abstract public function getSidebarUpgrade();",
"function udesign_sidebar_bottom() {\r\n do_action('udesign_sidebar_bottom');\r\n}",
"function msdlab_add_homepage_hero_flex_sidebars(){\n genesis_register_sidebar(array(\n 'name' => 'Homepage Hero',\n 'description' => 'Homepage hero space',\n 'id' => 'homepage-top'\n ));\n genesis_register_sidebar(array(\n 'name' => 'Homepage Widget Area',\n 'description' => 'Homepage central widget areas',\n 'id' => 'homepage-widgets',\n 'before_widget' => genesis_markup( array(\n 'html5' => '<section id=\"%1$s\" class=\"widget %2$s\"><div class=\"widget-wrap\">',\n 'xhtml' => '<div id=\"%1$s\" class=\"widget %2$s\"><div class=\"widget-wrap\">',\n 'echo' => false,\n ) ),\n \n 'after_widget' => genesis_markup( array(\n 'html5' => '</div><div class=\"clear\"></div></section>' . \"\\n\",\n 'xhtml' => '</div><div class=\"clear\"></div></div>' . \"\\n\",\n 'echo' => false\n ) ),\n )); \n}",
"function aton_qodef_register_sidebars() {\n\n register_sidebar(array(\n 'name' => 'Sidebar',\n 'id' => 'sidebar',\n 'description' => 'Default Sidebar',\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4>',\n 'after_title' => '</h4>'\n ));\n\n }",
"function my_contextual_help($contexual_help, $screen_id, $screen) {\n\tif('listing' == $screen->id) {\n\t\t$contextual_help = '<h2>Listings</h2>\n\t\t<p>Listings show the details of the items that we sell on the website. You can see a list of them on this page in reverse chronological order - the latest one we added is first.</p>\n\t\t<p>You can view/edit the details of each product by clicking on its name, or you can perform bulk actions using the dropdown menu and selecting multiple items.</p>';\n\t}elseif('edit-listing' == $screen->id) {\n\t\t$contextual_help = '<h2>Editing listings</h2>\n\t\t<p>This page allows you to view/modify listing details. Please make sure to fill out the available boxes with the appropriate details (listing image, price, brand) and <strong>not</strong> add these details to the listing description.</p>';\n\t}\n\treturn $contextual_help;\n}",
"function studio_widgets_init() {\n register_sidebar( array(\n 'name' => __( 'Sidebar', 'studio' ),\n 'id' => 'sidebar-1',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h1 class=\"widget-title\">',\n 'after_title' => '</h1>',\n ) );\n}",
"function my_register_sidebars() {\r\n register_sidebar(\r\n array(\r\n 'id' => 'primary',\r\n 'name' => __( 'Primary Sidebar' ),\r\n 'description' => __( 'A short list of google searches.' ),\r\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\r\n 'after_widget' => '</div>',\r\n 'before_title' => '<h3 class=\"widget-title\">',\r\n 'after_title' => '</h3>',\r\n )\r\n );\r\n /* Repeat register_sidebar() code for additional sidebars. */\r\n}",
"function gymfitness_widgets(){\n\n register_sidebar(array(\n 'name' => 'Sidebar 1', \n 'id' => 'sidebar_1',\n 'before_widget' => '<div class=\"\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>'\n ));\n register_sidebar(array(\n 'name' => 'Sidebar 2', \n 'id' => 'sidebar_2',\n 'before_widget' => '<div class=\"\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>'\n ));\n\n}",
"public function admin()\n {\n $this->view->books = $this->help->getBookList();\n $this->view->title = $this->lang->help->common;\n $this->display();\n }",
"function younitedstyle_sidebars() {\n\t\tregister_sidebar(array(\n\t\t\t'name'\t\t\t\t=>'Blog Sidebar',\n\t\t\t'id'\t\t\t\t=>'blog-sidebar',\n\t\t\t'before_widget'\t\t=>'<li class=\"widget\">',\n\t\t\t'after_widget'\t\t=>'</li>',\n\t\t\t'before_title'\t\t=>'<h2>',\n\t\t\t'after_title'\t\t=>'</h2>',\n\t\t\t));\n\t}",
"function YWR_2020_widgets_init()\n{\n register_sidebar(array(\n 'name' => __('General Page Sidebar', 'YWR_2020'),\n 'id' => 'sidebar-1',\n 'description' => __('Add widgets here to appear in your sidebar on standard pages.', 'YWR_2020'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget clearfix %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<div class=\"fancy-title title-bottom-border\"><h2>',\n 'after_title' => '</h2></div>',\n ));\n\n}",
"public function admin_init() {\n\t\twp_enqueue_script( 'common' );\n\t\twp_enqueue_script( 'wp-lists' );\n\t\twp_enqueue_script( 'postbox' );\n\n\t\t// Register setting to store all the sidebar options in the *_options table\n\t\tregister_setting( 'ups_sidebars_options', 'ups_sidebars', array( $this, 'validate' ) );\n\n\t\t$sidebars = get_option( 'ups_sidebars' );\n\t\tif ( is_array( $sidebars ) && count ( $sidebars ) > 0 ) {\n\t\t\tforeach ( $sidebars as $id => $sidebar ) {\n\t\t\t\tadd_meta_box(\n\t\t\t\t\tesc_attr( $id ),\n\t\t\t\t\tesc_html( $sidebar['name'] ),\n\t\t\t\t\tarray( $this, 'meta_box' ),\n\t\t\t\t\t'ups_sidebars',\n\t\t\t\t\t'normal',\n\t\t\t\t\t'default',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => esc_attr( $id ),\n\t\t\t\t\t\t'sidebar' => $sidebar\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\tunset( $sidebar['pages'] );\n\t\t\t\t$sidebar['id'] = esc_attr( $id );\n\t\t\t\tregister_sidebar( $sidebar );\n\t\t\t}\n\t\t} else {\n\t\t\tadd_meta_box( 'ups-sidebar-no-sidebars', __('No sidebars', self::TEXT_DOMAIN), array( $this, 'no_sidebars' ), 'ups_sidebars', 'normal', 'default' );\n\t\t}\n\n\t\t// Sidebar metaboxes\n\t\tadd_meta_box( 'ups-sidebar-add-new-sidebar', __('Add New Sidebar', self::TEXT_DOMAIN) , array( $this, 'new_sidebar' ), 'ups_sidebars', 'side', 'default' );\n\t\tadd_meta_box( 'ups-sidebar-about-the-plugin', __('About the Plugin', self::TEXT_DOMAIN) , array( $this, 'about' ), 'ups_sidebars', 'side', 'default' );\n\t}",
"function WBootStrap_sidebar_init() {\n\tregister_sidebar( array(\n\t\t'name' => 'Page Sidebar',\n\t\t'id' => 'sidebar-page',\n\t\t'description' => 'Sidebar for pages',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => \"</aside>\",\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t));\n\n\tregister_sidebar( array(\n\t\t'name' => 'Blog Sidebar',\n\t\t'id' => 'sidebar-posts',\n\t\t'description' => 'Sidebar for blog',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => \"</aside>\",\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t));\n\n \tregister_sidebar(array(\n \t'name' => 'Home Left',\n\t 'id' => 'home-left',\n\t 'description' => 'Left Sidebar on homepage',\n\t 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t 'after_widget' => '</div>',\n\t 'before_title' => '<h2>',\n\t 'after_title' => '</h2>'\n\t));\n\n register_sidebar(array(\n \t'name' => 'Home Middle',\n \t'id' => 'home-middle',\n \t'description' => 'Middle Sidebar on homepage',\n \t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n \t'after_widget' => '</div>',\n \t'before_title' => '<h2>',\n \t'after_title' => '</h2>'\n \t));\n\n register_sidebar(array(\n \t'name' => 'Home Right',\n \t'id' => 'home-right',\n \t'description' => 'Right Sidebar on homepage',\n \t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n \t'after_widget' => '</div>',\n \t'before_title' => '<h2>',\n \t'after_title' => '</h2>'\n \t));\n\n \tregister_sidebar(array(\n \t'name' => 'Blog Footer',\n \t'id' => 'blog-footer',\n \t'description' => 'Blog footer widgetized area',\n \t'before_widget' => '<div class=\"span4\"><div id=\"%1$s\" class=\"widget %2$s\">',\n \t'after_widget' => '</div></div>',\n \t'before_title' => '<h3>',\n \t'after_title' => '</h3>'\n \t));\n\n \tregister_sidebar(array(\n \t'name' => 'Page Footer',\n \t'id' => 'page-footer',\n \t'description' => 'pages footer widgetized area',\n \t'before_widget' => '<div class=\"span4\"><div id=\"%1$s\" class=\"widget %2$s\">',\n \t'after_widget' => '</div></div>',\n \t'before_title' => '<h3>',\n \t'after_title' => '</h3>'\n \t));\n\n \tregister_sidebar(array(\n \t'name' => 'Home Page Footer',\n \t'id' => 'home-footer',\n \t'description' => 'Home page footer widgetized area',\n \t'before_widget' => '<div class=\"span4\"><div id=\"%1$s\" class=\"widget %2$s\">',\n \t'after_widget' => '</div></div>',\n \t'before_title' => '<h3>',\n \t'after_title' => '</h3>'\n \t));\n\n}",
"function partoo_register_sidebars()\n\t{\n\n\t\t$sidebars = (array)apply_filters(\n\t\t\t'partoo_sidebars',\n\t\t\tarray(\n\t\t\t\t'sidebar-1' => array(\n\t\t\t\t\t'name' => '栏目页边栏',\n\t\t\t\t\t'description' => esc_html__('The primary sidebar appears alongside the content of every page, post, archive, and search template.', 'partoo'),\n\t\t\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t\t\t'after_widget' => '</aside>',\n\t\t\t\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t\t\t\t'after_title' => '</h4>',\n\t\t\t\t),\n\t\t\t\t'sidebar-2' => array(\n\t\t\t\t\t'name' => '内容页边栏',\n\t\t\t\t\t'description' => esc_html__('The secondary sidebar will only appear when you have selected a three-column layout.', 'partoo'),\n\t\t\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t\t\t'after_widget' => '</aside>',\n\t\t\t\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t\t\t\t'after_title' => '</h4>',\n\t\t\t\t),\n\t\t\t\t'sidebar-contact' => array(\n\t\t\t\t\t'name' => '联系页面边栏',\n\t\t\t\t\t'description' => '联系页面的边栏',\n\t\t\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t\t\t'after_widget' => '</aside>',\n\t\t\t\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t\t\t\t'after_title' => '</h4>',\n\t\t\t\t),\n\t\t\t\t'footer-1' => array(\n\t\t\t\t\t'name' => '页脚',\n\t\t\t\t\t'description' => esc_html__('This sidebar is the first column of the footer widget area.', 'partoo'),\n\t\t\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t\t\t'after_widget' => '</aside>',\n\t\t\t\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t\t\t\t'after_title' => '</h4>',\n\t\t\t\t),\n//\t\t\t\t'footer-2' => array(\n//\t\t\t\t\t'name' => esc_html__('Footer 2', 'partoo'),\n//\t\t\t\t\t'description' => esc_html__('This sidebar is the second column of the footer widget area.', 'partoo'),\n//\t\t\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n//\t\t\t\t\t'after_widget' => '</aside>',\n//\t\t\t\t\t'before_title' => '<h4 class=\"widget-title\">',\n//\t\t\t\t\t'after_title' => '</h4>',\n//\t\t\t\t),\n\t\t\t\t'home-area-1' => array(\n\t\t\t\t\t'name' => '首页焦点位置',\n\t\t\t\t\t'description' => '首页导航下方焦点位置',\n\t\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s container py-5\">',\n\t\t\t\t\t'after_widget' => '</div>',\n\t\t\t\t\t'before_title' => '<div class=\"title mb-5\"><h2>',\n\t\t\t\t\t'after_title' => '</div></h2>',\n\t\t\t\t),\n\t\t\t\t'home-fluid-area-grey' => array(\n\t\t\t\t\t'name' => '首页横幅位置',\n\t\t\t\t\t'description' => '首页中心横幅位置',\n//\t\t\t\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget %2$s bg-world py-5\">',\n//\t\t\t\t\t'after_widget' => '</section>',\n//\t\t\t\t\t'before_title' => '<div class=\"title mb-5\"><h2>',\n//\t\t\t\t\t'after_title' => '</div></h2>',\n\t\t\t\t),\n\t\t\t\t'half-area-left' => array(\n\t\t\t\t\t'name' => '半块左侧',\n\t\t\t\t\t'description' => '用在两栏同时等高时',\n\t\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t\t\t'after_widget' => '</div>',\n\t\t\t\t\t'before_title' => '<h5 class=\"title\">',\n\t\t\t\t\t'after_title' => '</h5>',\n\t\t\t\t),\n\t\t\t\t'half-area-right' => array(\n\t\t\t\t\t'name' => '半块右侧',\n\t\t\t\t\t'description' => '用在两栏同时等高时',\n\t\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t\t\t'after_widget' => '</div>',\n\t\t\t\t\t'before_title' => '<h5 class=\"title\">',\n\t\t\t\t\t'after_title' => '</h5>',\n\t\t\t\t),\n\t\t\t\t'home-primary-color-area' => array(\n\t\t\t\t\t'name' => '首页横幅-2',\n\t\t\t\t\t'description' => '首页下方横幅位置',\n//\t\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s bg-success text-white p-5 text-center\">',\n//\t\t\t\t\t'after_widget' => '</div>',\n//\t\t\t\t\t'before_title' => '<div class=\"title mb-5\"><h2>',\n//\t\t\t\t\t'after_title' => '</div></h2>',\n\t\t\t\t),\n\t\t\t\t'home-container-left' => array(\n\t\t\t\t\t'name' => '首页下方固定宽度左侧',\n\t\t\t\t\t'description' => '首页下方固定宽度左侧',\n\t\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t\t\t'after_widget' => '</div>',\n\t\t\t\t\t'before_title' => '<h5 class=\"title\">',\n\t\t\t\t\t'after_title' => '</h5>',\n\t\t\t\t),\n\t\t\t\t'home-container-right' => array(\n\t\t\t\t\t'name' => '首页下方固定宽度右侧',\n\t\t\t\t\t'description' => '首页下方固定宽度右侧',\n\t\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t\t\t'after_widget' => '</div>',\n\t\t\t\t\t'before_title' => '<h5 class=\"title\">',\n\t\t\t\t\t'after_title' => '</h5>',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\tforeach ($sidebars as $id => $args) {\n\t\t\tregister_sidebar(array_merge(array('id' => $id), $args));\n\t\t}\n\t}",
"function cd_do_sidebar() {\n\n\tadd_filter( 'wp_generate_tag_cloud_data', 'bf_lyrics_glossary_tag_cloud_data', 99, 1 );\n\n\tgenesis_widget_area( 'lyrics', array(\n\t\t'before' => '<div class=\"lyrics widget-area\"><div class=\"wrap\">',\n\t\t'after' => '</div></div>',\n\t) );\n\n}",
"public function panel_sidebar()\n {\n\n // Sidebar contents are not valid unless we have a form\n if (!$this->form) {\n return;\n }\n\n $sections = array(\n 'custom_content' => __('Custom content', 'wpforms'),\n 'general' => __('General', 'wpforms'),\n 'notifications' => __('Notifications', 'wpforms'),\n 'confirmation' => __('Confirmation', 'wpforms'),\n\n );\n $sections = apply_filters('wpforms_builder_settings_sections', $sections, $this->form_data);\n foreach ($sections as $slug => $section) {\n $this->panel_sidebar_section($section, $slug);\n }\n }",
"function fgallery_plugin_help($contextual_help, $screen_id, $screen) {\n if ($screen_id == 'toplevel_page_fgallery' || $screen_id == '1-flash-gallery_page_fgallery_add'\n || $screen_id == '1-flash-gallery_page_fgallery_add' || $screen_id == '1-flash-gallery_page_fgallery_images'\n || $screen_id == '1-flash-gallery_page_fgallery_upload') {\n $contextual_help = '<p><a href=\"http://1plugin.com/faq\" target=\"_blank\">'.__('FAQ').'</a></p>';\n }\n return $contextual_help;\n}",
"function arphabet_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'Home right sidebar',\n 'id' => 'home_right_1',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"rounded\">',\n 'after_title' => '</h2>',\n ) );\n }",
"function udemy_widget_setup(){\n\tregister_sidebar(\n\t\tarray(\n\t\t\t'name' \t=> 'Sidebar',\n\t\t\t'id' \t=> 'sidebar-1',\n\t\t\t'class' => 'custom',\n\t\t\t'description' => 'Standard Sidebar',\n\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</aside>',\n\t\t\t'before_title' => '<h1 class=\"widget-title\">',\n\t\t\t'after_title' => '</h1>',\n\t\t)\n\t);\n}",
"function rb_sidebar_init()\n{\n register_sidebar( array(\n 'name' => __( 'Top Sidebar' ),\n 'id' => 'sidebar-top',\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => \"</div>\",\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n}",
"function uni_add_sidebar_shop() {\n\tregister_sidebar( array(\n\t\t'name' => esc_html__( 'Shop Sidebar', 'shtheme' ),\n\t\t'id' => 'sidebar-shop',\n\t\t'description' => esc_html__( 'Add widgets here.', 'shtheme' ),\n\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</section>',\n\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t'after_title' => '</h2>',\n\t) );\n}",
"function phoenix_widget_setup() {\n register_sidebar(array(\n 'name' => 'Sidebar',\n 'id' => 'sidebar-1',\n 'class' => 'custom',\n 'description' => 'Single post of blog sidebar',\n ));\n}",
"function chandelier_elated_register_sidebars() {\n\n register_sidebar(array(\n 'name' => 'Sidebar',\n 'id' => 'sidebar',\n 'description' => 'Default Sidebar',\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h6 class=\"eltd-widget-title\">',\n 'after_title' => '</h6>'\n ));\n\n }",
"function thefold_widgets_init() {\n register_sidebar( array(\n 'name' => __( 'Main Sidebar', 'thefold' ),\n 'id' => 'sidebar-1',\n 'description' => __( 'Default sidebar that will appear on most pages', 'thefold' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n\n register_sidebar( array(\n 'name' => __( 'Footer', 'thefold' ),\n 'id' => 'footer',\n 'description' => __( 'Global Footer area', 'thefold' ),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n}",
"function register_my_sidebar(){\n \n register_sidebar( array(\n\t\t\"name\" => \"Sidebar widget\",\n \"id\" => \"sidebar1\", \n ));\n\n}",
"public function shop_toolbar_aside_starts_wrapper() {\n\t\t\t?>\n\t\t\t\t<div class=\"ast-shop-toolbar-aside-wrap\">\n\t\t\t<?php\n\t\t}",
"function register_sidebar_locations() {\n register_sidebar(\n array(\n 'id' => 'primary-sidebar',\n 'name' => __( 'Primary Sidebar' ),\n 'description' => __( 'A short description of the sidebar.' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n )\n );\n /* Repeat register_sidebar() code for additional sidebars. */\n // dit zijn zones die we aanmaken.\n register_sidebar(\n array(\n 'id' => 'secondary-sidebar',\n 'name' => __( 'Secondary Sidebar' ),\n 'description' => __( 'A short description of the sidebar.' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n )\n );\n}",
"private function help_style_tabs() {\n $help_sidebar = $this->get_sidebar();\n\n $help_class = '';\n if ( ! $help_sidebar ) :\n $help_class .= ' no-sidebar';\n endif;\n\n // Time to render!\n ?>\n <div id=\"screen-meta\" class=\"tr-options metabox-prefs\">\n\n <div id=\"contextual-help-wrap\" class=\"<?php echo esc_attr( $help_class ); ?>\" >\n <div id=\"contextual-help-back\"></div>\n <div id=\"contextual-help-columns\">\n <div class=\"contextual-help-tabs\">\n <ul>\n <?php\n $class = ' class=\"active\"';\n $tabs = $this->get_tabs();\n foreach ( $tabs as $tab ) :\n $link_id = \"tab-link-{$tab['id']}\";\n $panel_id = (!empty($tab['url'])) ? $tab['url'] : \"#tab-panel-{$tab['id']}\";\n ?>\n <li id=\"<?php echo esc_attr( $link_id ); ?>\"<?php echo $class; ?>>\n <a href=\"<?php echo esc_url( \"$panel_id\" ); ?>\">\n <?php echo esc_html( $tab['title'] ); ?>\n </a>\n </li>\n <?php\n $class = '';\n endforeach;\n ?>\n </ul>\n </div>\n\n <?php if ( $help_sidebar ) : ?>\n <div class=\"contextual-help-sidebar\">\n <?php echo $help_sidebar; ?>\n </div>\n <?php endif; ?>\n\n <div class=\"contextual-help-tabs-wrap\">\n <?php\n $classes = 'help-tab-content active';\n foreach ( $tabs as $tab ):\n $panel_id = \"tab-panel-{$tab['id']}\";\n ?>\n\n <div id=\"<?php echo esc_attr( $panel_id ); ?>\" class=\"inside <?php echo $classes; ?>\">\n <?php\n // Print tab content.\n echo $tab['content'];\n\n // If it exists, fire tab callback.\n if ( ! empty( $tab['callback'] ) )\n call_user_func_array( $tab['callback'], array( $this, $tab ) );\n ?>\n </div>\n <?php\n $classes = 'help-tab-content';\n endforeach;\n ?>\n </div>\n </div>\n </div>\n </div>\n <?php\n }",
"function shiftr_posts_sidebar() {\n register_sidebar([\n 'id' => 'the_blog_sidebar',\n 'name' => 'The Blog Sidebar',\n 'description' => 'The primary Sidebar for the blog',\n 'before_widget' => '<div class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4>',\n 'after_title' => '</h4>',\n ]);\n}",
"function add_sidebar_area(){\n\t\t\tif(!empty($_POST['qode-add-widget'])){\n\t\t\t\t$this->sidebars = get_option($this->stored);\n\t\t\t\t$name = $this->get_name(sanitize_text_field($_POST['qode-add-widget']));\n\n\t\t\t\tif(empty($this->sidebars)){\n\t\t\t\t\t$this->sidebars = array($name);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$this->sidebars = array_merge($this->sidebars, array($name));\n\t\t\t\t}\n\n\t\t\t\tupdate_option($this->stored, $this->sidebars);\n\t\t\t\twp_redirect( admin_url('widgets.php') );\n\t\t\t\tdie();\n\t\t\t}\n\t\t}",
"public function generate_admin_sidebar(array $par = []){\n\t\t\n\t\treturn( view('admin/partials/sidebar.php'));\n\t}",
"public function get_contextual_help() {\n\t\treturn '<p>' . __( 'Hovering over a row in the intrusions list will display action links that allow you to manage the intrusion. You can perform the following actions:', 'mute-screamer' ) . '</p>' .\n\t\t\t'<ul>' .\n\t\t\t'<li>' . __( 'Exclude automatically adds the item to the Exception fields list.', 'mute-screamer' ) . '</li>' .\n\t\t\t'<li>' . __( 'Delete permanently deletes the intrusion.', 'mute-screamer' ) . '</li>' .\n\t\t\t'</ul>';\n\t}",
"function ShowAdminHelp()\r\n{\r\n\tglobal $txt, $helptxt, $context, $scripturl;\r\n\r\n\tif (!isset($_GET['help']) || !is_string($_GET['help']))\r\n\t\tfatal_lang_error('no_access', false);\r\n\r\n\tif (!isset($helptxt))\r\n\t\t$helptxt = array();\r\n\r\n\t// Load the admin help language file and template.\r\n\tloadLanguage('Help');\r\n\r\n\t// Permission specific help?\r\n\tif (isset($_GET['help']) && substr($_GET['help'], 0, 14) == 'permissionhelp')\r\n\t\tloadLanguage('ManagePermissions');\r\n\r\n\tloadTemplate('Help');\r\n\r\n\t// Set the page title to something relevant.\r\n\t$context['page_title'] = $context['forum_name'] . ' - ' . $txt['help'];\r\n\r\n\t// Don't show any template layers, just the popup sub template.\r\n\t$context['template_layers'] = array();\r\n\t$context['sub_template'] = 'popup';\r\n\r\n\t// What help string should be used?\r\n\tif (isset($helptxt[$_GET['help']]))\r\n\t\t$context['help_text'] = $helptxt[$_GET['help']];\r\n\telseif (isset($txt[$_GET['help']]))\r\n\t\t$context['help_text'] = $txt[$_GET['help']];\r\n\telse\r\n\t\t$context['help_text'] = $_GET['help'];\r\n\r\n\t// Does this text contain a link that we should fill in?\r\n\tif (preg_match('~%([0-9]+\\$)?s\\?~', $context['help_text'], $match))\r\n\t\t$context['help_text'] = sprintf($context['help_text'], $scripturl, $context['session_id'], $context['session_var']);\r\n}",
"function siteorigin_panels_add_help_tab_content(){\n\tinclude 'tpl/help.php';\n}",
"function msdlab_hero(){\n if(is_active_sidebar('homepage-top')){\n print '<div id=\"hp-top\">';\n dynamic_sidebar('homepage-top');\n print '</div>';\n } \n}",
"public function add_page() {\n\t\tadd_theme_page(\n\t\t\t\t__('Manage Sidebars', self::TEXT_DOMAIN),\n\t\t\t\t__('Manage Sidebars', self::TEXT_DOMAIN),\n\t\t\t\t'edit_theme_options',\n\t\t\t\t'ups_sidebars',\n\t\t\t\tarray( $this, 'admin_page' )\n\t\t\t);\n\t}",
"function gotravel_mikado_register_sidebars() {\n\n\t\tregister_sidebar(array(\n\t\t\t'name' => esc_html__('Sidebar', 'gotravel'),\n\t\t\t'id' => 'sidebar',\n\t\t\t'description' => esc_html__('Default Sidebar', 'gotravel'),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h4><span class=\"mkdf-sidearea-title\">',\n\t\t\t'after_title' => '</span></h4>'\n\t\t));\n\t}",
"function iiess_widgets(){\n register_sidebar(array(\n 'name' => 'Sidebar Eventos',\n 'id' => 'sidebar',\n 'before_widget' => '<div class=\"widget\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"text-center texto-primario\">',\n 'after_title' => '</h3>'\n ));\n}",
"function mythemepost_widgets(){ \n register_sidebar( array(\n 'name' => 'Lavel Up New Widget Area',\n 'id' => 'level_up_new_widget_area',\n 'before_widget' => '<aside>',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n \n ));\n}",
"function hybrid_get_utility_after_singular() {\n\tget_sidebar( 'after-singular' );\n}",
"function wpdocs_theme_slug_widgets_init() {\n register_sidebar( array(\n 'name' => __( 'Main Sidebar', 'webino' ),\n 'id' => 'sidebar-1',\n 'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'webino' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h2 class=\"widgettitle\">',\n 'after_title' => '</h2>',\n ) );\n}"
] | [
"0.7530114",
"0.7510414",
"0.7312976",
"0.7145624",
"0.705241",
"0.6880671",
"0.68030876",
"0.67966586",
"0.6685019",
"0.6676104",
"0.66744876",
"0.66744876",
"0.66632247",
"0.6653989",
"0.65751004",
"0.6543022",
"0.64597756",
"0.6458532",
"0.64545244",
"0.6440975",
"0.643469",
"0.64199454",
"0.63568294",
"0.63263655",
"0.632236",
"0.63216895",
"0.63126063",
"0.6296786",
"0.6276596",
"0.6251658",
"0.6240193",
"0.62370074",
"0.6227944",
"0.6227744",
"0.62103957",
"0.6189486",
"0.6184308",
"0.617374",
"0.61392164",
"0.6115849",
"0.6102042",
"0.6084971",
"0.6076643",
"0.60667735",
"0.6062323",
"0.6059926",
"0.6056542",
"0.60420585",
"0.6041953",
"0.60379785",
"0.6037933",
"0.6018544",
"0.6015894",
"0.60146606",
"0.60068643",
"0.60049736",
"0.6004294",
"0.60027057",
"0.6001706",
"0.59989303",
"0.5996558",
"0.59942997",
"0.5988082",
"0.5972129",
"0.59667504",
"0.5960964",
"0.59598106",
"0.59592104",
"0.5954389",
"0.59522474",
"0.5951406",
"0.5950661",
"0.5950291",
"0.5940832",
"0.5936895",
"0.5929739",
"0.5925947",
"0.59242326",
"0.5922162",
"0.59213287",
"0.5918422",
"0.5916837",
"0.5896632",
"0.5887973",
"0.58855295",
"0.5873083",
"0.5869256",
"0.5862593",
"0.5860977",
"0.58563584",
"0.5854874",
"0.5854742",
"0.58379185",
"0.58304524",
"0.58265233",
"0.5820205",
"0.58088416",
"0.58079535",
"0.5795238",
"0.57817674",
"0.57813185"
] | 0.0 | -1 |
Render the screen's help section. This will trigger the deprecated filters for backwards compatibility. | public function make($style = 'default') {
switch($style) {
case 'default' :
$this->help_style_tabs();
break;
case 'meta' :
$this->metabox_style_tabs();
break;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function renderHelp() {}",
"public static function render_help() {\n\n // Grab the current screen\n $screen = get_current_screen();\n\n }",
"public function renderHelp()\n {\n $this->renderHeader();\n\n echo Line::begin('Usage:', Line::YELLOW)->nl();\n echo Line::begin()\n ->indent(2)\n ->text($this->getUsage())\n ->nl(2);\n\n // Options\n echo Line::begin('Options:', Line::YELLOW)->nl();\n echo Line::begin()\n ->indent(2)\n ->text('--help', Line::MAGENTA)\n ->to(21)\n ->text('-h', Line::MAGENTA)\n ->text('Display this help message.')\n ->nl(1);\n\n $attributes = $this->attributeNames();\n $help = $this->attributeHelp();\n\n sort($attributes);\n\n foreach ($attributes as $name) {\n echo Line::begin()\n ->indent(2)\n ->text(\"--$name\", Line::MAGENTA)\n ->to(24)\n ->text(isset($help[$name]) ? $help[$name] : '')\n ->nl();\n }\n\n exit(0);\n }",
"public function help(){\n\t\t$screen = get_current_screen();\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/installing\" target=\"_blank\">' . __( 'Installing the Plugin', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/staying-updated\" target=\"_blank\">' . __( 'Staying Updated', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/glossary\" target=\"_blank\">' . __( 'Glossary', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-general-info',\n\t\t\t'title' => __( 'General Info', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-interface\" target=\"_blank\">' . __( 'Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-creating\" target=\"_blank\">' . __( 'Creating a New Form', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-sorting\" target=\"_blank\">' . __( 'Sorting Your Forms', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-building\" target=\"_blank\">' . __( 'Building Your Forms', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-forms',\n\t\t\t'title' => __( 'Forms', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-interface\" target=\"_blank\">' . __( 'Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-managing\" target=\"_blank\">' . __( 'Managing Your Entries', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-searching-filtering\" target=\"_blank\">' . __( 'Searching and Filtering Your Entries', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-entries',\n\t\t\t'title' => __( 'Entries', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/email-design\" target=\"_blank\">' . __( 'Email Design Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/analytics\" target=\"_blank\">' . __( 'Analytics Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-email-analytics',\n\t\t\t'title' => __( 'Email Design & Analytics', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/import\" target=\"_blank\">' . __( 'Import Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/export\" target=\"_blank\">' . __( 'Export Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-import-export',\n\t\t\t'title' => __( 'Import & Export', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/conditional-logic\" target=\"_blank\">' . __( 'Conditional Logic', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/templating\" target=\"_blank\">' . __( 'Templating', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/custom-capabilities\" target=\"_blank\">' . __( 'Custom Capabilities', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/hooks\" target=\"_blank\">' . __( 'Filters and Actions', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-advanced',\n\t\t\t'title' => __( 'Advanced Topics', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<p>' . __( '<strong>Always load CSS</strong> - Force Visual Form Builder Pro CSS to load on every page. Will override \"Disable CSS\" option, if selected.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable CSS</strong> - Disable CSS output for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable Email</strong> - Disable emails from sending for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable Notifications Email</strong> - Disable notification emails from sending for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Skip Empty Fields in Email</strong> - Fields that have no data will not be displayed in the email.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable saving new entry</strong> - Disable new entries from being saved.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable saving entry IP address</strong> - An entry will be saved, but the IP address will be removed.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Place Address labels above fields</strong> - The Address field labels will be placed above the inputs instead of below.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Remove default SPAM Verification</strong> - The default SPAM Verification question will be removed and only a submit button will be visible.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable meta tag version</strong> - Prevent the hidden Visual Form Builder Pro version number from printing in the source code.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Skip PayPal redirect if total is zero</strong> - If PayPal is configured, do not redirect if the total is zero.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Prepend Confirmation</strong> - Always display the form beneath the text confirmation after the form has been submitted.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Max Upload Size</strong> - Restrict the file upload size for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Sender Mail Header</strong> - Control the Sender attribute in the mail header. This is useful for certain server configurations that require an existing email on the domain to be used.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>reCAPTCHA Public Key</strong> - Required if \"Use reCAPTCHA\" option is selected in the Secret field.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>reCAPTCHA Private Key</strong> - Required if \"Use reCAPTCHA\" option is selected in the Secret field.', 'visual-form-builder-pro' ) . '</p>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-settings',\n\t\t\t'title' => __( 'Settings', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t}",
"abstract public function displayHelp();",
"function builder_set_help_sidebar() {\n\tob_start();\n\t\n?>\n<p><strong><?php _e( 'For more information:', 'it-l10n-Builder-Everett' ); ?></strong></p>\n<p><?php _e( '<a href=\"http://ithemes.com/forum/\" target=\"_blank\">Support Forum</a>' ); ?></p>\n<p><?php _e( '<a href=\"http://ithemes.com/codex/page/Builder\" target=\"_blank\">Codex</a>' ); ?></p>\n<?php\n\t\n\t$help = ob_get_contents();\n\tob_end_clean();\n\t\n\t$help = apply_filters( 'builder_filter_help_sidebar', $help );\n\t\n\tif ( ! empty( $help ) ) {\n\t\t$screen = get_current_screen();\n\t\t\n\t\tif ( is_callable( array( $screen, 'set_help_sidebar' ) ) )\n\t\t\t$screen->set_help_sidebar( $help );\n\t}\n}",
"public static function add_old_compat_help($screen, $help)\n {\n }",
"public function help() {\n $screen = get_current_screen();\n SwpmFbUtils::help($screen);\n }",
"public function get_help_sidebar()\n {\n }",
"public function displayHelp()\n {\n $sHelp = \"\nUsage:\n$this->sViewName [options]\n\n$this->sTempalteDesc\n\nOptions:\\n\";\n\n $iMaxLength = 2;\n\n foreach ($this->hOptionList as $hOption)\n {\n if (isset($hOption['long']))\n {\n $iTemp = strlen($hOption['long']);\n\n if ($iTemp > $iMaxLength)\n {\n $iMaxLength = $iTemp;\n }\n }\n }\n\n foreach ($this->hOptionList as $hOption)\n {\n $bShort = isset($hOption['short']);\n $bLong = isset($hOption['long']);\n\n if (!$bShort && !$bLong)\n {\n continue;\n }\n\n if ($bShort && $bLong)\n {\n $sOpt = '-' . $hOption['short'] . ', --' . $hOption['long'];\n }\n elseif ($bShort && !$bLong)\n {\n $sOpt = '-' . $hOption['short'] . \"\\t\";\n }\n elseif (!$bShort && $bLong)\n {\n $sOpt = ' --' . $hOption['long'];\n }\n\n $sOpt = str_pad($sOpt, $iMaxLength + 7);\n $sHelp .= \"\\t$sOpt\\t\\t{$hOption['desc']}\\n\\n\";\n }\n\n die($sHelp . \"\\n\");\n }",
"public function help() \n {\n if (!isset($_SESSION)) { \n session_start(); \n }\n $title = 'Aide';\n $customStyle = $this->setCustomStyle('help');\n require('../src/View/HelpView.php');\n }",
"public static function index()\n {\n /*Displays example on page for help section. Set false or remove entirely before releasing to production.*/\n $example = false; \n\n return View::make('help.list')\n ->with('example',$example);\n }",
"function dfcg_plugin_help() {\n\t\n\tglobal $current_screen;\n\t\n\t$sidebar = dfcg_help_sidebar();\n\t\n\t$current_screen->set_help_sidebar( $sidebar );\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-general',\n\t\t'title' => __( 'General info', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_general'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-theme',\n\t\t'title' => __( 'Theme integration', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_theme'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-quick',\n\t\t'title' => __( 'Quick Start', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_quick'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-gallery',\n\t\t'title' => __( 'Gallery Method', DFCG_DOMAIN ),\n\t\t'callback' => \"dfcg_help_gallery\"\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-images',\n\t\t'title' => __( 'Image Management', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_images'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-desc',\n\t\t'title' => __( 'Descriptions', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_desc'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-css',\n\t\t'title' => __( 'Gallery CSS', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_css'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-scripts',\n\t\t'title' => __( 'Load Scripts', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_scripts'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-troubleshooting',\n\t\t'title' => __( 'Troubleshooting', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_trouble'\n\t));\n}",
"public function admin_head() {\n\t \t\t// Remove the fake Settings submenu\n\t \t\tremove_submenu_page( 'options-general.php', 'wc_talks' );\n\n\t \t\t//Generate help if one is available for the current screen\n\t \t\tif ( wct_is_admin() || ! empty( $this->is_plugin_settings ) ) {\n\n\t \t\t\t$screen = get_current_screen();\n\n\t \t\t\tif ( ! empty( $screen->id ) && ! $screen->get_help_tabs() ) {\n\t \t\t\t\t$help_tabs_list = $this->get_help_tabs( $screen->id );\n\n\t \t\t\t\tif ( ! empty( $help_tabs_list ) ) {\n\t \t\t\t\t\t// Loop through tabs\n\t \t\t\t\t\tforeach ( $help_tabs_list as $key => $help_tabs ) {\n\t \t\t\t\t\t\t// Make sure types are a screen method\n\t \t\t\t\t\t\tif ( ! in_array( $key, array( 'add_help_tab', 'set_help_sidebar' ) ) ) {\n\t \t\t\t\t\t\t\tcontinue;\n\t \t\t\t\t\t\t}\n\n\t \t\t\t\t\t\tforeach ( $help_tabs as $help_tab ) {\n\t \t\t\t\t\t\t\t$content = '';\n\n\t \t\t\t\t\t\t\tif ( empty( $help_tab['content'] ) || ! is_array( $help_tab['content'] ) ) {\n\t \t\t\t\t\t\t\t\tcontinue;\n\t \t\t\t\t\t\t\t}\n\n\t \t\t\t\t\t\t\tif ( ! empty( $help_tab['strong'] ) ) {\n\t \t\t\t\t\t\t\t\t$content .= '<p><strong>' . $help_tab['strong'] . '</strong></p>';\n\t \t\t\t\t\t\t\t}\n\n\t \t\t\t\t\t\t\tforeach ( $help_tab['content'] as $tab_content ) {\n\t\t\t\t\t\t\t\t\tif ( is_array( $tab_content ) ) {\n\t\t\t\t\t\t\t\t\t\t$content .= '<ul><li>' . join( '</li><li>', $tab_content ) . '</li></ul>';\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t$content .= '<p>' . $tab_content . '</p>';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$help_tab['content'] = $content;\n\n\t \t\t\t\t\t\t\tif ( 'add_help_tab' == $key ) {\n\t \t\t\t\t\t\t\t\t$screen->add_help_tab( $help_tab );\n\t \t\t\t\t\t\t\t} else {\n\t \t\t\t\t\t\t\t\t$screen->set_help_sidebar( $content );\n\t \t\t\t\t\t\t\t}\n\t \t\t\t\t\t\t}\n\t \t\t\t\t\t}\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t}\n\n\t \t\t// Add some css\n\t\t\t?>\n\n\t\t\t<style type=\"text/css\" media=\"screen\">\n\t\t\t/*<![CDATA[*/\n\n\t\t\t\t/* Bubble style for Main Post type menu */\n\t\t\t\t#adminmenu .wp-menu-open.menu-icon-<?php echo $this->post_type?> .awaiting-mod {\n\t\t\t\t\tbackground-color: #2ea2cc;\n\t\t\t\t\tcolor: #fff;\n\t\t\t\t}\n\n\t\t\t\t#wordcamp-talks-csv span.dashicons-media-spreadsheet {\n\t\t\t\t\tvertical-align: text-bottom;\n\t\t\t\t}\n\n\t\t\t\t<?php if ( wct_is_admin() && ! wct_is_rating_disabled() ) : ?>\n\t\t\t\t\t/* Rating stars in screen options and in talks WP List Table */\n\t\t\t\t\t.metabox-prefs .talk-rating-bubble:before,\n\t\t\t\t\tth .talk-rating-bubble:before {\n\t\t\t\t\t\tfont: normal 20px/.5 'dashicons';\n\t\t\t\t\t\tspeak: none;\n\t\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t\ttop: 4px;\n\t\t\t\t\t\tleft: -4px;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tvertical-align: top;\n\t\t\t\t\t\t-webkit-font-smoothing: antialiased;\n\t\t\t\t\t\t-moz-osx-font-smoothing: grayscale;\n\t\t\t\t\t\ttext-decoration: none !important;\n\t\t\t\t\t\tcolor: #444;\n\t\t\t\t\t}\n\n\t\t\t\t\tth .talk-rating-bubble:before,\n\t\t\t\t\t.metabox-prefs .talk-rating-bubble:before {\n\t\t\t\t\t\tcontent: '\\f155';\n\t\t\t\t\t}\n\n\t\t\t\t\t.metabox-prefs .talk-rating-bubble:before {\n\t\t\t\t\t\tvertical-align: baseline;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Rates management */\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates {\n\t\t\t\t\t\twidth: 100%;\n\t\t\t\t\t\tlist-style: none;\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t\tpadding: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li {\n\t\t\t\t\t\tlist-style: none;\n\t\t\t\t\t\toverflow: hidden;\n\t\t\t\t\t\tposition: relative;\n\t\t\t\t\t\tpadding:15px 0;\n\t\t\t\t\t\tborder-bottom:dotted 1px #ccc;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li:last-child {\n\t\t\t\t\t\tborder:none;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-star {\n\t\t\t\t\t\tfloat:left;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-star {\n\t\t\t\t\t\twidth:20%;\n\t\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users {\n\t\t\t\t\t\tmargin-left: 20%;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users span.user-rated {\n\t\t\t\t\t\tdisplay:inline-block;\n\t\t\t\t\t\tmargin:5px;\n\t\t\t\t\t\tpadding:5px;\n\t\t\t\t\t\t-webkit-box-shadow: 0 1px 1px 1px rgba(0,0,0,0.1);\n\t\t\t\t\t\tbox-shadow: 0 1px 1px 1px rgba(0,0,0,0.1);\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users a.del-rate {\n\t\t\t\t\t\ttext-decoration: none;\n\t\t\t\t\t}\n\n\t\t\t\t\t#wct_ratings_box ul.admin-talk-rates li div.admin-talk-rates-users a.del-rate div {\n\t\t\t\t\t\tvertical-align: baseline;\n\t\t\t\t\t}\n\t\t\t\t<?php endif; ?>\n\n\t\t\t/*]]>*/\n\t\t\t</style>\n\t\t\t<?php\n\t\t}",
"public function setup_help_tab()\n {\n }",
"public function help()\n {\n return view('frontEnd.usersPanel.help');\n }",
"public function printHelp();",
"protected function isHelp() {}",
"protected function displayHelp()\n {\n return $this->context->smarty->fetch($this->module->getLocalPath().'views/templates/admin/rewards_info.tpl');\n }",
"public static function end_help()\n\t{\n\t\treturn <<<HTML\n\t</div>\n</div>\nHTML;\n\t}",
"public function help()\n\t{\n\t\t// You could include a file and return it here.\n\t\treturn \"<h4>Overview</h4>\n\t\t<p>The Inventory module will work like magic. The End!</p>\";\n\t}",
"public function add_help_tab() {\n\t\t$screen = get_current_screen();\n\t\t$screen->add_help_tab( array(\n\t\t\t\t'id' => 'support',\n\t\t\t\t'title' => 'Support',\n\t\t\t\t'content' => '',\n\t\t\t\t'callback' => array( $this, 'display' ),\n\t\t\t)\n\t\t);\n\t}",
"public function help();",
"public function create_help_screen() {\n\t\t$this->admin_screen = WP_Screen::get( $this->admin_page );\n\n\t\t$this->admin_screen->add_help_tab(\n\t\t\tarray(\n\t\t\t\t'title' => 'Annotation Guide',\n\t\t\t\t'id' => 'annotation_tab',\n\t\t\t\t'content' => '<p>Drag the mouse and draw a rectangle around the object and the click save.</p>',\n\t\t\t\t'callback' => false\n\t\t\t)\n\t\t);\n\t}",
"function my_contextual_help($contexual_help, $screen_id, $screen) {\n\tif('listing' == $screen->id) {\n\t\t$contextual_help = '<h2>Listings</h2>\n\t\t<p>Listings show the details of the items that we sell on the website. You can see a list of them on this page in reverse chronological order - the latest one we added is first.</p>\n\t\t<p>You can view/edit the details of each product by clicking on its name, or you can perform bulk actions using the dropdown menu and selecting multiple items.</p>';\n\t}elseif('edit-listing' == $screen->id) {\n\t\t$contextual_help = '<h2>Editing listings</h2>\n\t\t<p>This page allows you to view/modify listing details. Please make sure to fill out the available boxes with the appropriate details (listing image, price, brand) and <strong>not</strong> add these details to the listing description.</p>';\n\t}\n\treturn $contextual_help;\n}",
"public function getHelpSidbar()\n {\n $txt_title = __(\"Resources\", 'duplicator');\n $txt_home = __(\"Knowledge Base\", 'duplicator');\n $txt_guide = __(\"Full User Guide\", 'duplicator');\n $txt_faq = __(\"Technical FAQs\", 'duplicator');\n\t\t$txt_sets = __(\"Package Settings\", 'duplicator');\n $this->screen->set_help_sidebar(\n \"<div class='dup-screen-hlp-info'><b>{$txt_title}:</b> <br/>\"\n .\"<i class='fa fa-home'></i> <a href='https://snapcreek.com/duplicator/docs/' target='_sc-home'>{$txt_home}</a> <br/>\"\n .\"<i class='fa fa-book'></i> <a href='https://snapcreek.com/duplicator/docs/guide/' target='_sc-guide'>{$txt_guide}</a> <br/>\"\n .\"<i class='fa fa-file-code-o'></i> <a href='https://snapcreek.com/duplicator/docs/faqs-tech/' target='_sc-faq'>{$txt_faq}</a> <br/>\"\n\t\t\t.\"<i class='fa fa-gear'></i> <a href='admin.php?page=duplicator-settings&tab=package'>{$txt_sets}</a></div>\"\n );\n }",
"public function get_help()\n\t{\n\t\treturn '';\n\t}",
"function ShowHelp()\r\n{\r\n\tglobal $settings, $user_info, $language, $context, $txt, $sourcedir, $options, $scripturl;\r\n\r\n\tloadTemplate('Help');\r\n\tloadLanguage('Manual');\r\n\r\n\t$manual_areas = array(\r\n\t\t'getting_started' => array(\r\n\t\t\t'title' => $txt['manual_category_getting_started'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'introduction' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_intro'],\r\n\t\t\t\t\t'template' => 'manual_intro',\r\n\t\t\t\t),\r\n\t\t\t\t'main_menu' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_main_menu'],\r\n\t\t\t\t\t'template' => 'manual_main_menu',\r\n\t\t\t\t),\r\n\t\t\t\t'board_index' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_board_index'],\r\n\t\t\t\t\t'template' => 'manual_board_index',\r\n\t\t\t\t),\r\n\t\t\t\t'message_view' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_message_view'],\r\n\t\t\t\t\t'template' => 'manual_message_view',\r\n\t\t\t\t),\r\n\t\t\t\t'topic_view' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_topic_view'],\r\n\t\t\t\t\t'template' => 'manual_topic_view',\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t),\r\n\t\t'registering' => array(\r\n\t\t\t'title' => $txt['manual_category_registering'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'when_how' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_when_how_register'],\r\n\t\t\t\t\t'template' => 'manual_when_how_register',\r\n\t\t\t\t),\r\n\t\t\t\t'registration_screen' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_registration_screen'],\r\n\t\t\t\t\t'template' => 'manual_registration_screen',\r\n\t\t\t\t),\r\n\t\t\t\t'activating_account' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_activating_account'],\r\n\t\t\t\t\t'template' => 'manual_activating_account',\r\n\t\t\t\t),\r\n\t\t\t\t'logging_in' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_logging_in_out'],\r\n\t\t\t\t\t'template' => 'manual_logging_in_out',\r\n\t\t\t\t),\r\n\t\t\t\t'password_reminders' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_password_reminders'],\r\n\t\t\t\t\t'template' => 'manual_password_reminders',\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t),\r\n\t\t'profile_features' => array(\r\n\t\t\t'title' => $txt['manual_category_profile_features'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'profile_info' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_profile_info'],\r\n\t\t\t\t\t'template' => 'manual_profile_info_summary',\r\n\t\t\t\t\t'description' => $txt['manual_entry_profile_info_desc'],\r\n\t\t\t\t\t'subsections' => array(\r\n\t\t\t\t\t\t'summary' => array($txt['manual_entry_profile_info_summary'], 'template' => 'manual_profile_info_summary'),\r\n\t\t\t\t\t\t'posts' => array($txt['manual_entry_profile_info_posts'], 'template' => 'manual_profile_info_posts'),\r\n\t\t\t\t\t\t'stats' => array($txt['manual_entry_profile_info_stats'], 'template' => 'manual_profile_info_stats'),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t\t'modify_profile' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_modify_profile'],\r\n\t\t\t\t\t'template' => 'manual_modify_profile_settings',\r\n\t\t\t\t\t'description' => $txt['manual_entry_modify_profile_desc'],\r\n\t\t\t\t\t'subsections' => array(\r\n\t\t\t\t\t\t'settings' => array($txt['manual_entry_modify_profile_settings'], 'template' => 'manual_modify_profile_settings'),\r\n\t\t\t\t\t\t'forum' => array($txt['manual_entry_modify_profile_forum'], 'template' => 'manual_modify_profile_forum'),\r\n\t\t\t\t\t\t'look' => array($txt['manual_entry_modify_profile_look'], 'template' => 'manual_modify_profile_look'),\r\n\t\t\t\t\t\t'auth' => array($txt['manual_entry_modify_profile_auth'], 'template' => 'manual_modify_profile_auth'),\r\n\t\t\t\t\t\t'notify' => array($txt['manual_entry_modify_profile_notify'], 'template' => 'manual_modify_profile_notify'),\r\n\t\t\t\t\t\t'pm' => array($txt['manual_entry_modify_profile_pm'], 'template' => 'manual_modify_profile_pm'),\r\n\t\t\t\t\t\t'buddies' => array($txt['manual_entry_modify_profile_buddies'], 'template' => 'manual_modify_profile_buddies'),\r\n\t\t\t\t\t\t'groups' => array($txt['manual_entry_modify_profile_groups'], 'template' => 'manual_modify_profile_groups'),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t\t'actions' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_profile_actions'],\r\n\t\t\t\t\t'template' => 'manual_profile_actions_subscriptions',\r\n\t\t\t\t\t'description' => $txt['manual_entry_modify_profile_desc'],\r\n\t\t\t\t\t'subsections' => array(\r\n\t\t\t\t\t\t'subscriptions' => array($txt['manual_entry_profile_actions_subscriptions'], 'template' => 'manual_profile_actions_subscriptions'),\r\n\t\t\t\t\t\t'delete' => array($txt['manual_entry_profile_actions_delete'], 'template' => 'manual_profile_actions_delete'),\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'posting_basics' => array(\r\n\t\t\t'title' => $txt['manual_category_posting_basics'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t/*'posting_screen' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_posting_screen'],\r\n\t\t\t\t\t'template' => 'manual_posting_screen',\r\n\t\t\t\t),*/\r\n\t\t\t\t'posting_topics' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_posting_topics'],\r\n\t\t\t\t\t'template' => 'manual_posting_topics',\r\n\t\t\t\t),\r\n\t\t\t\t/*'quoting_posts' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_quoting_posts'],\r\n\t\t\t\t\t'template' => 'manual_quoting_posts',\r\n\t\t\t\t),\r\n\t\t\t\t'modifying_posts' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_modifying_posts'],\r\n\t\t\t\t\t'template' => 'manual_modifying_posts',\r\n\t\t\t\t),*/\r\n\t\t\t\t'smileys' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_smileys'],\r\n\t\t\t\t\t'template' => 'manual_smileys',\r\n\t\t\t\t),\r\n\t\t\t\t'bbcode' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_bbcode'],\r\n\t\t\t\t\t'template' => 'manual_bbcode',\r\n\t\t\t\t),\r\n\t\t\t\t/*'wysiwyg' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_wysiwyg'],\r\n\t\t\t\t\t'template' => 'manual_wysiwyg',\r\n\t\t\t\t),*/\r\n\t\t\t),\r\n\t\t),\r\n\t\t'personal_messages' => array(\r\n\t\t\t'title' => $txt['manual_category_personal_messages'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'messages' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_pm_messages'],\r\n\t\t\t\t\t'template' => 'manual_pm_messages',\r\n\t\t\t\t),\r\n\t\t\t\t/*'actions' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_pm_actions'],\r\n\t\t\t\t\t'template' => 'manual_pm_actions',\r\n\t\t\t\t),\r\n\t\t\t\t'preferences' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_pm_preferences'],\r\n\t\t\t\t\t'template' => 'manual_pm_preferences',\r\n\t\t\t\t),*/\r\n\t\t\t),\r\n\t\t),\r\n\t\t'forum_tools' => array(\r\n\t\t\t'title' => $txt['manual_category_forum_tools'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'searching' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_searching'],\r\n\t\t\t\t\t'template' => 'manual_searching',\r\n\t\t\t\t),\r\n\t\t\t\t/*'memberlist' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_memberlist'],\r\n\t\t\t\t\t'template' => 'manual_memberlist',\r\n\t\t\t\t),\r\n\t\t\t\t'calendar' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_calendar'],\r\n\t\t\t\t\t'template' => 'manual_calendar',\r\n\t\t\t\t),*/\r\n\t\t\t),\r\n\t\t),\r\n\t);\r\n\r\n\t// Set a few options for the menu.\r\n\t$menu_options = array(\r\n\t\t'disable_url_session_check' => true,\r\n\t);\r\n\r\n\trequire_once($sourcedir . '/Subs-Menu.php');\r\n\t$manual_area_data = createMenu($manual_areas, $menu_options);\r\n\tunset($manual_areas);\r\n\r\n\t// Make a note of the Unique ID for this menu.\r\n\t$context['manual_menu_id'] = $context['max_menu_id'];\r\n\t$context['manual_menu_name'] = 'menu_data_' . $context['manual_menu_id'];\r\n\r\n\t// Get the selected item.\r\n\t$context['manual_area_data'] = $manual_area_data;\r\n\t$context['menu_item_selected'] = $manual_area_data['current_area'];\r\n\r\n\t// Set a title and description for the tab strip if subsections are present.\r\n\tif (isset($context['manual_area_data']['subsections']))\r\n\t\t$context[$context['manual_menu_name']]['tab_data'] = array(\r\n\t\t\t'title' => $manual_area_data['label'],\r\n\t\t\t'description' => isset($manual_area_data['description']) ? $manual_area_data['description'] : '',\r\n\t\t);\r\n\r\n\t// Bring it on!\r\n\t$context['sub_template'] = isset($manual_area_data['current_subsection'], $manual_area_data['subsections'][$manual_area_data['current_subsection']]['template']) ? $manual_area_data['subsections'][$manual_area_data['current_subsection']]['template'] : $manual_area_data['template'];\r\n\t$context['page_title'] = $manual_area_data['label'] . ' - ' . $txt['manual_smf_user_help'];\r\n\r\n\t// Build the link tree.\r\n\t$context['linktree'][] = array(\r\n\t\t'url' => $scripturl . '?action=help',\r\n\t\t'name' => $txt['help'],\r\n\t);\r\n\tif (isset($manual_area_data['current_area']) && $manual_area_data['current_area'] != 'index')\r\n\t\t$context['linktree'][] = array(\r\n\t\t\t'url' => $scripturl . '?action=admin;area=' . $manual_area_data['current_area'],\r\n\t\t\t'name' => $manual_area_data['label'],\r\n\t\t);\r\n\tif (!empty($manual_area_data['current_subsection']) && $manual_area_data['subsections'][$manual_area_data['current_subsection']][0] != $manual_area_data['label'])\r\n\t\t$context['linktree'][] = array(\r\n\t\t\t'url' => $scripturl . '?action=admin;area=' . $manual_area_data['current_area'] . ';sa=' . $manual_area_data['current_subsection'],\r\n\t\t\t'name' => $manual_area_data['subsections'][$manual_area_data['current_subsection']][0],\r\n\t\t);\r\n\r\n\t// We actually need a special style sheet for help ;)\r\n\t$context['template_layers'][] = 'manual';\r\n\r\n\t// The smiley info page needs some cheesy information.\r\n\tif ($manual_area_data['current_area'] == 'smileys')\r\n\t\tShowSmileyHelp();\r\n}",
"public function visitHelpPage()\n {\n $this->data .= \"\n /* --- visitHelpPage --- */\n _ra.visitHelpPage = {'visit': true};\n \n if (_ra.ready !== undefined) {\n _ra.visitHelpPage();\n }\n \";\n\n return $this->data;\n }",
"public function helpAction() {}",
"function ShowAdminHelp()\r\n{\r\n\tglobal $txt, $helptxt, $context, $scripturl;\r\n\r\n\tif (!isset($_GET['help']) || !is_string($_GET['help']))\r\n\t\tfatal_lang_error('no_access', false);\r\n\r\n\tif (!isset($helptxt))\r\n\t\t$helptxt = array();\r\n\r\n\t// Load the admin help language file and template.\r\n\tloadLanguage('Help');\r\n\r\n\t// Permission specific help?\r\n\tif (isset($_GET['help']) && substr($_GET['help'], 0, 14) == 'permissionhelp')\r\n\t\tloadLanguage('ManagePermissions');\r\n\r\n\tloadTemplate('Help');\r\n\r\n\t// Set the page title to something relevant.\r\n\t$context['page_title'] = $context['forum_name'] . ' - ' . $txt['help'];\r\n\r\n\t// Don't show any template layers, just the popup sub template.\r\n\t$context['template_layers'] = array();\r\n\t$context['sub_template'] = 'popup';\r\n\r\n\t// What help string should be used?\r\n\tif (isset($helptxt[$_GET['help']]))\r\n\t\t$context['help_text'] = $helptxt[$_GET['help']];\r\n\telseif (isset($txt[$_GET['help']]))\r\n\t\t$context['help_text'] = $txt[$_GET['help']];\r\n\telse\r\n\t\t$context['help_text'] = $_GET['help'];\r\n\r\n\t// Does this text contain a link that we should fill in?\r\n\tif (preg_match('~%([0-9]+\\$)?s\\?~', $context['help_text'], $match))\r\n\t\t$context['help_text'] = sprintf($context['help_text'], $scripturl, $context['session_id'], $context['session_var']);\r\n}",
"public function help_callback(){\r\n if($this->help_static_file()) {\r\n echo self::read_help_file($this->help_static_file());\r\n }\r\n }",
"public function makeHelpButton() {}",
"function Show_Help($title,$ret_help)\n\t\t{\n\t\t\tglobal \t$Captions_arr,$ecom_siteid,$db,$ecom_hostname,$ecom_themename,\n\t\t\t\t\t$ecom_themeid,$default_layout,$inlineSiteComponents,$Settings_arr;\n\t\t\t// ** Fetch any captions for product details page\n\t\t\t$Captions_arr['HELP'] \t= getCaptions('HELP');\n\t\t\t// ** Check to see whether current user is logged in \n\t\t\t$cust_id \t= get_session_var(\"ecom_login_customer\");\n\t\t\twhile ($row_help = $db->fetch_array($ret_help))\n\t\t\t{\n\t\t\t\t$help_arr[$row_help['help_id']] = array (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'help_heading'=>stripslash_normal($row_help['help_heading']),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'help_description'=>stripslashes($row_help['help_description'])\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t}\n\t\t\n\t\t \t\t/*$HTML_treemenu = '\t<div class=\"row breadcrumbs\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"'.CONTAINER_CLASS.'\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"container-tree\">\n\t\t\t\t\t\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"'.url_link('',1).'\" title=\"'.stripslash_normal($Captions_arr['COMMON']['TREE_MENU_HOME_LINK']).'\">'.stripslash_normal($Captions_arr['COMMON']['TREE_MENU_HOME_LINK']).'</a></li>\n\t\t\t\t\t\t\t\t\t\t\t\t<li> → '.stripslash_normal($Captions_arr['HELP']['HELP_HEAD']).'</li>\n\n\t\t\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div></div>';*/\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$HTML_treemenu = '\t<div class=\"breadcrumbs\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"'.CONTAINER_CLASS.'\">\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"container-tree\">\n\t\t\t\t\t\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t\t\t\t\t<li><a href=\"'.url_link('',1).'\" title=\"'.stripslash_normal($Captions_arr['COMMON']['TREE_MENU_HOME_LINK']).'\">'.stripslash_normal($Captions_arr['COMMON']['TREE_MENU_HOME_LINK']).'</a></li>\n\t\t\t\t\t\t\t\t\t\t\t\t<li> → '.stripslash_normal($Captions_arr['HELP']['HELP_HEAD']).'</li>\n\n\t\t\t\t\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t</div></div>';\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\techo $HTML_treemenu;\t\n\t?>\n\t\t<div class='faq_outer'>\n\t\t<a name=\"top\"></a>\n\t\t<div class=\"<?php echo CONTAINER_CLASS;?>\">\n\t\t<div class=\"panel-group\" id=\"accordion\">\n\t\t\n\t\t<?php \n\t\t\t// Showing the headings and descriptions\n\t\t\t$cntr=1;\n\t\t\tforeach ($help_arr as $k=>$v)\n\t\t\t{ \n\t\t\t\t$help_id = $k;\n\t\t\t\techo \t\"<div class=\\\"panel panel-default\\\" >\n\t\t\t\t\t\t\t<div class=\\\"panel-heading\\\">\n\t\t\t\t\t\t\t<a class=\\\"accordion-toggle\\\" data-toggle=\\\"collapse\\\" data-parent=\\\"#accordion\\\" href=\\\"#collapseOne\".$help_id.\"\\\"><div class=\\\"panel-title\\\">\n\n\t\t\t\t\t\t\t\".$cntr.'. '.$v['help_heading'].\"<i class=\\\" pull-right caret\\\"></i>\n\t\t\t\t\t\t\t</div></a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div id=\\\"collapseOne\".$help_id.\"\\\" class=\\\"panel-collapse collapse out\\\">\n\t\t\t\t\t\t\t<div class=\\\"panel-body\\\">\n\t\t\t\t\t\t\t\";\n\t\t\t\t\t\t\t$cntr++;\n\t\t\t\t\t\t\t\n\t\t?>\t\n\t\t<?php \n\t\t\t\t$sr_array = array('rgb(0, 0, 0)','#000000');\n\t\t\t\t$rep_array = array('rgb(255,255,255)','#ffffff'); \n\t\t\t\t$ans_desc = str_replace($sr_array,$rep_array,$v['help_description']);\n\t\t\techo $ans_desc?>\t\t\t\n\t<?php\t\n\techo \"\n\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\t</div>\";\n\t\t\t}\n\t?>\n\t\t\t</div> \n\t\t</div> \n\t\t</div>\n\t<?php\t\t\n\t\t}",
"public function help()\n {\n return view('help');\n }",
"public function help_tab(){\r\n $screen = get_current_screen();\r\n\r\n foreach($this->what_helps as $help_id => $tab) {\r\n $callback_name = $this->generate_callback_name($help_id);\r\n if(method_exists($this, 'help_'.$callback_name.'_callback')) {\r\n $callback = array($this, 'help_'.$callback_name.'_callback');\r\n }\r\n else {\r\n $callback = array($this, 'help_callback');\r\n }\r\n // documentation tab\r\n $screen->add_help_tab( array(\r\n 'id' => 'hw-help-'.$help_id,\r\n 'title' => __( $tab['title'] ),\r\n //'content' => \"<p>sdfsgdgdfghfhfgh</p>\",\r\n 'callback' => $callback\r\n )\r\n );\r\n }\r\n }",
"public static function help_inner () \n { \n $html = null;\n\n $top = __( 'Instruction Manual', 'label' );\n $inner = self::help_center();\n $bottom = self::page_foot();\n\n $html .= self::page_body( 'help', $top, $inner, $bottom );\n\n return $html;\n }",
"public function help()\n {\n echo PHP_EOL;\n $output = new Output;\n $output->write('Available Commands', [\n 'color' => 'red',\n 'bold' => true,\n 'underline' => true,\n ]);\n echo PHP_EOL;\n\n $maxlen = 0;\n foreach ($this->supportedArgs as $key => $description) {\n $len = strlen($key);\n if ($len > $maxlen) {\n $maxlen = $len;\n }\n\n }\n\n foreach ($this->supportedArgs as $key => $description) {\n $len = strlen($key);\n $output->write(' ')\n ->write($key, ['color' => 'yellow'])\n ->write(str_repeat(' ', $maxlen - $len))\n ->write(' - ')\n ->write($description);\n\n echo PHP_EOL;\n }\n\n echo PHP_EOL;\n\n }",
"function admin_hide_help() { \n $screen = get_current_screen();\n $screen->remove_help_tabs();\n}",
"public function help()\r\n\t{\r\n\t\t// You could include a file and return it here.\r\n\t\treturn \"No documentation has been added for this module.<br />Contact the module developer for assistance.\";\r\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}",
"public function cli_help() {}",
"public function render_screen_options()\n {\n }",
"public function index()\n {\n $this->help();\n }",
"public static function help($name)\n {\n self::create($name)->renderHelp();\n }",
"public function getHelp()\n {\n return $this->run(array(\n 'help'\n ));\n }",
"function foodpress_admin_help_tab_content() {\r\n\t$screen = get_current_screen();\r\n\r\n\t$screen->add_help_tab( array(\r\n\t 'id'\t=> 'foodpress_overview_tab',\r\n\t 'title'\t=> __( 'Overview', 'foodpress' ),\r\n\t 'content'\t=>\r\n\r\n\t \t'<p>' . __( 'Thank you for using FoodPress plugin. ', 'foodpress' ). '</p>'\r\n\r\n\t) );\r\n\r\n\r\n\r\n\r\n\t$screen->set_help_sidebar(\r\n\t\t'<p><strong>' . __( 'For more information:', 'foodpress' ) . '</strong></p>' .\r\n\t\t'<p><a href=\"http://demo.myfoodpress.com/\" target=\"_blank\">' . __( 'foodpress Demo', 'foodpress' ) . '</a></p>' .\r\n\t\t\r\n\t\t'<p><a href=\"http://demo.myfoodpress.com/documentation/\" target=\"_blank\">' . __( 'Documentation', 'foodpress' ) . '</a></p>'.\r\n\t\t'<p><a href=\"https://foodpressplugin.freshdesk.com/support/home/\" target=\"_blank\">' . __( 'Support', 'foodpress' ) . '</a></p>'\r\n\t);\r\n}",
"public function get_contextual_help() {\n\t\treturn '<p>' . __( 'Hovering over a row in the intrusions list will display action links that allow you to manage the intrusion. You can perform the following actions:', 'mute-screamer' ) . '</p>' .\n\t\t\t'<ul>' .\n\t\t\t'<li>' . __( 'Exclude automatically adds the item to the Exception fields list.', 'mute-screamer' ) . '</li>' .\n\t\t\t'<li>' . __( 'Delete permanently deletes the intrusion.', 'mute-screamer' ) . '</li>' .\n\t\t\t'</ul>';\n\t}",
"public function help()\n {\n $help = file_get_contents(BUILTIN_SHELL_HELP . 'list.txt');\n $this->put($help);\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\"] [] .= \"Zabbix Host Interface :\";\n\t\t$help = array_merge ( $help, zabbix_common_interface::help () );\n\t\t\n\t\treturn $help;\n\t}",
"public function dashboard_page_mscr_intrusions() {\n\t\t// WordPress 3.3\n\t\tif ( function_exists( 'wp_suspend_cache_addition' ) ) {\n\t\t\t$args = array(\n\t\t\t\t'title' => 'Help',\n\t\t\t\t'id' => 'mscr_help',\n\t\t\t\t'content' => $this->get_contextual_help(),\n\t\t\t);\n\t\t\tget_current_screen()->add_help_tab( $args );\n\t\t}\n\t\t// WordPress 3.1 and later\n\t\telse if ( function_exists( 'get_current_screen' ) ) {\n\t\t\t// Add help to the intrusions list page\n\t\t\tadd_contextual_help( get_current_screen(), $this->get_contextual_help() );\n\t\t}\n\t}",
"public function get_help(){\n $tmp=self::_pipeExec('\"'.$this->cmd.'\" --extended-help');\n return $tmp['stdout'];\n }",
"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 }",
"function get_site_screen_help_sidebar_content()\n {\n }",
"function index() \n {\n $this->view->render('help/index'); \n }",
"function help()\n\t{\n\t\t/* check if all required plugins are installed */\n\t\t\n\t\t$text = \"<div class='center buttons-bar'><form method='post' action='\".e_SELF.\"?\".e_QUERY.\"' id='core-db-import-form'>\";\n\t\t$text .= e107::getForm()->admin_button('importThemeDemo', 'Install Demo', 'other');\n\t\t$text .= '</form></div>';\n \n\t \treturn $text;\n\t}",
"protected function getQuickHelp() {\r\n $strOldAction = $this->getAction();\r\n $this->setAction($this->strOriginalAction);\r\n $strQuickhelp = parent::getQuickHelp();\r\n $this->setAction($strOldAction);\r\n return $strQuickhelp;\r\n }",
"public function custom_help_tab() {\n\n\t\t\t$screen = get_current_screen();\n\n\t\t\t// Return early if we're not on the needed post type.\n\t\t\tif ( ( $this->object_type == 'post' && $this->object != $screen->post_type ) || \n\t\t\t\t ( $this->object_type == 'taxonomy' && $this->object != $screen->taxonomy ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Add the help tabs.\n\t\t\tforeach ( $this->args->help_tabs as $tab ) {\n\t\t\t\t$screen->add_help_tab( $tab );\n\t\t\t}\n\n\t\t\t// Add the help sidebar.\n\t\t\t$screen->set_help_sidebar( $this->args->help_sidebar );\n\t\t}",
"function help_page() {\n\t\techo \"<div class=\\\"wrap\\\">\";\n\t\techo \"<h2>Help</h2>\";\n\t\techo \"<p>1. Upload your assets, to upload your assets go to the Piecemaker>Assets and click the <em>Upload New Asset</em> button.\n\t\t\\n</br>2. Once your assets are uploaded it is time to create your first Piecemaker go to Piecemaker>Piecemakers and click the <em>Add New Piecemaker</em>, fill all the option and click <em>Add Piecemaker</em> button.\n\t\t\\n </br>3. After creating new piecemaker you have to add Slides and Transitions. Go to Piecemaker>Piecemakers and click the icons next to your slider.\n\t\t\\n </br>4. To add your piecemaker into the post or page just simple type [piecemaker id='your_id'/] your_id = id of the piecemaker (it is displayed in the Piecemakers section).\"; \n\t\techo \"</div>\";\n\t}",
"public static function add_help_text()\n {\n }",
"public function helpAction()\r\n {\r\n $this->view->liste = $this->_helper->ListeDocuments('public/documents');\r\n $this->view->docPath = $this->getUrlDocs();\r\n }",
"function fgallery_plugin_help($contextual_help, $screen_id, $screen) {\n if ($screen_id == 'toplevel_page_fgallery' || $screen_id == '1-flash-gallery_page_fgallery_add'\n || $screen_id == '1-flash-gallery_page_fgallery_add' || $screen_id == '1-flash-gallery_page_fgallery_images'\n || $screen_id == '1-flash-gallery_page_fgallery_upload') {\n $contextual_help = '<p><a href=\"http://1plugin.com/faq\" target=\"_blank\">'.__('FAQ').'</a></p>';\n }\n return $contextual_help;\n}",
"public function getHelp()\n\t{\n\t\treturn $this->run(array('help'));\n\t}",
"function wpp_contextual_help( $data ) {\n\n $data[ 'Developer' ][ ] = '<h3>' . __( 'Developer', 'wpp' ) . '</h3>';\n $data[ 'Developer' ][ ] = '<p>' . __( 'The <b>slug</b> is automatically created from the title and is used in the back-end. It is also used for template selection, example: floorplan will look for a template called property-floorplan.php in your theme folder, or default to property.php if nothing is found.' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( 'If <b>Searchable</b> is checked then the property will be loaded for search, and available on the property search widget.' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( 'If <b>Location Matters</b> is checked, then an address field will be displayed for the property, and validated against Google Maps API. Additionally, the property will be displayed on the SuperMap, if the feature is installed.' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( '<b>Hidden Attributes</b> determine which attributes are not applicable to the given property type, and will be grayed out in the back-end.' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( '<b>Inheritance</b> determines which attributes should be automatically inherited from the parent property' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( 'Property attributes are meant to be short entries that can be searchable, on the back-end attributes will be displayed as single-line input boxes. On the front-end they are displayed using a definitions list.' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( 'Making an attribute as \"searchable\" will list it as one of the searchable options in the Property Search widget settings.' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( 'Be advised, attributes added via add_filter() function supercede the settings on this page.' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( '<b>Search Input:</b> Select and input type and enter comma-separated values that you would like to be used in property search, on the front-end.', 'wpp' ) . '</p>';\n $data[ 'Developer' ][ ] = '<p>' . __( '<b>Data Entry:</b> Enter comma-separated values that you would like to use on the back-end when editing properties.', 'wpp' ) . '</p>';\n\n return $data;\n\n }",
"function add_contextual_help($screen, $help)\n {\n }",
"function clshowhelp() {\n\tglobal $CLHELP;\n\tforeach ( $CLHELP as $msg) {\n\t\tif ( substr( $msg, strlen( $msg) - 1, 1) != \"\\n\") $msg .= \"\\n\"; \t// no end line in this msg, add one\n\t\techo $msg;\n\t}\n\t\n}",
"protected function checkForHelp() {\n\t\tif ($this->commandLineOptions->hasOption(tx_mnogosearch_clioptions::HELP)) {\n\t\t\t$this->showUsageAndExit();\n\t\t}\n\t}",
"public function getHelp()\n {\n new Help('form');\n }",
"function help ( $help='help text', $caption='') {\n\n\t\t$compath = JURI::root() . 'administrator/components/'.JEV_COM_COMPONENT;\n\t\t$imgpath = $compath . '/assets/images';\n\n\t\tif (empty($caption)) $caption = ' ';\n\n\t\tif (substr($help, 0, 7) == 'http://' || substr($help, 0, 8) == 'https://') {\n\t\t\t//help text is url, open new window\n\t\t\t$onclick_cmd = \"window.open(\\\"$help\\\", \\\"help\\\", \\\"height=700,width=800,resizable=yes,scrollbars\\\");return false\";\n\t\t} else {\n\t\t\t// help text is plain text with html tags\n\t\t\t// prepare text as overlib parameter\n\t\t\t// escape \", replace new line by space\n\t\t\t$help = htmlspecialchars($help, ENT_QUOTES);\n\t\t\t$help = str_replace('"', '\\"', $help);\n\t\t\t$help = str_replace(\"\\n\", \" \", $help);\n\n\t\t\t$ol_cmds = 'RIGHT, ABOVE, VAUTO, WRAP, STICKY, CLOSECLICK, CLOSECOLOR, \"white\"';\n\t\t\t$ol_cmds .= ', CLOSETEXT, \"<span style=\\\"border:solid white 1px;padding:0px;margin:1px;\\\"><b>X</b></span>\"';\n\t\t\t$onclick_cmd = 'return overlib(\"'.$help.'\", ' . $ol_cmds . ', CAPTION, \"'.$caption.'\")';\n\t\t}\n\n\t\t// RSH 10/11/10 - Added float:none for 1.6 compatiblity - The default template was floating images to the left\n\t\t$str = '<img border=\"0\" style=\"float: none; vertical-align:bottom; cursor:help;\" alt=\"'. JText::_('JEV_HELP') . '\"'\n\t\t. ' title=\"' . JText::_('JEV_HELP') .'\"'\n\t\t. ' src=\"' . $imgpath . '/help_ques_inact.gif\"'\n\t\t. ' onmouseover=\\'this.src=\"' . $imgpath . '/help_ques.gif\"\\''\n\t\t. ' onmouseout=\\'this.src=\"' . $imgpath . '/help_ques_inact.gif\"\\''\n\t\t. ' onclick=\\'' . $onclick_cmd . '\\' />';\n\n\t\treturn $str;\n\t}",
"function help()\n\t{\n\t\t$help['b'] = array();\n\t\t$help['i'] = array();\n\t\t\n\t\t$help['b'][] = 'Laisser une ligne vide entre chaque bloc <em>de même nature</em>.';\n\t\t$help['b'][] = '<strong>Paragraphe</strong> : du texte et une ligne vide';\n\t\t\n\t\tif ($this->getOpt('active_title')) {\n\t\t\t$help['b'][] = '<strong>Titre</strong> : <code>!!!</code>, <code>!!</code>, '.\n\t\t\t'<code>!</code> pour des titres plus ou moins importants';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_hr')) {\n\t\t\t$help['b'][] = '<strong>Trait horizontal</strong> : <code>----</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_lists')) {\n\t\t\t$help['b'][] = '<strong>Liste</strong> : ligne débutant par <code>*</code> ou '.\n\t\t\t'<code>#</code>. Il est possible de mélanger les listes '.\n\t\t\t'(<code>*#*</code>) pour faire des listes de plusieurs niveaux. '.\n\t\t\t'Respecter le style de chaque niveau';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_pre')) {\n\t\t\t$help['b'][] = '<strong>Texte préformaté</strong> : espace devant chaque ligne de texte';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_quote')) {\n\t\t\t$help['b'][] = '<strong>Bloc de citation</strong> : <code>></code> ou '.\n\t\t\t'<code>;:</code> devant chaque ligne de texte';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_fr_syntax')) {\n\t\t\t$help['i'][] = 'La correction de ponctuation est active. Un espace '.\n\t\t\t\t\t\t'insécable remplacera automatiquement tout espace '.\n\t\t\t\t\t\t'précédant les marques \";\",\"?\",\":\" et \"!\".';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_em')) {\n\t\t\t$help['i'][] = '<strong>Emphase</strong> : deux apostrophes <code>\\'\\'texte\\'\\'</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_strong')) {\n\t\t\t$help['i'][] = '<strong>Forte emphase</strong> : deux soulignés <code>__texte__</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_br')) {\n\t\t\t$help['i'][] = '<strong>Retour forcé à la ligne</strong> : <code>%%%</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_ins')) {\n\t\t\t$help['i'][] = '<strong>Insertion</strong> : deux plus <code>++texte++</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_del')) {\n\t\t\t$help['i'][] = '<strong>Suppression</strong> : deux moins <code>--texte--</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_urls')) {\n\t\t\t$help['i'][] = '<strong>Lien</strong> : <code>[url]</code>, <code>[nom|url]</code>, '.\n\t\t\t'<code>[nom|url|langue]</code> ou <code>[nom|url|langue|titre]</code>.';\n\t\t\t\n\t\t\t$help['i'][] = '<strong>Image</strong> : comme un lien mais avec une extension d\\'image.'.\n\t\t\t'<br />Pour désactiver la reconnaissance d\\'image mettez 0 dans un dernier '.\n\t\t\t'argument. Par exemple <code>[image|image.gif||0]</code> fera un lien vers l\\'image au '.\n\t\t\t'lieu de l\\'afficher.'.\n\t\t\t'<br />Il est conseillé d\\'utiliser la nouvelle syntaxe.';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_img')) {\n\t\t\t$help['i'][] = '<strong>Image</strong> (nouvelle syntaxe) : '.\n\t\t\t'<code>((url|texte alternatif))</code>, '.\n\t\t\t'<code>((url|texte alternatif|position))</code> ou '.\n\t\t\t'<code>((url|texte alternatif|position|description longue))</code>. '.\n\t\t\t'<br />La position peut prendre les valeur L ou G (gauche), R ou D (droite) ou C (centré).';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_anchor')) {\n\t\t\t$help['i'][] = '<strong>Ancre</strong> : <code>~ancre~</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_acronym')) {\n\t\t\t$help['i'][] = '<strong>Acronyme</strong> : <code>??acronyme??</code> ou '.\n\t\t\t'<code>??acronyme|titre??</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_q')) {\n\t\t\t$help['i'][] = '<strong>Citation</strong> : <code>{{citation}}</code>, '.\n\t\t\t'<code>{{citation|langue}}</code> ou <code>{{citation|langue|url}}</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_code')) {\n\t\t\t$help['i'][] = '<strong>Code</strong> : <code>@@code ici@@</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_footnotes')) {\n\t\t\t$help['i'][] = '<strong>Note de bas de page</strong> : <code>$$Corps de la note$$</code>';\n\t\t}\n\t\t\n\t\t$res = '<dl class=\"wikiHelp\">';\n\t\t\n\t\t$res .= '<dt>Blocs</dt><dd>';\n\t\tif (count($help['b']) > 0)\n\t\t{\n\t\t\t$res .= '<ul><li>';\n\t\t\t$res .= implode(' ;</li><li>', $help['b']);\n\t\t\t$res .= '.</li></ul>';\n\t\t}\n\t\t$res .= '</dd>';\n\t\t\n\t\t$res .= '<dt>Éléments en ligne</dt><dd>';\n\t\tif (count($help['i']) > 0)\n\t\t{\n\t\t\t$res .= '<ul><li>';\n\t\t\t$res .= implode(' ;</li><li>', $help['i']);\n\t\t\t$res .= '.</li></ul>';\n\t\t}\n\t\t$res .= '</dd>';\n\t\t\n\t\t$res .= '</dl>';\n\t\t\n\t\treturn $res;\t\n\t}",
"function bi_add_help_text( $contextual_help, $screen_id, $screen ) {\n if ( 'library' == $screen->id ) {\n $contextual_help =\n '<p>' . __('Things to remember when adding or editing alibrary:') . '</p>' .\n '<p>' . __('If you want to schedule the library review to be published in the future:') . '</p>' .\n '<ul>' .\n '<li>' . __('Under the Publish module, click on the Edit link next to Publish.') . '</li>' .\n '<li>' . __('Change the date to the date to actual publish this article, then click on Ok.') . '</li>' .\n '</ul>';\n } elseif ( 'edit-library' == $screen->id ) {\n $contextual_help = \n '<p>' . __('This is the help screen displaying the table of library blah blah blah.') . '</p>' ;\n }\n return $contextual_help;\n}",
"function section_support() {\r\n\t\tprint \"<ul id='admin-section-support-wrap'>\";\r\n\t\tprint \"<li><a id='framework-support' href='http://www.onemanonelaptop.com/docs/\" . $this->slug . \"' target='_blank' style=''>Plugin Documentation</a></li>\";\r\n\t\tprint \"<li><a id='framework-support' href='http://www.onemanonelaptop.com/forum/\" . $this->slug . \"' target='_blank' style=''>Support Forum</a></li>\";\r\n\t\tprint '<li><a title=\"Plugin Debug Information\" href=\"#TB_inline?width=640&inlineId=debuginfo\" class=\"thickbox\">Debug Information</a></li>';\r\n\t\t\r\n\t\tprint \"</ul>\"; \r\n\t\tprint '<div id=\"debuginfo\" style=\"display:none;\"><p><b>Framework Version:</b><br/>' . $this->version. '</p><p><b>Options Array:</b><br/>' . var_export($this->options,true) . '</p></div>';\r\n\t}",
"public function render_screen_options() {\n\t\t// Adds the screen options.\n\t\trequire_once ABSPATH . 'wp-admin/includes/nav-menu.php';\n\t\tadd_filter( 'manage_nav-menus_columns', 'wp_nav_menu_manage_columns' );\n\n\t\t// Display screen options.\n\t\t$screen = WP_Screen::get( 'nav-menus.php' );\n\t\t$screen->render_screen_options( array( 'wrap' => false ) );\n\t}",
"public function showGeneralHelp(Context $context)\n {\n $sortedSwitches = $context->phixDefinedSwitches->getSwitchesInDisplayOrder();\n\n $so = $context->stdout;\n\n $so->output($context->highlightStyle, \"phix \" . $context->version);\n $so->outputLine($context->urlStyle, ' http://gradwell.github.com');\n $so->outputLine(null, 'Copyright (c) 2010 Gradwell dot com Ltd. Released under the BSD license');\n $so->outputBlankLine();\n $this->showPhixSwitchSummary($context, $sortedSwitches);\n $this->showPhixSwitchDetails($context, $sortedSwitches);\n $this->showCommandsList($context);\n }",
"public function profileHelpAction()\r\n {\r\n $frontendHostname = $this->getParameter(\"frontend_hostname\");\r\n $merchantHostname = $this->getParameter(\"merchant_hostname\");\r\n $supportMobile = $this->getParameter(\"support_contact_number\");\r\n return $this->render('YilinkerFrontendBundle:Profile:profile_help.html.twig', \r\n compact(\r\n \"frontendHostname\",\r\n \"merchantHostname\",\r\n \"supportMobile\"\r\n )\r\n );\r\n }",
"function showHelp()\n{\n global $cli;\n\n $cli->writeln(sprintf(_(\"Usage: %s [OPTIONS]...\"), basename(__FILE__)));\n $cli->writeln();\n $cli->writeln(_(\"Mandatory arguments to long options are mandatory for short options too.\"));\n $cli->writeln();\n $cli->writeln(_(\"-h, --help Show this help\"));\n $cli->writeln(_(\"-u, --username[=username] Horde login username\"));\n $cli->writeln(_(\"-p, --password[=password] Horde login password\"));\n $cli->writeln(_(\"-t, --type[=type] Export format\"));\n $cli->writeln(_(\"-r, --rpc[=http://example.com/horde/rpc.php] Remote url\"));\n $cli->writeln();\n}",
"public function customizer_help() {\n\t\techo '\n\t\t<li>\n\t\t\t<p>\n\t\t\t\t' . __( 'Example text:', 'hellish-simplicity' ) . ' <code>' . esc_html( $this->default_header_text ) . '</code>\n\t\t\t</p>\n\t\t</li>';\n\t}",
"public function section_header() {\r\n\t\techo '<p>Other menu options will only show when there is a connection to the API.</p>';\r\n\t}",
"public function admin()\n {\n $this->view->books = $this->help->getBookList();\n $this->view->title = $this->lang->help->common;\n $this->display();\n }",
"public function longHelp()\n {\n return <<<LONGHELP\n\n __ __ _____ _\n | \\/ | __ _ __ _ ___| ___| | _____ __\n | |\\/| |/ _` |/ _` |/ _ \\ |_ | |/ _ \\ \\ /\\ / /\n | | | | (_| | (_| | __/ _| | | (_) \\ V V /\n |_| |_|\\__,_|\\__, |\\___|_| |_|\\___/ \\_/\\_/\n __ __ |___/_\n | \\/ | ___ __| (_) __ _\n | |\\/| |/ _ \\/ _` | |/ _` |\n | | | | __/ (_| | | (_| |\n |_|_ |_|\\___|\\__,_|_|\\__,_|\n |_ _|_ __ __| | _____ _____ _ __\n | || '_ \\ / _` |/ _ \\ \\/ / _ \\ '__|\n | || | | | (_| | __/> < __/ |\n |___|_| |_|\\__,_|\\___/_/\\_\\___|_|\n\n\n LICENSE AND COPYRIGHT NOTICE\n\n PLEASE READ THIS SOFTWARE LICENSE AGREEMENT (\"LICENSE\") CAREFULLY\n BEFORE USING THE SOFTWARE. BY USING THE SOFTWARE, YOU ARE AGREEING\n TO BE BOUND BY THE TERMS OF THIS LICENSE.\n IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENSE, DO NOT USE THE SOFTWARE.\n\n Full text of this license is available @license\n\n @license http://mageflow.com/license/connector/eula.txt MageFlow EULA\n @author MageFlow\n @copyright 2014 MageFlow http://mageflow.com/\n\n GENERAL INFO\n\n This script will create or update Media Index. Media Index is an up-to-date list of\n all media files under WYSIWYG folder in Magento media folder.\n\n\nLONGHELP;\n\n }",
"public function getHelp()\n\t{\n\t return '<info>Console Tool</info>';\n\t}",
"protected function help()\n\t{\n\t\t$this->out('Getsocialdata ' . self::VERSION);\n\t\t$this->out();\n\t\t$this->out('Usage: php -f bin/getdata.php -- [switches]');\n\t\t$this->out();\n\t\t$this->out('Switches: -h | --help Prints this usage information.');\n\t\t$this->out();\n\t\t$this->out();\n\t}",
"public function get_help_page()\n\t{\n\t\t$this->load_misc_methods();\n\t\treturn cms_module_GetHelpPage($this);\n\t}",
"public static function run()\n\t{\n\t\tstatic::help();\n\t}",
"public static function help() {\r\n\t\treturn self::getInstance()->createResponse(\r\n\t\t\t'<h2>How to use the Yammer extension</h2>'\r\n\t\t\t.'You can use the Yammer functionality in several ways:'\r\n\t\t\t.'<ul>'\r\n\t\t\t.'<li>Show messages with a specific tag #YourTag:'\r\n\t\t\t.' <ul>'\r\n\t\t\t.' <li><code><yammer><b><i>YourTag</i></b></yammer></code></li>'\r\n\t\t\t.' <li><code><yammertag><b><i>YourTag</i></b></yammertag></code></li>'\r\n\t\t\t.' <li><code><yammer tag=\"<b><i>YourTag</i></b>\" /></code></li>'\r\n\t\t\t.' </ul>'\r\n\t\t\t.'</li>'\r\n\t\t\t.'<li>Show message from a specific group:'\r\n\t\t\t.' <ul>'\r\n\t\t\t.' <li><code><yammergroup><b><i>YourGroup</i></b></yammergroup></code>'\r\n\t\t\t.' <li><code><yammer group=\"<b><i>YourGroup</i></b>\" /></code>'\r\n\t\t\t.' </ul>'\r\n\t\t\t.'</li>'\r\n\t\t\t.'</ul>'\r\n\t\t\t.'In later versions you might be able to use alternative construct to get other types of content from Yammer'\r\n\t\t);\r\n\t}",
"public function remove_help_tabs()\n {\n }",
"public function help()\r\n{\r\n // You could include a file and return it here.\r\n return \"No documentation has been added for this module.<br />Contact the module developer for assistance.\";\r\n}",
"public function help() {\n $this->say(\"Please let me help!\");\n\n $this->say(\"I'm Martha and I can help you answer questions and find things online. Try asking:\");\n\n $suggestions = $this->suggest(3);\n\n if($this->_context != 'web') {\n foreach($suggestions as $suggestion) {\n $this->say($suggestion);\n }\n $this->say(\"I can talk to all of these APIs thanks to Temboo! https://temboo.com\");\n $this->say(\"You can read my source at https://github.com/temboo/martha\");\n } else {\n foreach($suggestions as $suggestion) {\n $this->say('<p><a href=\"?query=' . htmlentities($suggestion, ENT_COMPAT, 'UTF-8') . '\" class=\"suggestion\">\"' . htmlentities($suggestion, ENT_NOQUOTES, 'UTF-8') . '\"</a></p>', true);\n }\n $this->say('<p>I can talk to all of these APIs thanks to <a href=\"https://temboo.com/\" target=\"_blank\">Temboo</a>!</p>', true);\n $this->say('<p>You can read my source at <a href=\"https://github.com/temboo/martha\" target=\"_blank\">Github</a>.</p>', true);\n }\n }",
"function bi_review_help_text( $contextual_help, $screen_id, $screen ) {\n if ( 'library' == $screen->id ) {\n $contextual_help =\n '<p>' . __('Things to remember when adding or editing a review:') . '</p>' .\n '<p>' . __('If you want to schedule the review to be published in the future:') . '</p>' .\n '<ul>' .\n '<li>' . __('Under the Publish module, click on the Edit link next to Publish.') . '</li>' .\n '<li>' . __('Change the date to the date to actual publish this review, then click on Ok.') . '</li>' .\n '</ul>';\n } elseif ( 'edit-review' == $screen->id ) {\n $contextual_help = \n '<p>' . __('This is the help screen displaying the table of review blah blah blah.') . '</p>' ;\n }\n return $contextual_help;\n}",
"private function displayHelpMessage() {\n $message = \"ClassDumper help:\\n\n -h : displays this help message\\n\n -f (directory 1 directory 2 ... directory n) : \n parses those directories\\n\n -t (xml / yaml) : selects type of serialization\\n\n (no args) : parses working directory in YAML format\\n\";\n\n echo $message;\n die('ShrubRoots ClassDumper v0.991');\n }",
"public function help()\n\t{\n\t\t$this\n\t\t\t->output\n\t\t\t->addOverview(\n\t\t\t\t'Store shared configuration variables used by the command line tool.\n\t\t\t\tThese will, for example, be used to fill in docblock stubs when\n\t\t\t\tusing the scaffolding command.'\n\t\t\t)\n\t\t\t->addTasks($this)\n\t\t\t->addArgument(\n\t\t\t\t'--{keyName}',\n\t\t\t\t'Sets the variable keyName to the given value.',\n\t\t\t\t'Example: --name=\"John Doe\"'\n\t\t\t);\n\t}",
"function helps()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['helps'] == 1 ) ? 'Help File' : 'Help Files';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'removed' : 'created';\n\t\t$helpkeys = array();\n\t\t\n\t\tforeach ( $this->xml_array['helps_group']['help'] as $k => $v )\n\t\t{\n\t\t\t$helpkeys[] = \"'{$v['title']['VALUE']}'\";\n\t\t}\n\t\t\n\t\t$this->ipsclass->DB->do_delete( 'faq', \"title IN (\".implode( \",\", $helpkeys ).\")\" );\n\t\t\n\t\tif ( !$this->ipsclass->input['un'] )\n\t\t{\n\t\t\tforeach ( $this->xml_array['helps_group']['help'] as $k => $v )\n\t\t\t{\n\t\t\t\t$this->_add_help( $v );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&code=work&mod={$this->ipsclass->input['mod']}&step={$this->ipsclass->input['step']}{$uninstall}{$group}&st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['helps']} {$object} {$operation}....\" );\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$help [__CLASS__] [\"text\"] [] .= \"Zabbix Interface :\";\n\t\t$help [__CLASS__] [\"text\"] [] .= \"\\t--zabbix_interface_ip 10.10.10.10 IP du CI\";\n\t\t$help [__CLASS__] [\"text\"] [] .= \"\\t--zabbix_interface_fqdn ci.client.fr.ghc.local FQDN du CI\";\n\t\t$help [__CLASS__] [\"text\"] [] .= \"\\t--zabbix_interface_resolv_fqdn IP|FQDN Si l'IP et le FQDN son fourni, permet de connaitre la methode a utiliser pour contacter le CI\";\n\t\t\n\t\treturn $help;\n\t}",
"public function help()\n\t{\n\t\t// You could include a file and return it here.\n\t\treturn \"<h4> Shipping Service </h4>\";\n\t}",
"public function getHelp() {\n\t\treturn $this->help;\n\t}",
"public function getHelp() {\n\t\treturn $this->help;\n\t}",
"function bi_suggestion_help_text( $contextual_help, $screen_id, $screen ) {\n if ( 'library' == $screen->id ) {\n $contextual_help =\n '<p>' . __('Things to remember when adding or editing a suggestion:') . '</p>' .\n '<p>' . __('If you want to schedule the suggestion to be published in the future:') . '</p>' .\n '<ul>' .\n '<li>' . __('Under the Publish module, click on the Edit link next to Publish.') . '</li>' .\n '<li>' . __('Change the date to the date to actual publish this suggestion, then click on Ok.') . '</li>' .\n '</ul>';\n } elseif ( 'edit-suggestion' == $screen->id ) {\n $contextual_help = \n '<p>' . __('This is the help screen displaying the table of suggestion blah blah blah.') . '</p>' ;\n }\n return $contextual_help;\n}",
"public static function getAllHelp()\n {\n return $this->_help;\n }",
"public function setHelpTabs() {\n $this->args['help_tabs'][] = array(\n 'id' => 'redux-help-tab-1',\n 'title' => __( 'Theme Information 1', 'slova' ),\n 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'slova' )\n );\n\n $this->args['help_tabs'][] = array(\n 'id' => 'redux-help-tab-2',\n 'title' => __( 'Theme Information 2', 'slova' ),\n 'content' => __( '<p>This is the tab content, HTML is allowed.</p>', 'slova' )\n );\n\n // Set the help sidebar\n $this->args['help_sidebar'] = __( '<p>This is the sidebar content, HTML is allowed.</p>', 'slova' );\n }"
] | [
"0.8207169",
"0.799517",
"0.7358333",
"0.6991398",
"0.68393195",
"0.67684317",
"0.6754984",
"0.6681374",
"0.6656888",
"0.66234195",
"0.6612259",
"0.6593287",
"0.65444356",
"0.6503403",
"0.6420207",
"0.64185524",
"0.6398535",
"0.63742733",
"0.6351618",
"0.63394517",
"0.62931466",
"0.6291627",
"0.62895024",
"0.62834054",
"0.6283308",
"0.6245226",
"0.6241696",
"0.6226169",
"0.6219858",
"0.62182313",
"0.6217607",
"0.6209594",
"0.6192608",
"0.6189253",
"0.6161596",
"0.61437327",
"0.61330587",
"0.61231875",
"0.6121198",
"0.61185783",
"0.61174715",
"0.61174715",
"0.61174715",
"0.61026704",
"0.6102242",
"0.61003053",
"0.60987294",
"0.6098102",
"0.6090207",
"0.608637",
"0.60741305",
"0.6056637",
"0.6055881",
"0.6048296",
"0.6036969",
"0.60358375",
"0.6034366",
"0.60335386",
"0.6016262",
"0.60159737",
"0.6014693",
"0.60108757",
"0.6006046",
"0.598921",
"0.5983017",
"0.594916",
"0.59387016",
"0.59366053",
"0.593487",
"0.5925346",
"0.5923351",
"0.59177643",
"0.5902627",
"0.5897144",
"0.5896953",
"0.58766186",
"0.58719695",
"0.586797",
"0.5866138",
"0.58514935",
"0.5845943",
"0.58416665",
"0.5808155",
"0.5796448",
"0.57804996",
"0.57719225",
"0.57688516",
"0.5764426",
"0.57604814",
"0.5746946",
"0.5746205",
"0.57389134",
"0.57193685",
"0.57071227",
"0.5703048",
"0.5696454",
"0.5693103",
"0.5693103",
"0.5687597",
"0.56726694",
"0.5670455"
] | 0.0 | -1 |
Default help only if there is no oldstyle block of text and no newstyle help tabs. | private function metabox_style_tabs() {
$help_sidebar = $this->get_sidebar();
$help_class = '';
if ( ! $help_sidebar ) :
$help_class .= ' no-sidebar';
endif;
// Time to render!
?>
<div class="tabbed">
<div class="tabbed-sections">
<ul class="tr-tabs alignleft">
<?php
$class = ' class="active"';
$tabs = $this->get_tabs();
foreach ( $tabs as $tab ) :
$link_id = "tab-link-{$tab['id']}";
$panel_id = (!empty($tab['url'])) ? $tab['url'] : "#tab-panel-{$tab['id']}";
?>
<li id="<?php echo esc_attr( $link_id ); ?>"<?php echo $class; ?>>
<a href="<?php echo esc_url( "$panel_id" ); ?>">
<?php echo esc_html( $tab['title'] ); ?>
</a>
</li>
<?php
$class = '';
endforeach;
?>
</ul>
</div>
<?php if ( $help_sidebar ) : ?>
<div class="tabbed-sidebar">
<?php echo $help_sidebar; ?>
</div>
<?php endif; ?>
<div class="tr-sections clearfix">
<?php
$classes = 'tab-section active';
foreach ( $tabs as $tab ):
$panel_id = "tab-panel-{$tab['id']}";
?>
<div id="<?php echo esc_attr( $panel_id ); ?>" class="<?php echo $classes; ?>">
<?php
// Print tab content.
echo $tab['content'];
// If it exists, fire tab callback.
if ( ! empty( $tab['callback'] ) )
call_user_func_array( $tab['callback'], array( $this, $tab ) );
?>
</div>
<?php
$classes = 'tab-section';
endforeach;
?>
</div>
</div>
<?php
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function isHelp() {}",
"protected function renderHelp() {}",
"abstract public function displayHelp();",
"public static function add_help_text()\n {\n }",
"public function help();",
"public function printHelp();",
"function ShowAdminHelp()\r\n{\r\n\tglobal $txt, $helptxt, $context, $scripturl;\r\n\r\n\tif (!isset($_GET['help']) || !is_string($_GET['help']))\r\n\t\tfatal_lang_error('no_access', false);\r\n\r\n\tif (!isset($helptxt))\r\n\t\t$helptxt = array();\r\n\r\n\t// Load the admin help language file and template.\r\n\tloadLanguage('Help');\r\n\r\n\t// Permission specific help?\r\n\tif (isset($_GET['help']) && substr($_GET['help'], 0, 14) == 'permissionhelp')\r\n\t\tloadLanguage('ManagePermissions');\r\n\r\n\tloadTemplate('Help');\r\n\r\n\t// Set the page title to something relevant.\r\n\t$context['page_title'] = $context['forum_name'] . ' - ' . $txt['help'];\r\n\r\n\t// Don't show any template layers, just the popup sub template.\r\n\t$context['template_layers'] = array();\r\n\t$context['sub_template'] = 'popup';\r\n\r\n\t// What help string should be used?\r\n\tif (isset($helptxt[$_GET['help']]))\r\n\t\t$context['help_text'] = $helptxt[$_GET['help']];\r\n\telseif (isset($txt[$_GET['help']]))\r\n\t\t$context['help_text'] = $txt[$_GET['help']];\r\n\telse\r\n\t\t$context['help_text'] = $_GET['help'];\r\n\r\n\t// Does this text contain a link that we should fill in?\r\n\tif (preg_match('~%([0-9]+\\$)?s\\?~', $context['help_text'], $match))\r\n\t\t$context['help_text'] = sprintf($context['help_text'], $scripturl, $context['session_id'], $context['session_var']);\r\n}",
"function help()\n\t{\n\t\t$help['b'] = array();\n\t\t$help['i'] = array();\n\t\t\n\t\t$help['b'][] = 'Laisser une ligne vide entre chaque bloc <em>de même nature</em>.';\n\t\t$help['b'][] = '<strong>Paragraphe</strong> : du texte et une ligne vide';\n\t\t\n\t\tif ($this->getOpt('active_title')) {\n\t\t\t$help['b'][] = '<strong>Titre</strong> : <code>!!!</code>, <code>!!</code>, '.\n\t\t\t'<code>!</code> pour des titres plus ou moins importants';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_hr')) {\n\t\t\t$help['b'][] = '<strong>Trait horizontal</strong> : <code>----</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_lists')) {\n\t\t\t$help['b'][] = '<strong>Liste</strong> : ligne débutant par <code>*</code> ou '.\n\t\t\t'<code>#</code>. Il est possible de mélanger les listes '.\n\t\t\t'(<code>*#*</code>) pour faire des listes de plusieurs niveaux. '.\n\t\t\t'Respecter le style de chaque niveau';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_pre')) {\n\t\t\t$help['b'][] = '<strong>Texte préformaté</strong> : espace devant chaque ligne de texte';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_quote')) {\n\t\t\t$help['b'][] = '<strong>Bloc de citation</strong> : <code>></code> ou '.\n\t\t\t'<code>;:</code> devant chaque ligne de texte';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_fr_syntax')) {\n\t\t\t$help['i'][] = 'La correction de ponctuation est active. Un espace '.\n\t\t\t\t\t\t'insécable remplacera automatiquement tout espace '.\n\t\t\t\t\t\t'précédant les marques \";\",\"?\",\":\" et \"!\".';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_em')) {\n\t\t\t$help['i'][] = '<strong>Emphase</strong> : deux apostrophes <code>\\'\\'texte\\'\\'</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_strong')) {\n\t\t\t$help['i'][] = '<strong>Forte emphase</strong> : deux soulignés <code>__texte__</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_br')) {\n\t\t\t$help['i'][] = '<strong>Retour forcé à la ligne</strong> : <code>%%%</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_ins')) {\n\t\t\t$help['i'][] = '<strong>Insertion</strong> : deux plus <code>++texte++</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_del')) {\n\t\t\t$help['i'][] = '<strong>Suppression</strong> : deux moins <code>--texte--</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_urls')) {\n\t\t\t$help['i'][] = '<strong>Lien</strong> : <code>[url]</code>, <code>[nom|url]</code>, '.\n\t\t\t'<code>[nom|url|langue]</code> ou <code>[nom|url|langue|titre]</code>.';\n\t\t\t\n\t\t\t$help['i'][] = '<strong>Image</strong> : comme un lien mais avec une extension d\\'image.'.\n\t\t\t'<br />Pour désactiver la reconnaissance d\\'image mettez 0 dans un dernier '.\n\t\t\t'argument. Par exemple <code>[image|image.gif||0]</code> fera un lien vers l\\'image au '.\n\t\t\t'lieu de l\\'afficher.'.\n\t\t\t'<br />Il est conseillé d\\'utiliser la nouvelle syntaxe.';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_img')) {\n\t\t\t$help['i'][] = '<strong>Image</strong> (nouvelle syntaxe) : '.\n\t\t\t'<code>((url|texte alternatif))</code>, '.\n\t\t\t'<code>((url|texte alternatif|position))</code> ou '.\n\t\t\t'<code>((url|texte alternatif|position|description longue))</code>. '.\n\t\t\t'<br />La position peut prendre les valeur L ou G (gauche), R ou D (droite) ou C (centré).';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_anchor')) {\n\t\t\t$help['i'][] = '<strong>Ancre</strong> : <code>~ancre~</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_acronym')) {\n\t\t\t$help['i'][] = '<strong>Acronyme</strong> : <code>??acronyme??</code> ou '.\n\t\t\t'<code>??acronyme|titre??</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_q')) {\n\t\t\t$help['i'][] = '<strong>Citation</strong> : <code>{{citation}}</code>, '.\n\t\t\t'<code>{{citation|langue}}</code> ou <code>{{citation|langue|url}}</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_code')) {\n\t\t\t$help['i'][] = '<strong>Code</strong> : <code>@@code ici@@</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_footnotes')) {\n\t\t\t$help['i'][] = '<strong>Note de bas de page</strong> : <code>$$Corps de la note$$</code>';\n\t\t}\n\t\t\n\t\t$res = '<dl class=\"wikiHelp\">';\n\t\t\n\t\t$res .= '<dt>Blocs</dt><dd>';\n\t\tif (count($help['b']) > 0)\n\t\t{\n\t\t\t$res .= '<ul><li>';\n\t\t\t$res .= implode(' ;</li><li>', $help['b']);\n\t\t\t$res .= '.</li></ul>';\n\t\t}\n\t\t$res .= '</dd>';\n\t\t\n\t\t$res .= '<dt>Éléments en ligne</dt><dd>';\n\t\tif (count($help['i']) > 0)\n\t\t{\n\t\t\t$res .= '<ul><li>';\n\t\t\t$res .= implode(' ;</li><li>', $help['i']);\n\t\t\t$res .= '.</li></ul>';\n\t\t}\n\t\t$res .= '</dd>';\n\t\t\n\t\t$res .= '</dl>';\n\t\t\n\t\treturn $res;\t\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}",
"public function get_help()\n\t{\n\t\treturn '';\n\t}",
"public function hasHelp()\n {\n return !empty($this->help) || !empty($this->description);\n }",
"public function setup_help_tab()\n {\n }",
"protected function checkForHelp() {\n\t\tif ($this->commandLineOptions->hasOption(tx_mnogosearch_clioptions::HELP)) {\n\t\t\t$this->showUsageAndExit();\n\t\t}\n\t}",
"function help ( $help='help text', $caption='') {\n\n\t\t$compath = JURI::root() . 'administrator/components/'.JEV_COM_COMPONENT;\n\t\t$imgpath = $compath . '/assets/images';\n\n\t\tif (empty($caption)) $caption = ' ';\n\n\t\tif (substr($help, 0, 7) == 'http://' || substr($help, 0, 8) == 'https://') {\n\t\t\t//help text is url, open new window\n\t\t\t$onclick_cmd = \"window.open(\\\"$help\\\", \\\"help\\\", \\\"height=700,width=800,resizable=yes,scrollbars\\\");return false\";\n\t\t} else {\n\t\t\t// help text is plain text with html tags\n\t\t\t// prepare text as overlib parameter\n\t\t\t// escape \", replace new line by space\n\t\t\t$help = htmlspecialchars($help, ENT_QUOTES);\n\t\t\t$help = str_replace('"', '\\"', $help);\n\t\t\t$help = str_replace(\"\\n\", \" \", $help);\n\n\t\t\t$ol_cmds = 'RIGHT, ABOVE, VAUTO, WRAP, STICKY, CLOSECLICK, CLOSECOLOR, \"white\"';\n\t\t\t$ol_cmds .= ', CLOSETEXT, \"<span style=\\\"border:solid white 1px;padding:0px;margin:1px;\\\"><b>X</b></span>\"';\n\t\t\t$onclick_cmd = 'return overlib(\"'.$help.'\", ' . $ol_cmds . ', CAPTION, \"'.$caption.'\")';\n\t\t}\n\n\t\t// RSH 10/11/10 - Added float:none for 1.6 compatiblity - The default template was floating images to the left\n\t\t$str = '<img border=\"0\" style=\"float: none; vertical-align:bottom; cursor:help;\" alt=\"'. JText::_('JEV_HELP') . '\"'\n\t\t. ' title=\"' . JText::_('JEV_HELP') .'\"'\n\t\t. ' src=\"' . $imgpath . '/help_ques_inact.gif\"'\n\t\t. ' onmouseover=\\'this.src=\"' . $imgpath . '/help_ques.gif\"\\''\n\t\t. ' onmouseout=\\'this.src=\"' . $imgpath . '/help_ques_inact.gif\"\\''\n\t\t. ' onclick=\\'' . $onclick_cmd . '\\' />';\n\n\t\treturn $str;\n\t}",
"function validate_help(){ \n\t\tif($this->help){\n\t\t\tif(isset($this->input)|| isset($this->output) || isset($this->param_root) || isset($this->query) || isset($this->qf) || $this->n){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->help();\n\t\t\t}\n\t\t}\n\t\treturn true; \n }",
"function hasHelp()\n {\n return !empty($this->help);\n }",
"public function cli_help() {}",
"public function makeHelpButton() {}",
"public function hasHelp() {\n\t\treturn $this->help;\n\t}",
"private static function set_basic_help_texts() {\n\t\tself::$help_texts['basic'] = array(\n\t\t\t'date' => __( 'Replaced with the date of the post/page', 'wordpress-seo' ),\n\t\t\t'title' => __( 'Replaced with the title of the post/page', 'wordpress-seo' ),\n\t\t\t'parent_title' => __( 'Replaced with the title of the parent page of the current page', 'wordpress-seo' ),\n\t\t\t'archive_title' => __( 'Replaced with the normal title for an archive generated by WordPress', 'wordpress-seo' ),\n\t\t\t'sitename' => __( 'The site\\'s name', 'wordpress-seo' ),\n\t\t\t'sitedesc' => __( 'The site\\'s tag line / description', 'wordpress-seo' ),\n\t\t\t'excerpt' => __( 'Replaced with the post/page excerpt (or auto-generated if it does not exist)', 'wordpress-seo' ),\n\t\t\t'excerpt_only' => __( 'Replaced with the post/page excerpt (without auto-generation)', 'wordpress-seo' ),\n\t\t\t'tag' => __( 'Replaced with the current tag/tags', 'wordpress-seo' ),\n\t\t\t'category' => __( 'Replaced with the post categories (comma separated)', 'wordpress-seo' ),\n\t\t\t'primary_category' => __( 'Replaced with the primary category of the post/page', 'wordpress-seo' ),\n\t\t\t'category_description' => __( 'Replaced with the category description', 'wordpress-seo' ),\n\t\t\t'tag_description' => __( 'Replaced with the tag description', 'wordpress-seo' ),\n\t\t\t'term_description' => __( 'Replaced with the term description', 'wordpress-seo' ),\n\t\t\t'term_title' => __( 'Replaced with the term name', 'wordpress-seo' ),\n\t\t\t'searchphrase' => __( 'Replaced with the current search phrase', 'wordpress-seo' ),\n\t\t\t'sep' => sprintf(\n\t\t\t\t/* translators: %s: wp_title() function. */\n\t\t\t\t__( 'The separator defined in your theme\\'s %s tag.', 'wordpress-seo' ),\n\t\t\t\t'<code>wp_title()</code>'\n\t\t\t),\n\t\t);\n\t}",
"public function helpAction() {}",
"public function remove_help_tabs()\n {\n }",
"public function help() \n {\n if (!isset($_SESSION)) { \n session_start(); \n }\n $title = 'Aide';\n $customStyle = $this->setCustomStyle('help');\n require('../src/View/HelpView.php');\n }",
"public function testHelpUnexisting(): void\n {\n // setup\n $this->setCommand([\n 'help',\n 'unexpected'\n ]);\n\n // test body\n $commandLineOutput = $this->testBody();\n\n // assertions\n $this->validateOutput($commandLineOutput, [\n 'Usage: mezon <verb> <entity> [<options>]',\n 'Verbs:',\n 'Entities:'\n ]);\n }",
"function ren_help($mode = 1, $addtextfunc = \"addtext\", $helpfunc = \"help\")\n{\n return display_help(\"helpb\", $mode, $addtextfunc, $helpfunc = \"help\");\n}",
"public function setHelp($help) {\n\t\t$this->help = $help;\n\t}",
"public function help()\n {\n echo Config::main('help_text');\n if(empty($this->commands))\n render(\"[red] - NONE - [reset]\\r\\n\");\n else\n {\n foreach($this->commands as $key => $ignored)\n render(\"[blue] - {$key}[reset]\\r\\n\");\n }\n echo PHP_EOL;\n\n return 0;\n }",
"public function help()\r\n\t{\r\n\t\t// You could include a file and return it here.\r\n\t\treturn \"No documentation has been added for this module.<br />Contact the module developer for assistance.\";\r\n\t}",
"function clshowhelp() {\n\tglobal $CLHELP;\n\tforeach ( $CLHELP as $msg) {\n\t\tif ( substr( $msg, strlen( $msg) - 1, 1) != \"\\n\") $msg .= \"\\n\"; \t// no end line in this msg, add one\n\t\techo $msg;\n\t}\n\t\n}",
"public function get_help_sidebar()\n {\n }",
"public function help() {\n $this->say(\"Please let me help!\");\n\n $this->say(\"I'm Martha and I can help you answer questions and find things online. Try asking:\");\n\n $suggestions = $this->suggest(3);\n\n if($this->_context != 'web') {\n foreach($suggestions as $suggestion) {\n $this->say($suggestion);\n }\n $this->say(\"I can talk to all of these APIs thanks to Temboo! https://temboo.com\");\n $this->say(\"You can read my source at https://github.com/temboo/martha\");\n } else {\n foreach($suggestions as $suggestion) {\n $this->say('<p><a href=\"?query=' . htmlentities($suggestion, ENT_COMPAT, 'UTF-8') . '\" class=\"suggestion\">\"' . htmlentities($suggestion, ENT_NOQUOTES, 'UTF-8') . '\"</a></p>', true);\n }\n $this->say('<p>I can talk to all of these APIs thanks to <a href=\"https://temboo.com/\" target=\"_blank\">Temboo</a>!</p>', true);\n $this->say('<p>You can read my source at <a href=\"https://github.com/temboo/martha\" target=\"_blank\">Github</a>.</p>', true);\n }\n }",
"function Help() {\r\n\t\t\r\n\t\tglobal $path, $backgroundColor, $IP, $language;\r\n\t\tif( file_exists( \"$path.help.$language.ihtml\" ) ) include_once( \"$path.help.$language.ihtml\" );\r\n\t\telse include_once( \"$path.help.fr.ihtml\" );\r\n\t}",
"function ShowHelp()\r\n{\r\n\tglobal $settings, $user_info, $language, $context, $txt, $sourcedir, $options, $scripturl;\r\n\r\n\tloadTemplate('Help');\r\n\tloadLanguage('Manual');\r\n\r\n\t$manual_areas = array(\r\n\t\t'getting_started' => array(\r\n\t\t\t'title' => $txt['manual_category_getting_started'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'introduction' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_intro'],\r\n\t\t\t\t\t'template' => 'manual_intro',\r\n\t\t\t\t),\r\n\t\t\t\t'main_menu' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_main_menu'],\r\n\t\t\t\t\t'template' => 'manual_main_menu',\r\n\t\t\t\t),\r\n\t\t\t\t'board_index' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_board_index'],\r\n\t\t\t\t\t'template' => 'manual_board_index',\r\n\t\t\t\t),\r\n\t\t\t\t'message_view' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_message_view'],\r\n\t\t\t\t\t'template' => 'manual_message_view',\r\n\t\t\t\t),\r\n\t\t\t\t'topic_view' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_topic_view'],\r\n\t\t\t\t\t'template' => 'manual_topic_view',\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t),\r\n\t\t'registering' => array(\r\n\t\t\t'title' => $txt['manual_category_registering'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'when_how' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_when_how_register'],\r\n\t\t\t\t\t'template' => 'manual_when_how_register',\r\n\t\t\t\t),\r\n\t\t\t\t'registration_screen' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_registration_screen'],\r\n\t\t\t\t\t'template' => 'manual_registration_screen',\r\n\t\t\t\t),\r\n\t\t\t\t'activating_account' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_activating_account'],\r\n\t\t\t\t\t'template' => 'manual_activating_account',\r\n\t\t\t\t),\r\n\t\t\t\t'logging_in' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_logging_in_out'],\r\n\t\t\t\t\t'template' => 'manual_logging_in_out',\r\n\t\t\t\t),\r\n\t\t\t\t'password_reminders' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_password_reminders'],\r\n\t\t\t\t\t'template' => 'manual_password_reminders',\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t),\r\n\t\t'profile_features' => array(\r\n\t\t\t'title' => $txt['manual_category_profile_features'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'profile_info' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_profile_info'],\r\n\t\t\t\t\t'template' => 'manual_profile_info_summary',\r\n\t\t\t\t\t'description' => $txt['manual_entry_profile_info_desc'],\r\n\t\t\t\t\t'subsections' => array(\r\n\t\t\t\t\t\t'summary' => array($txt['manual_entry_profile_info_summary'], 'template' => 'manual_profile_info_summary'),\r\n\t\t\t\t\t\t'posts' => array($txt['manual_entry_profile_info_posts'], 'template' => 'manual_profile_info_posts'),\r\n\t\t\t\t\t\t'stats' => array($txt['manual_entry_profile_info_stats'], 'template' => 'manual_profile_info_stats'),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t\t'modify_profile' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_modify_profile'],\r\n\t\t\t\t\t'template' => 'manual_modify_profile_settings',\r\n\t\t\t\t\t'description' => $txt['manual_entry_modify_profile_desc'],\r\n\t\t\t\t\t'subsections' => array(\r\n\t\t\t\t\t\t'settings' => array($txt['manual_entry_modify_profile_settings'], 'template' => 'manual_modify_profile_settings'),\r\n\t\t\t\t\t\t'forum' => array($txt['manual_entry_modify_profile_forum'], 'template' => 'manual_modify_profile_forum'),\r\n\t\t\t\t\t\t'look' => array($txt['manual_entry_modify_profile_look'], 'template' => 'manual_modify_profile_look'),\r\n\t\t\t\t\t\t'auth' => array($txt['manual_entry_modify_profile_auth'], 'template' => 'manual_modify_profile_auth'),\r\n\t\t\t\t\t\t'notify' => array($txt['manual_entry_modify_profile_notify'], 'template' => 'manual_modify_profile_notify'),\r\n\t\t\t\t\t\t'pm' => array($txt['manual_entry_modify_profile_pm'], 'template' => 'manual_modify_profile_pm'),\r\n\t\t\t\t\t\t'buddies' => array($txt['manual_entry_modify_profile_buddies'], 'template' => 'manual_modify_profile_buddies'),\r\n\t\t\t\t\t\t'groups' => array($txt['manual_entry_modify_profile_groups'], 'template' => 'manual_modify_profile_groups'),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t\t'actions' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_profile_actions'],\r\n\t\t\t\t\t'template' => 'manual_profile_actions_subscriptions',\r\n\t\t\t\t\t'description' => $txt['manual_entry_modify_profile_desc'],\r\n\t\t\t\t\t'subsections' => array(\r\n\t\t\t\t\t\t'subscriptions' => array($txt['manual_entry_profile_actions_subscriptions'], 'template' => 'manual_profile_actions_subscriptions'),\r\n\t\t\t\t\t\t'delete' => array($txt['manual_entry_profile_actions_delete'], 'template' => 'manual_profile_actions_delete'),\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'posting_basics' => array(\r\n\t\t\t'title' => $txt['manual_category_posting_basics'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t/*'posting_screen' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_posting_screen'],\r\n\t\t\t\t\t'template' => 'manual_posting_screen',\r\n\t\t\t\t),*/\r\n\t\t\t\t'posting_topics' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_posting_topics'],\r\n\t\t\t\t\t'template' => 'manual_posting_topics',\r\n\t\t\t\t),\r\n\t\t\t\t/*'quoting_posts' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_quoting_posts'],\r\n\t\t\t\t\t'template' => 'manual_quoting_posts',\r\n\t\t\t\t),\r\n\t\t\t\t'modifying_posts' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_modifying_posts'],\r\n\t\t\t\t\t'template' => 'manual_modifying_posts',\r\n\t\t\t\t),*/\r\n\t\t\t\t'smileys' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_smileys'],\r\n\t\t\t\t\t'template' => 'manual_smileys',\r\n\t\t\t\t),\r\n\t\t\t\t'bbcode' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_bbcode'],\r\n\t\t\t\t\t'template' => 'manual_bbcode',\r\n\t\t\t\t),\r\n\t\t\t\t/*'wysiwyg' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_wysiwyg'],\r\n\t\t\t\t\t'template' => 'manual_wysiwyg',\r\n\t\t\t\t),*/\r\n\t\t\t),\r\n\t\t),\r\n\t\t'personal_messages' => array(\r\n\t\t\t'title' => $txt['manual_category_personal_messages'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'messages' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_pm_messages'],\r\n\t\t\t\t\t'template' => 'manual_pm_messages',\r\n\t\t\t\t),\r\n\t\t\t\t/*'actions' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_pm_actions'],\r\n\t\t\t\t\t'template' => 'manual_pm_actions',\r\n\t\t\t\t),\r\n\t\t\t\t'preferences' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_pm_preferences'],\r\n\t\t\t\t\t'template' => 'manual_pm_preferences',\r\n\t\t\t\t),*/\r\n\t\t\t),\r\n\t\t),\r\n\t\t'forum_tools' => array(\r\n\t\t\t'title' => $txt['manual_category_forum_tools'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'searching' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_searching'],\r\n\t\t\t\t\t'template' => 'manual_searching',\r\n\t\t\t\t),\r\n\t\t\t\t/*'memberlist' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_memberlist'],\r\n\t\t\t\t\t'template' => 'manual_memberlist',\r\n\t\t\t\t),\r\n\t\t\t\t'calendar' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_calendar'],\r\n\t\t\t\t\t'template' => 'manual_calendar',\r\n\t\t\t\t),*/\r\n\t\t\t),\r\n\t\t),\r\n\t);\r\n\r\n\t// Set a few options for the menu.\r\n\t$menu_options = array(\r\n\t\t'disable_url_session_check' => true,\r\n\t);\r\n\r\n\trequire_once($sourcedir . '/Subs-Menu.php');\r\n\t$manual_area_data = createMenu($manual_areas, $menu_options);\r\n\tunset($manual_areas);\r\n\r\n\t// Make a note of the Unique ID for this menu.\r\n\t$context['manual_menu_id'] = $context['max_menu_id'];\r\n\t$context['manual_menu_name'] = 'menu_data_' . $context['manual_menu_id'];\r\n\r\n\t// Get the selected item.\r\n\t$context['manual_area_data'] = $manual_area_data;\r\n\t$context['menu_item_selected'] = $manual_area_data['current_area'];\r\n\r\n\t// Set a title and description for the tab strip if subsections are present.\r\n\tif (isset($context['manual_area_data']['subsections']))\r\n\t\t$context[$context['manual_menu_name']]['tab_data'] = array(\r\n\t\t\t'title' => $manual_area_data['label'],\r\n\t\t\t'description' => isset($manual_area_data['description']) ? $manual_area_data['description'] : '',\r\n\t\t);\r\n\r\n\t// Bring it on!\r\n\t$context['sub_template'] = isset($manual_area_data['current_subsection'], $manual_area_data['subsections'][$manual_area_data['current_subsection']]['template']) ? $manual_area_data['subsections'][$manual_area_data['current_subsection']]['template'] : $manual_area_data['template'];\r\n\t$context['page_title'] = $manual_area_data['label'] . ' - ' . $txt['manual_smf_user_help'];\r\n\r\n\t// Build the link tree.\r\n\t$context['linktree'][] = array(\r\n\t\t'url' => $scripturl . '?action=help',\r\n\t\t'name' => $txt['help'],\r\n\t);\r\n\tif (isset($manual_area_data['current_area']) && $manual_area_data['current_area'] != 'index')\r\n\t\t$context['linktree'][] = array(\r\n\t\t\t'url' => $scripturl . '?action=admin;area=' . $manual_area_data['current_area'],\r\n\t\t\t'name' => $manual_area_data['label'],\r\n\t\t);\r\n\tif (!empty($manual_area_data['current_subsection']) && $manual_area_data['subsections'][$manual_area_data['current_subsection']][0] != $manual_area_data['label'])\r\n\t\t$context['linktree'][] = array(\r\n\t\t\t'url' => $scripturl . '?action=admin;area=' . $manual_area_data['current_area'] . ';sa=' . $manual_area_data['current_subsection'],\r\n\t\t\t'name' => $manual_area_data['subsections'][$manual_area_data['current_subsection']][0],\r\n\t\t);\r\n\r\n\t// We actually need a special style sheet for help ;)\r\n\t$context['template_layers'][] = 'manual';\r\n\r\n\t// The smiley info page needs some cheesy information.\r\n\tif ($manual_area_data['current_area'] == 'smileys')\r\n\t\tShowSmileyHelp();\r\n}",
"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 displayHelp()\n {\n $sHelp = \"\nUsage:\n$this->sViewName [options]\n\n$this->sTempalteDesc\n\nOptions:\\n\";\n\n $iMaxLength = 2;\n\n foreach ($this->hOptionList as $hOption)\n {\n if (isset($hOption['long']))\n {\n $iTemp = strlen($hOption['long']);\n\n if ($iTemp > $iMaxLength)\n {\n $iMaxLength = $iTemp;\n }\n }\n }\n\n foreach ($this->hOptionList as $hOption)\n {\n $bShort = isset($hOption['short']);\n $bLong = isset($hOption['long']);\n\n if (!$bShort && !$bLong)\n {\n continue;\n }\n\n if ($bShort && $bLong)\n {\n $sOpt = '-' . $hOption['short'] . ', --' . $hOption['long'];\n }\n elseif ($bShort && !$bLong)\n {\n $sOpt = '-' . $hOption['short'] . \"\\t\";\n }\n elseif (!$bShort && $bLong)\n {\n $sOpt = ' --' . $hOption['long'];\n }\n\n $sOpt = str_pad($sOpt, $iMaxLength + 7);\n $sHelp .= \"\\t$sOpt\\t\\t{$hOption['desc']}\\n\\n\";\n }\n\n die($sHelp . \"\\n\");\n }",
"public function help_callback(){\r\n if($this->help_static_file()) {\r\n echo self::read_help_file($this->help_static_file());\r\n }\r\n }",
"function dfcg_plugin_help() {\n\t\n\tglobal $current_screen;\n\t\n\t$sidebar = dfcg_help_sidebar();\n\t\n\t$current_screen->set_help_sidebar( $sidebar );\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-general',\n\t\t'title' => __( 'General info', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_general'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-theme',\n\t\t'title' => __( 'Theme integration', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_theme'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-quick',\n\t\t'title' => __( 'Quick Start', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_quick'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-gallery',\n\t\t'title' => __( 'Gallery Method', DFCG_DOMAIN ),\n\t\t'callback' => \"dfcg_help_gallery\"\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-images',\n\t\t'title' => __( 'Image Management', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_images'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-desc',\n\t\t'title' => __( 'Descriptions', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_desc'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-css',\n\t\t'title' => __( 'Gallery CSS', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_css'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-scripts',\n\t\t'title' => __( 'Load Scripts', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_scripts'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-troubleshooting',\n\t\t'title' => __( 'Troubleshooting', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_trouble'\n\t));\n}",
"public function customizer_help() {\n\t\techo '\n\t\t<li>\n\t\t\t<p>\n\t\t\t\t' . __( 'Example text:', 'hellish-simplicity' ) . ' <code>' . esc_html( $this->default_header_text ) . '</code>\n\t\t\t</p>\n\t\t</li>';\n\t}",
"public function getExtendedHelpMessage()\n {\n $out = $this->getHelpMessage() . \"\\n\";\n\n $out .= \"Usage: summary [--short] [module]\\n\"\n . \"Show the summary of the most recent results of each module.\\n\"\n . \"If a module name is provided as an argument, it\\n\"\n . \"will display only the summary for that module.\\n\\n\"\n . \"This is the default module that is run when no\\n\"\n . \"module name is given when running qis.\\n\";\n\n $out .= \"\\nValid Options:\\n\"\n . $this->_qis->getTerminal()->do_setaf(3)\n . \" --short : Show only short information\\n\"\n . $this->_qis->getTerminal()->do_op();\n\n return $out;\n }",
"public function setHelp($help)\n {\n $this->help = $help;\n return $this;\n }",
"public function getHelp(): string\n {\n return $this->help;\n }",
"public function help(){\n\t\t$screen = get_current_screen();\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/installing\" target=\"_blank\">' . __( 'Installing the Plugin', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/staying-updated\" target=\"_blank\">' . __( 'Staying Updated', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/glossary\" target=\"_blank\">' . __( 'Glossary', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-general-info',\n\t\t\t'title' => __( 'General Info', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-interface\" target=\"_blank\">' . __( 'Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-creating\" target=\"_blank\">' . __( 'Creating a New Form', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-sorting\" target=\"_blank\">' . __( 'Sorting Your Forms', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-building\" target=\"_blank\">' . __( 'Building Your Forms', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-forms',\n\t\t\t'title' => __( 'Forms', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-interface\" target=\"_blank\">' . __( 'Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-managing\" target=\"_blank\">' . __( 'Managing Your Entries', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-searching-filtering\" target=\"_blank\">' . __( 'Searching and Filtering Your Entries', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-entries',\n\t\t\t'title' => __( 'Entries', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/email-design\" target=\"_blank\">' . __( 'Email Design Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/analytics\" target=\"_blank\">' . __( 'Analytics Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-email-analytics',\n\t\t\t'title' => __( 'Email Design & Analytics', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/import\" target=\"_blank\">' . __( 'Import Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/export\" target=\"_blank\">' . __( 'Export Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-import-export',\n\t\t\t'title' => __( 'Import & Export', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/conditional-logic\" target=\"_blank\">' . __( 'Conditional Logic', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/templating\" target=\"_blank\">' . __( 'Templating', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/custom-capabilities\" target=\"_blank\">' . __( 'Custom Capabilities', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/hooks\" target=\"_blank\">' . __( 'Filters and Actions', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-advanced',\n\t\t\t'title' => __( 'Advanced Topics', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<p>' . __( '<strong>Always load CSS</strong> - Force Visual Form Builder Pro CSS to load on every page. Will override \"Disable CSS\" option, if selected.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable CSS</strong> - Disable CSS output for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable Email</strong> - Disable emails from sending for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable Notifications Email</strong> - Disable notification emails from sending for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Skip Empty Fields in Email</strong> - Fields that have no data will not be displayed in the email.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable saving new entry</strong> - Disable new entries from being saved.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable saving entry IP address</strong> - An entry will be saved, but the IP address will be removed.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Place Address labels above fields</strong> - The Address field labels will be placed above the inputs instead of below.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Remove default SPAM Verification</strong> - The default SPAM Verification question will be removed and only a submit button will be visible.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable meta tag version</strong> - Prevent the hidden Visual Form Builder Pro version number from printing in the source code.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Skip PayPal redirect if total is zero</strong> - If PayPal is configured, do not redirect if the total is zero.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Prepend Confirmation</strong> - Always display the form beneath the text confirmation after the form has been submitted.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Max Upload Size</strong> - Restrict the file upload size for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Sender Mail Header</strong> - Control the Sender attribute in the mail header. This is useful for certain server configurations that require an existing email on the domain to be used.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>reCAPTCHA Public Key</strong> - Required if \"Use reCAPTCHA\" option is selected in the Secret field.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>reCAPTCHA Private Key</strong> - Required if \"Use reCAPTCHA\" option is selected in the Secret field.', 'visual-form-builder-pro' ) . '</p>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-settings',\n\t\t\t'title' => __( 'Settings', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t}",
"function help($choice = null) {\r\n if($choice) {\r\n $this->help = true;\r\n } else {\r\n $this->help = false;\r\n }\r\n return true;\r\n }",
"public function get_help_tabs()\n {\n }",
"public static function help($name)\n {\n self::create($name)->renderHelp();\n }",
"public function getHelp()\n\t{\n\t\treturn $this->run(array('help'));\n\t}",
"public function getHelp()\n {\n $this->parseDocBlock();\n return $this->help;\n }",
"protected function getQuickHelp() {\r\n $strOldAction = $this->getAction();\r\n $this->setAction($this->strOriginalAction);\r\n $strQuickhelp = parent::getQuickHelp();\r\n $this->setAction($strOldAction);\r\n return $strQuickhelp;\r\n }",
"function setHelp($help)\n {\n $this->form->_help = true;\n $this->help = $help;\n }",
"public function longHelp()\n {\n return <<<LONGHELP\n\n __ __ _____ _\n | \\/ | __ _ __ _ ___| ___| | _____ __\n | |\\/| |/ _` |/ _` |/ _ \\ |_ | |/ _ \\ \\ /\\ / /\n | | | | (_| | (_| | __/ _| | | (_) \\ V V /\n |_| |_|\\__,_|\\__, |\\___|_| |_|\\___/ \\_/\\_/\n __ __ |___/_\n | \\/ | ___ __| (_) __ _\n | |\\/| |/ _ \\/ _` | |/ _` |\n | | | | __/ (_| | | (_| |\n |_|_ |_|\\___|\\__,_|_|\\__,_|\n |_ _|_ __ __| | _____ _____ _ __\n | || '_ \\ / _` |/ _ \\ \\/ / _ \\ '__|\n | || | | | (_| | __/> < __/ |\n |___|_| |_|\\__,_|\\___/_/\\_\\___|_|\n\n\n LICENSE AND COPYRIGHT NOTICE\n\n PLEASE READ THIS SOFTWARE LICENSE AGREEMENT (\"LICENSE\") CAREFULLY\n BEFORE USING THE SOFTWARE. BY USING THE SOFTWARE, YOU ARE AGREEING\n TO BE BOUND BY THE TERMS OF THIS LICENSE.\n IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENSE, DO NOT USE THE SOFTWARE.\n\n Full text of this license is available @license\n\n @license http://mageflow.com/license/connector/eula.txt MageFlow EULA\n @author MageFlow\n @copyright 2014 MageFlow http://mageflow.com/\n\n GENERAL INFO\n\n This script will create or update Media Index. Media Index is an up-to-date list of\n all media files under WYSIWYG folder in Magento media folder.\n\n\nLONGHELP;\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$help [__CLASS__] [\"text\"] [] .= \"Zabbix Host Interface :\";\n\t\t$help = array_merge ( $help, zabbix_common_interface::help () );\n\t\t\n\t\treturn $help;\n\t}",
"public function getHelp()\n {\n return $this->run(array(\n 'help'\n ));\n }",
"public function getHelp() {\n\t\treturn $this->help;\n\t}",
"public function getHelp() {\n\t\treturn $this->help;\n\t}",
"public function getHelp()\n {\n new Help('form');\n }",
"public function get_help(){\n $tmp=self::_pipeExec('\"'.$this->cmd.'\" --extended-help');\n return $tmp['stdout'];\n }",
"public static function end_help()\n\t{\n\t\treturn <<<HTML\n\t</div>\n</div>\nHTML;\n\t}",
"function help()\n\t{\n\t\t/* check if all required plugins are installed */\n\t\t\n\t\t$text = \"<div class='center buttons-bar'><form method='post' action='\".e_SELF.\"?\".e_QUERY.\"' id='core-db-import-form'>\";\n\t\t$text .= e107::getForm()->admin_button('importThemeDemo', 'Install Demo', 'other');\n\t\t$text .= '</form></div>';\n \n\t \treturn $text;\n\t}",
"function is_help($arg)\n{\n\tif ($arg === \"--help\" || $arg === \"-h\")\n\t\treturn true;\n\treturn false;\n}",
"public static function getHelpBlock($text)\n {\n return \"<p class=\\\"help-block\\\">{$text}</p>\";\n }",
"function foodpress_admin_help_tab_content() {\r\n\t$screen = get_current_screen();\r\n\r\n\t$screen->add_help_tab( array(\r\n\t 'id'\t=> 'foodpress_overview_tab',\r\n\t 'title'\t=> __( 'Overview', 'foodpress' ),\r\n\t 'content'\t=>\r\n\r\n\t \t'<p>' . __( 'Thank you for using FoodPress plugin. ', 'foodpress' ). '</p>'\r\n\r\n\t) );\r\n\r\n\r\n\r\n\r\n\t$screen->set_help_sidebar(\r\n\t\t'<p><strong>' . __( 'For more information:', 'foodpress' ) . '</strong></p>' .\r\n\t\t'<p><a href=\"http://demo.myfoodpress.com/\" target=\"_blank\">' . __( 'foodpress Demo', 'foodpress' ) . '</a></p>' .\r\n\t\t\r\n\t\t'<p><a href=\"http://demo.myfoodpress.com/documentation/\" target=\"_blank\">' . __( 'Documentation', 'foodpress' ) . '</a></p>'.\r\n\t\t'<p><a href=\"https://foodpressplugin.freshdesk.com/support/home/\" target=\"_blank\">' . __( 'Support', 'foodpress' ) . '</a></p>'\r\n\t);\r\n}",
"function GetHelp()\n {\n return $this->Lang('help');\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\"] [] .= \"Zabbix Interface :\";\n\t\t$help [__CLASS__] [\"text\"] [] .= \"\\t--zabbix_interface_ip 10.10.10.10 IP du CI\";\n\t\t$help [__CLASS__] [\"text\"] [] .= \"\\t--zabbix_interface_fqdn ci.client.fr.ghc.local FQDN du CI\";\n\t\t$help [__CLASS__] [\"text\"] [] .= \"\\t--zabbix_interface_resolv_fqdn IP|FQDN Si l'IP et le FQDN son fourni, permet de connaitre la methode a utiliser pour contacter le CI\";\n\t\t\n\t\treturn $help;\n\t}",
"public static function configureHelp(Help $help);",
"public function help()\r\n{\r\n // You could include a file and return it here.\r\n return \"No documentation has been added for this module.<br />Contact the module developer for assistance.\";\r\n}",
"public static function getAllHelp()\n {\n return $this->_help;\n }",
"function showHelp()\n{\n global $cli;\n\n $cli->writeln(sprintf(_(\"Usage: %s [OPTIONS]...\"), basename(__FILE__)));\n $cli->writeln();\n $cli->writeln(_(\"Mandatory arguments to long options are mandatory for short options too.\"));\n $cli->writeln();\n $cli->writeln(_(\"-h, --help Show this help\"));\n $cli->writeln(_(\"-u, --username[=username] Horde login username\"));\n $cli->writeln(_(\"-p, --password[=password] Horde login password\"));\n $cli->writeln(_(\"-t, --type[=type] Export format\"));\n $cli->writeln(_(\"-r, --rpc[=http://example.com/horde/rpc.php] Remote url\"));\n $cli->writeln();\n}",
"function helps()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['helps'] == 1 ) ? 'Help File' : 'Help Files';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'removed' : 'created';\n\t\t$helpkeys = array();\n\t\t\n\t\tforeach ( $this->xml_array['helps_group']['help'] as $k => $v )\n\t\t{\n\t\t\t$helpkeys[] = \"'{$v['title']['VALUE']}'\";\n\t\t}\n\t\t\n\t\t$this->ipsclass->DB->do_delete( 'faq', \"title IN (\".implode( \",\", $helpkeys ).\")\" );\n\t\t\n\t\tif ( !$this->ipsclass->input['un'] )\n\t\t{\n\t\t\tforeach ( $this->xml_array['helps_group']['help'] as $k => $v )\n\t\t\t{\n\t\t\t\t$this->_add_help( $v );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&code=work&mod={$this->ipsclass->input['mod']}&step={$this->ipsclass->input['step']}{$uninstall}{$group}&st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['helps']} {$object} {$operation}....\" );\n\t}",
"public function help_tab(){\r\n $screen = get_current_screen();\r\n\r\n foreach($this->what_helps as $help_id => $tab) {\r\n $callback_name = $this->generate_callback_name($help_id);\r\n if(method_exists($this, 'help_'.$callback_name.'_callback')) {\r\n $callback = array($this, 'help_'.$callback_name.'_callback');\r\n }\r\n else {\r\n $callback = array($this, 'help_callback');\r\n }\r\n // documentation tab\r\n $screen->add_help_tab( array(\r\n 'id' => 'hw-help-'.$help_id,\r\n 'title' => __( $tab['title'] ),\r\n //'content' => \"<p>sdfsgdgdfghfhfgh</p>\",\r\n 'callback' => $callback\r\n )\r\n );\r\n }\r\n }",
"function builder_set_help_sidebar() {\n\tob_start();\n\t\n?>\n<p><strong><?php _e( 'For more information:', 'it-l10n-Builder-Everett' ); ?></strong></p>\n<p><?php _e( '<a href=\"http://ithemes.com/forum/\" target=\"_blank\">Support Forum</a>' ); ?></p>\n<p><?php _e( '<a href=\"http://ithemes.com/codex/page/Builder\" target=\"_blank\">Codex</a>' ); ?></p>\n<?php\n\t\n\t$help = ob_get_contents();\n\tob_end_clean();\n\t\n\t$help = apply_filters( 'builder_filter_help_sidebar', $help );\n\t\n\tif ( ! empty( $help ) ) {\n\t\t$screen = get_current_screen();\n\t\t\n\t\tif ( is_callable( array( $screen, 'set_help_sidebar' ) ) )\n\t\t\t$screen->set_help_sidebar( $help );\n\t}\n}",
"public function displayHelp()\n\t{\n\t\t$obj = MpmCommandLineWriter::getInstance();\n\t\t$obj->addText('./migrate.php latest [--force]');\n\t\t$obj->addText(' ');\n\t\t$obj->addText('This command is used to migrate up to the most recent version. No arguments are required.');\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 latest', 4);\n\t\t$obj->addText('./migrate.php latest --force', 4);\n\t\t$obj->write();\n\t}",
"function bi_suggestion_help_text( $contextual_help, $screen_id, $screen ) {\n if ( 'library' == $screen->id ) {\n $contextual_help =\n '<p>' . __('Things to remember when adding or editing a suggestion:') . '</p>' .\n '<p>' . __('If you want to schedule the suggestion to be published in the future:') . '</p>' .\n '<ul>' .\n '<li>' . __('Under the Publish module, click on the Edit link next to Publish.') . '</li>' .\n '<li>' . __('Change the date to the date to actual publish this suggestion, then click on Ok.') . '</li>' .\n '</ul>';\n } elseif ( 'edit-suggestion' == $screen->id ) {\n $contextual_help = \n '<p>' . __('This is the help screen displaying the table of suggestion blah blah blah.') . '</p>' ;\n }\n return $contextual_help;\n}",
"public static function render_help() {\n\n // Grab the current screen\n $screen = get_current_screen();\n\n }",
"public function getHelp()\n\t{\n\t return '<info>Console Tool</info>';\n\t}",
"function getHelp()\n {\n return $this->help;\n }",
"public function custom_help_tab() {\n\n\t\t\t$screen = get_current_screen();\n\n\t\t\t// Return early if we're not on the needed post type.\n\t\t\tif ( ( $this->object_type == 'post' && $this->object != $screen->post_type ) || \n\t\t\t\t ( $this->object_type == 'taxonomy' && $this->object != $screen->taxonomy ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Add the help tabs.\n\t\t\tforeach ( $this->args->help_tabs as $tab ) {\n\t\t\t\t$screen->add_help_tab( $tab );\n\t\t\t}\n\n\t\t\t// Add the help sidebar.\n\t\t\t$screen->set_help_sidebar( $this->args->help_sidebar );\n\t\t}",
"function help($message = null) {\n if (!is_null($message))\n echo($message.NL.NL);\n\n $self = baseName($_SERVER['PHP_SELF']);\n\necho <<<HELP\n\n Syntax: $self [symbol ...]\n\n\nHELP;\n}",
"function exampleHelpFunction()\n {\n //用法 >> exampleHelpFunction() \n return '這樣就能使用全域function了!';\n }",
"public function testHelpCommand(): void\n {\n $this->assertNotFalse(\n $this->artisan($signature = $this->getCommandSignature(), ['--help']),\n sprintf('Command \"%s\" does not return help message', $signature)\n );\n }",
"public function help()\n {\n echo PHP_EOL;\n $output = new Output;\n $output->write('Available Commands', [\n 'color' => 'red',\n 'bold' => true,\n 'underline' => true,\n ]);\n echo PHP_EOL;\n\n $maxlen = 0;\n foreach ($this->supportedArgs as $key => $description) {\n $len = strlen($key);\n if ($len > $maxlen) {\n $maxlen = $len;\n }\n\n }\n\n foreach ($this->supportedArgs as $key => $description) {\n $len = strlen($key);\n $output->write(' ')\n ->write($key, ['color' => 'yellow'])\n ->write(str_repeat(' ', $maxlen - $len))\n ->write(' - ')\n ->write($description);\n\n echo PHP_EOL;\n }\n\n echo PHP_EOL;\n\n }",
"public function setHelp(string $help): static\n {\n $this->help = $help;\n\n return $this;\n }",
"public function getHelpMessage()\n {\n return \"Get summary of a module or all modules\\n\";\n }",
"private function displayHelpMessage() {\n $message = \"ClassDumper help:\\n\n -h : displays this help message\\n\n -f (directory 1 directory 2 ... directory n) : \n parses those directories\\n\n -t (xml / yaml) : selects type of serialization\\n\n (no args) : parses working directory in YAML format\\n\";\n\n echo $message;\n die('ShrubRoots ClassDumper v0.991');\n }",
"private static function set_advanced_help_texts() {\n\t\tself::$help_texts['advanced'] = array(\n\t\t\t'pt_single' => __( 'Replaced with the content type single label', 'wordpress-seo' ),\n\t\t\t'pt_plural' => __( 'Replaced with the content type plural label', 'wordpress-seo' ),\n\t\t\t'modified' => __( 'Replaced with the post/page modified time', 'wordpress-seo' ),\n\t\t\t'id' => __( 'Replaced with the post/page ID', 'wordpress-seo' ),\n\t\t\t'name' => __( 'Replaced with the post/page author\\'s \\'nicename\\'', 'wordpress-seo' ),\n\t\t\t'user_description' => __( 'Replaced with the post/page author\\'s \\'Biographical Info\\'', 'wordpress-seo' ),\n\t\t\t'userid' => __( 'Replaced with the post/page author\\'s userid', 'wordpress-seo' ),\n\t\t\t'currenttime' => __( 'Replaced with the current time', 'wordpress-seo' ),\n\t\t\t'currentdate' => __( 'Replaced with the current date', 'wordpress-seo' ),\n\t\t\t'currentday' => __( 'Replaced with the current day', 'wordpress-seo' ),\n\t\t\t'currentmonth' => __( 'Replaced with the current month', 'wordpress-seo' ),\n\t\t\t'currentyear' => __( 'Replaced with the current year', 'wordpress-seo' ),\n\t\t\t'page' => __( 'Replaced with the current page number with context (i.e. page 2 of 4)', 'wordpress-seo' ),\n\t\t\t'pagetotal' => __( 'Replaced with the current page total', 'wordpress-seo' ),\n\t\t\t'pagenumber' => __( 'Replaced with the current page number', 'wordpress-seo' ),\n\t\t\t'caption' => __( 'Attachment caption', 'wordpress-seo' ),\n\t\t\t'focuskw' => __( 'Replaced with the posts focus keyword', 'wordpress-seo' ),\n\t\t\t'term404' => __( 'Replaced with the slug which caused the 404', 'wordpress-seo' ),\n\t\t\t'cf_<custom-field-name>' => __( 'Replaced with a posts custom field value', 'wordpress-seo' ),\n\t\t\t'ct_<custom-tax-name>' => __( 'Replaced with a posts custom taxonomies, comma separated.', 'wordpress-seo' ),\n\t\t\t'ct_desc_<custom-tax-name>' => __( 'Replaced with a custom taxonomies description', 'wordpress-seo' ),\n\t\t);\n\t}",
"public function help()\n {\n $help = file_get_contents(BUILTIN_SHELL_HELP . 'list.txt');\n $this->put($help);\n }",
"protected function displayHelp()\n {\n return $this->context->smarty->fetch($this->module->getLocalPath().'views/templates/admin/rewards_info.tpl');\n }",
"public function getHelpMessage() { return $this->data['helpMessage']; }",
"function helpLink() {\n\t\t// By default it's an (external) URL, hence not a valid Title.\n\t\t// But because MediaWiki is by nature very customizable, someone\n\t\t// might've changed it to point to a local page. Tricky!\n\t\t// @see https://phabricator.wikimedia.org/T155319\n\t\t$helpPage = $this->msg( 'helppage' )->inContentLanguage()->plain();\n\t\tif ( preg_match( '/^(?:' . wfUrlProtocols() . ')/', $helpPage ) ) {\n\t\t\t$helpLink = Linker::makeExternalLink(\n\t\t\t\t$helpPage,\n\t\t\t\t$this->msg( 'help' )->plain()\n\t\t\t);\n\t\t} else {\n\t\t\t$helpLink = MediaWikiServices::getInstance()->getLinkRenderer()->makeKnownLink(\n\t\t\t\tTitle::newFromText( $helpPage ),\n\t\t\t\t$this->msg( 'help' )->text()\n\t\t\t);\n\t\t}\n\t\treturn $helpLink;\n\t\t// This doesn't work with the default value of 'helppage' which points to an external URL\n\t\t// return $this->footerLink( 'help', 'helppage' );\n\t}",
"public function getProcessedHelp(): string\n {\n $name = $this->name;\n $isSingleCommand = $this->application?->isSingleCommand();\n\n $placeholders = [\n '%command.name%',\n '%command.full_name%',\n ];\n $replacements = [\n $name,\n $isSingleCommand ? $_SERVER['PHP_SELF'] : $_SERVER['PHP_SELF'].' '.$name,\n ];\n\n return str_replace($placeholders, $replacements, $this->getHelp() ?: $this->getDescription());\n }",
"function fgallery_plugin_help($contextual_help, $screen_id, $screen) {\n if ($screen_id == 'toplevel_page_fgallery' || $screen_id == '1-flash-gallery_page_fgallery_add'\n || $screen_id == '1-flash-gallery_page_fgallery_add' || $screen_id == '1-flash-gallery_page_fgallery_images'\n || $screen_id == '1-flash-gallery_page_fgallery_upload') {\n $contextual_help = '<p><a href=\"http://1plugin.com/faq\" target=\"_blank\">'.__('FAQ').'</a></p>';\n }\n return $contextual_help;\n}",
"public static function help_inner () \n { \n $html = null;\n\n $top = __( 'Instruction Manual', 'label' );\n $inner = self::help_center();\n $bottom = self::page_foot();\n\n $html .= self::page_body( 'help', $top, $inner, $bottom );\n\n return $html;\n }",
"private function _getHelp( $options )\n {\n if ( $options->getHelp() ) {\n return '<p class=\"help-block\">'.$options->getHelp().'</p> ';\n } else {\n return '';\n }\n }",
"function admin_hide_help() { \n $screen = get_current_screen();\n $screen->remove_help_tabs();\n}",
"public function showGeneralHelp(Context $context)\n {\n $sortedSwitches = $context->phixDefinedSwitches->getSwitchesInDisplayOrder();\n\n $so = $context->stdout;\n\n $so->output($context->highlightStyle, \"phix \" . $context->version);\n $so->outputLine($context->urlStyle, ' http://gradwell.github.com');\n $so->outputLine(null, 'Copyright (c) 2010 Gradwell dot com Ltd. Released under the BSD license');\n $so->outputBlankLine();\n $this->showPhixSwitchSummary($context, $sortedSwitches);\n $this->showPhixSwitchDetails($context, $sortedSwitches);\n $this->showCommandsList($context);\n }",
"public function helpStubCommand() {}",
"public function getHelpLines()\n {\n return array(\n 'Usage: php [function] [full]',\n '[function] - the PHP function you want to search for',\n //'[full] (optional) - add \"full\" after the function name to include the description',\n 'Returns information about the specified PHP function'\n );\n }",
"public function renderHelp()\n {\n $this->renderHeader();\n\n echo Line::begin('Usage:', Line::YELLOW)->nl();\n echo Line::begin()\n ->indent(2)\n ->text($this->getUsage())\n ->nl(2);\n\n // Options\n echo Line::begin('Options:', Line::YELLOW)->nl();\n echo Line::begin()\n ->indent(2)\n ->text('--help', Line::MAGENTA)\n ->to(21)\n ->text('-h', Line::MAGENTA)\n ->text('Display this help message.')\n ->nl(1);\n\n $attributes = $this->attributeNames();\n $help = $this->attributeHelp();\n\n sort($attributes);\n\n foreach ($attributes as $name) {\n echo Line::begin()\n ->indent(2)\n ->text(\"--$name\", Line::MAGENTA)\n ->to(24)\n ->text(isset($help[$name]) ? $help[$name] : '')\n ->nl();\n }\n\n exit(0);\n }",
"static function help($command) {\n return 'TO-DO';\n }",
"public static function help() {\n\t\tWP_CLI::line( <<<EOB\nusage: wp core update\n or: wp core version [--extra]\n or: wp core install --site_url=example.com --site_title=<site-title> [--admin_name=<username>] --admin_password=<password> --admin_email=<email-address>\nEOB\n\t);\n\t}"
] | [
"0.78581786",
"0.7162684",
"0.7113693",
"0.6955237",
"0.6848153",
"0.6844692",
"0.6794005",
"0.6789542",
"0.6788821",
"0.6788821",
"0.6788821",
"0.6786914",
"0.6685687",
"0.6672015",
"0.66453034",
"0.6610642",
"0.6610198",
"0.6556672",
"0.6535161",
"0.6472765",
"0.646506",
"0.6461922",
"0.6397989",
"0.63927126",
"0.6389478",
"0.63483274",
"0.6344305",
"0.630777",
"0.6274039",
"0.62597823",
"0.62276626",
"0.62251467",
"0.6213736",
"0.6213367",
"0.619427",
"0.61899555",
"0.6184772",
"0.61814755",
"0.615642",
"0.6151988",
"0.6122973",
"0.6122192",
"0.612072",
"0.6113812",
"0.6109489",
"0.60737336",
"0.6072318",
"0.60649925",
"0.606302",
"0.60561293",
"0.6047767",
"0.60388076",
"0.6038561",
"0.602328",
"0.6018898",
"0.6018898",
"0.6006954",
"0.60039115",
"0.6003269",
"0.59960616",
"0.5993425",
"0.59910053",
"0.5990804",
"0.5988774",
"0.59845924",
"0.5961651",
"0.59446895",
"0.5940318",
"0.5938382",
"0.5928109",
"0.5926054",
"0.592027",
"0.5918606",
"0.5915298",
"0.5905923",
"0.5905156",
"0.58862865",
"0.58775115",
"0.58771646",
"0.58754355",
"0.58634126",
"0.5861152",
"0.5853597",
"0.5838741",
"0.58336854",
"0.58296835",
"0.58290106",
"0.5827611",
"0.5826486",
"0.5823987",
"0.58185136",
"0.5812318",
"0.5806602",
"0.5799663",
"0.57972676",
"0.5796041",
"0.5793341",
"0.5790368",
"0.57806885",
"0.57790405",
"0.57768214"
] | 0.0 | -1 |
Default help only if there is no oldstyle block of text and no newstyle help tabs. | private function help_style_tabs() {
$help_sidebar = $this->get_sidebar();
$help_class = '';
if ( ! $help_sidebar ) :
$help_class .= ' no-sidebar';
endif;
// Time to render!
?>
<div id="screen-meta" class="tr-options metabox-prefs">
<div id="contextual-help-wrap" class="<?php echo esc_attr( $help_class ); ?>" >
<div id="contextual-help-back"></div>
<div id="contextual-help-columns">
<div class="contextual-help-tabs">
<ul>
<?php
$class = ' class="active"';
$tabs = $this->get_tabs();
foreach ( $tabs as $tab ) :
$link_id = "tab-link-{$tab['id']}";
$panel_id = (!empty($tab['url'])) ? $tab['url'] : "#tab-panel-{$tab['id']}";
?>
<li id="<?php echo esc_attr( $link_id ); ?>"<?php echo $class; ?>>
<a href="<?php echo esc_url( "$panel_id" ); ?>">
<?php echo esc_html( $tab['title'] ); ?>
</a>
</li>
<?php
$class = '';
endforeach;
?>
</ul>
</div>
<?php if ( $help_sidebar ) : ?>
<div class="contextual-help-sidebar">
<?php echo $help_sidebar; ?>
</div>
<?php endif; ?>
<div class="contextual-help-tabs-wrap">
<?php
$classes = 'help-tab-content active';
foreach ( $tabs as $tab ):
$panel_id = "tab-panel-{$tab['id']}";
?>
<div id="<?php echo esc_attr( $panel_id ); ?>" class="inside <?php echo $classes; ?>">
<?php
// Print tab content.
echo $tab['content'];
// If it exists, fire tab callback.
if ( ! empty( $tab['callback'] ) )
call_user_func_array( $tab['callback'], array( $this, $tab ) );
?>
</div>
<?php
$classes = 'help-tab-content';
endforeach;
?>
</div>
</div>
</div>
</div>
<?php
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function isHelp() {}",
"protected function renderHelp() {}",
"abstract public function displayHelp();",
"public static function add_help_text()\n {\n }",
"public function help();",
"public function printHelp();",
"function ShowAdminHelp()\r\n{\r\n\tglobal $txt, $helptxt, $context, $scripturl;\r\n\r\n\tif (!isset($_GET['help']) || !is_string($_GET['help']))\r\n\t\tfatal_lang_error('no_access', false);\r\n\r\n\tif (!isset($helptxt))\r\n\t\t$helptxt = array();\r\n\r\n\t// Load the admin help language file and template.\r\n\tloadLanguage('Help');\r\n\r\n\t// Permission specific help?\r\n\tif (isset($_GET['help']) && substr($_GET['help'], 0, 14) == 'permissionhelp')\r\n\t\tloadLanguage('ManagePermissions');\r\n\r\n\tloadTemplate('Help');\r\n\r\n\t// Set the page title to something relevant.\r\n\t$context['page_title'] = $context['forum_name'] . ' - ' . $txt['help'];\r\n\r\n\t// Don't show any template layers, just the popup sub template.\r\n\t$context['template_layers'] = array();\r\n\t$context['sub_template'] = 'popup';\r\n\r\n\t// What help string should be used?\r\n\tif (isset($helptxt[$_GET['help']]))\r\n\t\t$context['help_text'] = $helptxt[$_GET['help']];\r\n\telseif (isset($txt[$_GET['help']]))\r\n\t\t$context['help_text'] = $txt[$_GET['help']];\r\n\telse\r\n\t\t$context['help_text'] = $_GET['help'];\r\n\r\n\t// Does this text contain a link that we should fill in?\r\n\tif (preg_match('~%([0-9]+\\$)?s\\?~', $context['help_text'], $match))\r\n\t\t$context['help_text'] = sprintf($context['help_text'], $scripturl, $context['session_id'], $context['session_var']);\r\n}",
"function help()\n\t{\n\t\t$help['b'] = array();\n\t\t$help['i'] = array();\n\t\t\n\t\t$help['b'][] = 'Laisser une ligne vide entre chaque bloc <em>de même nature</em>.';\n\t\t$help['b'][] = '<strong>Paragraphe</strong> : du texte et une ligne vide';\n\t\t\n\t\tif ($this->getOpt('active_title')) {\n\t\t\t$help['b'][] = '<strong>Titre</strong> : <code>!!!</code>, <code>!!</code>, '.\n\t\t\t'<code>!</code> pour des titres plus ou moins importants';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_hr')) {\n\t\t\t$help['b'][] = '<strong>Trait horizontal</strong> : <code>----</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_lists')) {\n\t\t\t$help['b'][] = '<strong>Liste</strong> : ligne débutant par <code>*</code> ou '.\n\t\t\t'<code>#</code>. Il est possible de mélanger les listes '.\n\t\t\t'(<code>*#*</code>) pour faire des listes de plusieurs niveaux. '.\n\t\t\t'Respecter le style de chaque niveau';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_pre')) {\n\t\t\t$help['b'][] = '<strong>Texte préformaté</strong> : espace devant chaque ligne de texte';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_quote')) {\n\t\t\t$help['b'][] = '<strong>Bloc de citation</strong> : <code>></code> ou '.\n\t\t\t'<code>;:</code> devant chaque ligne de texte';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_fr_syntax')) {\n\t\t\t$help['i'][] = 'La correction de ponctuation est active. Un espace '.\n\t\t\t\t\t\t'insécable remplacera automatiquement tout espace '.\n\t\t\t\t\t\t'précédant les marques \";\",\"?\",\":\" et \"!\".';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_em')) {\n\t\t\t$help['i'][] = '<strong>Emphase</strong> : deux apostrophes <code>\\'\\'texte\\'\\'</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_strong')) {\n\t\t\t$help['i'][] = '<strong>Forte emphase</strong> : deux soulignés <code>__texte__</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_br')) {\n\t\t\t$help['i'][] = '<strong>Retour forcé à la ligne</strong> : <code>%%%</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_ins')) {\n\t\t\t$help['i'][] = '<strong>Insertion</strong> : deux plus <code>++texte++</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_del')) {\n\t\t\t$help['i'][] = '<strong>Suppression</strong> : deux moins <code>--texte--</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_urls')) {\n\t\t\t$help['i'][] = '<strong>Lien</strong> : <code>[url]</code>, <code>[nom|url]</code>, '.\n\t\t\t'<code>[nom|url|langue]</code> ou <code>[nom|url|langue|titre]</code>.';\n\t\t\t\n\t\t\t$help['i'][] = '<strong>Image</strong> : comme un lien mais avec une extension d\\'image.'.\n\t\t\t'<br />Pour désactiver la reconnaissance d\\'image mettez 0 dans un dernier '.\n\t\t\t'argument. Par exemple <code>[image|image.gif||0]</code> fera un lien vers l\\'image au '.\n\t\t\t'lieu de l\\'afficher.'.\n\t\t\t'<br />Il est conseillé d\\'utiliser la nouvelle syntaxe.';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_img')) {\n\t\t\t$help['i'][] = '<strong>Image</strong> (nouvelle syntaxe) : '.\n\t\t\t'<code>((url|texte alternatif))</code>, '.\n\t\t\t'<code>((url|texte alternatif|position))</code> ou '.\n\t\t\t'<code>((url|texte alternatif|position|description longue))</code>. '.\n\t\t\t'<br />La position peut prendre les valeur L ou G (gauche), R ou D (droite) ou C (centré).';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_anchor')) {\n\t\t\t$help['i'][] = '<strong>Ancre</strong> : <code>~ancre~</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_acronym')) {\n\t\t\t$help['i'][] = '<strong>Acronyme</strong> : <code>??acronyme??</code> ou '.\n\t\t\t'<code>??acronyme|titre??</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_q')) {\n\t\t\t$help['i'][] = '<strong>Citation</strong> : <code>{{citation}}</code>, '.\n\t\t\t'<code>{{citation|langue}}</code> ou <code>{{citation|langue|url}}</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_code')) {\n\t\t\t$help['i'][] = '<strong>Code</strong> : <code>@@code ici@@</code>';\n\t\t}\n\t\t\n\t\tif ($this->getOpt('active_footnotes')) {\n\t\t\t$help['i'][] = '<strong>Note de bas de page</strong> : <code>$$Corps de la note$$</code>';\n\t\t}\n\t\t\n\t\t$res = '<dl class=\"wikiHelp\">';\n\t\t\n\t\t$res .= '<dt>Blocs</dt><dd>';\n\t\tif (count($help['b']) > 0)\n\t\t{\n\t\t\t$res .= '<ul><li>';\n\t\t\t$res .= implode(' ;</li><li>', $help['b']);\n\t\t\t$res .= '.</li></ul>';\n\t\t}\n\t\t$res .= '</dd>';\n\t\t\n\t\t$res .= '<dt>Éléments en ligne</dt><dd>';\n\t\tif (count($help['i']) > 0)\n\t\t{\n\t\t\t$res .= '<ul><li>';\n\t\t\t$res .= implode(' ;</li><li>', $help['i']);\n\t\t\t$res .= '.</li></ul>';\n\t\t}\n\t\t$res .= '</dd>';\n\t\t\n\t\t$res .= '</dl>';\n\t\t\n\t\treturn $res;\t\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}",
"public function get_help()\n\t{\n\t\treturn '';\n\t}",
"public function hasHelp()\n {\n return !empty($this->help) || !empty($this->description);\n }",
"public function setup_help_tab()\n {\n }",
"protected function checkForHelp() {\n\t\tif ($this->commandLineOptions->hasOption(tx_mnogosearch_clioptions::HELP)) {\n\t\t\t$this->showUsageAndExit();\n\t\t}\n\t}",
"function help ( $help='help text', $caption='') {\n\n\t\t$compath = JURI::root() . 'administrator/components/'.JEV_COM_COMPONENT;\n\t\t$imgpath = $compath . '/assets/images';\n\n\t\tif (empty($caption)) $caption = ' ';\n\n\t\tif (substr($help, 0, 7) == 'http://' || substr($help, 0, 8) == 'https://') {\n\t\t\t//help text is url, open new window\n\t\t\t$onclick_cmd = \"window.open(\\\"$help\\\", \\\"help\\\", \\\"height=700,width=800,resizable=yes,scrollbars\\\");return false\";\n\t\t} else {\n\t\t\t// help text is plain text with html tags\n\t\t\t// prepare text as overlib parameter\n\t\t\t// escape \", replace new line by space\n\t\t\t$help = htmlspecialchars($help, ENT_QUOTES);\n\t\t\t$help = str_replace('"', '\\"', $help);\n\t\t\t$help = str_replace(\"\\n\", \" \", $help);\n\n\t\t\t$ol_cmds = 'RIGHT, ABOVE, VAUTO, WRAP, STICKY, CLOSECLICK, CLOSECOLOR, \"white\"';\n\t\t\t$ol_cmds .= ', CLOSETEXT, \"<span style=\\\"border:solid white 1px;padding:0px;margin:1px;\\\"><b>X</b></span>\"';\n\t\t\t$onclick_cmd = 'return overlib(\"'.$help.'\", ' . $ol_cmds . ', CAPTION, \"'.$caption.'\")';\n\t\t}\n\n\t\t// RSH 10/11/10 - Added float:none for 1.6 compatiblity - The default template was floating images to the left\n\t\t$str = '<img border=\"0\" style=\"float: none; vertical-align:bottom; cursor:help;\" alt=\"'. JText::_('JEV_HELP') . '\"'\n\t\t. ' title=\"' . JText::_('JEV_HELP') .'\"'\n\t\t. ' src=\"' . $imgpath . '/help_ques_inact.gif\"'\n\t\t. ' onmouseover=\\'this.src=\"' . $imgpath . '/help_ques.gif\"\\''\n\t\t. ' onmouseout=\\'this.src=\"' . $imgpath . '/help_ques_inact.gif\"\\''\n\t\t. ' onclick=\\'' . $onclick_cmd . '\\' />';\n\n\t\treturn $str;\n\t}",
"function validate_help(){ \n\t\tif($this->help){\n\t\t\tif(isset($this->input)|| isset($this->output) || isset($this->param_root) || isset($this->query) || isset($this->qf) || $this->n){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->help();\n\t\t\t}\n\t\t}\n\t\treturn true; \n }",
"function hasHelp()\n {\n return !empty($this->help);\n }",
"public function cli_help() {}",
"public function makeHelpButton() {}",
"public function hasHelp() {\n\t\treturn $this->help;\n\t}",
"private static function set_basic_help_texts() {\n\t\tself::$help_texts['basic'] = array(\n\t\t\t'date' => __( 'Replaced with the date of the post/page', 'wordpress-seo' ),\n\t\t\t'title' => __( 'Replaced with the title of the post/page', 'wordpress-seo' ),\n\t\t\t'parent_title' => __( 'Replaced with the title of the parent page of the current page', 'wordpress-seo' ),\n\t\t\t'archive_title' => __( 'Replaced with the normal title for an archive generated by WordPress', 'wordpress-seo' ),\n\t\t\t'sitename' => __( 'The site\\'s name', 'wordpress-seo' ),\n\t\t\t'sitedesc' => __( 'The site\\'s tag line / description', 'wordpress-seo' ),\n\t\t\t'excerpt' => __( 'Replaced with the post/page excerpt (or auto-generated if it does not exist)', 'wordpress-seo' ),\n\t\t\t'excerpt_only' => __( 'Replaced with the post/page excerpt (without auto-generation)', 'wordpress-seo' ),\n\t\t\t'tag' => __( 'Replaced with the current tag/tags', 'wordpress-seo' ),\n\t\t\t'category' => __( 'Replaced with the post categories (comma separated)', 'wordpress-seo' ),\n\t\t\t'primary_category' => __( 'Replaced with the primary category of the post/page', 'wordpress-seo' ),\n\t\t\t'category_description' => __( 'Replaced with the category description', 'wordpress-seo' ),\n\t\t\t'tag_description' => __( 'Replaced with the tag description', 'wordpress-seo' ),\n\t\t\t'term_description' => __( 'Replaced with the term description', 'wordpress-seo' ),\n\t\t\t'term_title' => __( 'Replaced with the term name', 'wordpress-seo' ),\n\t\t\t'searchphrase' => __( 'Replaced with the current search phrase', 'wordpress-seo' ),\n\t\t\t'sep' => sprintf(\n\t\t\t\t/* translators: %s: wp_title() function. */\n\t\t\t\t__( 'The separator defined in your theme\\'s %s tag.', 'wordpress-seo' ),\n\t\t\t\t'<code>wp_title()</code>'\n\t\t\t),\n\t\t);\n\t}",
"public function helpAction() {}",
"public function remove_help_tabs()\n {\n }",
"public function help() \n {\n if (!isset($_SESSION)) { \n session_start(); \n }\n $title = 'Aide';\n $customStyle = $this->setCustomStyle('help');\n require('../src/View/HelpView.php');\n }",
"public function testHelpUnexisting(): void\n {\n // setup\n $this->setCommand([\n 'help',\n 'unexpected'\n ]);\n\n // test body\n $commandLineOutput = $this->testBody();\n\n // assertions\n $this->validateOutput($commandLineOutput, [\n 'Usage: mezon <verb> <entity> [<options>]',\n 'Verbs:',\n 'Entities:'\n ]);\n }",
"function ren_help($mode = 1, $addtextfunc = \"addtext\", $helpfunc = \"help\")\n{\n return display_help(\"helpb\", $mode, $addtextfunc, $helpfunc = \"help\");\n}",
"public function setHelp($help) {\n\t\t$this->help = $help;\n\t}",
"public function help()\n {\n echo Config::main('help_text');\n if(empty($this->commands))\n render(\"[red] - NONE - [reset]\\r\\n\");\n else\n {\n foreach($this->commands as $key => $ignored)\n render(\"[blue] - {$key}[reset]\\r\\n\");\n }\n echo PHP_EOL;\n\n return 0;\n }",
"public function help()\r\n\t{\r\n\t\t// You could include a file and return it here.\r\n\t\treturn \"No documentation has been added for this module.<br />Contact the module developer for assistance.\";\r\n\t}",
"function clshowhelp() {\n\tglobal $CLHELP;\n\tforeach ( $CLHELP as $msg) {\n\t\tif ( substr( $msg, strlen( $msg) - 1, 1) != \"\\n\") $msg .= \"\\n\"; \t// no end line in this msg, add one\n\t\techo $msg;\n\t}\n\t\n}",
"public function get_help_sidebar()\n {\n }",
"public function help() {\n $this->say(\"Please let me help!\");\n\n $this->say(\"I'm Martha and I can help you answer questions and find things online. Try asking:\");\n\n $suggestions = $this->suggest(3);\n\n if($this->_context != 'web') {\n foreach($suggestions as $suggestion) {\n $this->say($suggestion);\n }\n $this->say(\"I can talk to all of these APIs thanks to Temboo! https://temboo.com\");\n $this->say(\"You can read my source at https://github.com/temboo/martha\");\n } else {\n foreach($suggestions as $suggestion) {\n $this->say('<p><a href=\"?query=' . htmlentities($suggestion, ENT_COMPAT, 'UTF-8') . '\" class=\"suggestion\">\"' . htmlentities($suggestion, ENT_NOQUOTES, 'UTF-8') . '\"</a></p>', true);\n }\n $this->say('<p>I can talk to all of these APIs thanks to <a href=\"https://temboo.com/\" target=\"_blank\">Temboo</a>!</p>', true);\n $this->say('<p>You can read my source at <a href=\"https://github.com/temboo/martha\" target=\"_blank\">Github</a>.</p>', true);\n }\n }",
"function Help() {\r\n\t\t\r\n\t\tglobal $path, $backgroundColor, $IP, $language;\r\n\t\tif( file_exists( \"$path.help.$language.ihtml\" ) ) include_once( \"$path.help.$language.ihtml\" );\r\n\t\telse include_once( \"$path.help.fr.ihtml\" );\r\n\t}",
"function ShowHelp()\r\n{\r\n\tglobal $settings, $user_info, $language, $context, $txt, $sourcedir, $options, $scripturl;\r\n\r\n\tloadTemplate('Help');\r\n\tloadLanguage('Manual');\r\n\r\n\t$manual_areas = array(\r\n\t\t'getting_started' => array(\r\n\t\t\t'title' => $txt['manual_category_getting_started'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'introduction' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_intro'],\r\n\t\t\t\t\t'template' => 'manual_intro',\r\n\t\t\t\t),\r\n\t\t\t\t'main_menu' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_main_menu'],\r\n\t\t\t\t\t'template' => 'manual_main_menu',\r\n\t\t\t\t),\r\n\t\t\t\t'board_index' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_board_index'],\r\n\t\t\t\t\t'template' => 'manual_board_index',\r\n\t\t\t\t),\r\n\t\t\t\t'message_view' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_message_view'],\r\n\t\t\t\t\t'template' => 'manual_message_view',\r\n\t\t\t\t),\r\n\t\t\t\t'topic_view' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_topic_view'],\r\n\t\t\t\t\t'template' => 'manual_topic_view',\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t),\r\n\t\t'registering' => array(\r\n\t\t\t'title' => $txt['manual_category_registering'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'when_how' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_when_how_register'],\r\n\t\t\t\t\t'template' => 'manual_when_how_register',\r\n\t\t\t\t),\r\n\t\t\t\t'registration_screen' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_registration_screen'],\r\n\t\t\t\t\t'template' => 'manual_registration_screen',\r\n\t\t\t\t),\r\n\t\t\t\t'activating_account' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_activating_account'],\r\n\t\t\t\t\t'template' => 'manual_activating_account',\r\n\t\t\t\t),\r\n\t\t\t\t'logging_in' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_logging_in_out'],\r\n\t\t\t\t\t'template' => 'manual_logging_in_out',\r\n\t\t\t\t),\r\n\t\t\t\t'password_reminders' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_password_reminders'],\r\n\t\t\t\t\t'template' => 'manual_password_reminders',\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t),\r\n\t\t'profile_features' => array(\r\n\t\t\t'title' => $txt['manual_category_profile_features'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'profile_info' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_profile_info'],\r\n\t\t\t\t\t'template' => 'manual_profile_info_summary',\r\n\t\t\t\t\t'description' => $txt['manual_entry_profile_info_desc'],\r\n\t\t\t\t\t'subsections' => array(\r\n\t\t\t\t\t\t'summary' => array($txt['manual_entry_profile_info_summary'], 'template' => 'manual_profile_info_summary'),\r\n\t\t\t\t\t\t'posts' => array($txt['manual_entry_profile_info_posts'], 'template' => 'manual_profile_info_posts'),\r\n\t\t\t\t\t\t'stats' => array($txt['manual_entry_profile_info_stats'], 'template' => 'manual_profile_info_stats'),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t\t'modify_profile' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_modify_profile'],\r\n\t\t\t\t\t'template' => 'manual_modify_profile_settings',\r\n\t\t\t\t\t'description' => $txt['manual_entry_modify_profile_desc'],\r\n\t\t\t\t\t'subsections' => array(\r\n\t\t\t\t\t\t'settings' => array($txt['manual_entry_modify_profile_settings'], 'template' => 'manual_modify_profile_settings'),\r\n\t\t\t\t\t\t'forum' => array($txt['manual_entry_modify_profile_forum'], 'template' => 'manual_modify_profile_forum'),\r\n\t\t\t\t\t\t'look' => array($txt['manual_entry_modify_profile_look'], 'template' => 'manual_modify_profile_look'),\r\n\t\t\t\t\t\t'auth' => array($txt['manual_entry_modify_profile_auth'], 'template' => 'manual_modify_profile_auth'),\r\n\t\t\t\t\t\t'notify' => array($txt['manual_entry_modify_profile_notify'], 'template' => 'manual_modify_profile_notify'),\r\n\t\t\t\t\t\t'pm' => array($txt['manual_entry_modify_profile_pm'], 'template' => 'manual_modify_profile_pm'),\r\n\t\t\t\t\t\t'buddies' => array($txt['manual_entry_modify_profile_buddies'], 'template' => 'manual_modify_profile_buddies'),\r\n\t\t\t\t\t\t'groups' => array($txt['manual_entry_modify_profile_groups'], 'template' => 'manual_modify_profile_groups'),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t\t'actions' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_profile_actions'],\r\n\t\t\t\t\t'template' => 'manual_profile_actions_subscriptions',\r\n\t\t\t\t\t'description' => $txt['manual_entry_modify_profile_desc'],\r\n\t\t\t\t\t'subsections' => array(\r\n\t\t\t\t\t\t'subscriptions' => array($txt['manual_entry_profile_actions_subscriptions'], 'template' => 'manual_profile_actions_subscriptions'),\r\n\t\t\t\t\t\t'delete' => array($txt['manual_entry_profile_actions_delete'], 'template' => 'manual_profile_actions_delete'),\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'posting_basics' => array(\r\n\t\t\t'title' => $txt['manual_category_posting_basics'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t/*'posting_screen' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_posting_screen'],\r\n\t\t\t\t\t'template' => 'manual_posting_screen',\r\n\t\t\t\t),*/\r\n\t\t\t\t'posting_topics' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_posting_topics'],\r\n\t\t\t\t\t'template' => 'manual_posting_topics',\r\n\t\t\t\t),\r\n\t\t\t\t/*'quoting_posts' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_quoting_posts'],\r\n\t\t\t\t\t'template' => 'manual_quoting_posts',\r\n\t\t\t\t),\r\n\t\t\t\t'modifying_posts' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_modifying_posts'],\r\n\t\t\t\t\t'template' => 'manual_modifying_posts',\r\n\t\t\t\t),*/\r\n\t\t\t\t'smileys' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_smileys'],\r\n\t\t\t\t\t'template' => 'manual_smileys',\r\n\t\t\t\t),\r\n\t\t\t\t'bbcode' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_bbcode'],\r\n\t\t\t\t\t'template' => 'manual_bbcode',\r\n\t\t\t\t),\r\n\t\t\t\t/*'wysiwyg' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_wysiwyg'],\r\n\t\t\t\t\t'template' => 'manual_wysiwyg',\r\n\t\t\t\t),*/\r\n\t\t\t),\r\n\t\t),\r\n\t\t'personal_messages' => array(\r\n\t\t\t'title' => $txt['manual_category_personal_messages'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'messages' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_pm_messages'],\r\n\t\t\t\t\t'template' => 'manual_pm_messages',\r\n\t\t\t\t),\r\n\t\t\t\t/*'actions' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_pm_actions'],\r\n\t\t\t\t\t'template' => 'manual_pm_actions',\r\n\t\t\t\t),\r\n\t\t\t\t'preferences' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_pm_preferences'],\r\n\t\t\t\t\t'template' => 'manual_pm_preferences',\r\n\t\t\t\t),*/\r\n\t\t\t),\r\n\t\t),\r\n\t\t'forum_tools' => array(\r\n\t\t\t'title' => $txt['manual_category_forum_tools'],\r\n\t\t\t'description' => '',\r\n\t\t\t'areas' => array(\r\n\t\t\t\t'searching' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_searching'],\r\n\t\t\t\t\t'template' => 'manual_searching',\r\n\t\t\t\t),\r\n\t\t\t\t/*'memberlist' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_memberlist'],\r\n\t\t\t\t\t'template' => 'manual_memberlist',\r\n\t\t\t\t),\r\n\t\t\t\t'calendar' => array(\r\n\t\t\t\t\t'label' => $txt['manual_section_calendar'],\r\n\t\t\t\t\t'template' => 'manual_calendar',\r\n\t\t\t\t),*/\r\n\t\t\t),\r\n\t\t),\r\n\t);\r\n\r\n\t// Set a few options for the menu.\r\n\t$menu_options = array(\r\n\t\t'disable_url_session_check' => true,\r\n\t);\r\n\r\n\trequire_once($sourcedir . '/Subs-Menu.php');\r\n\t$manual_area_data = createMenu($manual_areas, $menu_options);\r\n\tunset($manual_areas);\r\n\r\n\t// Make a note of the Unique ID for this menu.\r\n\t$context['manual_menu_id'] = $context['max_menu_id'];\r\n\t$context['manual_menu_name'] = 'menu_data_' . $context['manual_menu_id'];\r\n\r\n\t// Get the selected item.\r\n\t$context['manual_area_data'] = $manual_area_data;\r\n\t$context['menu_item_selected'] = $manual_area_data['current_area'];\r\n\r\n\t// Set a title and description for the tab strip if subsections are present.\r\n\tif (isset($context['manual_area_data']['subsections']))\r\n\t\t$context[$context['manual_menu_name']]['tab_data'] = array(\r\n\t\t\t'title' => $manual_area_data['label'],\r\n\t\t\t'description' => isset($manual_area_data['description']) ? $manual_area_data['description'] : '',\r\n\t\t);\r\n\r\n\t// Bring it on!\r\n\t$context['sub_template'] = isset($manual_area_data['current_subsection'], $manual_area_data['subsections'][$manual_area_data['current_subsection']]['template']) ? $manual_area_data['subsections'][$manual_area_data['current_subsection']]['template'] : $manual_area_data['template'];\r\n\t$context['page_title'] = $manual_area_data['label'] . ' - ' . $txt['manual_smf_user_help'];\r\n\r\n\t// Build the link tree.\r\n\t$context['linktree'][] = array(\r\n\t\t'url' => $scripturl . '?action=help',\r\n\t\t'name' => $txt['help'],\r\n\t);\r\n\tif (isset($manual_area_data['current_area']) && $manual_area_data['current_area'] != 'index')\r\n\t\t$context['linktree'][] = array(\r\n\t\t\t'url' => $scripturl . '?action=admin;area=' . $manual_area_data['current_area'],\r\n\t\t\t'name' => $manual_area_data['label'],\r\n\t\t);\r\n\tif (!empty($manual_area_data['current_subsection']) && $manual_area_data['subsections'][$manual_area_data['current_subsection']][0] != $manual_area_data['label'])\r\n\t\t$context['linktree'][] = array(\r\n\t\t\t'url' => $scripturl . '?action=admin;area=' . $manual_area_data['current_area'] . ';sa=' . $manual_area_data['current_subsection'],\r\n\t\t\t'name' => $manual_area_data['subsections'][$manual_area_data['current_subsection']][0],\r\n\t\t);\r\n\r\n\t// We actually need a special style sheet for help ;)\r\n\t$context['template_layers'][] = 'manual';\r\n\r\n\t// The smiley info page needs some cheesy information.\r\n\tif ($manual_area_data['current_area'] == 'smileys')\r\n\t\tShowSmileyHelp();\r\n}",
"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 displayHelp()\n {\n $sHelp = \"\nUsage:\n$this->sViewName [options]\n\n$this->sTempalteDesc\n\nOptions:\\n\";\n\n $iMaxLength = 2;\n\n foreach ($this->hOptionList as $hOption)\n {\n if (isset($hOption['long']))\n {\n $iTemp = strlen($hOption['long']);\n\n if ($iTemp > $iMaxLength)\n {\n $iMaxLength = $iTemp;\n }\n }\n }\n\n foreach ($this->hOptionList as $hOption)\n {\n $bShort = isset($hOption['short']);\n $bLong = isset($hOption['long']);\n\n if (!$bShort && !$bLong)\n {\n continue;\n }\n\n if ($bShort && $bLong)\n {\n $sOpt = '-' . $hOption['short'] . ', --' . $hOption['long'];\n }\n elseif ($bShort && !$bLong)\n {\n $sOpt = '-' . $hOption['short'] . \"\\t\";\n }\n elseif (!$bShort && $bLong)\n {\n $sOpt = ' --' . $hOption['long'];\n }\n\n $sOpt = str_pad($sOpt, $iMaxLength + 7);\n $sHelp .= \"\\t$sOpt\\t\\t{$hOption['desc']}\\n\\n\";\n }\n\n die($sHelp . \"\\n\");\n }",
"public function help_callback(){\r\n if($this->help_static_file()) {\r\n echo self::read_help_file($this->help_static_file());\r\n }\r\n }",
"function dfcg_plugin_help() {\n\t\n\tglobal $current_screen;\n\t\n\t$sidebar = dfcg_help_sidebar();\n\t\n\t$current_screen->set_help_sidebar( $sidebar );\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-general',\n\t\t'title' => __( 'General info', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_general'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-theme',\n\t\t'title' => __( 'Theme integration', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_theme'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-quick',\n\t\t'title' => __( 'Quick Start', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_quick'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-gallery',\n\t\t'title' => __( 'Gallery Method', DFCG_DOMAIN ),\n\t\t'callback' => \"dfcg_help_gallery\"\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-images',\n\t\t'title' => __( 'Image Management', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_images'\n\t));\n\t\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-desc',\n\t\t'title' => __( 'Descriptions', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_desc'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-css',\n\t\t'title' => __( 'Gallery CSS', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_css'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-scripts',\n\t\t'title' => __( 'Load Scripts', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_scripts'\n\t));\n\n\t$current_screen->add_help_tab( array(\n\t\t'id' => 'dfcg-help-troubleshooting',\n\t\t'title' => __( 'Troubleshooting', DFCG_DOMAIN ),\n\t\t'callback' => 'dfcg_help_trouble'\n\t));\n}",
"public function customizer_help() {\n\t\techo '\n\t\t<li>\n\t\t\t<p>\n\t\t\t\t' . __( 'Example text:', 'hellish-simplicity' ) . ' <code>' . esc_html( $this->default_header_text ) . '</code>\n\t\t\t</p>\n\t\t</li>';\n\t}",
"public function getExtendedHelpMessage()\n {\n $out = $this->getHelpMessage() . \"\\n\";\n\n $out .= \"Usage: summary [--short] [module]\\n\"\n . \"Show the summary of the most recent results of each module.\\n\"\n . \"If a module name is provided as an argument, it\\n\"\n . \"will display only the summary for that module.\\n\\n\"\n . \"This is the default module that is run when no\\n\"\n . \"module name is given when running qis.\\n\";\n\n $out .= \"\\nValid Options:\\n\"\n . $this->_qis->getTerminal()->do_setaf(3)\n . \" --short : Show only short information\\n\"\n . $this->_qis->getTerminal()->do_op();\n\n return $out;\n }",
"public function setHelp($help)\n {\n $this->help = $help;\n return $this;\n }",
"public function getHelp(): string\n {\n return $this->help;\n }",
"public function help(){\n\t\t$screen = get_current_screen();\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/installing\" target=\"_blank\">' . __( 'Installing the Plugin', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/staying-updated\" target=\"_blank\">' . __( 'Staying Updated', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/glossary\" target=\"_blank\">' . __( 'Glossary', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-general-info',\n\t\t\t'title' => __( 'General Info', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-interface\" target=\"_blank\">' . __( 'Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-creating\" target=\"_blank\">' . __( 'Creating a New Form', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-sorting\" target=\"_blank\">' . __( 'Sorting Your Forms', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/forms-building\" target=\"_blank\">' . __( 'Building Your Forms', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-forms',\n\t\t\t'title' => __( 'Forms', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-interface\" target=\"_blank\">' . __( 'Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-managing\" target=\"_blank\">' . __( 'Managing Your Entries', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/entries-searching-filtering\" target=\"_blank\">' . __( 'Searching and Filtering Your Entries', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-entries',\n\t\t\t'title' => __( 'Entries', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/email-design\" target=\"_blank\">' . __( 'Email Design Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/analytics\" target=\"_blank\">' . __( 'Analytics Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-email-analytics',\n\t\t\t'title' => __( 'Email Design & Analytics', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/import\" target=\"_blank\">' . __( 'Import Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/export\" target=\"_blank\">' . __( 'Export Interface Overview', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-import-export',\n\t\t\t'title' => __( 'Import & Export', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<ul>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/conditional-logic\" target=\"_blank\">' . __( 'Conditional Logic', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/templating\" target=\"_blank\">' . __( 'Templating', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/documentation/custom-capabilities\" target=\"_blank\">' . __( 'Custom Capabilities', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '<li><a href=\"http://vfbpro.com/hooks\" target=\"_blank\">' . __( 'Filters and Actions', 'visual-form-builder-pro' ) . '</a></li>';\n\t\t$help .= '</ul>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-advanced',\n\t\t\t'title' => __( 'Advanced Topics', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t\t$help = '<p>' . __( '<strong>Always load CSS</strong> - Force Visual Form Builder Pro CSS to load on every page. Will override \"Disable CSS\" option, if selected.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable CSS</strong> - Disable CSS output for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable Email</strong> - Disable emails from sending for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable Notifications Email</strong> - Disable notification emails from sending for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Skip Empty Fields in Email</strong> - Fields that have no data will not be displayed in the email.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable saving new entry</strong> - Disable new entries from being saved.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable saving entry IP address</strong> - An entry will be saved, but the IP address will be removed.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Place Address labels above fields</strong> - The Address field labels will be placed above the inputs instead of below.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Remove default SPAM Verification</strong> - The default SPAM Verification question will be removed and only a submit button will be visible.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Disable meta tag version</strong> - Prevent the hidden Visual Form Builder Pro version number from printing in the source code.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Skip PayPal redirect if total is zero</strong> - If PayPal is configured, do not redirect if the total is zero.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Prepend Confirmation</strong> - Always display the form beneath the text confirmation after the form has been submitted.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Max Upload Size</strong> - Restrict the file upload size for all forms.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>Sender Mail Header</strong> - Control the Sender attribute in the mail header. This is useful for certain server configurations that require an existing email on the domain to be used.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>reCAPTCHA Public Key</strong> - Required if \"Use reCAPTCHA\" option is selected in the Secret field.', 'visual-form-builder-pro' ) . '</p>';\n\t\t$help .= '<p>' . __( '<strong>reCAPTCHA Private Key</strong> - Required if \"Use reCAPTCHA\" option is selected in the Secret field.', 'visual-form-builder-pro' ) . '</p>';\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'vfb-help-tab-settings',\n\t\t\t'title' => __( 'Settings', 'visual-form-builder-pro' ),\n\t\t\t'content' => $help,\n\t\t) );\n\n\t}",
"function help($choice = null) {\r\n if($choice) {\r\n $this->help = true;\r\n } else {\r\n $this->help = false;\r\n }\r\n return true;\r\n }",
"public function get_help_tabs()\n {\n }",
"public static function help($name)\n {\n self::create($name)->renderHelp();\n }",
"public function getHelp()\n\t{\n\t\treturn $this->run(array('help'));\n\t}",
"public function getHelp()\n {\n $this->parseDocBlock();\n return $this->help;\n }",
"protected function getQuickHelp() {\r\n $strOldAction = $this->getAction();\r\n $this->setAction($this->strOriginalAction);\r\n $strQuickhelp = parent::getQuickHelp();\r\n $this->setAction($strOldAction);\r\n return $strQuickhelp;\r\n }",
"function setHelp($help)\n {\n $this->form->_help = true;\n $this->help = $help;\n }",
"public function longHelp()\n {\n return <<<LONGHELP\n\n __ __ _____ _\n | \\/ | __ _ __ _ ___| ___| | _____ __\n | |\\/| |/ _` |/ _` |/ _ \\ |_ | |/ _ \\ \\ /\\ / /\n | | | | (_| | (_| | __/ _| | | (_) \\ V V /\n |_| |_|\\__,_|\\__, |\\___|_| |_|\\___/ \\_/\\_/\n __ __ |___/_\n | \\/ | ___ __| (_) __ _\n | |\\/| |/ _ \\/ _` | |/ _` |\n | | | | __/ (_| | | (_| |\n |_|_ |_|\\___|\\__,_|_|\\__,_|\n |_ _|_ __ __| | _____ _____ _ __\n | || '_ \\ / _` |/ _ \\ \\/ / _ \\ '__|\n | || | | | (_| | __/> < __/ |\n |___|_| |_|\\__,_|\\___/_/\\_\\___|_|\n\n\n LICENSE AND COPYRIGHT NOTICE\n\n PLEASE READ THIS SOFTWARE LICENSE AGREEMENT (\"LICENSE\") CAREFULLY\n BEFORE USING THE SOFTWARE. BY USING THE SOFTWARE, YOU ARE AGREEING\n TO BE BOUND BY THE TERMS OF THIS LICENSE.\n IF YOU DO NOT AGREE TO THE TERMS OF THIS LICENSE, DO NOT USE THE SOFTWARE.\n\n Full text of this license is available @license\n\n @license http://mageflow.com/license/connector/eula.txt MageFlow EULA\n @author MageFlow\n @copyright 2014 MageFlow http://mageflow.com/\n\n GENERAL INFO\n\n This script will create or update Media Index. Media Index is an up-to-date list of\n all media files under WYSIWYG folder in Magento media folder.\n\n\nLONGHELP;\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$help [__CLASS__] [\"text\"] [] .= \"Zabbix Host Interface :\";\n\t\t$help = array_merge ( $help, zabbix_common_interface::help () );\n\t\t\n\t\treturn $help;\n\t}",
"public function getHelp()\n {\n return $this->run(array(\n 'help'\n ));\n }",
"public function getHelp() {\n\t\treturn $this->help;\n\t}",
"public function getHelp() {\n\t\treturn $this->help;\n\t}",
"public function getHelp()\n {\n new Help('form');\n }",
"public function get_help(){\n $tmp=self::_pipeExec('\"'.$this->cmd.'\" --extended-help');\n return $tmp['stdout'];\n }",
"public static function end_help()\n\t{\n\t\treturn <<<HTML\n\t</div>\n</div>\nHTML;\n\t}",
"function help()\n\t{\n\t\t/* check if all required plugins are installed */\n\t\t\n\t\t$text = \"<div class='center buttons-bar'><form method='post' action='\".e_SELF.\"?\".e_QUERY.\"' id='core-db-import-form'>\";\n\t\t$text .= e107::getForm()->admin_button('importThemeDemo', 'Install Demo', 'other');\n\t\t$text .= '</form></div>';\n \n\t \treturn $text;\n\t}",
"function is_help($arg)\n{\n\tif ($arg === \"--help\" || $arg === \"-h\")\n\t\treturn true;\n\treturn false;\n}",
"public static function getHelpBlock($text)\n {\n return \"<p class=\\\"help-block\\\">{$text}</p>\";\n }",
"function foodpress_admin_help_tab_content() {\r\n\t$screen = get_current_screen();\r\n\r\n\t$screen->add_help_tab( array(\r\n\t 'id'\t=> 'foodpress_overview_tab',\r\n\t 'title'\t=> __( 'Overview', 'foodpress' ),\r\n\t 'content'\t=>\r\n\r\n\t \t'<p>' . __( 'Thank you for using FoodPress plugin. ', 'foodpress' ). '</p>'\r\n\r\n\t) );\r\n\r\n\r\n\r\n\r\n\t$screen->set_help_sidebar(\r\n\t\t'<p><strong>' . __( 'For more information:', 'foodpress' ) . '</strong></p>' .\r\n\t\t'<p><a href=\"http://demo.myfoodpress.com/\" target=\"_blank\">' . __( 'foodpress Demo', 'foodpress' ) . '</a></p>' .\r\n\t\t\r\n\t\t'<p><a href=\"http://demo.myfoodpress.com/documentation/\" target=\"_blank\">' . __( 'Documentation', 'foodpress' ) . '</a></p>'.\r\n\t\t'<p><a href=\"https://foodpressplugin.freshdesk.com/support/home/\" target=\"_blank\">' . __( 'Support', 'foodpress' ) . '</a></p>'\r\n\t);\r\n}",
"function GetHelp()\n {\n return $this->Lang('help');\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\"] [] .= \"Zabbix Interface :\";\n\t\t$help [__CLASS__] [\"text\"] [] .= \"\\t--zabbix_interface_ip 10.10.10.10 IP du CI\";\n\t\t$help [__CLASS__] [\"text\"] [] .= \"\\t--zabbix_interface_fqdn ci.client.fr.ghc.local FQDN du CI\";\n\t\t$help [__CLASS__] [\"text\"] [] .= \"\\t--zabbix_interface_resolv_fqdn IP|FQDN Si l'IP et le FQDN son fourni, permet de connaitre la methode a utiliser pour contacter le CI\";\n\t\t\n\t\treturn $help;\n\t}",
"public static function configureHelp(Help $help);",
"public function help()\r\n{\r\n // You could include a file and return it here.\r\n return \"No documentation has been added for this module.<br />Contact the module developer for assistance.\";\r\n}",
"public static function getAllHelp()\n {\n return $this->_help;\n }",
"function showHelp()\n{\n global $cli;\n\n $cli->writeln(sprintf(_(\"Usage: %s [OPTIONS]...\"), basename(__FILE__)));\n $cli->writeln();\n $cli->writeln(_(\"Mandatory arguments to long options are mandatory for short options too.\"));\n $cli->writeln();\n $cli->writeln(_(\"-h, --help Show this help\"));\n $cli->writeln(_(\"-u, --username[=username] Horde login username\"));\n $cli->writeln(_(\"-p, --password[=password] Horde login password\"));\n $cli->writeln(_(\"-t, --type[=type] Export format\"));\n $cli->writeln(_(\"-r, --rpc[=http://example.com/horde/rpc.php] Remote url\"));\n $cli->writeln();\n}",
"function helps()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['helps'] == 1 ) ? 'Help File' : 'Help Files';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'removed' : 'created';\n\t\t$helpkeys = array();\n\t\t\n\t\tforeach ( $this->xml_array['helps_group']['help'] as $k => $v )\n\t\t{\n\t\t\t$helpkeys[] = \"'{$v['title']['VALUE']}'\";\n\t\t}\n\t\t\n\t\t$this->ipsclass->DB->do_delete( 'faq', \"title IN (\".implode( \",\", $helpkeys ).\")\" );\n\t\t\n\t\tif ( !$this->ipsclass->input['un'] )\n\t\t{\n\t\t\tforeach ( $this->xml_array['helps_group']['help'] as $k => $v )\n\t\t\t{\n\t\t\t\t$this->_add_help( $v );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&code=work&mod={$this->ipsclass->input['mod']}&step={$this->ipsclass->input['step']}{$uninstall}{$group}&st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['helps']} {$object} {$operation}....\" );\n\t}",
"public function help_tab(){\r\n $screen = get_current_screen();\r\n\r\n foreach($this->what_helps as $help_id => $tab) {\r\n $callback_name = $this->generate_callback_name($help_id);\r\n if(method_exists($this, 'help_'.$callback_name.'_callback')) {\r\n $callback = array($this, 'help_'.$callback_name.'_callback');\r\n }\r\n else {\r\n $callback = array($this, 'help_callback');\r\n }\r\n // documentation tab\r\n $screen->add_help_tab( array(\r\n 'id' => 'hw-help-'.$help_id,\r\n 'title' => __( $tab['title'] ),\r\n //'content' => \"<p>sdfsgdgdfghfhfgh</p>\",\r\n 'callback' => $callback\r\n )\r\n );\r\n }\r\n }",
"function builder_set_help_sidebar() {\n\tob_start();\n\t\n?>\n<p><strong><?php _e( 'For more information:', 'it-l10n-Builder-Everett' ); ?></strong></p>\n<p><?php _e( '<a href=\"http://ithemes.com/forum/\" target=\"_blank\">Support Forum</a>' ); ?></p>\n<p><?php _e( '<a href=\"http://ithemes.com/codex/page/Builder\" target=\"_blank\">Codex</a>' ); ?></p>\n<?php\n\t\n\t$help = ob_get_contents();\n\tob_end_clean();\n\t\n\t$help = apply_filters( 'builder_filter_help_sidebar', $help );\n\t\n\tif ( ! empty( $help ) ) {\n\t\t$screen = get_current_screen();\n\t\t\n\t\tif ( is_callable( array( $screen, 'set_help_sidebar' ) ) )\n\t\t\t$screen->set_help_sidebar( $help );\n\t}\n}",
"public function displayHelp()\n\t{\n\t\t$obj = MpmCommandLineWriter::getInstance();\n\t\t$obj->addText('./migrate.php latest [--force]');\n\t\t$obj->addText(' ');\n\t\t$obj->addText('This command is used to migrate up to the most recent version. No arguments are required.');\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 latest', 4);\n\t\t$obj->addText('./migrate.php latest --force', 4);\n\t\t$obj->write();\n\t}",
"function bi_suggestion_help_text( $contextual_help, $screen_id, $screen ) {\n if ( 'library' == $screen->id ) {\n $contextual_help =\n '<p>' . __('Things to remember when adding or editing a suggestion:') . '</p>' .\n '<p>' . __('If you want to schedule the suggestion to be published in the future:') . '</p>' .\n '<ul>' .\n '<li>' . __('Under the Publish module, click on the Edit link next to Publish.') . '</li>' .\n '<li>' . __('Change the date to the date to actual publish this suggestion, then click on Ok.') . '</li>' .\n '</ul>';\n } elseif ( 'edit-suggestion' == $screen->id ) {\n $contextual_help = \n '<p>' . __('This is the help screen displaying the table of suggestion blah blah blah.') . '</p>' ;\n }\n return $contextual_help;\n}",
"public static function render_help() {\n\n // Grab the current screen\n $screen = get_current_screen();\n\n }",
"public function getHelp()\n\t{\n\t return '<info>Console Tool</info>';\n\t}",
"function getHelp()\n {\n return $this->help;\n }",
"public function custom_help_tab() {\n\n\t\t\t$screen = get_current_screen();\n\n\t\t\t// Return early if we're not on the needed post type.\n\t\t\tif ( ( $this->object_type == 'post' && $this->object != $screen->post_type ) || \n\t\t\t\t ( $this->object_type == 'taxonomy' && $this->object != $screen->taxonomy ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Add the help tabs.\n\t\t\tforeach ( $this->args->help_tabs as $tab ) {\n\t\t\t\t$screen->add_help_tab( $tab );\n\t\t\t}\n\n\t\t\t// Add the help sidebar.\n\t\t\t$screen->set_help_sidebar( $this->args->help_sidebar );\n\t\t}",
"function help($message = null) {\n if (!is_null($message))\n echo($message.NL.NL);\n\n $self = baseName($_SERVER['PHP_SELF']);\n\necho <<<HELP\n\n Syntax: $self [symbol ...]\n\n\nHELP;\n}",
"function exampleHelpFunction()\n {\n //用法 >> exampleHelpFunction() \n return '這樣就能使用全域function了!';\n }",
"public function testHelpCommand(): void\n {\n $this->assertNotFalse(\n $this->artisan($signature = $this->getCommandSignature(), ['--help']),\n sprintf('Command \"%s\" does not return help message', $signature)\n );\n }",
"public function help()\n {\n echo PHP_EOL;\n $output = new Output;\n $output->write('Available Commands', [\n 'color' => 'red',\n 'bold' => true,\n 'underline' => true,\n ]);\n echo PHP_EOL;\n\n $maxlen = 0;\n foreach ($this->supportedArgs as $key => $description) {\n $len = strlen($key);\n if ($len > $maxlen) {\n $maxlen = $len;\n }\n\n }\n\n foreach ($this->supportedArgs as $key => $description) {\n $len = strlen($key);\n $output->write(' ')\n ->write($key, ['color' => 'yellow'])\n ->write(str_repeat(' ', $maxlen - $len))\n ->write(' - ')\n ->write($description);\n\n echo PHP_EOL;\n }\n\n echo PHP_EOL;\n\n }",
"public function setHelp(string $help): static\n {\n $this->help = $help;\n\n return $this;\n }",
"public function getHelpMessage()\n {\n return \"Get summary of a module or all modules\\n\";\n }",
"private function displayHelpMessage() {\n $message = \"ClassDumper help:\\n\n -h : displays this help message\\n\n -f (directory 1 directory 2 ... directory n) : \n parses those directories\\n\n -t (xml / yaml) : selects type of serialization\\n\n (no args) : parses working directory in YAML format\\n\";\n\n echo $message;\n die('ShrubRoots ClassDumper v0.991');\n }",
"private static function set_advanced_help_texts() {\n\t\tself::$help_texts['advanced'] = array(\n\t\t\t'pt_single' => __( 'Replaced with the content type single label', 'wordpress-seo' ),\n\t\t\t'pt_plural' => __( 'Replaced with the content type plural label', 'wordpress-seo' ),\n\t\t\t'modified' => __( 'Replaced with the post/page modified time', 'wordpress-seo' ),\n\t\t\t'id' => __( 'Replaced with the post/page ID', 'wordpress-seo' ),\n\t\t\t'name' => __( 'Replaced with the post/page author\\'s \\'nicename\\'', 'wordpress-seo' ),\n\t\t\t'user_description' => __( 'Replaced with the post/page author\\'s \\'Biographical Info\\'', 'wordpress-seo' ),\n\t\t\t'userid' => __( 'Replaced with the post/page author\\'s userid', 'wordpress-seo' ),\n\t\t\t'currenttime' => __( 'Replaced with the current time', 'wordpress-seo' ),\n\t\t\t'currentdate' => __( 'Replaced with the current date', 'wordpress-seo' ),\n\t\t\t'currentday' => __( 'Replaced with the current day', 'wordpress-seo' ),\n\t\t\t'currentmonth' => __( 'Replaced with the current month', 'wordpress-seo' ),\n\t\t\t'currentyear' => __( 'Replaced with the current year', 'wordpress-seo' ),\n\t\t\t'page' => __( 'Replaced with the current page number with context (i.e. page 2 of 4)', 'wordpress-seo' ),\n\t\t\t'pagetotal' => __( 'Replaced with the current page total', 'wordpress-seo' ),\n\t\t\t'pagenumber' => __( 'Replaced with the current page number', 'wordpress-seo' ),\n\t\t\t'caption' => __( 'Attachment caption', 'wordpress-seo' ),\n\t\t\t'focuskw' => __( 'Replaced with the posts focus keyword', 'wordpress-seo' ),\n\t\t\t'term404' => __( 'Replaced with the slug which caused the 404', 'wordpress-seo' ),\n\t\t\t'cf_<custom-field-name>' => __( 'Replaced with a posts custom field value', 'wordpress-seo' ),\n\t\t\t'ct_<custom-tax-name>' => __( 'Replaced with a posts custom taxonomies, comma separated.', 'wordpress-seo' ),\n\t\t\t'ct_desc_<custom-tax-name>' => __( 'Replaced with a custom taxonomies description', 'wordpress-seo' ),\n\t\t);\n\t}",
"public function help()\n {\n $help = file_get_contents(BUILTIN_SHELL_HELP . 'list.txt');\n $this->put($help);\n }",
"protected function displayHelp()\n {\n return $this->context->smarty->fetch($this->module->getLocalPath().'views/templates/admin/rewards_info.tpl');\n }",
"public function getHelpMessage() { return $this->data['helpMessage']; }",
"function helpLink() {\n\t\t// By default it's an (external) URL, hence not a valid Title.\n\t\t// But because MediaWiki is by nature very customizable, someone\n\t\t// might've changed it to point to a local page. Tricky!\n\t\t// @see https://phabricator.wikimedia.org/T155319\n\t\t$helpPage = $this->msg( 'helppage' )->inContentLanguage()->plain();\n\t\tif ( preg_match( '/^(?:' . wfUrlProtocols() . ')/', $helpPage ) ) {\n\t\t\t$helpLink = Linker::makeExternalLink(\n\t\t\t\t$helpPage,\n\t\t\t\t$this->msg( 'help' )->plain()\n\t\t\t);\n\t\t} else {\n\t\t\t$helpLink = MediaWikiServices::getInstance()->getLinkRenderer()->makeKnownLink(\n\t\t\t\tTitle::newFromText( $helpPage ),\n\t\t\t\t$this->msg( 'help' )->text()\n\t\t\t);\n\t\t}\n\t\treturn $helpLink;\n\t\t// This doesn't work with the default value of 'helppage' which points to an external URL\n\t\t// return $this->footerLink( 'help', 'helppage' );\n\t}",
"public function getProcessedHelp(): string\n {\n $name = $this->name;\n $isSingleCommand = $this->application?->isSingleCommand();\n\n $placeholders = [\n '%command.name%',\n '%command.full_name%',\n ];\n $replacements = [\n $name,\n $isSingleCommand ? $_SERVER['PHP_SELF'] : $_SERVER['PHP_SELF'].' '.$name,\n ];\n\n return str_replace($placeholders, $replacements, $this->getHelp() ?: $this->getDescription());\n }",
"function fgallery_plugin_help($contextual_help, $screen_id, $screen) {\n if ($screen_id == 'toplevel_page_fgallery' || $screen_id == '1-flash-gallery_page_fgallery_add'\n || $screen_id == '1-flash-gallery_page_fgallery_add' || $screen_id == '1-flash-gallery_page_fgallery_images'\n || $screen_id == '1-flash-gallery_page_fgallery_upload') {\n $contextual_help = '<p><a href=\"http://1plugin.com/faq\" target=\"_blank\">'.__('FAQ').'</a></p>';\n }\n return $contextual_help;\n}",
"public static function help_inner () \n { \n $html = null;\n\n $top = __( 'Instruction Manual', 'label' );\n $inner = self::help_center();\n $bottom = self::page_foot();\n\n $html .= self::page_body( 'help', $top, $inner, $bottom );\n\n return $html;\n }",
"private function _getHelp( $options )\n {\n if ( $options->getHelp() ) {\n return '<p class=\"help-block\">'.$options->getHelp().'</p> ';\n } else {\n return '';\n }\n }",
"function admin_hide_help() { \n $screen = get_current_screen();\n $screen->remove_help_tabs();\n}",
"public function showGeneralHelp(Context $context)\n {\n $sortedSwitches = $context->phixDefinedSwitches->getSwitchesInDisplayOrder();\n\n $so = $context->stdout;\n\n $so->output($context->highlightStyle, \"phix \" . $context->version);\n $so->outputLine($context->urlStyle, ' http://gradwell.github.com');\n $so->outputLine(null, 'Copyright (c) 2010 Gradwell dot com Ltd. Released under the BSD license');\n $so->outputBlankLine();\n $this->showPhixSwitchSummary($context, $sortedSwitches);\n $this->showPhixSwitchDetails($context, $sortedSwitches);\n $this->showCommandsList($context);\n }",
"public function helpStubCommand() {}",
"public function getHelpLines()\n {\n return array(\n 'Usage: php [function] [full]',\n '[function] - the PHP function you want to search for',\n //'[full] (optional) - add \"full\" after the function name to include the description',\n 'Returns information about the specified PHP function'\n );\n }",
"public function renderHelp()\n {\n $this->renderHeader();\n\n echo Line::begin('Usage:', Line::YELLOW)->nl();\n echo Line::begin()\n ->indent(2)\n ->text($this->getUsage())\n ->nl(2);\n\n // Options\n echo Line::begin('Options:', Line::YELLOW)->nl();\n echo Line::begin()\n ->indent(2)\n ->text('--help', Line::MAGENTA)\n ->to(21)\n ->text('-h', Line::MAGENTA)\n ->text('Display this help message.')\n ->nl(1);\n\n $attributes = $this->attributeNames();\n $help = $this->attributeHelp();\n\n sort($attributes);\n\n foreach ($attributes as $name) {\n echo Line::begin()\n ->indent(2)\n ->text(\"--$name\", Line::MAGENTA)\n ->to(24)\n ->text(isset($help[$name]) ? $help[$name] : '')\n ->nl();\n }\n\n exit(0);\n }",
"static function help($command) {\n return 'TO-DO';\n }",
"public static function help() {\n\t\tWP_CLI::line( <<<EOB\nusage: wp core update\n or: wp core version [--extra]\n or: wp core install --site_url=example.com --site_title=<site-title> [--admin_name=<username>] --admin_password=<password> --admin_email=<email-address>\nEOB\n\t);\n\t}"
] | [
"0.78585654",
"0.7163232",
"0.71136975",
"0.69553405",
"0.68480325",
"0.6844482",
"0.67940307",
"0.6790145",
"0.6789163",
"0.6789163",
"0.6789163",
"0.6787876",
"0.6686592",
"0.66720545",
"0.6646073",
"0.66112876",
"0.6610647",
"0.6557137",
"0.6535637",
"0.6472542",
"0.64658606",
"0.64623743",
"0.63972676",
"0.63928974",
"0.63891006",
"0.63486135",
"0.6343709",
"0.6308633",
"0.62740856",
"0.6260039",
"0.62287444",
"0.6225935",
"0.6213819",
"0.62131107",
"0.6194096",
"0.6190205",
"0.6185766",
"0.6181129",
"0.6156707",
"0.6152947",
"0.6123926",
"0.6122613",
"0.61218154",
"0.6114455",
"0.6109506",
"0.6073861",
"0.607262",
"0.6065489",
"0.6063953",
"0.6056444",
"0.60486275",
"0.603957",
"0.6039509",
"0.60239345",
"0.60197544",
"0.60197544",
"0.60075283",
"0.6004869",
"0.60043526",
"0.5996147",
"0.5993641",
"0.59912425",
"0.5991096",
"0.5989498",
"0.5985488",
"0.5962154",
"0.5944172",
"0.5940982",
"0.59383607",
"0.59284204",
"0.59258616",
"0.59202164",
"0.5918434",
"0.59158957",
"0.5906683",
"0.5905849",
"0.5886841",
"0.58782804",
"0.5877193",
"0.5875547",
"0.5863563",
"0.58617723",
"0.58542013",
"0.58399546",
"0.5834381",
"0.5830138",
"0.5829566",
"0.58280843",
"0.58277",
"0.58237445",
"0.5819054",
"0.5812626",
"0.58072335",
"0.5800758",
"0.5797137",
"0.57970387",
"0.5793416",
"0.57912827",
"0.57818663",
"0.5779044",
"0.5777022"
] | 0.0 | -1 |
Get how powerful the referenced flavor is for this berry. | public function getPotency(): int
{
return $this->potency;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getFlavors()\r\n{\r\n return array(\"grasshopper\",\"maple\",\"carrot\", \"caramel\",\"velvet\",\"lemon\",\"tiramisu\");\r\n}",
"public function getHot()\n {\n return $this->hot;\n }",
"public function getQuality();",
"public function getQuality();",
"public function getQuality()\n {\n return $this->Quality;\n }",
"public function getWeight()\n {\n return $this->getTypeInstance(true)->getWeight($this);\n }",
"public function getQuality()\n {\n return $this->_quality;\n }",
"public function getQuality()\n {\n return $this->quality;\n }",
"public function getQuality()\n {\n return $this->quality;\n }",
"public function get_quality()\n {\n }",
"public function getCalculatedQuality()\n {\n $this->processQualityOptionIfNotAlready();\n return $this->calculatedQuality;\n }",
"public function getQuality() {\n\t\treturn $this->_quality;\n\t}",
"public function getPothexchrate()\n {\n return $this->pothexchrate;\n }",
"public function getQuality()\r\n\t{\r\n\t\t$quality = 0;\r\n\r\n\t\tforeach ($this->_sum('quality')->result() as $row) \r\n\t\t\t$quality = $row->quality;\r\n\r\n\t\treturn $quality;\r\n\t}",
"function getQuality() {return $this->_quality;}",
"public function getBerry(): Berry\n {\n return $this->berry;\n }",
"public function getColdNumber()\n {\n return $this->cold_number;\n }",
"public function getPothexchctry()\n {\n return $this->pothexchctry;\n }",
"public function getWeight() {\n return $this->item->getWeight();\n }",
"public function size()\n {\n return 100 - $this->eaten;\n }",
"public function getBrightness()\n {\n if (isset($this->a_State['bri']))\n {\n return($this->a_State['bri']);\n } /* if */\n else\n {\n return(null);\n } /* else */\n }",
"public function fat()\n\t{\n\t\treturn $this->macronutrients()['fat'];\n\t}",
"public function carFuel()\n {\n return parent::getFuel();\n }",
"public function animalBreedingLimitation() {\n return $this->animal->breeding_limitation;\n }",
"public function getCurrentAmmo() {\n return $this->currentAmmo;\n }",
"public function getFood()\n {\n return $this->food;\n }",
"private function getVentureBonus(){\n\t\treturn $this->ventureBonus ? 2 : 1;\n\t}",
"function GetMatchesMoreSkin()\n {\n return $this->more_skin_matches;\n }",
"public function cost() {\n $cost = $this->beverage->cost();\n switch ($this->beverage->getSize()) {\n case 'tall':\n $cost += 1;\n break;\n case 'grande':\n $cost += 3;\n break;\n case 'venti':\n $cost += 6;\n break;\n }\n return $cost;\n }",
"public function getBoost()\n {\n return $this->_boost;\n }",
"private function getWeight()\n\t{\n\t\treturn $this->cart->getWeight();\n\t}",
"public function getQuality()\n {\n $value = $this->get(self::quality);\n return $value === null ? (double)$value : $value;\n }",
"public function get_questions_quality()\n\t{\n\t\treturn $this->questions_quality;\n\t}",
"public function getHire()\n {\n return $this->get(self::_HIRE);\n }",
"public function getCible()\n {\n return $this->cible;\n }",
"public function bronze(): int\n {\n return $this->pluck('definedTrophies.bronze');\n }",
"function getWeight() {\n return $this->weight;\n }",
"public function getQuantite()\n {\n return $this->quantite;\n }",
"public function getItemBreakdown() {\n echo 'Cone type: '.$this->coneType['name'].'- $'.number_format($this->coneType['price'], 2).\"\\n\";\n echo \"Flavors used:\\n\";\n foreach ($this->scoops as $scoop) {\n echo ' '.$scoop['name'].' - $'.number_format($scoop['price'], 2).\"\\n\";\n }\n echo \"\\n\\n\";\n }",
"public function getServiceCharge()\n {\n return $this->service_charge;\n }",
"public function getBoost() {}",
"public function getDamageMultiplier() {\n return $this->damageMultiplier();\n }",
"public function getFreight()\n {\n return $this->freight;\n }",
"public function getWeight() {\n }",
"public function getHot(){\n return array_get($this->hot,$this->c_hot,'[N\\A]');\n }",
"public function getQualityIndex()\r\n {\r\n return $this->quality;\r\n }",
"public function HrebStatus() {\r\n return $this->compliance->getHrebStatus();\r\n }",
"public function getWeight()\n {\n return $this->weight;\n }",
"public function getWeight()\n {\n return $this->weight;\n }",
"public function getWeight()\n {\n return $this->weight;\n }",
"public function getWeight()\n {\n return $this->weight;\n }",
"public function getWeight()\n {\n return $this->weight;\n }",
"public function getWeight()\n {\n return $this->weight;\n }",
"public function getWeight();",
"public function getWeight();",
"public function getWeight();",
"public function getWeight();",
"public function getWeight();",
"public function getWeight();",
"public function getWeight();",
"public function getFieldBoosts() {\n return $this->_fieldBoosts;\n }",
"public function getGlossary();",
"public function getFrightCostHint()\n\t{\n\t\treturn $this->getAurednikOrder()->getData('aurednik_order_fright_information');\n\t}",
"public function getMinSpellBonusDamage(){\r\n\t $result = min($this->getSpellBonusDamageArcane(),\r\n \t\t\t\t\t$this->getSpellBonusDamageFire(),\r\n \t\t\t\t\t$this->getSpellBonusDamageFrost(),\r\n\t\t\t\t\t$this->getSpellBonusDamageHoly(),\r\n \t\t\t\t\t$this->getSpellBonusDamageNature(),\r\n \t\t\t\t\t$this->getSpellBonusDamageShadow());\r\n\t return $result;\r\n\t}",
"public function print_flavors()\n {\n $flavors = $this->service->FlavorList();\n while($flavor = $flavors->Next()) {\n printf(\"%2d) Flavor %s has %dMB of RAM, %d vCPUs and %dGB of disk\\n\",\n $flavor->id, $flavor->name, $flavor->ram, $flavor->vcpus, $flavor->disk);\n }\n }",
"public function getWeight() {\n return $this->weight;\n }",
"public function getSparePower() {\r\n return $this->getMaxPower() - $this->getUsedPower();\r\n }",
"public function getBelKe17()\n {\n return $this->bel_ke_17;\n }",
"public function silver(): int\n {\n return $this->pluck('definedTrophies.silver');\n }",
"public function getPower()\n {\n return $this->power;\n }",
"public function getWeightClass() {}",
"public function getCharged()\n {\n return $this->charged;\n }",
"function get_weight() {\n\t\tif ($this->data['weight']) return $this->data['weight'];\n\t}",
"public function getGrowthFactor()\n {\n return $this->growth_factor;\n }",
"public function getProducts_attributes_weight() {\n\t\treturn $this->products_attributes_weight;\n\t}",
"public function GetHands(){\r\n\t \r\n\t\treturn $this -> hands;\r\n\t }",
"public function getBonus()\n {\n return $this->bonus;\n }",
"public function getBonus()\n {\n return $this->bonus;\n }",
"public function getBonus()\n {\n return $this->bonus;\n }",
"public static function getLowestQuality(): int\n {\n return static::$lowestQuality;\n }",
"public function getProdRelated()\n {\n return $this->prod_related;\n }",
"public function getGc()\n {\n return $this->get('gc');\n }",
"public function cost(): float\n {\n if ($this->beverage->isSmallSize()) {\n return 0.10 + $this->beverage->cost();\n }\n\n if ($this->beverage->isMediumSize()) {\n return 0.15 + $this->beverage->cost();\n }\n\n if ($this->beverage->isLargeSize()) {\n return 0.20 + $this->beverage->cost();\n }\n\n return 0.20 + $this->beverage->cost();\n }",
"public function getFavColour();",
"public function getLegs()\n {\n return $this->Legs;\n }",
"public function getproduct_feathered()\n\t\t{\n\t\t\t$query = \"SELECT * FROM tbl_product WHERE type = '0'\";\n\t\t\t$result = $this->db->select($query);\n\t\t\treturn $result;\n\t\t}",
"public function getClothingSize()\n {\n return $this->clothingSize;\n }",
"public function getBuyBattleChance()\n {\n return $this->get(self::_BUY_BATTLE_CHANCE);\n }",
"public function getCharger(): Charger\n {\n return $this -> charger_connector_type -> charger;\n }",
"public function getActiveWeightFeature()\n {\n $feature = $this->getSettingValue('weight_by', null);\n \t$feature = ($feature == '') ? null : $feature;\n \treturn $feature;\n }",
"public function getProdHeight()\n {\n return $this->prod_height;\n }",
"public function getExperienceShort ()\n {\n $xp_short = $this->getExperience() - $this->getExperienceForLevel($this->getLevel());\n\n return $xp_short;\n }",
"public function getHeure()\n {\n return $this->heure;\n }",
"public function getFiguredLarge()\n\t{\n\t\tif(!Storage::has('json/wristband/colors/figuredLarge.json')) {\n\t\t\t// generate and save .json file.\n\t\t\tStorage::put('json/wristband/colors/figuredLarge.json', json_encode($this->figuredLarge()));\n\t\t}\n\t\t// return data from .json file.\n\t\treturn json_decode(Storage::get('json/wristband/colors/figuredLarge.json'), true);\n\t}",
"protected function _getAppearanceReference() {}",
"protected function _getAppearanceReference() {}",
"protected function _getAppearanceReference() {}",
"protected function _getAppearanceReference() {}",
"public function getHotNumber()\n {\n return $this->hot_number;\n }",
"public function damage() {\n return $this->damageMultiplier * $this->weapon->damage();\n }",
"public function getWeight() \r\n {\r\n return $this->weight;\r\n }"
] | [
"0.596787",
"0.58714014",
"0.5830345",
"0.5830345",
"0.57503927",
"0.5741754",
"0.57413185",
"0.5737611",
"0.5737611",
"0.5681164",
"0.56327724",
"0.55617666",
"0.5540514",
"0.55194616",
"0.55127084",
"0.5503975",
"0.54327065",
"0.54225934",
"0.53942263",
"0.53873825",
"0.53851444",
"0.5365922",
"0.53594154",
"0.53557533",
"0.5348099",
"0.5343294",
"0.5306226",
"0.5298475",
"0.528388",
"0.5276197",
"0.52694374",
"0.52601254",
"0.5248548",
"0.52437127",
"0.523832",
"0.52189714",
"0.5209608",
"0.52041227",
"0.51986665",
"0.5177714",
"0.5175861",
"0.51684576",
"0.5149855",
"0.5145347",
"0.51442033",
"0.513925",
"0.5134918",
"0.513174",
"0.513174",
"0.513174",
"0.513174",
"0.513174",
"0.513174",
"0.51234394",
"0.51234394",
"0.51234394",
"0.51234394",
"0.51234394",
"0.51234394",
"0.51234394",
"0.51175255",
"0.51126564",
"0.5112048",
"0.5110244",
"0.5099838",
"0.5088667",
"0.50872695",
"0.5085378",
"0.5078064",
"0.5078054",
"0.50769687",
"0.50757354",
"0.5064852",
"0.50617427",
"0.50607187",
"0.5053049",
"0.5051866",
"0.5051866",
"0.5051866",
"0.5051507",
"0.50510097",
"0.50407636",
"0.50388247",
"0.50294036",
"0.5028978",
"0.50258917",
"0.5025497",
"0.5019514",
"0.5014679",
"0.5013163",
"0.5009519",
"0.5007995",
"0.50038695",
"0.5003629",
"0.49969205",
"0.49969205",
"0.49969205",
"0.49967647",
"0.49963778",
"0.4993385",
"0.4992544"
] | 0.0 | -1 |
Get the berry with the referenced flavor. | public function getBerry(): Berry
{
return $this->berry;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setFlavorRef($flavorRef)\n {\n return $this->set('flavorRef', $flavorRef);\n }",
"public function getBlueprint() {\n return $this->blueprint;\n }",
"public function getBewallet()\n {\n return $this->bewallet;\n }",
"public function getBrand()\n\t{\n\t\t$Brand = new Product_Brand();\n\t\treturn $Brand->findItem( array( 'Id = '.$this->Brand ) );\n\t}",
"public function show($id)\n {\n return Brewery::findOrFail($id);\n }",
"public function carBrand()\n {\n return parent::getBrand();\n }",
"public function getBrandById($id)\n {\n return Brand::find($id);\n }",
"public function getBlueprint($path) {\n $blueprints = $this->toObjects();\n // If the blueprint does not exist then return null\n // As blueprints may change over time we don't throw an exception\n if (!isset($blueprints[$path])) { return null; }\n // Return the found blueprint object\n return $blueprints[$path];\n }",
"public function blueprint()\n {\n return $this->belongsTo('App\\Models\\Blueprint');\n }",
"public function getBrand()\n {\n return $this->brand;\n }",
"public function getBrand()\n {\n return $this->brand;\n }",
"public static function get($class)\n {\n return ModelBlueprint::exists($class) ? ModelBlueprint::$blueprints[$class] : null;\n }",
"public function getExistingBranchForTestCase()\n {\n $branchName = $this->getDevBranchName();\n $devBranch = new DevBranches($this->getDefaultClient());\n\n $branches = $devBranch->listBranches();\n $branch = null;\n // get branch detail\n foreach ($branches as $branchItem) {\n if ($branchItem['name'] === $branchName) {\n $branch = $branchItem;\n }\n }\n if (!isset($branch)) {\n $this->testCase->fail(sprintf('Reuse existing branch: branch %s not found.', $branchName));\n }\n\n return $branch;\n }",
"public function getBranchesBranch()\n {\n return $this->hasOne(Branches::className(), ['branch_id' => 'branches_branch_id']);\n }",
"function get_brand($id) {\n return $this->db->get_where('brands', array('id' => $id))->row_array();\n }",
"function getFlavors()\r\n{\r\n return array(\"grasshopper\",\"maple\",\"carrot\", \"caramel\",\"velvet\",\"lemon\",\"tiramisu\");\r\n}",
"public function getBrandById($id);",
"public function getFeaturedbrand(){\n\t\t \n\t\t $collections = Mage::getModel('brand/brand')->getCollection()\n\t\t\t\t\t\t->addFieldToFilter('is_feature',1);\n\t\t\t\t\n\t\treturn $collections;\n\t }",
"public function getCarBrands();",
"public function getImageBo()\r\n\t{\r\n\t\treturn $this->ImageBo;\r\n\t}",
"public function getBranch()\n {\n return $this->hasOne(CompanyBranches::className(), ['BranchID' => 'BranchID']);\n }",
"public function getBranch()\n {\n return $this->branch;\n }",
"public function getBranch()\n {\n return $this->branch;\n }",
"public function getBairro()\n\t{\n\t\t/**\n\t\t * retorna bairro.\n\t\t * @return bairro\n\t\t */\t\t\n\t\treturn $this->bairro;\n\t}",
"public function getBrandFound()\n\t{\n\t\treturn $this->brandFound;\n\t}",
"public function getBranch()\n {\n return $this->_options['branch'];\n }",
"public function getBrand()\n {\n $brandAttribute = $this->helper->getBrandConfig();\n\n return $this->getAttribute($brandAttribute);\n }",
"public function getBrightness()\n {\n if (isset($this->a_State['bri']))\n {\n return($this->a_State['bri']);\n } /* if */\n else\n {\n return(null);\n } /* else */\n }",
"public static function getBithumb(){\n $bithumbConfig = Setting::getValue('bithumb');\n if(empty($bithumbConfig['api']) || empty($bithumbConfig['secret']) ){\n $bithumbConfig['api']='';\n $bithumbConfig['secret']='';\n }\n $bithumb = new BithumbClient($bithumbConfig['api'], $bithumbConfig['secret']);\n return $bithumb;\n }",
"public function show(Flavor $flavor)\n {\n return view('flavors.show', compact('flavor'));\n }",
"function getBreeding($id){\n\t$crud = new CRUD();\n\t$crud->connect();\n\n\t$crud->sql(\"select * from breeding_tbl where breeding_id='{$id}'\");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['breeding_id'];\n\n\t}\n\t$crud->disconnect();\n}",
"public function Brand()\n { \n// $this->hasOne($relatedTo, $foreignKey, $localKey)\n return $this->hasOne('App\\Models\\Brand', 'brand_id', 'brand_id');\n }",
"public function getBrand()\n {\n foreach ($this->getSupportedBrands() as $brand => $val) {\n if (preg_match($val, $this->getNumber())) {\n return $brand;\n }\n }\n }",
"public function getBranch()\n {\n return new GitBranch($this->getProjectBase());\n }",
"public function getBrands()\n {\n return $this->brands;\n }",
"public function branch() {\n return $this->hasOne('App\\Models\\Branch', 'branch_id', 'branch_id');\n }",
"private function get_bridge()\n\t{\n\t\treturn $this->m_bridge;\n\t}",
"public function brewery() : Relation\n {\n $this->belongsTo(Brewery::class);\n }",
"public function show($id)\n {\n //\n return Brands::find($id);\n }",
"public function getCRRALibrary()\n {\n return $this->fields['building'][0];\n }",
"private function get()\n {\n $db = 'Ernio\\\\Bankas\\\\' . $this->settings;\n return $db::get();\n }",
"public function getBackblazeB2Bucket() {\n return @$this->attributes['backblaze_b2_bucket'];\n }",
"public function dbGetBrand()\n\t{\n\t\t// Return the Brand Names\n\t\treturn array(\"-\", \"Coke\", \"Coke Light\", \"Coke Zero\", \"Sprite\", \"Dr Pepper\", \"Fanta\");\n\t}",
"public function get_brand() {\n $query = $this->db->get('brand');\n if ($query->num_rows() > 0) {\n return $query->result();\n } else {\n return false;\n }\n }",
"public function getBrand(): ?string\n {\n return $this->brand;\n }",
"public function getRecipe()\n\t{\n\t\tif(!$this->_recipe){\n\t\t\t$this->_recipe = Website_Model_CbFactory::factory('Website_Model_Recipe',$this->recipeId);\n\t\t}\n\t\treturn $this->_recipe;\n\t}",
"public static function billsUsingBraintree()\n {\n return static::billsUsing('braintree');\n }",
"function getBreed($id){\n\t$crud = new CRUD();\n\t$crud->connect();\n\n\t$crud->sql(\"select * from pigs_tbl where pig_id='{$id}'\");\n\t$r = $crud->getResult();\n\tforeach($r as $rs){\n\t\treturn $rs['breed'];\n\n\t}\n\t$crud->disconnect();\n}",
"function fn_get_brands($feature_id, $lang_code = CART_LANGUAGE)\n{\n\t//var_dump($feature_id);\n $params['feature_id']=$feature_id;\n\t$params['feature_type']=\"E\";\n $params['get_images'] = true;\n\t\n list($brands, $search) = fn_get_product_feature_variants($params,0, DESCR_SL);\n\t\n return array($brands, $params);\n}",
"public function getSupplyChannel()\n {\n return $this->supplyChannel instanceof ChannelReferenceBuilder ? $this->supplyChannel->build() : $this->supplyChannel;\n }",
"public function getBrand() : ?string \n {\n if ( ! $this->hasBrand()) {\n $this->setBrand($this->getDefaultBrand());\n }\n return $this->brand;\n }",
"public function branch()\n\t{\n\t\treturn $this->hasOne('App\\Models\\Branch', 'id', 'branch_id');\n\t}",
"public function brand()\n {\n return $this->hasOne(Brands::class, 'id','brand_id');\n }",
"public function getBb()\n {\n return $this->bb;\n }",
"function getBrands()\n {\n $returned_brands = $GLOBALS['DB']->query(\"SELECT brands.* FROM stores\n JOIN stores_brands ON (stores.id = stores_brands.store_id)\n JOIN brands ON (stores_brands.brand_id = brands.id)\n WHERE stores.id = {$this->getId()};\");\n\n $brands = array();\n foreach($returned_brands as $brand) {\n $brand_name = $brand['brand_name'];\n $id = $brand['id'];\n $new_brand = new Brand($brand_name, $id);\n array_push($brands, $new_brand);\n }\n return $brands;\n }",
"public function getCarrier()\n {\n return isset($this->carrier) ? $this->carrier : null;\n }",
"public function getBrand()\n{\nreturn $this->brand;\n}",
"function getBreve()\n {\n if (!isset($this->sbreve) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->sbreve;\n }",
"public function getHotelRef()\n {\n return $this->hotelRef;\n }",
"public function getBrandImage()\n {\n return $this->brandImage;\n }",
"public function index(Flavor $flavor) {\n\n $flavorList = Flavor::latest()->get();\n\n return view('flavors.index', compact('flavorList'));\n }",
"public function getCarrier()\n {\n return $this->carrier;\n }",
"protected function _getAppearanceReference() {}",
"protected function _getAppearanceReference() {}",
"protected function _getAppearanceReference() {}",
"protected function _getAppearanceReference() {}",
"public function getBrand(Request $request)\n\t{\n\t\t$params = $request->all();\n\n\t\t$brands = Brand::where('status', '=', 1)->get();\n\t\t\n\t\treturn response($brands);\n\t}",
"public function getRefBancaria(){\n return $this->ref_bancaria->toArray();\n }",
"public function getCloudflareBucket() {\n return @$this->attributes['cloudflare_bucket'];\n }",
"public function index()\n {\n return new BrandResource(Brand::all());\n }",
"public function getProduct()\n {\n return $this->product instanceof ProductReferenceBuilder ? $this->product->build() : $this->product;\n }",
"public function getBrand_id()\n {\n return $this->brand_id;\n }",
"public function getBrand_id()\n {\n return $this->brand_id;\n }",
"public function getBrand($limit = 3)\n {\n return \\R::find('brand', \"LIMIT {$limit}\");\n }",
"public function fromFlavor($flav)\n {\n return $this->isFlavor(strtolower($this->from_flavor), strtolower($flav));\n }",
"public function getBulanRef()\n {\n return $this->db->get('ref_Bulan')->result_array();\n }",
"public function getProductById($id){\r\n\t\treturn $this->query(\"SELECT * FROM beer WHERE beer_ID = '$id'\"); \r\n\t}",
"public function getBranchOf()\n {\n return $this->branchOf;\n }",
"public static function findByReference($reference) {\n\t\t\t\n\t\t\treturn Booking::where('reference', $reference)->first();\n\t\t}",
"public function getBvoucher()\n {\n return $this->bvoucher;\n }",
"public function getBlueprints() {\n return $this->blueprints;\n }",
"public function get_pen_house_stocking($farm_id)\n {\n $farm_id = Auth::User()->farm_id;\n $first_pen_house_stocking = PenHouseStocking::where('farm_id', $farm_id)\n ->first();\n if ($first_pen_house_stocking) {\n return $first_pen_house_stocking;\n }\n }",
"public function getBairro() {\n return $this->sBairro;\n }",
"public function getBrandId()\n {\n return $this->brandId;\n }",
"public function getDependency()\n {\n if (isset($this->dependency)) {\n return $this->dependency;\n }\n $db = DataAccess::getInstance();\n $this->dependency = '' . $db->GetOne(\"SELECT `dependency` FROM \" . geoTables::browsing_filters_settings . \" WHERE `category` = ? and `field` = ?\", array(self::getActiveCategory(), $this->target));\n return $this->dependency;\n }",
"function get_borrowing_byID($voucher_id) {\r\n $params[0] = array(\"name\" => \":voucher_id\", \"value\" => &$voucher_id);\r\n return $this->DBObject->readCursor(\"product_actions.get_borrowing_byID(:voucher_id)\", $params);\r\n }",
"public function getB()\n {\n return $this->B;\n }",
"public function getBrandCollection()\n {\n return $brandCollection = Mage::getModel('shopbrand/brand')->getCollection()\n ->addFieldToFilter('status', array('eq' => 1));\n }",
"public function getDDBinks()\n {\n \tif (null === $this->ddBinks)\n \t{\n\t $path = __DIR__ . '/vcards/DDBinks.vcf';\n $parser = new VCardParser();\n $vcards = $parser->importFromFile($path);\n \n $this->assertCount(1, $vcards);\n $this->ddBinks = $vcards[0];\n \t}\n\treturn $this->ddBinks;\n }",
"public function getDDBinks()\n {\n \tif (null === $this->ddBinks)\n \t{\n\t $path = __DIR__ . '/vcards/DDBinks.vcf';\n $parser = new VCardParser();\n $vcards = $parser->importFromFile($path);\n \n $this->assertCount(1, $vcards);\n $this->ddBinks = $vcards[0];\n \t}\n\treturn $this->ddBinks;\n }",
"public function getProduct($name)\n {\n $brand = Brand::where('name', $name)->first();\n return ProductResource::collection($brand->product);\n }",
"function getBrush() { return $this->_brush; }",
"public function getBrandById($brandeditid){\n\t\t\t \t$brandeditid = mysqli_real_escape_string($this->db->link,$brandeditid);\n\t\t\t \t$query = \"SELECT * FROM tbl_brand WHERE brandId = '$brandeditid' \";\n\t\t\t \t$result = $this->db->select($query);\n\t\t\t \treturn $result;\n\n\t\t\t }",
"public function getCurrentTheme() {\n\t\t\t//No usamos el getTodayAdvertisements, así nos ahorramos la hidratacion de cosas innecesarias\n\t\t\treturn ThemeQuery::create()\n\t\t\t\t->filterByBillboard($this)\n\t\t\t\t->filterByCurrent()\n\t\t\t\t->findOne();\n\t\t}",
"protected function getBranch()\n {\n $branches = $this->terminal->run($this->git->branch());\n\n preg_match('/\\*\\s([\\w]*)/', $branches, $matches);\n \n if (!empty($matches[1])) {\n $this->branch = $matches[1];\n }\n \n $this->output->write('<info>' . $this->branch . '</info>' . PHP_EOL);\n }",
"public function getUserBreweryId () {\n\t\treturn ($this->userBreweryId);\n\t}",
"protected function getHairColorChoice()\n {\n $optCollection = $this->createMockOptionCollection(4);\n// $optCollection->add(\n// (new Option('noir', 300))\n// ->add(new Option\\Data\\Text('les cheveux noirs'))\n// );\n// $optCollection->add(\n// (new Option('blond', 100))\n// ->add(new Option\\Data\\Text('les cheveux blonds'))\n// );\n// $optCollection->add(\n// (new Option('vert', 5))\n// ->add(new Option\\Data\\Text('les cheveux verts'))\n// );\n// $optCollection->add(\n// (new Option('violet', 1))\n// ->add(new Option\\Data\\Text('les cheveux violets'))\n// );\n\n $choice = new Choice('cheveux', $optCollection);\n\n return $choice;\n }",
"public function getBanco() {\n return $this->banco;\n }",
"public function brands()\n {\n return $this->belongsTo('App\\Brand');\n }",
"public function getBrandName(): string\n {\n return $this->brand;\n }"
] | [
"0.5789121",
"0.55683446",
"0.5425306",
"0.54249614",
"0.5416171",
"0.53708035",
"0.53600264",
"0.5308344",
"0.53020996",
"0.52651674",
"0.52651674",
"0.5187404",
"0.5176655",
"0.51710093",
"0.5169752",
"0.5163356",
"0.514269",
"0.5126189",
"0.5102067",
"0.50918275",
"0.50918174",
"0.5041297",
"0.5041297",
"0.50018966",
"0.49978495",
"0.49939358",
"0.4992032",
"0.49913037",
"0.49628282",
"0.49602696",
"0.49469253",
"0.49465168",
"0.49303642",
"0.4909001",
"0.4904823",
"0.4888033",
"0.48880064",
"0.48876908",
"0.48837218",
"0.4873986",
"0.48704848",
"0.48654553",
"0.4865439",
"0.48520088",
"0.48396698",
"0.4830996",
"0.48275727",
"0.48260847",
"0.48251882",
"0.48236322",
"0.48162502",
"0.48119828",
"0.48118535",
"0.48105076",
"0.4809713",
"0.47991085",
"0.47987783",
"0.4792403",
"0.47841573",
"0.478124",
"0.47760406",
"0.4752574",
"0.47490793",
"0.47490793",
"0.47490793",
"0.47482637",
"0.4737663",
"0.4734292",
"0.47275734",
"0.4725343",
"0.47193417",
"0.47135848",
"0.47135848",
"0.47113174",
"0.47005507",
"0.4697432",
"0.46930525",
"0.46909067",
"0.46862322",
"0.46836936",
"0.46770075",
"0.46652398",
"0.46649083",
"0.46538618",
"0.46534827",
"0.4650285",
"0.46494937",
"0.4644447",
"0.4635345",
"0.4635345",
"0.4635043",
"0.46345794",
"0.46331576",
"0.46308815",
"0.46307534",
"0.46233395",
"0.46208695",
"0.46202698",
"0.46200737",
"0.4605945"
] | 0.66842926 | 0 |
Check if data saved. | private function create() {
$id = $this->objAccessCrud->getId();
if (!empty ( $id )) return;
// Check if there are permission to execute delete command.
$result = $this->clsAccessPermission->toCreat();
if(!$result){
$this->msg->setWarn("You don't have permission to create!");
return;
}
// Execute insert.
$this->objAccessCrud->setDateInsert(date("Y-m-d H:i:s"));
$id = $this->objAccessCrud->create ();
// Check result.
if ($id == 0) {
$this->msg->setError ('There were issues on creating ther record!');
return;
}
// Save the id in the session to be used in the update.
$_SESSION ['PK']['ACCESSCRUD'] = $id;
$this->msg->setSuccess ( 'Created the record with success!' );
return;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function is_saved()\n\t\t{\n\t\t\treturn $this->hash && file_exists($this->get_path_hashed()) || $this->saved;\n\t\t}",
"protected function canSave()\n {\n if( $this->ticket != null and\n $this->filename != null)\n {\n return true;\n }\n else\n return false;\n }",
"public function save(): bool\n {\n\n $bytes_written = file_put_contents($this->file_name, json_encode($this->getData()));\n\n if ($bytes_written === FALSE) {\n return false;\n }\n\n return true;\n }",
"public function isAlreadySaved()\n\t\t{\n\t\t\treturn $this->_alreadySaved == true;\n\t\t}",
"function save()\n {\n $save = false;\n if ( $this->lastActivity === NULL )\n return false;\n foreach ( $this->dataInterfaces as $data )\n {\n if ( $data->save() )\n $save = true;\n }\n return $save;\n }",
"function save() {\n $this->log .= \"save() called<br />\";\n if (count($this->data) < 1) {\n $this->log .= \"Nothing to save.<br />\";\n return false;\n }\n //create file pointer\n $this->log .= \"Save file name: \".$this->filename.\"<br />\";\n if (!$fp=@fopen($this->filename,\"w\")) {\n $this->log .= \"Could not create or open \".$this->filename.\"<br />\";\n return false;\n }\n //write to file\n if (!@fwrite($fp,serialize($this->data))) {\n $this->log .= \"Could not write to \".$this->filename.\"<br />\";\n fclose($fp);\n return false;\n }\n //close file pointer\n fclose($fp);\n return true;\n }",
"protected function has_data()\n {\n }",
"public function checkIsSaved()\n {\n if (isset($this->owner->primaryKey) == false) {\n throw new ModelIsUnsaved();\n }\n }",
"public function save()\n {\n return FALSE;\n }",
"function save() {\r\n\t\t$this->log .= \"save() called<br />\";\r\n\t\tif (count($this->data) < 1) {\r\n\t\t\t$this->log .= \"Nothing to save.<br />\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//create file pointer\r\n\t\tif (!$fp=@fopen($this->filename,\"w\")) {\r\n\t\t\t$this->log .= \"Could not create or open \".$this->filename.\"<br />\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//write to file\r\n\t\tif (!@fwrite($fp,serialize($this->data))) {\r\n\t\t\t$this->log .= \"Could not write to \".$this->filename.\"<br />\";\r\n\t\t\tfclose($fp);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//close file pointer\r\n\t\tfclose($fp);\r\n\t\treturn true;\r\n\t}",
"public function has_data()\n {\n }",
"public function isPersisted() {}",
"protected abstract function canSave();",
"protected function onSaved()\n {\n return true;\n }",
"protected function autosave_check() {\n\t\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"public function isPersisted();",
"public function isPersisted();",
"public function isPersisted();",
"public function isDirty();",
"public function canSave()\n {\n return $this->save;\n }",
"public function onSave()\n\t{\n\t\t$value = $this->getValue();\n\t\tif(!empty( $value ))\n\t\t{\n\t\t\treturn $this->getLookupTable()->set(\n\t\t\t\t $this->getValue(),\n\t\t\t\t $this->getValueObject()->getKey()\n\t\t\t ) > 0;\n\t\t}\n\t\treturn false;\n\t}",
"public static function save($data): bool\n {\n $storage_data = serialize($data);\n file_put_contents(self::$path.self::$filename, $storage_data);\n return true;\n }",
"public function save()\n {\n if ( !$this->unsaved ) {\n // either nothing has been changed, or data has not been loaded, so\n // do nothing by returning early\n return;\n }\n\n $this->write();\n $this->unsaved = false;\n }",
"function beforesave(){\n\t\t// if it returns true, the item will be saved; if it returns false, it won't\n\t\treturn true;\n\t}",
"public function save(array $data) : bool;",
"protected function onSaving()\n {\n return true;\n }",
"public function saveData()\r\n {\r\n \r\n }",
"protected function wasSaveSuccessful($data) {\n\n if (in_array(false, $data)) {\n return false;\n }\n\n foreach ($data as $row) {\n if (is_array($row) && in_array(false, $row)) {\n return false;\n }\n }\n\n return true;\n }",
"function isSaveAllowed() {\n\t\t\treturn $this->isAllowedAction( 'save' );\n\t\t}",
"protected function saveData()\n\t{\n\t\treturn $this->saveDb();\n\t}",
"function checkSaveButtons() {\n if ($this->arrTableParameters['savedok'] || $this->arrTableParameters['saveandclosedok']) {\n $tce = GeneralUtility::makeInstance('t3lib_TCEmain');\n $tce->stripslashes_values=0;\n if (count($this->arrTableParameters['grps'])) {\n\t $arrSave['grps'] = $this->arrTableParameters['grps'];\n\t $arrData[$this->arrWizardParameters['table']][$this->arrWizardParameters['uid']][$this->arrWizardParameters['field']] = serialize($arrSave);\n } else {\n \t$arrData[$this->arrWizardParameters['table']][$this->arrWizardParameters['uid']][$this->arrWizardParameters['field']] = '';\n }\n $tce->start($arrData,array());\n\t $tce->process_datamap();\n if ($this->arrTableParameters['saveandclosedok']) {\n header('Location: ' . GeneralUtility::locationHeaderUrl($this->arrWizardParameters['returnUrl']));\n\t\t\t\texit;\n }\n }\n }",
"public function saved()\n\t{\t\n\t\treturn $this->_saved;\n\t}",
"public function save($data): bool\n {\n return (bool) file_put_contents($this->path, json_encode($data, JSON_PRETTY_PRINT));\n }",
"public function save() {\t\t\t\t\n\t\tif (file_put_contents($this->filename, $this->objects)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function save()\n {\n $rc = true;\n $ak = array_keys($this->_objData);\n if (isset($this->_objData[$ak[0]][$this->_objField]) && $this->_objData[$ak[0]][$this->_objField]) {\n $rc = $this->update();\n } else {\n $rc = $this->insert();\n }\n return $rc;\n }",
"public function getNeedsSaving ()\n {\n return $this->needsSaving;\n }",
"public function hasDirtyData(): bool\n {\n return ($this->state == self::STATE_MANAGED\n && ($data = $this->itemReflection->dehydrate($this->item))\n && (! $this->isDataEqual($data, $this->originalData))\n );\n }",
"function save() {\n $id = (int)$this->getId();\n $fields = array();\n foreach ($this->_data as $col => &$value) {\n if (($value->flags & DATAFLAG_CHANGED)) // only save/update values that have been changed\n {\n $fields[] = new ColVal($col, $value->dataType, $value->value);\n }\n }\n if (sizeof($fields) == 0) {\n if ($id == 0) {\n return false;\n }\n return true;\n }\n\n if ($id != 0) {\n // update\n if (!App::getDBO()->update($this->getTableName(), $fields, \"id=$id\")) {\n return false;\n }\n } else {\n // save new (insert)\n if ($id = App::getDBO()->insert($this->getTableName(), $fields)) {\n $this->_data['id']->value = $id;\n $this->_data['id']->flags = DATAFLAG_LOADED;\n } else {\n return false;\n }\n }\n\n // if we got here, the save was successful\n\n foreach ($this->_data as $col => &$value) {\n if (($value->flags & DATAFLAG_CHANGED)) // we just saved/updated values that were changed\n {\n $value->flags &= ~DATAFLAG_CHANGED;\n } // remove changed flag\n }\n\n return true;\n }",
"private function isFolderSaved($data){\n //Checking the folder table to make sure we have the\n //$f = Folder::where('name', '=', $data['name'])->where('full_path', '=', $data['full_path'])->get();\n $SEL = \"SELECT * FROM folders WHERE name='\".$data['name'].\"' AND full_path='\".$data['full_path'].\"'\";\n $f = DB::connection('mysql')->select($SEL);\n if(count($f) > 0){\n foreach ($f as $folder) {\n $SQL = \"UPDATE folders SET found = '1' WHERE id = '\".$folder->id.\"'\";\n DB::connection('mysql')->update($SQL);\n }\n return true;\n }else{\n return false;\n }\n }",
"public function save(): bool;",
"public function save(): bool;",
"public function save(): bool\n {\n $data = [\n 'date' => $this->getDate(),\n 'type' => $this->getType(),\n 'recorded' => $this->getRecorded(),\n 'route' => $this->getRoute(),\n 'place' => $this->getPlace(),\n 'mileage' => $this->getMileage(),\n 'place_manual' => $this->getPlaceManual(),\n 'description' => $this->getDescription()\n ];\n if ($this->getId()) {\n if ((new db\\Update('event', $data, $this->getId()))->run() !== false) {\n return true;\n }\n } else {\n if ($newId = (new db\\Insert('event', $data))->run()) {\n $this->setId($newId);\n return true;\n }\n }\n return false;\n }",
"public function hasData(){\n return $this->_has(1);\n }",
"protected function saveData()\n {\n // TODO: データ保存\n\n // 一次データ削除\n $this->deleteStore();\n\n drupal_set_message($this->t('The form has been saved.'));\n }",
"function saveMessage($data) {\n \n if ($this->save($data)) {\n return true;\n } else {\n return false;\n }\n \n }",
"public function save()\n\t{\n\t\treturn false;\n\t}",
"public function save()\n {\n $temp = [];\n foreach ($this as $prop => $value) {\n $temp[$prop] = $value;\n }\n\n self::update($temp);\n if (isset($temp[(new static)->key])) {\n self::where((new static)->key, '=', $temp[(new static)->key]);\n }\n if (self::execute()->errno == 0) {\n return true;\n }\n return false;\n }",
"public function persist(): bool\n {\n // No caching for now and no extra call needed because of that.\n return true;\n }",
"public function isPersistent(): bool;",
"public function save()\n {\n return false;\n }",
"public function hasData() {\n try {\n $res = TRUE;\n }\n catch (\\Exception $e) {\n $res = FALSE;\n }\n\n return $res;\n }",
"public function shouldBeSaved($entityName, $data) {\n $storage = $this->storageFactory->getStorage($entityName);\n if ($storage === null)\n return false;\n return $storage->shouldBeSaved($data);\n }",
"public function isDirty(): bool;",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function hasData() : bool;",
"public function save(){\n\t\t$res = true;\n\t\t$changedData = $this->changedData();\n\t\tif(count($changedData)){\n\t\t\tif(!empty($this->orig)){\n\t\t\t\t$res = (dbHelper::updateQry($this->tableName,$changedData,array($this->primaryKey=>$this->data[$this->primaryKey]))?true:false);\n\t\t\t\t$this->orig = $this->data;\n\t\t\t} else {\n\t\t\t\t//if this row has been deleted but someone else saves data to it this will automatically restore the row from $data\n\t\t\t\t$res = (dbHelper::insertQry($this->tableName,$this->data)?true:false);\n\t\t\t\t$this->data[$this->primaryKey] = db::insertID();\n\t\t\t\tdbData::addRow($this->tableName,$this->primaryKey,$this->data);\n\t\t\t\t$this->orig =& dbData::rowRefrence($this->tableName,$this->primaryKey,$this->data[$this->primaryKey]);\n\t\t\t}\n\t\t}\n\t\treturn $res;\n\t}",
"public function save()\n\t{\n\t\tif ($this->loaded === FALSE)\n\t\t{\n\n\t\t}\n\t\treturn parent::save();\n\t}",
"public final function hasData()\n {\n return $this->data == false ? false : true;\n }",
"public function savePreferences()\n {\n $result = false;\n $request = request()->toArray();\n $changes = array();\n \n if($request['description'] !== \"\"){\n $changes['description'] = $request['description'];\n }\n \n $params = array_slice($request, 2);\n foreach(array_keys($params) as $key){\n if($params[$key]!==null && $params[$key]>0){\n $changes[$key] = $params[$key];\n }\n }\n\n if($changes){\n $this->update($changes);\n $result = true;\n }\n return $result;\n }",
"protected function _save()\n\t{\n\t\t$_file = $this->_storagePath . DIRECTORY_SEPARATOR . $this->_fileName;\n\n\t\t$_data = json_encode( $this->contents() );\n\n\t\tif ( $this->_compressStore )\n\t\t{\n\t\t\t$_data = Utility\\Storage::freeze( $this->contents() );\n\t\t}\n\n\t\tif ( false === file_put_contents( $_file, $_data ) )\n\t\t{\n\t\t\tUtility\\Log::error( 'Unable to store Oasys data in \"' . $_file . '\". System error.' );\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"function checkSavedFiles(){\n\t\t \n\t\t $tableFiles = new TabOut_TableFiles;\n\t\t $baseFileName = $this->tableID;\n\t\t $tableFiles->getAllFileSizes($baseFileName);\n\t\t $this->files = $tableFiles->savedFileSizes;\n\t\t $metadata = $this->metadata;\n\t\t $tableFields = $metadata[\"tableFields\"];\n\t\t unset($metadata[\"tableFields\"]);\n\t\t $metadata[\"files\"] = $this->files;\n\t\t $metadata[\"tableFields\"] = $tableFields; //just for sake of order! :)\n\t\t $this->metadata = $metadata;\n\t\t \n\t }",
"public function alreadyExists()\n\t{\n\t\tif(file_exists($this->getSavePath())) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"protected function preSave() {\n return TRUE;\n }",
"public function hasStored()\n\t{\n\t\tif( $_SESSION[__CLASS__][$this->questionId] !== null )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public function isStorable()\n {\n return ((int)$this->storable === 1);\n }",
"public function save(array $a_data): bool\n {\n $o_storage = $this->getStorage();\n $this->a_errors = $o_storage->save($a_data);\n return $this->a_errors ? false : true;\n }",
"private function make_extended_data_persistent() {\n\t\t\tif ( ! $this->dataChanged ) return false;\n\t\t\tif ( empty( $this->exdata ) ) return false;\n\t\t\tif ( ! $this->slplus->database->is_Extended() ) return false;\n\n\t\t\t$changed_record_count = $this->slplus->database->extension->update_data( $this->id, $this->exdata );\n\n\t\t\t$this->slplus->database->reset_extended_data_flag();\n\n\t\t\treturn ( $changed_record_count > 0 );\n\t\t}",
"public function store()\n\t{\n\t\treturn false;\n\t}",
"public function Save()\r\n {\r\n return false;\r\n }",
"public function save()\n {\n $success = $this->obj->save();\n\n if (! $success)\n {\n if ($this->obj->valid)\n {\n $this->_set_error('Failed to save data!');\n }\n else\n {\n //Validation error\n $this->_set_error();\n }\n }\n\n return $success;\n }",
"function isDirty() : bool;",
"public function hasData(): bool\n {\n return !empty($this->data);\n }",
"public function isPersistent()\n {\n }",
"public function have_settings_been_saved() {\n\t\treturn self::$settings_saved;\n\t}",
"protected function afterStore(array &$data, CrudModel $model)\n {\n return true;\n }",
"public function isDataDumpAvailable()\n {\n $result = self::checkFileAccess(Registry::get('config.dir.install') . App::DB_DATA);\n\n if (!$result) {\n $app = App::instance();\n $app->setNotification('E', $app->t('error'), $app->t('data_dump_is_not_available'), true);\n }\n\n return $result;\n }",
"function currentFormHasData() {\n global $double_data_entry, $user_rights, $quesion_by_section, $pageFields;\n\n $record = $_GET['id'];\n if ($double_data_entry && $user_rights['double_data'] != 0) {\n $record = $record . '--' . $user_rights['double_data'];\n }\n\n if (PAGE != 'DataEntry/index.php' && $question_by_section && Records::fieldsHaveData($record, $pageFields[$_GET['__page__']], $_GET['event_id'])) {\n // The survey has data.\n return true;\n }\n\n if (Records::formHasData($record, $_GET['page'], $_GET['event_id'], $_GET['instance'])) {\n // The data entry has data.\n return true;\n }\n\n return false;\n }",
"public function dirty()\n\t{\n\t\tif ( ! $this->app['files']->exists($this->cacheFilePath))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"function checkSaveCall()\n{\tif ( !wp_verify_nonce( $_POST['smille_fields_nonce'], plugin_basename(__FILE__) )) {\n\t\treturn false;\n\t}\n\t\n\t// verify if this is an auto save routine. If it is our form has not been submitted, so we dont want to do anything\n\tif ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) { return false; }\n\t\n\t return true;\n}",
"public function valid()\n {\n return $this->storage->valid();\n }",
"private static function save() {\n\t\tif(self::$data===null) throw new Excepton('Save before load!');\n\t\t$fp=fopen(self::$datafile,'w');\n\t\tif(!$fp) throw new Exception('Could not write data file!');\n\t\tforeach (self::$data as $item) {\n\t\t\tfwrite($fp,$item); // we use the __toString() here\n\t\t}\n\t\tfclose($fp);\n\t}",
"public function valid()\n {\n if (count($this->data) < 1) {\n if ($this->provider instanceof \\Closure) {\n $this->data = $this->provider->__invoke($this->key);\n } else {\n $this->data = $this->manuallyAddedData;\n $this->manuallyAddedData = array();\n }\n }\n\n return count($this->data) > 0;\n }",
"function save($data)\n {\n $query = $this->db->get_where( $this->_tablename, 'shop = \\'' . $this->_shop . '\\'');\n $result = $query->result();\n \n if( count( $result ) <= 0 )\n $this->db->insert( $this->_tablename, $data);\n else\n $this->db->update( $this->_tablename, $data);\n \n if($this->db->affected_rows()>0){\n return true;\n }\n else{\n return false;\n }\n }",
"private function saveData(): void\n {\n $this->tab_chat_call->call_update = gmdate(\"Y-m-d H:i:s\"); //data e hora UTC\n $result = $this->tab_chat_call->save();\n\n if ($result) {\n $this->Result = true;\n $this->Error = [];\n $this->Error['msg'] = \"Sucesso!\";\n $this->Error['data']['call'] = $this->tab_chat_call->call_id;\n } else {\n $this->Result = false;\n $this->Error = [];\n $this->Error['msg'] = $this->tab_chat_call->fail()->getMessage();\n $this->Error['data'] = null;\n }\n }",
"function save($data = [])\n\t{\n\t\tif($this->db->insert('receivings_transactions', $data))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function getSavedData()\n {\n\n return $this->savedData;\n\n }",
"public function isDirty()\r\n\t{\r\n\t\treturn (count($this->changelog)>0) ? true : false;\r\n\t}",
"function Check()\n {\n if (file_exists($this->save)) {\n $jsondecode = file_get_contents($this->save);\n }\n\n $decoded = json_decode($jsondecode, true);\n if ($decoded == NULL) {\n $this->register_start();\n } else {\n for ($i = 0; $i < count($decoded) + 1; $i++) {\n\n if (($decoded)[$i][0]['Starttime'] == NULL && ($decoded)[$i][0]['Endtime'] == NULL) {\n $this->register_start();\n }\n if (($decoded)[$i][0]['Endtime'] == \"\" && ($decoded)[$i][0]['Starttime'] != NULL) {\n $this->register_end();\n break;\n }\n }\n }\n }",
"public function save()\r\n {\r\n if( empty($this->dirty) ) return true;\r\n \r\n $pkName = $this->pkName();\r\n //is it an update?\r\n if( isset($this->data[$pkName]) ){\r\n $this->table->update($this->dirty, \"{$pkName}=?\", array($this->data[$pkName]) );\r\n $merged_data[$pkName] = $this->data[$pkName];\r\n } else {\r\n //it's an insert\r\n $merged_data = array_merge(\r\n $this->array_diff_schema($this->dirty),\r\n $this->array_diff_schema($this->data)\r\n );\r\n $this->table->insert($merged_data);\r\n $pk = $this->pkName();\r\n if( !isset($merged_data[$pk]) )\r\n $merged_data[$pk] = $this->table->lastInsertId();\r\n }\r\n $this->reset($merged_data);\r\n return true;\r\n }",
"private function _isCardSaved() {\n\t $tokenId = (int) $this->getInfoInstance()->getAdditionalInformation('token_id');\n\t return (boolean)($this->getInfoInstance()->getAdditionalInformation('create_token') === 'true') &&\n\t !($tokenId && ($tokenId > 0));\n\t}",
"public function beforeSave()\n\t{\n\t\tif (parent::beforeSave())\n\t\t{\n\t\t\t$this->last_modified = time();\n\t\t\tif ($this->isNewRecord)\n\t\t\t{\n\t\t\t\tYii::log(\"new pic uploaded and processed.\");\n\t\t\t\tif ($this->data!=null)\n\t\t\t\t{\n\t\t\t\t\t$this->resizefile();\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\tYii::log(\"process pic failed with data = null\", \"error\");\n\t\t\t\t\tYii::log(\"process pic failed with data = null\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tYii::log(\"process pic failed with parent save = null\", \"error\");\n\t\t\tYii::log(\"process pic failed with parent save = null\");\n\t\t\treturn (false);\n\t\t}\n\t}",
"public function save(): bool\n {\n return $this->id > 0\n ? $this->actionHandler->update()\n : $this->actionHandler->insert();\n }"
] | [
"0.75610065",
"0.70083016",
"0.6977446",
"0.6933225",
"0.69051766",
"0.6817394",
"0.68078536",
"0.68033856",
"0.6791581",
"0.6771454",
"0.67361313",
"0.6735232",
"0.6730853",
"0.66952455",
"0.6607865",
"0.65971136",
"0.65971136",
"0.65971136",
"0.65905493",
"0.65905464",
"0.65662056",
"0.65632224",
"0.6547363",
"0.6544972",
"0.65355617",
"0.65046644",
"0.6492045",
"0.64851123",
"0.64799476",
"0.6462599",
"0.64433247",
"0.6434478",
"0.64328957",
"0.64181817",
"0.6414141",
"0.6408847",
"0.640126",
"0.63876516",
"0.6378578",
"0.6348206",
"0.6348206",
"0.6341118",
"0.6327199",
"0.62987787",
"0.627222",
"0.6268199",
"0.62642014",
"0.62626505",
"0.6261356",
"0.62566805",
"0.6253453",
"0.62528056",
"0.6251279",
"0.6227683",
"0.6227683",
"0.6227683",
"0.6227683",
"0.6227683",
"0.6227683",
"0.6227683",
"0.6227683",
"0.6227683",
"0.6227683",
"0.62144184",
"0.62135863",
"0.62048215",
"0.6182956",
"0.6176205",
"0.61721504",
"0.6166699",
"0.61589736",
"0.61460394",
"0.61422163",
"0.61387795",
"0.61286926",
"0.61151606",
"0.6110485",
"0.6109698",
"0.61060154",
"0.60926986",
"0.6092631",
"0.60912246",
"0.609056",
"0.6090038",
"0.60798913",
"0.60684407",
"0.60561734",
"0.60535896",
"0.6051708",
"0.6049825",
"0.60494286",
"0.60309577",
"0.6030689",
"0.60296786",
"0.60294574",
"0.60131186",
"0.60002434",
"0.6000216",
"0.5996142",
"0.5994608",
"0.59928215"
] | 0.0 | -1 |
Check if there are permission to execute delete command. | private function read(){
$result = $this->clsAccessPermission->toRead();
if(!$result){
$this->msg->setWarn("You don't have permission to reade!");
return;
}
// Take the id from session.
if(!empty($_SESSION ['PK']['ACCESSCRUD'])){
$id = $_SESSION ['PK']['ACCESSCRUD'];
$this->objAccessCrud->readOne ( $id );
}
$this->fieldValue["cl_id_access_profile"] = $this->objAccessCrud->getIdAccessProfile();
$this->fieldValue["cl_id_access_page"] = $this->objAccessCrud->getIdAccessPage();
$this->fieldValue["cl_crud"] = $this->objAccessCrud->getCread();
$this->fieldValue["cl_read"] = $this->objAccessCrud->getRead();
$this->fieldValue["cl_update"] = $this->objAccessCrud->getUpdate();
$this->fieldValue["cl_delete"] = $this->objAccessCrud->getDelete();
$this->fieldValue["cl_date_insert"] = $this->objAccessCrud->getDateInsert();
$this->fieldValue["cl_date_update"] = $this->objAccessCrud->getDateUpdate();
return;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function can_delete () {\r\n\r\n return $this->permissions[\"D\"] ? true : false;\r\n\r\n }",
"public function canDelete()\n {\n return in_array('delete', $this->actions);\n }",
"public function canDelete()\n {\n $exist = $this->getModelObj('permission')->where(['resource_code' => $this->code, 'app' => $this->app])->first();\n if ($exist) {\n return false;\n }\n return true;\n }",
"function permissions_delete()\n{\n // Deletion not allowed\n return false;\n}",
"public function delete(): bool\n {\n return $this->isAllowed(self::DELETE);\n }",
"function canDelete() {\n return true;\n }",
"private function canDelete()\n {\n //Checks roles allowed\n $roles = array(\n 'ROLE_MANAGER',\n 'ROLE_ADMIN',\n );\n\n foreach ($roles as $role) {\n if ($this->security->isGranted($role)) {\n return true;\n }\n }\n\n return false;\n }",
"public function delete()\n {\n // Check P_DELETE\n if (!wcmSession::getInstance()->isAllowed($this, wcmPermission::P_DELETE))\n {\n $this->lastErrorMsg = _INSUFFICIENT_PRIVILEGES;\n return false;\n }\n\n if (!parent::delete())\n return false;\n \n // Erase permissions\n $project = wcmProject::getInstance();\n $sql = 'DELETE FROM #__permission WHERE target=?';\n $params = array($this->getPermissionTarget());\n $project->database->executeStatement($sql, $params);\n \n return true;\n\n }",
"protected function check_delete_permission($post)\n {\n }",
"public function authorize()\n {\n return $this->can('delete');\n }",
"function CanDelete()\n\t{\treturn !count($this->subpages) && $this->CanAdminUserDelete();\n\t}",
"public function canDelete()\n {\n return $this->canGet();\n }",
"function checkPermissionDelete() {\n\t\tif ($_SESSION['log_delete']!=='1'){\n\t\t\theader('Location: start.php');\n\t\t\tdie();\n\t\t}\n\t}",
"public function canDelete()\n {\n return 1;\n }",
"public function authorize()\n {\n $represent = $this->getRepresent();\n\n return $represent->can('delete')\n && $represent->exists($this->route('id'));\n }",
"private function can_remove() {\n return isset( $_POST[ self::NAME ] ) &&\n $_POST[ self::NAME ] === 'remove' &&\n $this->backupFileExists() &&\n current_user_can( 'manage_options' );\n\n }",
"protected function canDelete() {\n return $this->canUpdate() &&\n parent::can(PERM_SOCIALQUESTIONCOMMENT_UPDATE_STATUS_DELETE, $this->getEmptyComment());\n }",
"public function authorize(): bool\n {\n return Gate::allows('admin.genero.delete', $this->genero);\n }",
"protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Training_Vendor::main_index_delete');\n }",
"public function authorize(): bool\n {\n if (Auth::user()->hasPermissionTo('delete thread')) {\n return true;\n }\n\n $thread = $this->run(GetThreadJob::class, [\n 'thread_id' => $this->request->all()['thread_id']\n ]);\n\n if ($thread != null && $thread->user_id === Auth::user()->id && Auth::user()->hasPermissionTo('delete own thread')) {\n return true;\n }\n\n return false;\n }",
"public function canDelete()\n {\n return Auth::user() && ( $this->sender_id === Auth::id() || $this->recipient_id === Auth::id() );\n }",
"protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Webiators_DeleteOrdersFromAdmin::delete_order');\n }",
"public function canDelete($member = null) {\n\t\treturn Permission::check('CMS_ACCESS_CMSMain');\n\t}",
"public function isDelete();",
"public function authorize()\n {\n if (env('APP_ENV') == 'testing') {\n return true;\n }\n\n return tenant(auth()->user()->id)->hasPermissionTo('delete fixed asset');\n }",
"public function canDelete()\n {\n $user = $this->getUser();\n\n if ($user->getData('role') == 'Admin' && $this->getData('status') != Service\\BalanceWithdrawals::STATUS_PENDING) {\n return true;\n }\n\n return false;\n }",
"public function testAllowDelete()\n {\n $this->logOut();\n $deleteFalse = LogEntry::create()->canDelete(null);\n $this->assertFalse($deleteFalse);\n\n $this->logInWithPermission('ADMIN');\n $deleteTrue = LogEntry::create()->canDelete();\n $this->assertTrue($deleteTrue);\n }",
"public function deleteAdmin() {\n\t\t$numRows = $this->db->delete();\n\t\tif($numRows===1) {\n\t\t\treturn TRUE;\n\t\t}\n\t\telse {\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"public function authorize()\n {\n $this->translation = Translation::findByUuidOrFail($this->route('id'));\n\n return $this->user()->can('delete', [Translation::class, $this->translation->node->project]);\n }",
"public function canDelete()\n\t{\n\t\tif ( $this->deleteOrMoveQueued() === TRUE )\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\tif( static::restrictionCheck( 'delete' ) )\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\n\t\tif( static::$ownerTypes['member'] !== NULL )\n\t\t{\n\t\t\t$column\t= static::$ownerTypes['member'];\n\n\t\t\tif( $this->$column == \\IPS\\Member::loggedIn()->member_id )\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( static::$ownerTypes['group'] !== NULL )\n\t\t{\n\t\t\t$column\t= static::$ownerTypes['group']['ids'];\n\n\t\t\t$value = $this->$column;\n\t\t\tif( count( array_intersect( explode( \",\", $value ), \\IPS\\Member::loggedIn()->groups ) ) )\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\n\t\treturn FALSE;\n\t}",
"protected function check_permission()\n {\n return true;\n }",
"public function canDelete($member = null) {\n\t\treturn ($this->Code == 'DEFAULT') ? false : Permission::check('Product_CANCRUD');\n\t}",
"public function isDelete(): bool {}",
"public function isDeleteGranted($entity): bool;",
"public function canDelete()\n {\n if ( !SimpleForumTools::checkAccess($this->forumNode(), 'topic', 'remove') )\n {\n \treturn false;\n }\n \t\n return true;\n }",
"function canDelete($member = NULL)\n\t{\n\t\treturn true;\n\t}",
"abstract function allowDeleteAction();",
"public function sure_delete_block(){\r\n\t\tif($this->has_admin_panel()) return $this->module_sure_delete_block();\r\n return $this->module_no_permission();\r\n\t}",
"public function canManagePermissions()\n\t{\n\t\tif ( $this->deleteOrMoveQueued() === TRUE )\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\treturn ( static::$permApp !== NULL and static::$permType !== NULL and static::restrictionCheck( 'permissions' ) );\n\t}",
"public function batch_items_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"public function checkPermissions() {\r\n\t\treturn $this->modx->hasPermission('edit_document');\r\n\t}",
"public function delete(): bool\n {\n return $this->actionHandler->delete();\n }",
"public function checkPermissions();",
"public function beforeDelete() {\n // Console doesn't have Yii::$app->user, so we skip it for console\n if (php_sapi_name() != 'cli') {\n // Don't let delete yourself\n if (Yii::$app->user->id == $this->id) {\n return false;\n }\n\n // Don't let non-superadmin delete superadmin\n if (!Yii::$app->user->isSuperadmin AND $this->superadmin == 1) {\n return false;\n }\n }\n\n return parent::beforeDelete();\n }",
"function CheckDeleteAccess($item=array())\n {\n return $this->CheckEditAccess($item);\n }",
"function canDelete(User $user) {\n return $user->canManageTrash();\n }",
"public static function isDelete(): bool {\r\n return static :: isMethod('delete');\r\n }",
"public function canBeDelete() {\n\t\tglobal $rootPath;\n\t\tif(!isset($rootPath)) $rootPath = \"\";\n\t\ttry {\n\t\t\tif (!$this->canDelete())\n\t\t\t\treturn 2;\n\t\t} catch(Exception $e){}\n\n\t\tglobal $connect;\n\t\t$res=0;\n\t\trequire_once('CORE/extensionManager.inc.php');\n\t\t$class_list = getReferenceTablesList($this->__table,$rootPath);\n\t\tforeach($class_list as $table=>$fieldname) {\n\t\t\t$search=true;\n\t\t\tforeach($this->__DBMetaDataField as $values)\n\t\t\t\tif ($values['type']==9) {\n\t\t\t\t\t$params=$values['params'];\n\t\t\t\t\tif (($params['TableName']==$table) && ($params['RefField']==$fieldname))\n\t\t\t\t\t\t$search=false;\n\t\t\t\t}\n\t\t\tif ($search) {\n\t\t\t\t$file_class_name = DBObj_Abstract::getTableName($table);\n\t\t\t\t$class_name = 'DBObj_'. $table;\n\t\t\t\trequire_once($file_class_name);\n\t\t\t\t$DBObj=new $class_name;\n\t\t\t\t$sub_param=$DBObj->__DBMetaDataField[$fieldname];\n\t\t\t\t$search=$sub_param['notnull'];\n\t\t\t}\n\t\t\tif ($search) {\n\t\t\t\ttry {\n\t\t\t\t\t$q=\"SELECT id FROM $table WHERE $fieldname=$this->id\";\n\t\t\t\t\t$row_id=$connect->execute($q,true);\n\t\t\t\t\tif ($connect->getRow($row_id)!=false)\n\t\t\t\t\t\t$res=1;\n\t\t\t\t}\n\t\t\t\tcatch (LucteriosException $e) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(($res==0) && !$this->is_super) {\n\t\t\t$son = $this->getSon();\n\t\t\tif($son != null)\n\t\t\t\t$res=$son->canBeDelete();\n\t\t}\n\t\tif (($res==0) && ($this->Heritage != \"\"))\n\t\t\t$res=$this->Super->canBeDelete();\n\t\treturn $res;\n\t}",
"public function canDELETE($collection = null) {\r\n $rights = $this->getRights($collection, 'delete');\r\n return is_bool($rights) ? $rights : true;\r\n }",
"public function authorize()\n {\n $this->reusablePayment = FetchReusablePayment::run([\n 'encoded_id' => $this->encoded_id,\n ]);\n\n return $this->user()->can('delete', $this->reusablePayment);\n }",
"protected function beforeDelete()\n\t{\n\t\tif(parent::beforeDelete()){\n\t\t\t$avaiable = $this->chkAvaiableDelete($this->id);\n\t\t\tif($avaiable!=''){\n\t\t\t\techo $avaiable;\n\t\t\t\treturn false;\n\t\t\t}else\n\t\t\t\treturn true;\n\t\t}else \n\t\t\treturn false;\n\t}",
"public function checkPermission()\n\t{\n\t\tif ($this->User->isAdmin) {\n\t\t\treturn;\n\t\t}\n\n\t\t// TODO\n\t}",
"public function checkACL()\n {\n return parent::checkACL() || \\XLite\\Core\\Auth::getInstance()->isPermissionAllowed('manage orders');\n }",
"public function sure_delete_local(){\r\n\t\tif($this->has_admin_panel()) return $this->module_sure_delete_local();\r\n return $this->module_no_permission();\r\n\t}",
"function delete()\n {\n if($this->checkAccess('permission.delete') == 1)\n {\n echo(json_encode(array('status'=>'access')));\n }\n else\n {\n $permissionId = $this->input->post('permissionId');\n $permissionInfo = array('isDeleted'=>1,'updatedBy'=>$this->vendorId, 'updatedDtm'=>date('Y-m-d H:i:s'));\n \n $result = $this->permission_model->deletePermission($permissionId, $permissionInfo);\n \n if ($result > 0) { echo(json_encode(array('status'=>TRUE))); }\n else { echo(json_encode(array('status'=>FALSE))); }\n }\n }",
"function is_delete_statement()\n {\n return isset($this->object->_query_args['is_delete']) && $this->object->_query_args['is_delete'];\n }",
"function delete() {\n\t\t$query = '\n\t\t\tDELETE FROM '.system::getConfig()->getDatabase('mofilm_content').'.userSourcePermissions\n\t\t\tWHERE\n\t\t\t\tID = :ID\n\t\t\tLIMIT 1';\n\n\t\t$oStmt = dbManager::getInstance()->prepare($query);\n\t\t$oStmt->bindValue(':ID', $this->getID());\n\n\t\tif ( $oStmt->execute() ) {\n\t\t\t$oStmt->closeCursor();\n\t\t\t$this->reset();\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function authorize()\n {\n abort_if(Gate::denies('comment_delete'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n return false;\n }",
"function canDelete($user) {\n if($this->getId() == $user->getId()) {\n return false; // user cannot delete himself\n } // if\n\n if($this->isAdministrator() && !$user->isAdministrator()) {\n return false; // only administrators can delete administrators\n } // if\n\n return $user->isPeopleManager();\n }",
"protected function isPermissionCorrect() {}",
"function check_has_permissions() {\n $details = $this->get_user_details('1');\n\t\treturn 0 != strcmp(strtoupper($details['StatusInfo']), '\"ACCESS DENIED\"');\n\t}",
"function hasPermission($perm)\n {\n switch ($perm) {\n case Horde_Perms::EDIT: return false;\n case Horde_Perms::DELETE: return false;\n default: return true;\n }\n }",
"public function delete() {\n $stmt = $this->pro->prepare('delete from user where id = :id');\n $stmt->bindValue(':id', $this->id);\n return $stmt->execute() == 1;\n }",
"public function testAccessDeleteNoPermission()\n {\n $user = \\App\\User::where('permission', 0)->first();\n $response = $this->actingAs($user)->post('/group-setting/delete', [\n 'group_id' => 2,\n ]);\n $response->assertStatus(403);\n }",
"protected function validateDelete() {\r\n\t\t// check permissions\r\n\t\tif (!WCF::getSession()->getPermission('admin.user.canDeleteUser')) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\treturn $this->__validateAccessibleGroups(array_keys($this->objects));\r\n\t}",
"function delete_permission() {\n\t\t$this->db->where('permission_id', $_POST['id']);\n\t\t$this->db->delete('system_security.permission');\n\t\techo \"{error: '',msg: '\" . sprintf(lang('success_delete'), 'permission') . \"'}\";\n\t\t\n }",
"public static function uses_permissions(): bool;",
"public function allowDeletion()\n {\n return $this->allowDeletion;\n }",
"public function isDeleteResource();",
"public function adminPermissionCheck() {\n \tif(Permission::check('ADMIN')) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }",
"public function testPermissionOwnGotDeleted()\n {\n $this->createDummyRole();\n\n // Delete the permission\n $this->call('POST', '/api/permissions', array(\n 'action' => $this->deleteAction,\n 'id' => 1,\n ));\n\n $this->assertDatabaseHas('roles', [\n 'id' => 1,\n 'name' => $this->testRoleName,\n 'description' => $this->testRoleDesc\n ]);\n\n $this->assertDatabaseMissing('role_permission', [\n 'role_id' => 1,\n 'permission_id' => 1.\n ]);\n\n $this->assertDatabaseHas('role_permission', [\n 'role_id' => 1,\n 'permission_id' => 2,\n ]);\n }",
"protected function _can_delete($delete_id) {\n\t\treturn TRUE;\n\t}",
"protected function _can_delete($delete_id) {\n\t\treturn TRUE;\n\t}",
"protected function canDelete($record) { return false; }",
"public function canDeletePages();",
"function can_do($privilege)\n {\n return $this->storage->can_do($privilege);\n }",
"function permissions() {\r\n\t\treturn false;\r\n\t}",
"public function authorizedToDelete(Request $request)\n {\n return false;\n }",
"public function isDelete(): bool\n {\n return $this->getMethod() === self::METHOD_DELETE;\n }",
"public function is_deletable()\r\n {\r\n return !$this->id || Validator_identifiers::instance()->where('id_dataset_active', $this->id)->count_all() || \r\n Upload_queue::instance()->where('id_dataset_active', $this->id)->count_all()\r\n ? FALSE : TRUE;\r\n }",
"protected function _can_delete($delete_id)\n\t{\n\t\treturn TRUE;\n\t}",
"protected function _can_delete($delete_id)\n\t{\n\t\treturn TRUE;\n\t}",
"function CanDelete()\n\t{\t\n\t\t\n\t\tif ($this->id && !$this->GetLocations() && $this->CanAdminUserDelete())\n\t\t{\n\t\t\t// courses\n\t\t\t$sql = \"SELECT cid FROM courses WHERE city=\" . (int)$this->id;\n\t\t\tif ($result = $this->db->Query($sql))\n\t\t\t{\tif ($this->db->NumRows($result))\n\t\t\t\t{\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t\t\n\t}",
"function check_permission()\n\t{\n\t\t$CFG = $this->config->item('permission_modify_configure');\n\t\tif( ! addPermission( $CFG[\"sector\"][\"add\"] ) )\n\t\t{\n\t\t\t$this->form_validation->set_message('check_permission', _e('access denied'));\n\t\t\treturn false;\t\t\t\t\n\t\t}\n\t}",
"function canDelete(&$msg, $oid = NULL) {\n\t\t//$tables[] = array( 'label' => 'Users', 'name' => 'users', 'idfield' => 'user_id', 'joinfield' => 'user_company' );\n\t\t//return CDpObject::canDelete( $msg, $oid, $tables );\n\t\treturn true;\n\t}",
"public function needsPermission()\n {\n // an error will be thrown\n\n foreach ($this->model as $element) {\n\n $controller = ucfirst($element) . 'Controller';\n $method = 'execute' . ucfirst($this->action);\n\n if (isset($this->app->config()->get()->Backend->Authentication->noPermission->$controller)) {\n\n $noPermissionMethods = $this->app->config()->get()->Backend->Authentication->noPermission->$controller;\n\n // echo \"$method : \";\n // print_r($noPermissionMethods);\n if (in_array($method, $noPermissionMethods)) {\n continue;\n }\n }\n // echo \"$element ...\";\n //if the user is not authentified, this command will throw an error\n $this->auth();\n $this->permission($element);\n }\n }",
"protected function _can_delete($delete_id) {\r\n return true;\r\n }",
"public function isDelete() {\n\t\tif ('DELETE' == $this->getMethod())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function isDeleted() {}",
"public function isDeleted() {}",
"public function hasPermissions()\n {\n return ! empty($this->permissions);\n }",
"public function permissions()\n\t{\n\t\t// add any additional custom permission checking here and \n\t\t// return FALSE if user doesn't have permission\n\t\n\t\treturn TRUE;\n\t}",
"abstract public function shouldIDelete();",
"public function interceptDelete()\n\t{\n\t\t$user = $this->getService('com://admin/ninjaboard.model.people')->getMe();\n\t\t$rows = $this->getModel()->getList();\n\t\tforeach($rows as $row)\n\t\t{\n\t\t\t$topic = $this->getService('com://site/ninjaboard.model.topics')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->id($row->ninjaboard_topic_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->getItem();\n\t\t\t$forum = $this->getService('com://site/ninjaboard.model.forums')\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->id($topic->forum_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t->getItem();\n\n\t\t\t// @TODO we migth want to add an option later, wether or not to allow users to delete their own post.\n\t\t\tif($forum->post_permissions < 3 && $row->created_by != $user->id) {\n\t\t\t\tJError::raiseError(403, JText::_('COM_NINJABOARD_YOU_DONT_HAVE_THE_PERMISSIONS_TO_DELETE_OTHERS_TOPICS'));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}",
"function commandAllowed()\n {\n return array_key_exists($this->command, $this->commands);\n }",
"public function isDeleteInstanceCall(): bool\n {\n return $this->getUserId() === self::$remoteCallDelete;\n }",
"public function isDeleted();",
"public function isDeleted();",
"public function isDelete()\n {\n return ($this->getMethod() == 'DELETE') ? true : false;\n }",
"public function delete(): bool\n {\n\n return false;\n }",
"public function delete(): bool;"
] | [
"0.7690149",
"0.7515026",
"0.74735135",
"0.73804986",
"0.73200476",
"0.7290811",
"0.72029907",
"0.71688354",
"0.71642536",
"0.7126175",
"0.7015681",
"0.69358265",
"0.69294024",
"0.6907647",
"0.6871635",
"0.6827732",
"0.68051016",
"0.67965406",
"0.6766139",
"0.6762733",
"0.66881967",
"0.6685978",
"0.6685767",
"0.66515046",
"0.66458225",
"0.66302544",
"0.6605566",
"0.6583409",
"0.6581104",
"0.6568089",
"0.6565454",
"0.6561821",
"0.65573484",
"0.65540105",
"0.65191346",
"0.6512253",
"0.6508001",
"0.6504535",
"0.6495601",
"0.6493113",
"0.6473579",
"0.6469381",
"0.64669806",
"0.643924",
"0.64267135",
"0.63694066",
"0.6365812",
"0.634951",
"0.6344107",
"0.6337527",
"0.6330631",
"0.6319177",
"0.6318459",
"0.63152987",
"0.63108194",
"0.6300424",
"0.627989",
"0.6269711",
"0.6230745",
"0.62015575",
"0.6199336",
"0.6196679",
"0.6190024",
"0.61861044",
"0.6176406",
"0.6172261",
"0.6158925",
"0.61583716",
"0.6140374",
"0.61386025",
"0.6138257",
"0.6122557",
"0.6122557",
"0.6117926",
"0.6117896",
"0.6113678",
"0.6102816",
"0.6102334",
"0.6101761",
"0.6101453",
"0.6092779",
"0.6092779",
"0.60915077",
"0.6089128",
"0.60884726",
"0.6080478",
"0.6079858",
"0.60758036",
"0.6074989",
"0.60747856",
"0.6071164",
"0.6070856",
"0.6067737",
"0.6053047",
"0.60515374",
"0.60410404",
"0.60407186",
"0.60407186",
"0.6029841",
"0.6021818",
"0.60109514"
] | 0.0 | -1 |
Check if data saved. | private function update(){
$id = $this->objAccessCrud->getId();
if (empty ( $id )) return;
// Check permission to update.
$result = $this->clsAccessPermission->toUpdate();
if(!$result){
$this->msg->setWarn("You don't have permission to update!");
return;
}
// Execute Update.
if (! $this->objAccessCrud->update ()) {
$this->msg->setError ("There were issues on update the record!");
return;
}
$this->msg->setSuccess ("Updated the record with success!");
return;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function is_saved()\n\t\t{\n\t\t\treturn $this->hash && file_exists($this->get_path_hashed()) || $this->saved;\n\t\t}",
"protected function canSave()\n {\n if( $this->ticket != null and\n $this->filename != null)\n {\n return true;\n }\n else\n return false;\n }",
"public function save(): bool\n {\n\n $bytes_written = file_put_contents($this->file_name, json_encode($this->getData()));\n\n if ($bytes_written === FALSE) {\n return false;\n }\n\n return true;\n }",
"public function isAlreadySaved()\n\t\t{\n\t\t\treturn $this->_alreadySaved == true;\n\t\t}",
"function save()\n {\n $save = false;\n if ( $this->lastActivity === NULL )\n return false;\n foreach ( $this->dataInterfaces as $data )\n {\n if ( $data->save() )\n $save = true;\n }\n return $save;\n }",
"function save() {\n $this->log .= \"save() called<br />\";\n if (count($this->data) < 1) {\n $this->log .= \"Nothing to save.<br />\";\n return false;\n }\n //create file pointer\n $this->log .= \"Save file name: \".$this->filename.\"<br />\";\n if (!$fp=@fopen($this->filename,\"w\")) {\n $this->log .= \"Could not create or open \".$this->filename.\"<br />\";\n return false;\n }\n //write to file\n if (!@fwrite($fp,serialize($this->data))) {\n $this->log .= \"Could not write to \".$this->filename.\"<br />\";\n fclose($fp);\n return false;\n }\n //close file pointer\n fclose($fp);\n return true;\n }",
"protected function has_data()\n {\n }",
"public function checkIsSaved()\n {\n if (isset($this->owner->primaryKey) == false) {\n throw new ModelIsUnsaved();\n }\n }",
"public function save()\n {\n return FALSE;\n }",
"function save() {\r\n\t\t$this->log .= \"save() called<br />\";\r\n\t\tif (count($this->data) < 1) {\r\n\t\t\t$this->log .= \"Nothing to save.<br />\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//create file pointer\r\n\t\tif (!$fp=@fopen($this->filename,\"w\")) {\r\n\t\t\t$this->log .= \"Could not create or open \".$this->filename.\"<br />\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//write to file\r\n\t\tif (!@fwrite($fp,serialize($this->data))) {\r\n\t\t\t$this->log .= \"Could not write to \".$this->filename.\"<br />\";\r\n\t\t\tfclose($fp);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//close file pointer\r\n\t\tfclose($fp);\r\n\t\treturn true;\r\n\t}",
"public function has_data()\n {\n }",
"public function isPersisted() {}",
"protected abstract function canSave();",
"protected function onSaved()\n {\n return true;\n }",
"protected function autosave_check() {\n\t\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"public function isPersisted();",
"public function isPersisted();",
"public function isPersisted();",
"public function isDirty();",
"public function canSave()\n {\n return $this->save;\n }",
"public function onSave()\n\t{\n\t\t$value = $this->getValue();\n\t\tif(!empty( $value ))\n\t\t{\n\t\t\treturn $this->getLookupTable()->set(\n\t\t\t\t $this->getValue(),\n\t\t\t\t $this->getValueObject()->getKey()\n\t\t\t ) > 0;\n\t\t}\n\t\treturn false;\n\t}",
"public static function save($data): bool\n {\n $storage_data = serialize($data);\n file_put_contents(self::$path.self::$filename, $storage_data);\n return true;\n }",
"public function save()\n {\n if ( !$this->unsaved ) {\n // either nothing has been changed, or data has not been loaded, so\n // do nothing by returning early\n return;\n }\n\n $this->write();\n $this->unsaved = false;\n }",
"function beforesave(){\n\t\t// if it returns true, the item will be saved; if it returns false, it won't\n\t\treturn true;\n\t}",
"public function save(array $data) : bool;",
"protected function onSaving()\n {\n return true;\n }",
"public function saveData()\r\n {\r\n \r\n }",
"protected function wasSaveSuccessful($data) {\n\n if (in_array(false, $data)) {\n return false;\n }\n\n foreach ($data as $row) {\n if (is_array($row) && in_array(false, $row)) {\n return false;\n }\n }\n\n return true;\n }",
"function isSaveAllowed() {\n\t\t\treturn $this->isAllowedAction( 'save' );\n\t\t}",
"protected function saveData()\n\t{\n\t\treturn $this->saveDb();\n\t}",
"function checkSaveButtons() {\n if ($this->arrTableParameters['savedok'] || $this->arrTableParameters['saveandclosedok']) {\n $tce = GeneralUtility::makeInstance('t3lib_TCEmain');\n $tce->stripslashes_values=0;\n if (count($this->arrTableParameters['grps'])) {\n\t $arrSave['grps'] = $this->arrTableParameters['grps'];\n\t $arrData[$this->arrWizardParameters['table']][$this->arrWizardParameters['uid']][$this->arrWizardParameters['field']] = serialize($arrSave);\n } else {\n \t$arrData[$this->arrWizardParameters['table']][$this->arrWizardParameters['uid']][$this->arrWizardParameters['field']] = '';\n }\n $tce->start($arrData,array());\n\t $tce->process_datamap();\n if ($this->arrTableParameters['saveandclosedok']) {\n header('Location: ' . GeneralUtility::locationHeaderUrl($this->arrWizardParameters['returnUrl']));\n\t\t\t\texit;\n }\n }\n }",
"public function saved()\n\t{\t\n\t\treturn $this->_saved;\n\t}",
"public function save($data): bool\n {\n return (bool) file_put_contents($this->path, json_encode($data, JSON_PRETTY_PRINT));\n }",
"public function save() {\t\t\t\t\n\t\tif (file_put_contents($this->filename, $this->objects)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function save()\n {\n $rc = true;\n $ak = array_keys($this->_objData);\n if (isset($this->_objData[$ak[0]][$this->_objField]) && $this->_objData[$ak[0]][$this->_objField]) {\n $rc = $this->update();\n } else {\n $rc = $this->insert();\n }\n return $rc;\n }",
"public function getNeedsSaving ()\n {\n return $this->needsSaving;\n }",
"public function hasDirtyData(): bool\n {\n return ($this->state == self::STATE_MANAGED\n && ($data = $this->itemReflection->dehydrate($this->item))\n && (! $this->isDataEqual($data, $this->originalData))\n );\n }",
"function save() {\n $id = (int)$this->getId();\n $fields = array();\n foreach ($this->_data as $col => &$value) {\n if (($value->flags & DATAFLAG_CHANGED)) // only save/update values that have been changed\n {\n $fields[] = new ColVal($col, $value->dataType, $value->value);\n }\n }\n if (sizeof($fields) == 0) {\n if ($id == 0) {\n return false;\n }\n return true;\n }\n\n if ($id != 0) {\n // update\n if (!App::getDBO()->update($this->getTableName(), $fields, \"id=$id\")) {\n return false;\n }\n } else {\n // save new (insert)\n if ($id = App::getDBO()->insert($this->getTableName(), $fields)) {\n $this->_data['id']->value = $id;\n $this->_data['id']->flags = DATAFLAG_LOADED;\n } else {\n return false;\n }\n }\n\n // if we got here, the save was successful\n\n foreach ($this->_data as $col => &$value) {\n if (($value->flags & DATAFLAG_CHANGED)) // we just saved/updated values that were changed\n {\n $value->flags &= ~DATAFLAG_CHANGED;\n } // remove changed flag\n }\n\n return true;\n }",
"private function isFolderSaved($data){\n //Checking the folder table to make sure we have the\n //$f = Folder::where('name', '=', $data['name'])->where('full_path', '=', $data['full_path'])->get();\n $SEL = \"SELECT * FROM folders WHERE name='\".$data['name'].\"' AND full_path='\".$data['full_path'].\"'\";\n $f = DB::connection('mysql')->select($SEL);\n if(count($f) > 0){\n foreach ($f as $folder) {\n $SQL = \"UPDATE folders SET found = '1' WHERE id = '\".$folder->id.\"'\";\n DB::connection('mysql')->update($SQL);\n }\n return true;\n }else{\n return false;\n }\n }",
"public function save(): bool;",
"public function save(): bool;",
"public function save(): bool\n {\n $data = [\n 'date' => $this->getDate(),\n 'type' => $this->getType(),\n 'recorded' => $this->getRecorded(),\n 'route' => $this->getRoute(),\n 'place' => $this->getPlace(),\n 'mileage' => $this->getMileage(),\n 'place_manual' => $this->getPlaceManual(),\n 'description' => $this->getDescription()\n ];\n if ($this->getId()) {\n if ((new db\\Update('event', $data, $this->getId()))->run() !== false) {\n return true;\n }\n } else {\n if ($newId = (new db\\Insert('event', $data))->run()) {\n $this->setId($newId);\n return true;\n }\n }\n return false;\n }",
"public function hasData(){\n return $this->_has(1);\n }",
"protected function saveData()\n {\n // TODO: データ保存\n\n // 一次データ削除\n $this->deleteStore();\n\n drupal_set_message($this->t('The form has been saved.'));\n }",
"function saveMessage($data) {\n \n if ($this->save($data)) {\n return true;\n } else {\n return false;\n }\n \n }",
"public function save()\n\t{\n\t\treturn false;\n\t}",
"public function save()\n {\n $temp = [];\n foreach ($this as $prop => $value) {\n $temp[$prop] = $value;\n }\n\n self::update($temp);\n if (isset($temp[(new static)->key])) {\n self::where((new static)->key, '=', $temp[(new static)->key]);\n }\n if (self::execute()->errno == 0) {\n return true;\n }\n return false;\n }",
"public function persist(): bool\n {\n // No caching for now and no extra call needed because of that.\n return true;\n }",
"public function isPersistent(): bool;",
"public function save()\n {\n return false;\n }",
"public function hasData() {\n try {\n $res = TRUE;\n }\n catch (\\Exception $e) {\n $res = FALSE;\n }\n\n return $res;\n }",
"public function shouldBeSaved($entityName, $data) {\n $storage = $this->storageFactory->getStorage($entityName);\n if ($storage === null)\n return false;\n return $storage->shouldBeSaved($data);\n }",
"public function isDirty(): bool;",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function hasData() : bool;",
"public function save(){\n\t\t$res = true;\n\t\t$changedData = $this->changedData();\n\t\tif(count($changedData)){\n\t\t\tif(!empty($this->orig)){\n\t\t\t\t$res = (dbHelper::updateQry($this->tableName,$changedData,array($this->primaryKey=>$this->data[$this->primaryKey]))?true:false);\n\t\t\t\t$this->orig = $this->data;\n\t\t\t} else {\n\t\t\t\t//if this row has been deleted but someone else saves data to it this will automatically restore the row from $data\n\t\t\t\t$res = (dbHelper::insertQry($this->tableName,$this->data)?true:false);\n\t\t\t\t$this->data[$this->primaryKey] = db::insertID();\n\t\t\t\tdbData::addRow($this->tableName,$this->primaryKey,$this->data);\n\t\t\t\t$this->orig =& dbData::rowRefrence($this->tableName,$this->primaryKey,$this->data[$this->primaryKey]);\n\t\t\t}\n\t\t}\n\t\treturn $res;\n\t}",
"public function save()\n\t{\n\t\tif ($this->loaded === FALSE)\n\t\t{\n\n\t\t}\n\t\treturn parent::save();\n\t}",
"public final function hasData()\n {\n return $this->data == false ? false : true;\n }",
"public function savePreferences()\n {\n $result = false;\n $request = request()->toArray();\n $changes = array();\n \n if($request['description'] !== \"\"){\n $changes['description'] = $request['description'];\n }\n \n $params = array_slice($request, 2);\n foreach(array_keys($params) as $key){\n if($params[$key]!==null && $params[$key]>0){\n $changes[$key] = $params[$key];\n }\n }\n\n if($changes){\n $this->update($changes);\n $result = true;\n }\n return $result;\n }",
"protected function _save()\n\t{\n\t\t$_file = $this->_storagePath . DIRECTORY_SEPARATOR . $this->_fileName;\n\n\t\t$_data = json_encode( $this->contents() );\n\n\t\tif ( $this->_compressStore )\n\t\t{\n\t\t\t$_data = Utility\\Storage::freeze( $this->contents() );\n\t\t}\n\n\t\tif ( false === file_put_contents( $_file, $_data ) )\n\t\t{\n\t\t\tUtility\\Log::error( 'Unable to store Oasys data in \"' . $_file . '\". System error.' );\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"function checkSavedFiles(){\n\t\t \n\t\t $tableFiles = new TabOut_TableFiles;\n\t\t $baseFileName = $this->tableID;\n\t\t $tableFiles->getAllFileSizes($baseFileName);\n\t\t $this->files = $tableFiles->savedFileSizes;\n\t\t $metadata = $this->metadata;\n\t\t $tableFields = $metadata[\"tableFields\"];\n\t\t unset($metadata[\"tableFields\"]);\n\t\t $metadata[\"files\"] = $this->files;\n\t\t $metadata[\"tableFields\"] = $tableFields; //just for sake of order! :)\n\t\t $this->metadata = $metadata;\n\t\t \n\t }",
"public function alreadyExists()\n\t{\n\t\tif(file_exists($this->getSavePath())) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"protected function preSave() {\n return TRUE;\n }",
"public function hasStored()\n\t{\n\t\tif( $_SESSION[__CLASS__][$this->questionId] !== null )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public function isStorable()\n {\n return ((int)$this->storable === 1);\n }",
"public function save(array $a_data): bool\n {\n $o_storage = $this->getStorage();\n $this->a_errors = $o_storage->save($a_data);\n return $this->a_errors ? false : true;\n }",
"private function make_extended_data_persistent() {\n\t\t\tif ( ! $this->dataChanged ) return false;\n\t\t\tif ( empty( $this->exdata ) ) return false;\n\t\t\tif ( ! $this->slplus->database->is_Extended() ) return false;\n\n\t\t\t$changed_record_count = $this->slplus->database->extension->update_data( $this->id, $this->exdata );\n\n\t\t\t$this->slplus->database->reset_extended_data_flag();\n\n\t\t\treturn ( $changed_record_count > 0 );\n\t\t}",
"public function store()\n\t{\n\t\treturn false;\n\t}",
"public function Save()\r\n {\r\n return false;\r\n }",
"public function save()\n {\n $success = $this->obj->save();\n\n if (! $success)\n {\n if ($this->obj->valid)\n {\n $this->_set_error('Failed to save data!');\n }\n else\n {\n //Validation error\n $this->_set_error();\n }\n }\n\n return $success;\n }",
"function isDirty() : bool;",
"public function hasData(): bool\n {\n return !empty($this->data);\n }",
"public function isPersistent()\n {\n }",
"public function have_settings_been_saved() {\n\t\treturn self::$settings_saved;\n\t}",
"protected function afterStore(array &$data, CrudModel $model)\n {\n return true;\n }",
"public function isDataDumpAvailable()\n {\n $result = self::checkFileAccess(Registry::get('config.dir.install') . App::DB_DATA);\n\n if (!$result) {\n $app = App::instance();\n $app->setNotification('E', $app->t('error'), $app->t('data_dump_is_not_available'), true);\n }\n\n return $result;\n }",
"function currentFormHasData() {\n global $double_data_entry, $user_rights, $quesion_by_section, $pageFields;\n\n $record = $_GET['id'];\n if ($double_data_entry && $user_rights['double_data'] != 0) {\n $record = $record . '--' . $user_rights['double_data'];\n }\n\n if (PAGE != 'DataEntry/index.php' && $question_by_section && Records::fieldsHaveData($record, $pageFields[$_GET['__page__']], $_GET['event_id'])) {\n // The survey has data.\n return true;\n }\n\n if (Records::formHasData($record, $_GET['page'], $_GET['event_id'], $_GET['instance'])) {\n // The data entry has data.\n return true;\n }\n\n return false;\n }",
"public function dirty()\n\t{\n\t\tif ( ! $this->app['files']->exists($this->cacheFilePath))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"function checkSaveCall()\n{\tif ( !wp_verify_nonce( $_POST['smille_fields_nonce'], plugin_basename(__FILE__) )) {\n\t\treturn false;\n\t}\n\t\n\t// verify if this is an auto save routine. If it is our form has not been submitted, so we dont want to do anything\n\tif ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) { return false; }\n\t\n\t return true;\n}",
"public function valid()\n {\n return $this->storage->valid();\n }",
"private static function save() {\n\t\tif(self::$data===null) throw new Excepton('Save before load!');\n\t\t$fp=fopen(self::$datafile,'w');\n\t\tif(!$fp) throw new Exception('Could not write data file!');\n\t\tforeach (self::$data as $item) {\n\t\t\tfwrite($fp,$item); // we use the __toString() here\n\t\t}\n\t\tfclose($fp);\n\t}",
"public function valid()\n {\n if (count($this->data) < 1) {\n if ($this->provider instanceof \\Closure) {\n $this->data = $this->provider->__invoke($this->key);\n } else {\n $this->data = $this->manuallyAddedData;\n $this->manuallyAddedData = array();\n }\n }\n\n return count($this->data) > 0;\n }",
"function save($data)\n {\n $query = $this->db->get_where( $this->_tablename, 'shop = \\'' . $this->_shop . '\\'');\n $result = $query->result();\n \n if( count( $result ) <= 0 )\n $this->db->insert( $this->_tablename, $data);\n else\n $this->db->update( $this->_tablename, $data);\n \n if($this->db->affected_rows()>0){\n return true;\n }\n else{\n return false;\n }\n }",
"private function saveData(): void\n {\n $this->tab_chat_call->call_update = gmdate(\"Y-m-d H:i:s\"); //data e hora UTC\n $result = $this->tab_chat_call->save();\n\n if ($result) {\n $this->Result = true;\n $this->Error = [];\n $this->Error['msg'] = \"Sucesso!\";\n $this->Error['data']['call'] = $this->tab_chat_call->call_id;\n } else {\n $this->Result = false;\n $this->Error = [];\n $this->Error['msg'] = $this->tab_chat_call->fail()->getMessage();\n $this->Error['data'] = null;\n }\n }",
"function save($data = [])\n\t{\n\t\tif($this->db->insert('receivings_transactions', $data))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function getSavedData()\n {\n\n return $this->savedData;\n\n }",
"public function isDirty()\r\n\t{\r\n\t\treturn (count($this->changelog)>0) ? true : false;\r\n\t}",
"function Check()\n {\n if (file_exists($this->save)) {\n $jsondecode = file_get_contents($this->save);\n }\n\n $decoded = json_decode($jsondecode, true);\n if ($decoded == NULL) {\n $this->register_start();\n } else {\n for ($i = 0; $i < count($decoded) + 1; $i++) {\n\n if (($decoded)[$i][0]['Starttime'] == NULL && ($decoded)[$i][0]['Endtime'] == NULL) {\n $this->register_start();\n }\n if (($decoded)[$i][0]['Endtime'] == \"\" && ($decoded)[$i][0]['Starttime'] != NULL) {\n $this->register_end();\n break;\n }\n }\n }\n }",
"public function save()\r\n {\r\n if( empty($this->dirty) ) return true;\r\n \r\n $pkName = $this->pkName();\r\n //is it an update?\r\n if( isset($this->data[$pkName]) ){\r\n $this->table->update($this->dirty, \"{$pkName}=?\", array($this->data[$pkName]) );\r\n $merged_data[$pkName] = $this->data[$pkName];\r\n } else {\r\n //it's an insert\r\n $merged_data = array_merge(\r\n $this->array_diff_schema($this->dirty),\r\n $this->array_diff_schema($this->data)\r\n );\r\n $this->table->insert($merged_data);\r\n $pk = $this->pkName();\r\n if( !isset($merged_data[$pk]) )\r\n $merged_data[$pk] = $this->table->lastInsertId();\r\n }\r\n $this->reset($merged_data);\r\n return true;\r\n }",
"private function _isCardSaved() {\n\t $tokenId = (int) $this->getInfoInstance()->getAdditionalInformation('token_id');\n\t return (boolean)($this->getInfoInstance()->getAdditionalInformation('create_token') === 'true') &&\n\t !($tokenId && ($tokenId > 0));\n\t}",
"public function beforeSave()\n\t{\n\t\tif (parent::beforeSave())\n\t\t{\n\t\t\t$this->last_modified = time();\n\t\t\tif ($this->isNewRecord)\n\t\t\t{\n\t\t\t\tYii::log(\"new pic uploaded and processed.\");\n\t\t\t\tif ($this->data!=null)\n\t\t\t\t{\n\t\t\t\t\t$this->resizefile();\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\tYii::log(\"process pic failed with data = null\", \"error\");\n\t\t\t\t\tYii::log(\"process pic failed with data = null\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tYii::log(\"process pic failed with parent save = null\", \"error\");\n\t\t\tYii::log(\"process pic failed with parent save = null\");\n\t\t\treturn (false);\n\t\t}\n\t}",
"public function save(): bool\n {\n return $this->id > 0\n ? $this->actionHandler->update()\n : $this->actionHandler->insert();\n }"
] | [
"0.75610065",
"0.70083016",
"0.6977446",
"0.6933225",
"0.69051766",
"0.6817394",
"0.68078536",
"0.68033856",
"0.6791581",
"0.6771454",
"0.67361313",
"0.6735232",
"0.6730853",
"0.66952455",
"0.6607865",
"0.65971136",
"0.65971136",
"0.65971136",
"0.65905493",
"0.65905464",
"0.65662056",
"0.65632224",
"0.6547363",
"0.6544972",
"0.65355617",
"0.65046644",
"0.6492045",
"0.64851123",
"0.64799476",
"0.6462599",
"0.64433247",
"0.6434478",
"0.64328957",
"0.64181817",
"0.6414141",
"0.6408847",
"0.640126",
"0.63876516",
"0.6378578",
"0.6348206",
"0.6348206",
"0.6341118",
"0.6327199",
"0.62987787",
"0.627222",
"0.6268199",
"0.62642014",
"0.62626505",
"0.6261356",
"0.62566805",
"0.6253453",
"0.62528056",
"0.6251279",
"0.6227683",
"0.6227683",
"0.6227683",
"0.6227683",
"0.6227683",
"0.6227683",
"0.6227683",
"0.6227683",
"0.6227683",
"0.6227683",
"0.62144184",
"0.62135863",
"0.62048215",
"0.6182956",
"0.6176205",
"0.61721504",
"0.6166699",
"0.61589736",
"0.61460394",
"0.61422163",
"0.61387795",
"0.61286926",
"0.61151606",
"0.6110485",
"0.6109698",
"0.61060154",
"0.60926986",
"0.6092631",
"0.60912246",
"0.609056",
"0.6090038",
"0.60798913",
"0.60684407",
"0.60561734",
"0.60535896",
"0.6051708",
"0.6049825",
"0.60494286",
"0.60309577",
"0.6030689",
"0.60296786",
"0.60294574",
"0.60131186",
"0.60002434",
"0.6000216",
"0.5996142",
"0.5994608",
"0.59928215"
] | 0.0 | -1 |
Check if data saved. | private function delete(){
$id = $this->objAccessCrud->getId();
if (empty ( $id )) return;
// Check if there are permission to execute delete command.
$result = $this->clsAccessPermission->toDelete();
if(!$result){
$this->msg->setWarn("You don't have permission to delete!");
return;
}
if(!$this->objAccessCrud->delete($id)){
$this->msg->setError ("There was an issue to delete, because this register has some relation with another one!");
return;
}
// Cleaner all class values.
$this->objAccessCrud->setAccessCrud(null);
// Cleaner session primary key.
$_SESSION['PK']['ACCESSCRUD'] = null;
$this->msg->setSuccess ("Delete the record with success!");
return;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function is_saved()\n\t\t{\n\t\t\treturn $this->hash && file_exists($this->get_path_hashed()) || $this->saved;\n\t\t}",
"protected function canSave()\n {\n if( $this->ticket != null and\n $this->filename != null)\n {\n return true;\n }\n else\n return false;\n }",
"public function save(): bool\n {\n\n $bytes_written = file_put_contents($this->file_name, json_encode($this->getData()));\n\n if ($bytes_written === FALSE) {\n return false;\n }\n\n return true;\n }",
"public function isAlreadySaved()\n\t\t{\n\t\t\treturn $this->_alreadySaved == true;\n\t\t}",
"function save()\n {\n $save = false;\n if ( $this->lastActivity === NULL )\n return false;\n foreach ( $this->dataInterfaces as $data )\n {\n if ( $data->save() )\n $save = true;\n }\n return $save;\n }",
"function save() {\n $this->log .= \"save() called<br />\";\n if (count($this->data) < 1) {\n $this->log .= \"Nothing to save.<br />\";\n return false;\n }\n //create file pointer\n $this->log .= \"Save file name: \".$this->filename.\"<br />\";\n if (!$fp=@fopen($this->filename,\"w\")) {\n $this->log .= \"Could not create or open \".$this->filename.\"<br />\";\n return false;\n }\n //write to file\n if (!@fwrite($fp,serialize($this->data))) {\n $this->log .= \"Could not write to \".$this->filename.\"<br />\";\n fclose($fp);\n return false;\n }\n //close file pointer\n fclose($fp);\n return true;\n }",
"protected function has_data()\n {\n }",
"public function checkIsSaved()\n {\n if (isset($this->owner->primaryKey) == false) {\n throw new ModelIsUnsaved();\n }\n }",
"public function save()\n {\n return FALSE;\n }",
"function save() {\r\n\t\t$this->log .= \"save() called<br />\";\r\n\t\tif (count($this->data) < 1) {\r\n\t\t\t$this->log .= \"Nothing to save.<br />\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//create file pointer\r\n\t\tif (!$fp=@fopen($this->filename,\"w\")) {\r\n\t\t\t$this->log .= \"Could not create or open \".$this->filename.\"<br />\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//write to file\r\n\t\tif (!@fwrite($fp,serialize($this->data))) {\r\n\t\t\t$this->log .= \"Could not write to \".$this->filename.\"<br />\";\r\n\t\t\tfclose($fp);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t//close file pointer\r\n\t\tfclose($fp);\r\n\t\treturn true;\r\n\t}",
"public function has_data()\n {\n }",
"public function isPersisted() {}",
"protected abstract function canSave();",
"protected function onSaved()\n {\n return true;\n }",
"protected function autosave_check() {\n\t\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}",
"public function isPersisted();",
"public function isPersisted();",
"public function isPersisted();",
"public function isDirty();",
"public function canSave()\n {\n return $this->save;\n }",
"public function onSave()\n\t{\n\t\t$value = $this->getValue();\n\t\tif(!empty( $value ))\n\t\t{\n\t\t\treturn $this->getLookupTable()->set(\n\t\t\t\t $this->getValue(),\n\t\t\t\t $this->getValueObject()->getKey()\n\t\t\t ) > 0;\n\t\t}\n\t\treturn false;\n\t}",
"public static function save($data): bool\n {\n $storage_data = serialize($data);\n file_put_contents(self::$path.self::$filename, $storage_data);\n return true;\n }",
"public function save()\n {\n if ( !$this->unsaved ) {\n // either nothing has been changed, or data has not been loaded, so\n // do nothing by returning early\n return;\n }\n\n $this->write();\n $this->unsaved = false;\n }",
"function beforesave(){\n\t\t// if it returns true, the item will be saved; if it returns false, it won't\n\t\treturn true;\n\t}",
"public function save(array $data) : bool;",
"protected function onSaving()\n {\n return true;\n }",
"public function saveData()\r\n {\r\n \r\n }",
"protected function wasSaveSuccessful($data) {\n\n if (in_array(false, $data)) {\n return false;\n }\n\n foreach ($data as $row) {\n if (is_array($row) && in_array(false, $row)) {\n return false;\n }\n }\n\n return true;\n }",
"function isSaveAllowed() {\n\t\t\treturn $this->isAllowedAction( 'save' );\n\t\t}",
"protected function saveData()\n\t{\n\t\treturn $this->saveDb();\n\t}",
"function checkSaveButtons() {\n if ($this->arrTableParameters['savedok'] || $this->arrTableParameters['saveandclosedok']) {\n $tce = GeneralUtility::makeInstance('t3lib_TCEmain');\n $tce->stripslashes_values=0;\n if (count($this->arrTableParameters['grps'])) {\n\t $arrSave['grps'] = $this->arrTableParameters['grps'];\n\t $arrData[$this->arrWizardParameters['table']][$this->arrWizardParameters['uid']][$this->arrWizardParameters['field']] = serialize($arrSave);\n } else {\n \t$arrData[$this->arrWizardParameters['table']][$this->arrWizardParameters['uid']][$this->arrWizardParameters['field']] = '';\n }\n $tce->start($arrData,array());\n\t $tce->process_datamap();\n if ($this->arrTableParameters['saveandclosedok']) {\n header('Location: ' . GeneralUtility::locationHeaderUrl($this->arrWizardParameters['returnUrl']));\n\t\t\t\texit;\n }\n }\n }",
"public function saved()\n\t{\t\n\t\treturn $this->_saved;\n\t}",
"public function save($data): bool\n {\n return (bool) file_put_contents($this->path, json_encode($data, JSON_PRETTY_PRINT));\n }",
"public function save() {\t\t\t\t\n\t\tif (file_put_contents($this->filename, $this->objects)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function save()\n {\n $rc = true;\n $ak = array_keys($this->_objData);\n if (isset($this->_objData[$ak[0]][$this->_objField]) && $this->_objData[$ak[0]][$this->_objField]) {\n $rc = $this->update();\n } else {\n $rc = $this->insert();\n }\n return $rc;\n }",
"public function getNeedsSaving ()\n {\n return $this->needsSaving;\n }",
"public function hasDirtyData(): bool\n {\n return ($this->state == self::STATE_MANAGED\n && ($data = $this->itemReflection->dehydrate($this->item))\n && (! $this->isDataEqual($data, $this->originalData))\n );\n }",
"function save() {\n $id = (int)$this->getId();\n $fields = array();\n foreach ($this->_data as $col => &$value) {\n if (($value->flags & DATAFLAG_CHANGED)) // only save/update values that have been changed\n {\n $fields[] = new ColVal($col, $value->dataType, $value->value);\n }\n }\n if (sizeof($fields) == 0) {\n if ($id == 0) {\n return false;\n }\n return true;\n }\n\n if ($id != 0) {\n // update\n if (!App::getDBO()->update($this->getTableName(), $fields, \"id=$id\")) {\n return false;\n }\n } else {\n // save new (insert)\n if ($id = App::getDBO()->insert($this->getTableName(), $fields)) {\n $this->_data['id']->value = $id;\n $this->_data['id']->flags = DATAFLAG_LOADED;\n } else {\n return false;\n }\n }\n\n // if we got here, the save was successful\n\n foreach ($this->_data as $col => &$value) {\n if (($value->flags & DATAFLAG_CHANGED)) // we just saved/updated values that were changed\n {\n $value->flags &= ~DATAFLAG_CHANGED;\n } // remove changed flag\n }\n\n return true;\n }",
"private function isFolderSaved($data){\n //Checking the folder table to make sure we have the\n //$f = Folder::where('name', '=', $data['name'])->where('full_path', '=', $data['full_path'])->get();\n $SEL = \"SELECT * FROM folders WHERE name='\".$data['name'].\"' AND full_path='\".$data['full_path'].\"'\";\n $f = DB::connection('mysql')->select($SEL);\n if(count($f) > 0){\n foreach ($f as $folder) {\n $SQL = \"UPDATE folders SET found = '1' WHERE id = '\".$folder->id.\"'\";\n DB::connection('mysql')->update($SQL);\n }\n return true;\n }else{\n return false;\n }\n }",
"public function save(): bool;",
"public function save(): bool;",
"public function save(): bool\n {\n $data = [\n 'date' => $this->getDate(),\n 'type' => $this->getType(),\n 'recorded' => $this->getRecorded(),\n 'route' => $this->getRoute(),\n 'place' => $this->getPlace(),\n 'mileage' => $this->getMileage(),\n 'place_manual' => $this->getPlaceManual(),\n 'description' => $this->getDescription()\n ];\n if ($this->getId()) {\n if ((new db\\Update('event', $data, $this->getId()))->run() !== false) {\n return true;\n }\n } else {\n if ($newId = (new db\\Insert('event', $data))->run()) {\n $this->setId($newId);\n return true;\n }\n }\n return false;\n }",
"public function hasData(){\n return $this->_has(1);\n }",
"protected function saveData()\n {\n // TODO: データ保存\n\n // 一次データ削除\n $this->deleteStore();\n\n drupal_set_message($this->t('The form has been saved.'));\n }",
"function saveMessage($data) {\n \n if ($this->save($data)) {\n return true;\n } else {\n return false;\n }\n \n }",
"public function save()\n\t{\n\t\treturn false;\n\t}",
"public function save()\n {\n $temp = [];\n foreach ($this as $prop => $value) {\n $temp[$prop] = $value;\n }\n\n self::update($temp);\n if (isset($temp[(new static)->key])) {\n self::where((new static)->key, '=', $temp[(new static)->key]);\n }\n if (self::execute()->errno == 0) {\n return true;\n }\n return false;\n }",
"public function persist(): bool\n {\n // No caching for now and no extra call needed because of that.\n return true;\n }",
"public function isPersistent(): bool;",
"public function save()\n {\n return false;\n }",
"public function hasData() {\n try {\n $res = TRUE;\n }\n catch (\\Exception $e) {\n $res = FALSE;\n }\n\n return $res;\n }",
"public function shouldBeSaved($entityName, $data) {\n $storage = $this->storageFactory->getStorage($entityName);\n if ($storage === null)\n return false;\n return $storage->shouldBeSaved($data);\n }",
"public function isDirty(): bool;",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function isAlreadyInSave()\n {\n return $this->alreadyInSave;\n }",
"public function hasData() : bool;",
"public function save(){\n\t\t$res = true;\n\t\t$changedData = $this->changedData();\n\t\tif(count($changedData)){\n\t\t\tif(!empty($this->orig)){\n\t\t\t\t$res = (dbHelper::updateQry($this->tableName,$changedData,array($this->primaryKey=>$this->data[$this->primaryKey]))?true:false);\n\t\t\t\t$this->orig = $this->data;\n\t\t\t} else {\n\t\t\t\t//if this row has been deleted but someone else saves data to it this will automatically restore the row from $data\n\t\t\t\t$res = (dbHelper::insertQry($this->tableName,$this->data)?true:false);\n\t\t\t\t$this->data[$this->primaryKey] = db::insertID();\n\t\t\t\tdbData::addRow($this->tableName,$this->primaryKey,$this->data);\n\t\t\t\t$this->orig =& dbData::rowRefrence($this->tableName,$this->primaryKey,$this->data[$this->primaryKey]);\n\t\t\t}\n\t\t}\n\t\treturn $res;\n\t}",
"public function save()\n\t{\n\t\tif ($this->loaded === FALSE)\n\t\t{\n\n\t\t}\n\t\treturn parent::save();\n\t}",
"public final function hasData()\n {\n return $this->data == false ? false : true;\n }",
"public function savePreferences()\n {\n $result = false;\n $request = request()->toArray();\n $changes = array();\n \n if($request['description'] !== \"\"){\n $changes['description'] = $request['description'];\n }\n \n $params = array_slice($request, 2);\n foreach(array_keys($params) as $key){\n if($params[$key]!==null && $params[$key]>0){\n $changes[$key] = $params[$key];\n }\n }\n\n if($changes){\n $this->update($changes);\n $result = true;\n }\n return $result;\n }",
"protected function _save()\n\t{\n\t\t$_file = $this->_storagePath . DIRECTORY_SEPARATOR . $this->_fileName;\n\n\t\t$_data = json_encode( $this->contents() );\n\n\t\tif ( $this->_compressStore )\n\t\t{\n\t\t\t$_data = Utility\\Storage::freeze( $this->contents() );\n\t\t}\n\n\t\tif ( false === file_put_contents( $_file, $_data ) )\n\t\t{\n\t\t\tUtility\\Log::error( 'Unable to store Oasys data in \"' . $_file . '\". System error.' );\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"function checkSavedFiles(){\n\t\t \n\t\t $tableFiles = new TabOut_TableFiles;\n\t\t $baseFileName = $this->tableID;\n\t\t $tableFiles->getAllFileSizes($baseFileName);\n\t\t $this->files = $tableFiles->savedFileSizes;\n\t\t $metadata = $this->metadata;\n\t\t $tableFields = $metadata[\"tableFields\"];\n\t\t unset($metadata[\"tableFields\"]);\n\t\t $metadata[\"files\"] = $this->files;\n\t\t $metadata[\"tableFields\"] = $tableFields; //just for sake of order! :)\n\t\t $this->metadata = $metadata;\n\t\t \n\t }",
"public function alreadyExists()\n\t{\n\t\tif(file_exists($this->getSavePath())) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"protected function preSave() {\n return TRUE;\n }",
"public function hasStored()\n\t{\n\t\tif( $_SESSION[__CLASS__][$this->questionId] !== null )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public function isStorable()\n {\n return ((int)$this->storable === 1);\n }",
"public function save(array $a_data): bool\n {\n $o_storage = $this->getStorage();\n $this->a_errors = $o_storage->save($a_data);\n return $this->a_errors ? false : true;\n }",
"private function make_extended_data_persistent() {\n\t\t\tif ( ! $this->dataChanged ) return false;\n\t\t\tif ( empty( $this->exdata ) ) return false;\n\t\t\tif ( ! $this->slplus->database->is_Extended() ) return false;\n\n\t\t\t$changed_record_count = $this->slplus->database->extension->update_data( $this->id, $this->exdata );\n\n\t\t\t$this->slplus->database->reset_extended_data_flag();\n\n\t\t\treturn ( $changed_record_count > 0 );\n\t\t}",
"public function store()\n\t{\n\t\treturn false;\n\t}",
"public function Save()\r\n {\r\n return false;\r\n }",
"public function save()\n {\n $success = $this->obj->save();\n\n if (! $success)\n {\n if ($this->obj->valid)\n {\n $this->_set_error('Failed to save data!');\n }\n else\n {\n //Validation error\n $this->_set_error();\n }\n }\n\n return $success;\n }",
"function isDirty() : bool;",
"public function hasData(): bool\n {\n return !empty($this->data);\n }",
"public function isPersistent()\n {\n }",
"public function have_settings_been_saved() {\n\t\treturn self::$settings_saved;\n\t}",
"protected function afterStore(array &$data, CrudModel $model)\n {\n return true;\n }",
"public function isDataDumpAvailable()\n {\n $result = self::checkFileAccess(Registry::get('config.dir.install') . App::DB_DATA);\n\n if (!$result) {\n $app = App::instance();\n $app->setNotification('E', $app->t('error'), $app->t('data_dump_is_not_available'), true);\n }\n\n return $result;\n }",
"function currentFormHasData() {\n global $double_data_entry, $user_rights, $quesion_by_section, $pageFields;\n\n $record = $_GET['id'];\n if ($double_data_entry && $user_rights['double_data'] != 0) {\n $record = $record . '--' . $user_rights['double_data'];\n }\n\n if (PAGE != 'DataEntry/index.php' && $question_by_section && Records::fieldsHaveData($record, $pageFields[$_GET['__page__']], $_GET['event_id'])) {\n // The survey has data.\n return true;\n }\n\n if (Records::formHasData($record, $_GET['page'], $_GET['event_id'], $_GET['instance'])) {\n // The data entry has data.\n return true;\n }\n\n return false;\n }",
"public function dirty()\n\t{\n\t\tif ( ! $this->app['files']->exists($this->cacheFilePath))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"function checkSaveCall()\n{\tif ( !wp_verify_nonce( $_POST['smille_fields_nonce'], plugin_basename(__FILE__) )) {\n\t\treturn false;\n\t}\n\t\n\t// verify if this is an auto save routine. If it is our form has not been submitted, so we dont want to do anything\n\tif ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) { return false; }\n\t\n\t return true;\n}",
"public function valid()\n {\n return $this->storage->valid();\n }",
"private static function save() {\n\t\tif(self::$data===null) throw new Excepton('Save before load!');\n\t\t$fp=fopen(self::$datafile,'w');\n\t\tif(!$fp) throw new Exception('Could not write data file!');\n\t\tforeach (self::$data as $item) {\n\t\t\tfwrite($fp,$item); // we use the __toString() here\n\t\t}\n\t\tfclose($fp);\n\t}",
"public function valid()\n {\n if (count($this->data) < 1) {\n if ($this->provider instanceof \\Closure) {\n $this->data = $this->provider->__invoke($this->key);\n } else {\n $this->data = $this->manuallyAddedData;\n $this->manuallyAddedData = array();\n }\n }\n\n return count($this->data) > 0;\n }",
"function save($data)\n {\n $query = $this->db->get_where( $this->_tablename, 'shop = \\'' . $this->_shop . '\\'');\n $result = $query->result();\n \n if( count( $result ) <= 0 )\n $this->db->insert( $this->_tablename, $data);\n else\n $this->db->update( $this->_tablename, $data);\n \n if($this->db->affected_rows()>0){\n return true;\n }\n else{\n return false;\n }\n }",
"private function saveData(): void\n {\n $this->tab_chat_call->call_update = gmdate(\"Y-m-d H:i:s\"); //data e hora UTC\n $result = $this->tab_chat_call->save();\n\n if ($result) {\n $this->Result = true;\n $this->Error = [];\n $this->Error['msg'] = \"Sucesso!\";\n $this->Error['data']['call'] = $this->tab_chat_call->call_id;\n } else {\n $this->Result = false;\n $this->Error = [];\n $this->Error['msg'] = $this->tab_chat_call->fail()->getMessage();\n $this->Error['data'] = null;\n }\n }",
"function save($data = [])\n\t{\n\t\tif($this->db->insert('receivings_transactions', $data))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function getSavedData()\n {\n\n return $this->savedData;\n\n }",
"public function isDirty()\r\n\t{\r\n\t\treturn (count($this->changelog)>0) ? true : false;\r\n\t}",
"function Check()\n {\n if (file_exists($this->save)) {\n $jsondecode = file_get_contents($this->save);\n }\n\n $decoded = json_decode($jsondecode, true);\n if ($decoded == NULL) {\n $this->register_start();\n } else {\n for ($i = 0; $i < count($decoded) + 1; $i++) {\n\n if (($decoded)[$i][0]['Starttime'] == NULL && ($decoded)[$i][0]['Endtime'] == NULL) {\n $this->register_start();\n }\n if (($decoded)[$i][0]['Endtime'] == \"\" && ($decoded)[$i][0]['Starttime'] != NULL) {\n $this->register_end();\n break;\n }\n }\n }\n }",
"public function save()\r\n {\r\n if( empty($this->dirty) ) return true;\r\n \r\n $pkName = $this->pkName();\r\n //is it an update?\r\n if( isset($this->data[$pkName]) ){\r\n $this->table->update($this->dirty, \"{$pkName}=?\", array($this->data[$pkName]) );\r\n $merged_data[$pkName] = $this->data[$pkName];\r\n } else {\r\n //it's an insert\r\n $merged_data = array_merge(\r\n $this->array_diff_schema($this->dirty),\r\n $this->array_diff_schema($this->data)\r\n );\r\n $this->table->insert($merged_data);\r\n $pk = $this->pkName();\r\n if( !isset($merged_data[$pk]) )\r\n $merged_data[$pk] = $this->table->lastInsertId();\r\n }\r\n $this->reset($merged_data);\r\n return true;\r\n }",
"private function _isCardSaved() {\n\t $tokenId = (int) $this->getInfoInstance()->getAdditionalInformation('token_id');\n\t return (boolean)($this->getInfoInstance()->getAdditionalInformation('create_token') === 'true') &&\n\t !($tokenId && ($tokenId > 0));\n\t}",
"public function beforeSave()\n\t{\n\t\tif (parent::beforeSave())\n\t\t{\n\t\t\t$this->last_modified = time();\n\t\t\tif ($this->isNewRecord)\n\t\t\t{\n\t\t\t\tYii::log(\"new pic uploaded and processed.\");\n\t\t\t\tif ($this->data!=null)\n\t\t\t\t{\n\t\t\t\t\t$this->resizefile();\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\tYii::log(\"process pic failed with data = null\", \"error\");\n\t\t\t\t\tYii::log(\"process pic failed with data = null\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tYii::log(\"process pic failed with parent save = null\", \"error\");\n\t\t\tYii::log(\"process pic failed with parent save = null\");\n\t\t\treturn (false);\n\t\t}\n\t}",
"public function save(): bool\n {\n return $this->id > 0\n ? $this->actionHandler->update()\n : $this->actionHandler->insert();\n }"
] | [
"0.75610065",
"0.70083016",
"0.6977446",
"0.6933225",
"0.69051766",
"0.6817394",
"0.68078536",
"0.68033856",
"0.6791581",
"0.6771454",
"0.67361313",
"0.6735232",
"0.6730853",
"0.66952455",
"0.6607865",
"0.65971136",
"0.65971136",
"0.65971136",
"0.65905493",
"0.65905464",
"0.65662056",
"0.65632224",
"0.6547363",
"0.6544972",
"0.65355617",
"0.65046644",
"0.6492045",
"0.64851123",
"0.64799476",
"0.6462599",
"0.64433247",
"0.6434478",
"0.64328957",
"0.64181817",
"0.6414141",
"0.6408847",
"0.640126",
"0.63876516",
"0.6378578",
"0.6348206",
"0.6348206",
"0.6341118",
"0.6327199",
"0.62987787",
"0.627222",
"0.6268199",
"0.62642014",
"0.62626505",
"0.6261356",
"0.62566805",
"0.6253453",
"0.62528056",
"0.6251279",
"0.6227683",
"0.6227683",
"0.6227683",
"0.6227683",
"0.6227683",
"0.6227683",
"0.6227683",
"0.6227683",
"0.6227683",
"0.6227683",
"0.62144184",
"0.62135863",
"0.62048215",
"0.6182956",
"0.6176205",
"0.61721504",
"0.6166699",
"0.61589736",
"0.61460394",
"0.61422163",
"0.61387795",
"0.61286926",
"0.61151606",
"0.6110485",
"0.6109698",
"0.61060154",
"0.60926986",
"0.6092631",
"0.60912246",
"0.609056",
"0.6090038",
"0.60798913",
"0.60684407",
"0.60561734",
"0.60535896",
"0.6051708",
"0.6049825",
"0.60494286",
"0.60309577",
"0.6030689",
"0.60296786",
"0.60294574",
"0.60131186",
"0.60002434",
"0.6000216",
"0.5996142",
"0.5994608",
"0.59928215"
] | 0.0 | -1 |
Create a new policy instance. | public function __construct()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function createPolicy() {\n\t\tthrow new CmisNotImplementedException(\"createPolicy\");\n\t}",
"public function testPolicyCanBeCreated()\n {\n $policy = factory(App\\Models\\Policy::class)->create([\n 'title' => 'Administrator',\n ]);\n\n $this->assertEquals($policy->title, 'Administrator');\n\n $this->seeInDatabase('policies', ['id' => '1', 'title' => 'Administrator']);\n }",
"public function toPolicy()\n {\n return new Policy($this->calls);\n }",
"public function addPolicy(Policy $policy)\n {\n $this->policies[] = $policy;\n return $this;\n }",
"public function policy(Policy $policy = null)\n {\n if(null === $policy)\n {\n return $this->child('policy');\n }\n return $this->child('policy', $policy);\n }",
"public function __construct($childPolicy) { }",
"public function getPolicy()\n {\n return Controllers\\PolicyController::getInstance();\n }",
"public function create()\n {\n return view('policy.create');\n }",
"public function create()\n {\n return view('admin.policy.create');\n }",
"public function create(Request $request)\n {\n $policy = new Policy();\n\n $now = Carbon::now();\n $next_year = Carbon::now()->addYear()->subDay();\n\n $policy->date_from = $now->format('d.m.Y');\n $policy->time_from = $now->addHour()->format('H').':00';\n $policy->date_to = $next_year->format('d.m.Y');\n $policy->time_to = '24:00';\n $policy->sign_date = $now->format('d.m.Y');\n $policy->same_client_owner = true;\n $policy->p_base = 4118;\n $policy->p_k1 = 1.8;\n $policy->p_k2 = 1.0;\n $policy->p_k3 = 1.0;\n $policy->p_k4 = 1.0;\n $policy->p_k5 = 1.0;\n $policy->p_k6 = 1.0;\n $policy->p_k7 = 1.0;\n $policy->p_k8 = 1.0;\n $policy->policy_serial = 'EEE';\n $policy->dk_date = $next_year->format('d.m.Y');\n $policy->t_amount = 500.0;\n $policy->f_amount = 2000.0;\n\n $max_policy_number = Policy::all()->max('policy_number');\n if(!$max_policy_number){\n $max_policy_number = '0724573036';\n }\n $max_receipt_number = Policy::all()->max('receipt_number');\n if(!$max_receipt_number){\n $max_receipt_number = '1711116';\n }\n $policy->policy_number = str_pad((int)$max_policy_number + 1, 10, '0', STR_PAD_LEFT);\n $policy->receipt_number = (int)$max_receipt_number + 1;\n\n $vehicles = [];\n $client = Client::find($request->get('client_id'));\n if($client){\n $policy->client = $client;\n $policy->drivers = $client->drivers;\n $vehicles = $client->vehicles;\n //if(!empty($vehicles)){\n // $policy->vehicle = $client->vehicles()->first();\n //}\n }\n $policy->company_name = trans('policy.Company Megaruss');\n $policy->owner_company = false;\n\n session()->put('url.intended', URL::previous());\n\n $companies = Policy::getCompanyOptionsForSelect();\n $makers = Vehicle::getMakeOptionsForSelect();\n\n return view('policies.create', compact('policy','vehicles','companies','makers'));\n }",
"public function policy($force_new = false)\n\t{\n\t\tif ((! $force_new) && (! is_null($this->policy))) {\n\t\t\treturn $this->policy;\n\t\t}\n\n\t\treturn $this->policy = policy($this->policy_class);\n\t}",
"public function create(PolicyCreateResponseModel $responseModel): ViewModel;",
"public function __construct() {\n parent::__construct();\n $this->setOdataType('#microsoft.graph.stsPolicy');\n }",
"protected function getCreateNewObjectPolicy() {\n return PhabricatorPolicies::POLICY_NOONE;\n }",
"public function run()\n\t{\n\t\t/** Access policy for admin\n\t\t */\n\t\tApp\\Model\\Base\\Policy::create([\n\t\t\t'name' => 'Admin',\n\t\t\t'description' => 'Access policy for admin',\n\t\t]);\n\n\t\t/** Access policy for manager\n\t\t */\n\t\tApp\\Model\\Base\\Policy::create([\n\t\t\t'name' => 'Manager',\n\t\t\t'description' => 'Access policy for manager',\n\t\t]);\n\n\t\t/** Access policy for simple member\n\t\t */\n\t\tApp\\Model\\Base\\Policy::create([\n\t\t\t'name' => 'Member',\n\t\t\t'description' => 'Access policy for simple member',\n\t\t]);\n\t}",
"public function store(Request $request)\n {\n\n $rules = [\n 'sub_broker_name',\n 'policy_holder_name',\n 'category',\n 'product_name',\n 'policy_amount',\n 'issuing_status',\n ];\n\n $this->validate($request, $rules);\n\n $policy = new Policy;\n\n $policy->sub_broker_id = $request->sub_broker_name;\n $policy->policy_holder_name = $request->policy_holder_name;\n $policy->category = $request->category;\n $policy->product_name = $request->product_name;\n $policy->policy_amount = $request->policy_amount;\n $policy->issuing_status = $request->issuing_status;\n\n $policy->save();\n\n// $data = $request->all();\n// $subbroker = Policy::create($data);\n\n return redirect()->route('policy.index');\n }",
"public static function create() {}",
"public static function create() {}",
"public static function create() {}",
"public function createPolicy(\n $repositoryId,\n PropertiesInterface $properties,\n $folderId = null,\n array $policies = [],\n AclInterface $addAces = null,\n AclInterface $removeAces = null,\n ExtensionDataInterface $extension = null\n ) {\n // TODO: Implement createPolicy() method.\n }",
"public function create() {}",
"public function newInstance();",
"public function newInstance();",
"public function store(Request $request, PrivacyPolicy $PrivacyPolicy)\n {\n //dd(10);\n $inputArr['title'] = $request->get('title');\n $inputArr['description'] = $request->get('description');\n $PrivacyPolicy = $PrivacyPolicy->saveNewPolicy($inputArr);\n if(!$PrivacyPolicy){\n return redirect()->back()->with('error', 'Unable to add questionnaire. Please try again later.');\n }\n\n return redirect()->route('admin.privacypolicy.index')->with('success_message', 'New Privacy & Policy created successfully.');\n }",
"public function createPolicy(User $user)\n {\n return $user->may(static::PERMISSION_CREATE);\n }",
"public function createPolicy(User $user)\n {\n return $user->may(static::PERMISSION_CREATE);\n }",
"public function Create()\n\t{\n\t\treturn new self;\n\t}",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n {\n return new self();\n }",
"public static function create()\n\t{\n\t\treturn new self;\n\t}",
"public function store(Request $request)\n {\n $this->validate($request, $this->rules);\n $mytime = Carbon\\Carbon::now();\n $policy = PrivacyPolicy::create($request->all() + [\n 'created_by' => Auth::user()->id,\n 'created_at' => $mytime->toDateTimeString()\n ]);\n \\Session::flash('flash_message','You have just created new Privacy Policy.');\n return redirect()->route('privacyPolicy.index');\n }",
"public static function create() {\n return new self();\n }",
"public static function create() {\n\t\treturn new self();\n\t}",
"public function create()\n {\n $id = DB::table('policies')->max('id');\n\n $id += 1;\n\n return view('admin.policies.create', compact('id'));\n }",
"public function create()\n {\n return new $this->class;\n }",
"public static function create()\n\t\t{\n\t\t\treturn new self();\n\t\t}",
"private function createCollectionPolicy() {\n module_load_include('inc', 'fedora_repository', 'api/fedora_item');\n $fedora_item = new fedora_item($this->contentModelPid);\n $datastreams = $fedora_item->get_datastreams_list_as_array();\n if (isset($datastreams['COLLECTION_POLICY_TMPL'])) {\n $collection_policy_template = $fedora_item->get_datastream_dissemination('COLLECTION_POLICY_TMPL');\n $collection_policy_template_dom = DOMDocument::loadXML($collection_policy_template);\n $collection_policy_template_root = $collection_policy_template_dom->getElementsByTagName('collection_policy');\n if ($collection_policy_template_root->length > 0) {\n $collection_policy_template_root = $collection_policy_template_root->item(0);\n $node = $this->importNode($collection_policy_template_root, TRUE);\n $datastream = $this->createDatastreamElement('COLLECTION_POLICY', 'A', 'X');\n $version = $this->createDatastreamVersionElement('COLLECTION_POLICY.0', 'Collection Policy', 'text/xml');\n $content = $this->createDatastreamContentElement();\n $this->root->appendChild($datastream)->appendChild($version)->appendChild($content)->appendChild($node);\n }\n }\n }",
"public function create()\n\t{\n\t\t//Permissions are created via code\n\t}",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public function create();",
"public static function create(): self\n {\n return new self();\n }",
"public static function create(): self\n {\n return new self();\n }",
"public function create(){}",
"public function addToPolicyID($policyID)\n {\n $this->policyID[] = $policyID;\n return $this;\n }",
"public static function newInstance()\n {\n $instance = new self;\n return $instance;\n }",
"public function store(StorePolicyRequest $request)\n {\n\n $client = Client::find($request->input('client.id'));\n\n if(!$client){\n $client = new Client();\n }\n $client->fill($request->input('client'));\n $client->save();\n\n if($request->has('vehicle.id')){\n $vehicle = Vehicle::find($request->input('vehicle.id'));\n }else{\n $vehicle = new Vehicle();\n }\n $vehicle->fill($request->input('vehicle'));\n $vehicle->client()->associate($client);\n $vehicle->save();\n\n $policy = new Policy($request->all());\n $policy->client()->associate($client);\n if($request->input('same_client_owner')){\n $policy->setOwnerData($client);\n }\n $policy->vehicle()->associate($vehicle);\n $policy->save();\n\n $drivers_sync = [];\n foreach($request->input('drivers') as $key => $driver){\n if(!empty($driver['name'])){\n $d = Driver::find($driver['id']);\n if(!$d){\n $d = new Driver();\n }\n $d->fill($driver);\n $d->client()->associate($client);\n $d->save();\n array_push($drivers_sync, $d->id);\n }\n }\n $policy->drivers()->sync($drivers_sync);\n\n flash()->success('Policy has been created successfully.');\n return Redirect::intended('/');\n }",
"protected function policy()\n {\n return $this->gate()->getPolicyFor($this);\n }",
"public function run()\n {\n PrivacyPolicy::create([\n\n 'main_text'=>[\n 'ar'=>'نص رئيسي',\n 'en'=>'main',\n ],\n 'text_one'=>[\n 'ar'=>'نص رئيسي',\n 'en'=>'main',\n ],\n 'text_two'=>[\n 'ar'=>'نص رئيسي',\n 'en'=>'main',\n ],\n 'text_three'=>[\n 'ar'=>'نص رئيسي',\n 'en'=>'main',\n ],\n 'text_four'=>[\n 'ar'=>'نص رئيسي',\n 'en'=>'main',\n ],\n 'text_five'=>[\n 'ar'=>'نص رئيسي',\n 'en'=>'main',\n ],\n 'text_six'=>[\n 'ar'=>'نص رئيسي',\n 'en'=>'main',\n ],\n 'text_seven'=>[\n 'ar'=>'نص رئيسي',\n 'en'=>'main',\n ],\n 'text_eight'=>[\n 'ar'=>'نص رئيسي',\n 'en'=>'main',\n ],\n ]);\n }",
"public function create()\n {}",
"public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }",
"public function create(ReturnPolicyRequest $Model): SetReturnPolicyResponse\n {\n return $this->client->request('createReturnPolicy', 'POST', 'return_policy',\n [\n 'json' => $Model->getArrayCopy(),\n ]\n );\n }",
"public function create() {\n\t\t\t//\n\t\t}",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public static function create()\n {\n return new static();\n }",
"public function create()\n {\n $this->cpAuthorize();\n }",
"public static function create()\n {\n return new static;\n }",
"public static function create()\n {\n return new static;\n }",
"public static function create()\n {\n return new static;\n }",
"public static function create()\n {\n return new static;\n }"
] | [
"0.69238234",
"0.63803977",
"0.63180053",
"0.6157489",
"0.59963197",
"0.5828844",
"0.5753017",
"0.5750766",
"0.57240343",
"0.5712267",
"0.57120466",
"0.5633073",
"0.5629794",
"0.5476492",
"0.5414451",
"0.536653",
"0.5354097",
"0.5354097",
"0.5354097",
"0.53313726",
"0.5293763",
"0.5292304",
"0.5292304",
"0.52784693",
"0.52376395",
"0.52376395",
"0.52274543",
"0.5222868",
"0.5222868",
"0.5222868",
"0.5222868",
"0.5222868",
"0.5222868",
"0.5222868",
"0.5222868",
"0.5222868",
"0.5222868",
"0.5222868",
"0.5222868",
"0.5222868",
"0.5222868",
"0.5222868",
"0.5222868",
"0.5222868",
"0.5222868",
"0.5222868",
"0.5222868",
"0.5222868",
"0.52038455",
"0.5195074",
"0.5190787",
"0.5188793",
"0.51716197",
"0.5159273",
"0.5158003",
"0.51553255",
"0.5153394",
"0.51464254",
"0.51464254",
"0.51464254",
"0.51464254",
"0.51464254",
"0.51464254",
"0.51464254",
"0.51464254",
"0.51464254",
"0.51464254",
"0.51464254",
"0.51383084",
"0.51383084",
"0.51305",
"0.5099971",
"0.5092445",
"0.5087874",
"0.50853986",
"0.5082831",
"0.5065765",
"0.50374144",
"0.503741",
"0.50371057",
"0.50312907",
"0.50312907",
"0.50312907",
"0.50312907",
"0.50312907",
"0.50312907",
"0.50312907",
"0.50312907",
"0.50312907",
"0.50312907",
"0.50312907",
"0.50312907",
"0.50312907",
"0.50312907",
"0.50312907",
"0.50312907",
"0.50251085",
"0.5007391",
"0.5007391",
"0.5007391",
"0.5007391"
] | 0.0 | -1 |
Define the model's default state. | public function definition()
{
$this->faker->addProvider(new PersianFaker($this->faker));
$tags = collect([
"در آستانه ازدواج",
"در انتظار جهیزیه",
"محصل با استعداد",
"فقر مالی شدید",
"دارای مشکل تنفسی",
"محصل",
"دانشجو",
"بحران روحی",
"خانوار پر جمعیت",
"استعداد درخشان",
"دارای معلولیت",
]);
return [
'first_name' => $this->faker->firstName,
'last_name' => $this->faker->lastName,
'emotional_text' => $this->faker->realText(100),
'national_code' => "090" . $this->faker->shuffleString("05654654") ,
'about' => $this->faker->realText(500),
'birth_date' => $this->faker->dateTimeBetween("-18 years", "-1 years"),
'priority' => random_int(1, 9),
'city_id' => 1,
'office_id' => 1,
'type' => random_int(1,2),
'sex' => random_int(1,2),
'tags' => $tags->shuffle()->skip(random_int($tags->count()-6,$tags->count()-2))->toArray(),
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getDefaultState()\r\n\t{\r\n\t}",
"static function get_default_state();",
"public function getDefaultUserState();",
"private function setDefaultStates(): void\n {\n foreach ($this->arr_attributes as $strParamName) {\n $this->states[$strParamName] = $this->params->get($strParamName, 0);\n }\n }",
"abstract protected function getDefaultModel();",
"public function applyDefaultValues()\n {\n $this->is_active = false;\n $this->is_closed = false;\n }",
"protected function getDefaultModelObject() : void\n {\n return;\n }",
"public function applyDefaultValues()\n {\n $this->active = false;\n }",
"protected function makeDefault()\n {\n $this->options = [];\n $this->menuSource = MenuSource::STATIC_SOURCE;\n $this->action = new Action(ActionType::MENU(), 'Default menu name', 'Default menu text');\n }",
"public function set()\n {\n\t\tif ($this->model->state())\n $this->model->set();\n }",
"public function __default()\n\t{\n\n\t}",
"protected function initial_set_default() {\n\t\tif ( isset( $this->field[ 'config' ][ 'default' ] ) ) {\n\t\t\t$this->default = $this->field[ 'config' ][ 'default' ];\n\t\t} else {\n\t\t\t$this->default = '';\n\t\t}\n\t}",
"public function applyDefaultValues()\n\t{\n\t\t$this->type = 1;\n\t\t$this->total_index = 0;\n\t\t$this->is_published = true;\n\t\t$this->is_featured = false;\n\t\t$this->comments_count = 0;\n\t}",
"public function setModelDefaults() \n {\n if (!empty($this->model->defaultFieldValues())) {\n \n foreach($this->model->defaultFieldValues() as $field => $defaultValue) {\n\n $this->model->$field = $defaultValue;\n }\n } \n }",
"function getDefaultState(){\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->where(array('is_default'=>true));\r\n\t\t$recordSet = $this->db->get(TBL_MST_STATES);\r\n\t\t$data=$recordSet->result() ;\r\n\t\treturn $data[0]->id;\r\n\t}",
"public function setValueDefault()\n {\n $this->isActive = true;\n $this->createdAt = new \\DateTime();\n }",
"public function applyDefaultValues()\n {\n $this->deleted = false;\n $this->amount = 1;\n $this->amountevaluation = 0;\n $this->defaultstatus = 0;\n $this->defaultdirectiondate = 0;\n $this->defaultenddate = 0;\n $this->defaultpersoninevent = 0;\n $this->defaultpersonineditor = 0;\n $this->maxoccursinevent = 0;\n $this->showtime = false;\n $this->ispreferable = true;\n $this->isrequiredcoordination = false;\n $this->isrequiredtissue = false;\n $this->mnem = '';\n }",
"public function getDefaultStateName() {\n return $this->values->get('DefaultStateName');\n }",
"public function default() {\n \n $this->data = ModuleConfig::settings();\n // [Module_Data]\n }",
"public static function bootStateMachine()\n {\n static::creating(function ($model) {\n $fieldState = $model->getFieldState();\n if (empty($model->$fieldState)) {\n $model->$fieldState = $model->getInitialState();\n }\n $model->beforeTransition($model->fromTransition, $model->toTransition);\n $model->setStateChangeAt();\n });\n static::created(function ($model) {\n $model->afterTransition($model->fromTransition, $model->toTransition);\n });\n static::saving(function ($model) {\n $model->beforeTransition($model->fromTransition, $model->toTransition);\n $model->setStateChangeAt();\n });\n static::saved(function ($model) {\n $model->afterTransition($model->fromTransition, $model->toTransition);\n });\n }",
"function _setModelState()\r\n {\r\n $state = parent::_setModelState(); \r\n $app = JFactory::getApplication();\r\n $model = $this->getModel( $this->get('suffix') );\r\n $ns = $this->getNamespace();\r\n\r\n $state['filter_id_from'] = $app->getUserStateFromRequest($ns.'id_from', 'filter_id_from', '', '');\r\n $state['filter_id_to'] = $app->getUserStateFromRequest($ns.'id_to', 'filter_id_to', '', '');\r\n $state['filter_name'] = $app->getUserStateFromRequest($ns.'name', 'filter_name', '', '');\r\n $state['filter_enabled'] = $app->getUserStateFromRequest($ns.'enabled', 'filter_enabled', '', '');\r\n $state['filter_taxclass'] = $app->getUserStateFromRequest($ns.'taxclass', 'filter_taxclass', '', '');\r\n $state['filter_shippingtype'] = $app->getUserStateFromRequest($ns.'shippingtype', 'filter_shippingtype', '', '');\r\n \r\n foreach (@$state as $key=>$value)\r\n {\r\n $model->setState( $key, $value ); \r\n }\r\n return $state;\r\n }",
"public function getInitialState(): StateContract\n {\n return $this->newState(['value' => 1]);\n }",
"public function state();",
"public function setUserDefaultStatus($userDefaultStatus);",
"public function setStateModel($stateModel) {}",
"public function getBaseState() {}",
"public function init()\r\n {\r\n $this->_helper->db->setDefaultModelName('DefaultMetadataValue');\r\n }",
"public function set_to_default()\n\t{\n\t\t// SimpleDB requires a value for every attribue...\n\t\t$this->_name = NULL;\n\t\t$this->_contextid = NULL;\n\t\t$this->_userid = NULL;\n $this->_deleted = 0;\n\t\t$this->_lastmodified = 0;\t\n\t}",
"public function create_default() {\n if (!$this->model->has_default()) {\n $default_data = [\n 'id' => 1,\n 'name' => 'Beregu',\n 'desc' => 'team vs team',\n ];\n $this->model->create_default($default_data);\n\n $default_data = [\n 'id' => 2,\n 'name' => 'Individu',\n 'desc' => 'individu vs individu',\n ];\n $this->model->create_default($default_data);\n }\n }",
"public function __construct(State $model)\n\t{\n\t\t$this->model = $model;\n\t}",
"public function getStateModel() {}",
"public function set_default_data() {\n\t\t$this->button_text_color = '#FFFFFF';\n\t\t$this->button_background_color = '#6699CC';\n\n\t\t$this->header_text_color = '#FFFFFF';\n\t\t$this->header_background_color = '#6699CC';\n\n\t\t$this->button_text = 'Do Not Sell My Data';\n\n\t\t$this->publish_status = 'Draft';\n\t\t$this->last_published = '';\n\n\t\t$this->ot_logo = '';\n\t\t$this->display_position = 'right';\n\t\t$this->floating_button\t= '';\n\t\t$this->isLinkEnabled \t= 'textlink';\n\t}",
"public function applyDefaultValues()\n\t{\n\t\t$this->points = '0';\n\t\t$this->type = 0;\n\t\t$this->hidden = 0;\n\t\t$this->relationship_status = 0;\n\t\t$this->show_email = 1;\n\t\t$this->show_gender = 1;\n\t\t$this->show_hometown = 1;\n\t\t$this->show_home_phone = 1;\n\t\t$this->show_mobile_phone = 1;\n\t\t$this->show_birthdate = 1;\n\t\t$this->show_address = 1;\n\t\t$this->show_relationship_status = 1;\n\t\t$this->credit = 0;\n\t\t$this->login = 0;\n\t}",
"public function initializeDefaults()\n {\n }",
"public function applyDefaultValues()\n\t{\n\t\t$this->ativo = true;\n\t\t$this->tipo_acesso = 'M';\n\t\t$this->estado_civil = 'O';\n\t\t$this->nivel_acesso = '1';\n\t\t$this->usuario_validado = false;\n\t}",
"public function setDefaultAttribute($value){\n $this->attributes['default'] = ($value === 'true' || $value ? true : false);\n}",
"private function _set_default()\r\n\t{\r\n\t\tif($this->input->post('default'))\r\n\t\t{\r\n\t\t\t$this->db->update('showcases',array('default' => 0));\r\n\t\t\t$this->db->where('id', $this->input->post('default'));\r\n\t\t\t$this->db->update('showcases',array('default' => 1));\r\n\t\t\t\r\n\t\t\t$this->set_message('success', 'Vetrina predefinita aggiornata con successo!');\r\n\t\t\tredirect($this->list);\r\n\t\t}\r\n\t}",
"public function applyDefaultValues()\n {\n $this->is_not = false;\n $this->rank = 0;\n }",
"public function __default()\r\n \t{\r\n \t if( self::isArg( 'notifwindow') )\r\n \t {\r\n $this->view = \"common_notifwindow\";\r\n \t $this->viewArgs['table'] = self::getArg( \"table\", AT_posint, true );\r\n \t }\r\n \t else\r\n \t {\r\n $this->view = \"dummygame_dummygame\";\r\n self::trace( \"Complete reinitialization of board game\" );\r\n }\r\n \t}",
"private function _load_default_model(){\n\n\t\t$default_model_name = strtolower(get_class($this)) . '_model';\n\n\t\tif(file_exists(APPPATH . 'models/' . $default_model_name . '.php')){\n\n\t\t\t$this->load->model($default_model_name, strtolower(get_class($this)));\n\t\t\t$this->_default_model = strtolower(get_class($this));\n\t\t}\n\n\t}",
"public function model()\n {\n return State::class;\n }",
"public function model()\n {\n return State::class;\n }",
"public function getDefault();",
"public function setDefaultValues()\n\t{\t\t\n\t\t\t \n\t}",
"protected function initialiseModel()\n {\n parent::initialiseModel();\n\n $this->SelectedTab = 0;\n }",
"final protected function _defaults(){\n if(! $this->_defaults) return;\n foreach($this->_defaults as $conf => $default_value){\n if(! self::inform($conf)) self::define($conf, $default_value);\n }\n }",
"public function useDefaults()\n\t{\n\t\t$this->use_defaults = true;\n\t}",
"public function set_behaviors_default_data() {\n\n\t\t$this->is_google_personalize_enabled = 'checked';\n\t\t$this->google_confirmation_title = 'Personalized advertisements';\n\t\t$this->google_confirmation_message = 'Turning this off will opt you out of personalized advertisements delivered from Google on this website.';\n\t\t$this->confirmbutton = 'Confirm';\n\t\t$this->is_email_enabled = 'checked';\n\t\t$this->email_address = '';\n\t\t$this->popup_main_title = 'Do Not Sell My Personal Information';\n\t\t$this->link_text = 'Privacy Policy';\n\t\t$this->link_url = '';\n\t\t$this->privacy_policy_message = 'Exercise your consumer rights by contacting us below';\n\t\t$this->is_phone_enabled = 'checked';\n\t\t$this->phone_number = '';\n\t\t$this->form_link_text = 'Exercise Your Rights';\n\t\t$this->form_link_url = '';\n\t\t$this->form_enable = 'checked';\n\t\t$this->publish_status = 'Draft';\n\t\t$this->last_published = '';\n\t\t$this->selectuseroption\t\t\t\t = 'All';\n\t\t$this->isIABEnabled \t\t\t\t = 'checked';\n\t\t$this->isLSPAenable \t\t\t\t = '';\n\t}",
"public function makeDefault() {\n $this->update([\n 'color' => null,\n 'size' => null\n ]);\n }",
"public function applyDefaultData()\n {\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $config = $objectManager->get('\\Magento\\Framework\\App\\Config\\ScopeConfigInterface');\n\n $this->setsup_is_active(1);\n $this->setsup_locale($config->getValue('general/locale/code'));\n $this->setsup_currency($config->getValue('currency/options/base'));\n $this->setsup_country($config->getValue('general/country/default'));\n\n return $this;\n }",
"protected function setDefaultValues()\n {\n parent::setDefaultValues();\n\t}",
"public function setDefaultStateName($stateName) {\n $this->values->put('DefaultStateName', $stateName);\n }",
"public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }",
"public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }",
"public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }",
"public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }",
"public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }",
"public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }",
"public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }",
"public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }",
"public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }",
"public function applyDefaultValues()\n {\n $this->jml_lantai = '1';\n $this->asal_data = '1';\n $this->last_sync = '1901-01-01 00:00:00';\n }",
"function init() {\n $this->options['selected'] = isset($this->options['value']) ?\n true : @(bool)$this->options['default'];\n }",
"public function __construct()\n {\n $this->applyDefaultValues();\n }",
"public function __construct()\n {\n $this->applyDefaultValues();\n }",
"public function __construct()\n {\n $this->applyDefaultValues();\n }",
"public function __construct()\n {\n $this->applyDefaultValues();\n }",
"public function __construct()\n {\n $this->applyDefaultValues();\n }",
"public function init() {\n\t\t// use this method to initialize default values.\n\t}",
"public function applyDefaultValues()\n\t{\n\t}",
"public function applyDefaultValues()\n\t{\n\t}",
"public function applyDefaultValues()\n\t{\n\t}",
"protected function cliModelInit()\n {\n }",
"function getDefaultValue() \n {\n return $this->getValueByFieldName( 'statevar_default' );\n }",
"public function __default()\r\n {\r\n if( self::isArg( 'notifwindow') ) {\r\n $this->view = \"common_notifwindow\";\r\n $this->viewArgs['table'] = self::getArg( \"table\", AT_posint, true );\r\n } else {\r\n $this->view = \"thecrew_thecrew\";\r\n self::trace( \"Complete reinitialization of board game\" );\r\n }\r\n }",
"public function toggleDefault()\n {\n $this->language->default = ! $this->language->default;\n }",
"public static function set_default_values() {\n\t\t?>\n\t\tcase \"nu_phone\" :\n\t\t\tfield.label = \"Phone\";\n\t\t\tfield.isRequired = true;\n\t\t\tfield.description = \"Numbers only. e.g. 8885551212\";\n\t\t\tbreak;\n\t\t<?php\n\t}",
"function post_model_init($from_cache = FALSE)\n {\n }",
"public static function preModel(){\n\t\t\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}",
"protected function get_default() {\n\t\treturn false;\n\t}",
"protected function setDefaultTemplate(): void\n {\n $this->setDefaultData(function(Generator $faker) {\n return [\n 'password' => 'xx',\n 'username' => $faker->email,\n 'modified' => time(),\n // set the model's default values\n // For example:\n // 'name' => $faker->lastName\n ];\n });\n }",
"function setDefault($value)\n {\n $this->_defValue = $value;\n }",
"public function __default()\r\n {\r\n if (self::isArg('notifwindow')) {\r\n $this->view = \"common_notifwindow\";\r\n $this->viewArgs['table'] = self::getArg(\"table\", AT_posint, true);\r\n } else {\r\n $this->view = \"lettertycoon_lettertycoon\";\r\n self::trace(\"Complete reinitialization of board game\");\r\n }\r\n }",
"protected function setDefaults()\n {\n return;\n }",
"public function defaultData();",
"public function getStatesModel()\n\t{\n\t\treturn $this->statesModel = new StatesModel();\n\t}",
"public function getDefaultValue();",
"public function getDefaultValue();",
"public function applyDefaultValues()\n\t{\n\t\t$this->closed = 0;\n\t\t$this->lastfmid = 0;\n\t\t$this->hasphotos = 0;\n\t}",
"public function applyDefaultValues()\n\t{\n\t\t$this->platform = 'pc';\n\t\t$this->experience_score = 0;\n\t\t$this->up_votes = 0;\n\t\t$this->down_votes = 0;\n\t\t$this->is_guest = 0;\n\t\t$this->is_admin = 0;\n\t\t$this->today_votes = 0;\n\t\t$this->email_on = 1;\n\t}",
"private function getStateDefaultStatus($state)\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\t$status = false;\n $stateNode = $this->_getState($state);\n if ($stateNode) {\n $status = $this->quoteStatusFactory->create()->loadDefaultByState($state);\n $status = $status->getStatus();\n }\n return $status;\n\t\t}\n\t}"
] | [
"0.77757794",
"0.72255844",
"0.6857964",
"0.67950636",
"0.67661",
"0.6433752",
"0.64074224",
"0.63712305",
"0.61876214",
"0.61864567",
"0.6159088",
"0.61543477",
"0.6153316",
"0.61428887",
"0.6116904",
"0.61084956",
"0.6106097",
"0.60391295",
"0.60389197",
"0.6019848",
"0.5986674",
"0.59860927",
"0.5976762",
"0.59668744",
"0.59477085",
"0.5901205",
"0.58822954",
"0.5878731",
"0.5871747",
"0.5848243",
"0.58415335",
"0.58413815",
"0.5833248",
"0.5825086",
"0.58250594",
"0.5806455",
"0.58058864",
"0.58041453",
"0.58029646",
"0.57660234",
"0.57429475",
"0.57429475",
"0.57427984",
"0.57279396",
"0.5711024",
"0.5692638",
"0.5673827",
"0.566948",
"0.5664214",
"0.5660662",
"0.56602883",
"0.5649529",
"0.56371003",
"0.56371003",
"0.56371003",
"0.56371003",
"0.56371003",
"0.56371003",
"0.56371003",
"0.56371003",
"0.56371003",
"0.5635351",
"0.5633597",
"0.5625998",
"0.5625998",
"0.5625998",
"0.5625998",
"0.5625998",
"0.56185526",
"0.5617039",
"0.5617039",
"0.5617039",
"0.559846",
"0.5595863",
"0.5588903",
"0.5571013",
"0.5570181",
"0.55631495",
"0.55542296",
"0.5544705",
"0.5544705",
"0.5544705",
"0.5544705",
"0.5544705",
"0.5544705",
"0.5544705",
"0.5544705",
"0.5544705",
"0.5544705",
"0.55306304",
"0.5529163",
"0.55278975",
"0.5527834",
"0.55129236",
"0.55105746",
"0.5509279",
"0.5508973",
"0.5508973",
"0.5507722",
"0.55054384",
"0.5486495"
] | 0.0 | -1 |
Method to create a connection to the Data Base | public static function connect()
{
//if the $db static attribute of this object (self) is empty ( self:: targets a static element of an object)
if(empty(self::$db))
{
//assignment to the attribute $db of the intanciation of the hydrated PDO object with the connection parameters
self::$db = new PDO(
"mysql:host=".DB_HOST.";dbname=".DB_NAME.";charset=utf8",
DB_USER, DB_PASS,
[
// display errors related to the Data Base
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
// return an associative array(string based) not numeric
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
// request send only to execute / not to prepare
PDO::ATTR_EMULATE_PREPARES => false,
]
);
}
return self::$db;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function connectToDB() {}",
"public function getConnection();",
"public function getConnection();",
"public function getConnection();",
"public function getConnection();",
"public function getConnection();",
"public function getConnection();",
"public function getConnection();",
"public function getConnection();",
"public function getConnection();",
"public function getConnection();",
"public function getConnection();",
"public function getConnection();",
"protected function createDatabaseConnection()\r\n\t{\r\n\t\t$this->dbConnectionPool = new \\Bitrix\\Main\\Db\\DbConnectionPool();\r\n\t}",
"private function connect()\n {\n if ($this->configuration->get('db.connector') == 'PDO') {\n $dsn = \"mysql:host=\" . $this->configuration->get('db.host') . \";dbname=\" . $this->configuration->get('db.name');\n $options = array();\n $this->db = new PDO(\n $dsn, $this->configuration->get('db.username'), $this->configuration->get('db.password'), $options\n );\n } elseif ($this->configuration->get('db.connector') == 'mysqli') {\n $this->db = mysqli_connect(\n $this->configuration->get('db.host'), $this->configuration->get('db.username'), $this->configuration->get('db.password'), $this->configuration->get('db.name')\n );\n }\n }",
"public function createConnection()\n {\n $client = DatabaseDriver::create($this->getConfig());\n\n return $client;\n }",
"public function connect()\n {\n $driver = 'DB'; // default driver\n $dsn = $this->getParameter('dsn');\n\n $do = $this->getParameter('dataobject');\n if ($do && isset($do['db_driver'])) {\n $driver = $do['db_driver'];\n }\n\n if ('DB' == $driver) {\n\n if (!class_exists('DB')) {\n include('DB.php');\n }\n\n $options = PEAR::getStaticProperty('DB', 'options');\n if ($options) {\n $this->connection = DB::connect($dsn, $options);\n } else {\n $this->connection = DB::connect($dsn);\n }\n \n } else {\n\n if (!class_exists('MDB2')) {\n include('MDB2.php');\n }\n \n $options = PEAR::getStaticProperty('MDB2', 'options');\n $this->connection = MDB2::connect($dsn, $options);\n }\n\n if (PEAR::isError($this->connection)) {\n\n throw new AgaviDatabaseException($this->connection->getMessage());\n $this->connection = Null;\n }\n }",
"private function connectDatabase() {\r\r\n\t\t$this->dbHandle = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\Database\\\\DatabaseConnection');\r\r\n\t\t$this->dbHandle->setDatabaseHost($this->dbHost);\r\r\n\t\t$this->dbHandle->setDatabaseUsername($this->dbUsername);\r\r\n\t\t$this->dbHandle->setDatabasePassword($this->dbPassword);\r\r\n\t\t$this->dbHandle->setDatabaseName($this->db);\r\r\n\t\t$this->dbHandle->sql_pconnect();\r\r\n\t\t$this->dbHandle->sql_select_db();\r\r\n\t}",
"abstract public function getConnection();",
"public function connect()\r\n\t{\r\n\t\t$options = array(\r\n\t\t\t'driver' => $this->_driver,\r\n\t\t\t'host' => $this->_host,\r\n\t\t\t'user' => $this->_username,\r\n\t\t\t'password' => $this->_password,\r\n\t\t\t'database' => $this->_database,\r\n\t\t\t'prefix' => $this->_prefix\r\n\t\t);\r\n\t\t\r\n\t\t$this->_instance = JFlappConnectorTypeDatabase::getInstance( $options );\r\n\t\r\n\t\treturn $this->_instance;\r\n\t}",
"public function connectDB() {}",
"public function createClient(){\n $config = new DBALConfiguration();\n $this->dbConnection = DBALDriverManager::getConnection($this->config, $config);\n }",
"private function dbConnect(){\n $database=new \\Database();\n return $database->getConnection();\n }",
"public function getConnect()\n {\n $this->conn = Registry::get('db');\n }",
"public static function connect() {\n $databaseConfig = Config::getDatabase();\n $databaseClass = $databaseConfig['class'];\n $databaseFile = SRC.'lib/db/databases/'.$databaseClass.'.php';\n if (!file_exists($databaseFile)) {\n throw new SynopsyException(\"Database class file '$databaseFile' doesn't exist!\");\n }\n require_once($databaseFile);\n $c = \"\\Synopsy\\Db\\Databases\\\\$databaseClass\";\n self::$instance = new $c();\n if (!self::$instance instanceof DatabaseInterface) {\n throw new SynopsyException(\"Database class '$databaseClass' doesn't implement DatabaseInterface interface!\");\n }\t\n self::$instance->connect($databaseConfig);\n }",
"protected function openConn() {\n $database = new Database();\n $this->conn = $database->getConnection();\n }",
"public function openConnection() {\n if($this->database != null) return;\n\n $config = $this->getDatabaseConfig();\n\n try {\n $this->database = new \\PDO(\n 'mysql:dbname=' . $config['database'] . ';host=' . $config['host'] . ':' . $config['port'],\n $config['username'],\n $config['password'],\n [\n \\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION,\n \\PDO::ATTR_DEFAULT_FETCH_MODE => \\PDO::FETCH_ASSOC\n ]\n );\n } catch(\\PDOException $exception) {\n die('Connection to mysql-server failed: ' . $exception->getMessage());\n }\n }",
"public static function makeConnection()\n {\n self::$connectionManager = new ConnectionManager();\n self::$connectionManager->addConnection([\n 'host' => self::$config['host'],\n 'user' => self::$config['user'],\n 'password' => self::$config['password'],\n 'dbname' => self::$config['dbname']\n ]);\n self::$connectionManager->bootModel();\n }",
"function create_connection(){\n\t\t$this->dbconn =& new DBConn();\r\n\t\tif($this->dbconn == NULL)\r\n\t\t\tdie('Could not create connection object');\n\t}",
"private function databaseConnection()\n {\n // Les connexions sont établies en créant des instances de la classe de base de PDO\n $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n $this->db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS, $options);\n }",
"protected function db_connect() {\n \n // Data source name\n $this->dsn = 'mysql:host=' . $this->db_host . ';dbname=' . $this->db_name . ';charset=' . $this->db_charset;\n\n // Makes a connection to the database\n $this->db_conn = new PDO( $this->dsn, $this->db_user, $this->db_password );\n\n // When fetching an SQL row it turn into an object\n $this->db_conn->setAttribute( PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ );\n // Gives the Error reporting atribute and throws exeptions\n $this->db_conn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n \n // Returns the connection\n return $this->db_conn;\n\n }",
"private function connect()\n {\n if (! is_null(self::$db)) {\n return;\n }\n\n // $this->host \t= $Database->host;\n // $this->user \t= $Database->user;\n // $this->pass \t= $Database->pass;\n // $this->database\t= $Database->database;\n\n $conn = 'mysql:dbname=' . $this->dbInfo->database . ';host=' . $this->dbInfo->host.';charset=utf8';\n try {\n self::$db = new PDO($conn, $this->dbInfo->user, $this->dbInfo->pass);\n } catch (PDOException $e) {\n die('Could not connect to database (' . $conn . ')');\n }\n }",
"private function connecDb()\n {\n try{\n $dsn = \"{$this->db_type}:host={$this->db_host};port={$this->db_port};\";\n $dsn .= \"dbname={$this->db_name};charset={$this->db_charset}\";\n //echo \"$dsn, $this->db_user, $this->db_pass\";\n $this->pdo = new PDO($dsn,$this->db_user,$this->db_pass);\n }catch(PDOException $e){\n echo\"<h2>创建POD对象失败</h2>\";\n $this->ShowErrorMessage($e);\n die();\n }\n }",
"protected function openConn()\n {\n $database = new Database();\n $this->conn = $database->getConnection();\n }",
"private function connect()\n {\n $connection_string = 'mysql:host=' . DB_HOST . ';dbname=' . DB_NAME . ';';\n $this->connection = new PDO($connection_string, DB_USER, DB_PASS);\n }",
"public function connect()\n {\n $config = $this->config;\n $config = array_merge($this->_baseConfig, $config);\n\n $conn = \"DATABASE='{$config['database']}';HOSTNAME='{$config['host']}';PORT={$config['port']};\";\n $conn .= \"PROTOCOL=TCPIP;UID={$config['username']};PWD={$config['password']};\";\n\n if (!$config['persistent']) {\n $this->connection = db2_connect($conn, PGSQL_CONNECT_FORCE_NEW);\n } else {\n $this->connection = db2_pconnect($conn);\n }\n $this->connected = false;\n\n if ($this->connection) {\n $this->connected = true;\n $this->query('SET search_path TO '.$config['schema']);\n }\n if (!empty($config['charset'])) {\n $this->setEncoding($config['charset']);\n }\n\n return $this->connection;\n }",
"private function connect()\n\t{\n\t\t$connectionData = $this->app->file->requireFile('config.php');\n\t\t\n\t\textract($connectionData);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tstatic::$connection = new PDO('mysql:host=' . $server . ';dbname=' . $dbname, $dbuser, $dbpass);\n\t\t\t\n\t\t\tstatic::$connection->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n\t\t\t\n\t\t\tstatic::$connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t\t\n\t\t\tstatic::$connection->exec('SET NAMES utf8');\n\t\t}\n\t\tcatch (PDOException $e)\n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\t\t\t\t\n\t}",
"private function createConnection()\n {\n\n //Pull db credentials from a .ini file in the private folder.\n $config = parse_ini_file('db.ini');\n\n $username = $config['username'];\n $password = $config['password'];\n $hostName = $config['servername'];\n $dbName = $config['dbname'];\n $dsn = 'mysql:host=' . $hostName . ';dbname=' . $dbName . ';';\n\n\n try {\n\n //Create connection\n $this->db = new PDO($dsn, $username, $password);\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch (PDOException $e) {\n\n $error_message = $e->getMessage();\n echo $error_message;\n }\n }",
"function _getConnection()\n {\n $this->_con = Pluf::db();\n }",
"public function connectToDatabase(){\n\t\t$dbinfo=$this->getDBinfo();\n\n\t\t$host=$dbinfo[\"host\"];\n\t\t$dbname=$dbinfo[\"dbname\"];\n\t\t$user=$dbinfo[\"user\"];\n\t\t\n $pass=$this->getPassword();//don't share!!\n\n try{\n $DBH = new PDO(\"mysql:host=$host;dbname=$dbname\", $user, $pass);\n $DBH->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n }catch(PDOException $e){\n $this->processException($e);\n }\n \n $this->setDBH($DBH);\n }",
"function establish_connection() {\n\t \t\tself::$db = Registry()->db = SqlFactory::factory(Config()->DSN);\n\t \t\tself::$has_update_blob = method_exists(self::$db, 'UpdateBlob');\n\t\t\treturn self::$db;\n\t\t}",
"public function connect()\n {\n $dsn = sprintf(\"mysql:host=%s;port=%s;dbname=%s\", $this->configuration['host'], $this->configuration['port'], $this->configuration['database']);\n $this->pdo = new PDO($dsn, $this->configuration['username'], $this->configuration['password']);\n }",
"public function connect()\n {\n try {\n\n $this->config = (new Config\\Config())->getConfig(); // load config file in config class\n\n // create pdo connection to DB by using config\n $this->_dbInstance = new \\PDO('mysql:host=' . $this->config['ServerName'] . ';dbname=' . $this->config['DBName'], $this->config['UserName'], $this->config['Password'],array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8\"));\n\n // set attributes for this connection\n $this->_dbInstance->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }catch(\\PDOException $e)\n {\n echo $e->getMessage();\n }\n }",
"public function connect()\n {\n if ($this->pdo !== null) {\n return;\n }\n\n $db = $this->configs['database'] ?? '';\n $hostname = $this->configs['hostname'] ?? '';\n $port = $this->configs['port'] ?? '';\n $charset = $this->configs['charset'] ?? '';\n $username = $this->configs['username'] ?? '';\n $password = $this->configs['password'] ?? '';\n\n $this->pdo = new PDO(\n \"mysql:dbname={$db};host={$hostname};port={$port};charset={$charset}\",\n $username,\n $password\n );\n }",
"private function connect(){\n\t\trequire (__DIR__ . '/../../config.php');\n\t\t$mysqlCFG =$database['mysql'];\n\t\t\n\t\tif(!self::$db){\n\t\t\t$connectionString = \"mysql:host=$mysqlCFG[host];dbname=$mysqlCFG[dbname]\";\n\t\t\ttry{\n\t\t\t\tself::$db = new \\PDO($connectionString, $mysqlCFG['user'], $mysqlCFG['password']);\n\t\t\t\tself::$db->setAttribute( \\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n\t\t\t}catch(\\PDOException $e){\n\t\t\t\tdie(\"Ocurrio un error al conectar con la base de datos: $e->getMessage()\");\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public static function connect()\n {\n $pdo = new \\PDO(\n self::$PDODsn,\n self::$DBUsername,\n self::$DBPassword\n );\n\n self::$connection = new Connection($pdo);\n \n return self::$connection;\n }",
"function createConnect()\r\n\t\t{\r\n\t\t$this->conn=mysql_pconnect($this->host,$this->user,$this->password);\r\n\t\tif(!is_resource($this->conn))\r\n\t\t\t{\r\n\t\t\t$this->errors=\"Could Not able to connect to the SQL Server.\";\r\n\t\t\t}\r\n\t\t$d = mysql_select_db($this->dbname, $this->conn);\r\n\t\tif(!is_resource($d))\r\n\t\t\t{\r\n\t\t\t$this->errors=\"Could Not able to Use database \".$this->dbname.\".\";\r\n\t\t\t}\r\n\t\t}",
"protected static function createDbConnection() {\n if(isset(self::$_config['db']) &&\n isset(self::$_config['db']['host']) &&\n isset(self::$_config['db']['user']) &&\n isset(self::$_config['db']['password']) &&\n isset(self::$_config['db']['database'])) {\n $db = mysqli_connect(\n self::$_config['db']['host'],\n self::$_config['db']['user'],\n self::$_config['db']['password'],\n self::$_config['db']['database']\n );\n\n if(mysqli_connect_errno()) {\n static::error500('DB error.', 'DB error: ' . mysqli_connect_errno());\n }\n\n if(!mysqli_set_charset($db, 'utf8')) {\n static::error500('DB error.', 'DB error: ' . mysqli_error($db));\n }\n\n Model::setConnection($db);\n } else {\n static::error500('Database settings are missing from config.');\n }\n }",
"protected function connectDB () {\n $host=$this->Parameters['db_host'];\n $username=$this->Parameters['db_username'];\n\t\t$password=$this->Parameters['db_userpassword'];\n\t\t$dbname=$this->Parameters['db_name'];\n\t\t\n $this->Conn = new mysqli ($host,$username,$password,$dbname);\n if($this->Conn->connect_errno > 0){\n throw new Exception('Unable to connect to database [' . $this->Conn->connect_error . ']');\n }\n }",
"protected function _initDbConnection() {\n\t\tif (!empty($this->db)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Create a new connection\n\t\tif (empty($this->config['datasource'])) {\n\t\t\tdie(\"FeedAggregatorPdoStorage: no datasource configured\\n\");\n\t\t}\n\n\t\t// Initialise a new database connection and associated schema.\n\t\t$db = new PDO($this->config['datasource']); \n\t\t$this->_initDbSchema();\n\t\t\n\t\t// Check the database tables exist\n\t\t$this->_initDbTables($db);\n\n\t\t// Database successful, make it ready to use\n\t\t$this->db = $db;\n\t}",
"private function _connect()\n {\n Horde::assertDriverConfig($this->_params, 'storage',\n array('phptype', 'charset'));\n\n if (!isset($this->_params['database'])) {\n $this->_params['database'] = '';\n }\n if (!isset($this->_params['username'])) {\n $this->_params['username'] = '';\n }\n if (!isset($this->_params['hostspec'])) {\n $this->_params['hostspec'] = '';\n }\n if (isset($this->_params['prefix'])) {\n $this->prefix = $this->_params['prefix'];\n }\n\n /* Connect to the SQL server using the supplied parameters. */\n require_once 'DB.php';\n $this->write_db = &DB::connect($this->_params,\n array('persistent' => !empty($this->_params['persistent'])));\n if ($this->write_db instanceof PEAR_Error) {\n throw new Horde_Exception($this->write_db);\n }\n\n // Set DB portability options.\n switch ($this->write_db->phptype) {\n case 'mssql':\n $this->write_db->setOption('portability', DB_PORTABILITY_LOWERCASE | DB_PORTABILITY_ERRORS | DB_PORTABILITY_RTRIM);\n break;\n default:\n $this->write_db->setOption('portability', DB_PORTABILITY_LOWERCASE | DB_PORTABILITY_ERRORS);\n }\n\n /* Check if we need to set up the read DB connection seperately. */\n if (!empty($this->_params['splitread'])) {\n $params = array_merge($this->_params, $this->_params['read']);\n $this->db = &DB::connect($params,\n array('persistent' => !empty($params['persistent'])));\n if ($this->db instanceof PEAR_Error) {\n throw new Horde_Exception($this->db);\n }\n\n // Set DB portability options.\n switch ($this->db->phptype) {\n case 'mssql':\n $this->db->setOption('portability', DB_PORTABILITY_LOWERCASE | DB_PORTABILITY_ERRORS | DB_PORTABILITY_RTRIM);\n break;\n default:\n $this->db->setOption('portability', DB_PORTABILITY_LOWERCASE | DB_PORTABILITY_ERRORS);\n }\n\n } else {\n /* Default to the same DB handle for the writer too. */\n $this->db =& $this->write_db;\n }\n\n return true;\n }",
"public static function connect() {\n\t\tif(!self::$conn) {\n\t\t\tnew Database();\n\t\t}\n\t\treturn self::$conn;\n\t}",
"protected function connect()\n\t{\n\t\t$strDSN = 'mysql:';\n\t\t$strDSN .= 'dbname=' . $GLOBALS['TL_CONFIG']['dbDatabase'] . ';';\n\t\t$strDSN .= 'host=' . $GLOBALS['TL_CONFIG']['dbHost'] . ';';\n\t\t$strDSN .= 'port=' . $GLOBALS['TL_CONFIG']['dbPort'] . ';';\n\t\t$strDSN .= 'charset=' . $GLOBALS['TL_CONFIG']['dbCharset'] . ';'; // supported only in PHP 5.3.6+\n\n\t\t$arrOptions = array(\n\t\t\tPDO::ATTR_PERSISTENT => $GLOBALS['TL_CONFIG']['dbPconnect'],\n\t\t\tPDO::MYSQL_ATTR_INIT_COMMAND => 'SET sql_mode=\\'\\'; SET NAMES ' . $GLOBALS['TL_CONFIG']['dbCharset'],\n\t\t\tPDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION\n\t\t);\n\n\t\t$this->resConnection = new PDO($strDSN, $GLOBALS['TL_CONFIG']['dbUser'], $GLOBALS['TL_CONFIG']['dbPass'], $arrOptions);\n\t}",
"private function connect() {\r\n\t\tunset($this->dbLink);\r\n\t\t/* create connection to database host */\r\n\t\t// $dbLink = mysql_connect(\"mysql.localhost\", \"de88623\", \"proberaum1\");\r\n\t\t$dbLink = mysql_connect(\"localhost\", \"robert\", \"YMbHFY+On2\");\r\n\t\t/* select database */\r\n\t\tmysql_select_db(\"robert_www_parkdrei_de\");\r\n\t\t/* set link to database as a object attribute */\r\n\t\t$this->dbLink = $dbLink;\r\n\t}",
"private function __construct() {\r\n $this->dbName = self::$_dbname;\r\n $this->username = self::$_username;\r\n $this->password = self::$_password;\r\n $this->hostname = self::$_hostname; \r\n\t return $this->connect();\r\n }",
"private function connectToDatabase()\n {\n return DbConnection::connectToDatabase($this->link);\n }",
"public function connect()\n {\n $data = $this->app->file->requireFile('config.php');\n extract($data);\n try {\n static::$DB = new PDO('mysql:host=' . $server . ';dbname=' . $dbname , $dbuser , $dbpass);\n\n static::$DB->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE , PDO::FETCH_OBJ);\n static::$DB->setAttribute(PDO::ATTR_ERRMODE , PDO::ERRMODE_EXCEPTION);\n static::$DB->exec('SET NAMES utf8');\n\n }\n catch (PDOException $e){\n die($e->getMessage());\n }\n }",
"private function connectDB()\n\t{\n\t\t$this->db = ECash::getMasterDb();\n\t\t\n\t//\t$this->dbconn = $this->db->getConnection();\n\t}",
"private function dbConnection() {\r\n //if (!is_resource($this->connessione))\r\n // $this->connessione = mysql_connect($this->db_server,$this->db_username,$this->db_pass) or die(\"Error connectin to the DBMS: \" . mysql_error());\r\n if (!is_resource($this->connessione)) {\r\n try {\r\n $this->connessione = new PDO($this->db_type . \":dbname=\" . $this->db_name . \";host=\" . $this->db_server, $this->db_username, $this->db_pass);\r\n //echo \"PDO connection object created\";\r\n $this->setupSQLStatement();\r\n } catch (PDOException $e) {\r\n echo $e->getMessage();\r\n die();\r\n }\r\n }\r\n }",
"function __construct() {\n $connector = new DbConnection();\n $conn = $connector->connect(); \n }",
"public function connect($db_properties);",
"private function connect()\n {\n try {\n self::$connection = new PDO($this->buildDSN(), $this->user, $this->pass, $this->options);\n } catch (PDOException $e) {\n die('Connection failed: ' . $e->getMessage());\n }\n\n }",
"private function openDatabaseConnection()\n {\n\n // set the (optional) options of the PDO connection. in this case, we set the fetch mode to\n // \"objects\", which means all results will be objects, like this: $result->user_name !\n // For example, fetch mode FETCH_ASSOC would return results like this: $result[\"user_name] !\n // @see http://www.php.net/manual/en/pdostatement.fetch.php\n $options = array(\\PDO::ATTR_DEFAULT_FETCH_MODE => \\PDO::FETCH_OBJ, \\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_WARNING);\n\n // generate a database connection, using the PDO connector\n // @see http://net.tutsplus.com/tutorials/php/why-you-should-be-using-phps-pdo-for-database-access/\n $this->db = new \\PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=' . DB_CHARSET, DB_USER, DB_PASS, $options);\n }",
"public function connect_db() {\n }",
"public function connect() {\n if ($this->link = mysql_connect($this->host, $this->user, $this->pass)) {\n if (!empty($this->name)) {\n if (!mysql_select_db($this->name)) {\n $this->exception(\"Could not connect to the database!\");\n }\n }\n } else {\n $this->exception(\"Could not create database connection!\");\n }\n }",
"private function connect() {\n $host = $this->dbConfig[$this->selected]['host'];\n $login = $this->dbConfig[$this->selected]['login'];\n $password = $this->dbConfig[$this->selected]['password'];\n $database = $this->dbConfig[$this->selected]['database'];\n try {\n $this->db = new PDO('mysql:host=' . $host . ';dbname=' . $database . ';charset=utf8', $login, $password);\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n//\t\t\t$this->db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n } catch (PDOException $e) {\n die('Could not connect to DB:' . $e);\n }\n }",
"public function getDbalConnection();",
"function connect()\n\t{\n\t\t$this->db=new MySQLi($this->localhos,$this->username,$this->passw,$this->data_name)or die(\"could not connect\");\n\t\t\n\t\treturn $this->db;\n\t}",
"public function connect() {\r\n\t\t$this->connection = mysql_connect($this->host, $this->username, $this->password);\r\n\t\t$this->selectDB($this->squema);\r\n\t}",
"public function connect() {\n\n\t\t$db_info_string = $this->_db_info[0]. ':host=' . $this->_db_info[1] . ';';\n\t\t$db_info_string .= 'dbname='. $this->_db_info[4]; \n\n\t\ttry {\n\t\t\t$this->_db = new pdo($db_info_string, $this->_db_info[2], $this->_db_info[3] );\n\n\t\t//set Error mode to send out exceptions\n\t\t$this->_db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION ); \n\n\t\t} catch (PDOException $e) {\n\t\t\t//TODO Custom error reporting\n\t\t\techo $e->getMessage();\n\t\t}\n\n\t\t//TODO ATTEMPT TO CONNECT, IF PDO OBJECT CANNOT BE CREATED, return \n\t\t//false and use custome error reporting\n\t\t//TRY, CATCH that jazz tooo\n\t\t\n\t\t//Returns the object so that it can be chained\n\t\treturn $this;\n }",
"protected function getConnection()\n {\n return $this->createDefaultDBConnection($this->createPdo(), static::NAME);\n }",
"public static function connect() {\n $dsn = \"mysql:host=\" . Config::$DB_HOST\n . \";port=\" . Config::$DB_PORT\n . \";dbname=\" . Config::$DB_NAME\n . \";charset=\" . Config::$DB_CHAR;\n try {\n self::$PDO = new PDO($dsn, Config::$DB_USER, Config::$DB_PASS);\n self::$PDO->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // Display SQL exceptions to the web page\n self::$PDO->setAttribute(PDO::MYSQL_ATTR_LOCAL_INFILE, true); // Allows use of MySQL 'LOAD DATA LOCAL INFILE' for mass data import\n } catch (PDOException $ex) {\n exit(\"Database failed to connect: \" . $ex->getMessage());\n }\n }",
"public function connect() {\r\n\t\t// connection parameters\r\n\t\t$host = App_Constant::$DATABASE_HOST;\r\n\t\t$user = App_Constant::$DATABASE_USER;\r\n\t\t$password = App_Constant::$DATABASE_PASSWORD;\r\n\t\t$database = App_Constant::$DATABASE_DB;\r\n\t\t$port = App_Constant::$DATABASE_PORT;\r\n\t\t// $socket = App_Constant::$DATABASE_SOCKET;\r\n\t\t\r\n\t\t// create new connection with specified database details.\r\n\t\ttry {\r\n\t\t\t$this->connection = mysqli_connect ( $host, $user, $password, $database, $port );\r\n\t\t} catch ( Exception $e ) {\r\n\t\t\tthrow new Exception ( App_Constant::$ERROR_FAIL_DB_CONNECTION . mysqli_connect_error () );\r\n\t\t}\r\n\t\t\r\n\t\t/*\r\n\t\t * if (mysqli_connect_errno()) { throw new Exception(App_Constant::$ERROR_FAIL_DB_CONNECTION . mysqli_connect_error()); }\r\n\t\t */\r\n\t}",
"public function connect() {\n\t\t$cnn_string = 'host='.$this->_dbhost.' port='.$this->_dbport.' user='.$this->_dbuser.' password='.$this->_dbpass.' dbname='.$this->_dbname;\n\t\t\n\t\t$this->_instance = pg_connect($cnn_string) or PK_debug(__FUNCTION__, \"No se ha podido conectar con la DB\\n\\n\".pg_errormessage(), array('class'=>'error'));\n\t\t\n\t\tif (!$this->_instance) {\n\t\t\techo '<h1>Error en la aplicacion</h1><p>No se ha podido conectar con la base de datos</p>';\n\t\t\tPK_debug('', '', 'output');\n\t\t\texit();\n\t\t}\n\t\t\n\t\treturn $this->_instance;\n\t}",
"public function connect() {\n if (!$this->connected()) {\n tenant_connect(\n $this->db_name\n );\n }\n }",
"private function __construct(){\n\t\t$this->connection = new Connection();\n\t\t$this->connection\n\t\t\t->setHost(Stack::getInstance()->get('db_host'))\n\t\t\t->setUser(Stack::getInstance()->get('db_user'))\n\t\t\t->setPassword(Stack::getInstance()->get('db_pass'))\n\t\t\t->setDatabase(Stack::getInstance()->get('db_table'))\n\t\t\t->connect();\n\t}",
"public function getConnection()\n {\n return $this->createDefaultDBConnection($this->_pdo, Zend_Registry::get('config')->database->dbname);\n }",
"public function getConnection()\n {\n return $this->createDefaultDBConnection($this->_pdo, Zend_Registry::get('config')->database->dbname);\n }",
"public function connect() {\n $this->database = new mysqli(\n $this->dbinfo['host'],\n $this->dbinfo['user'],\n $this->dbinfo['pass'],\n $this->dbinfo['name']\n );\n if ($this->database->connect_errno > 0)\n return $this->fail(\"Could not connect to database: [{$this->database->connect_error}]\");\n }",
"function connect() {\n // import database connection variables\n require_once __DIR__ . '/db_config.php';\n\n // Connecting to mysql database\n $this->conn = new mysqli(DB_SERVER, DB_USER, DB_PASSWORD, DB_DATABASE);\n \n // return database handler\n return $this->conn;\n }",
"public function getConnection() {\n\t\t$db = Config::get('librarydirectory::database.default');\n return static::resolveConnection($db);\n }",
"function connectToDatabase() {\n\n $host = self::servername;\n $databaseName = self::dbname;\n $password = self::password;\n $username = self::username;\n //To create the connection\n $conn = new mysqli($host, $username, $password, $databaseName);\n self::$conn = $conn;\n //Connection Checking, if there is a connection error, print the error\n if ($conn->connect_error) {\n exit(\"Failure\" . $conn->connect_error);\n }\n }",
"public function createConnection($db)\n {\n $this->adodb = $db;\n }",
"public function __construct() {\n $dsn = \"mysql:host=\".Configuration::DATABASE_HOST.\";dbname=\".Configuration::DATABASE_NAME;\n self::connect($dsn, Configuration::DATABASE_USER, Configuration::DATABASE_PASSWORD);\n }",
"private static function connect(){\n try{\n $conn_data = json_decode(file_get_contents(__DIR__.\"/../config/connection.json\"), true);\n self::$connection = new PDO($conn_data['CONN_STRING'], $conn_data['DB_USER'], $conn_data['DB_PASS']);\n\t\t} catch (PDOException $e){\n\t\t\techo \"Database error: \".$e->getMessage();\n\t\t\tdie();\n\t\t}\n }",
"private function Connect() {\n $this->Conn = parent::getConn();\n $this->Create = $this->Conn->prepare($this->Create);\n }",
"public function _Connect() {\t\t\n\t\tif($this->_connection) { $this->_Disconnect(); } \n\t\ttry {\t\t\t\n\t\t\t// GET CONFIGURATION\n\t\t\t$config = $this->_config;\n\t\t\tif(!$config) $this->_RenderError(XUXO_ERROR_CODE_004.': CONFIG IS NOT SET');\n\t\t\tif(!$config['USE']) return NULL;\t\t\t\n\t\t\t// GET PATH\n\t\t\tif ($a = Xuxo_Application::$_instance) {\n\t\t\t\t$path = $a->_GetBaseUrl(true).DIR_SEPARATOR.$config['HOST'];\n\t\t\t} else {\n\t\t\t\t$path = str_replace('\\\\',DIR_SEPARATOR,realpath(dirname(__FILE__))).$config['HOST'];\n\t\t\t}\n\t\t\t// CREATE PATH IF NOT EXISTED\n\t\t\tif(!file_exists($path)) { mkdir($path,0777); }\n\t\t\t// SET PERMISSION\n\t\t\t$this->_SetPermission($path);\n\t\t\t// GET SQLITE FILE\n\t\t\t$path .= DIR_SEPARATOR.$config['NAME'].\".sqlite\";\n\t\t\tif(!file_exists($path)) $this->_RenderError('SQLITE FILE DOES NOT EXIST','XUXO_ERROR_CODE_005');\n\t\t\t// CONNECTION\n\t\t\t$conndb = \"sqlite:\".$path;\t\t\t\n\t\t\t$this->_connection = new PDO($conndb);\n\t\t\tunset($conndb);\n\t\t\t// RETURN\n\t\t\tif (!$this->_connection) $this->_RenderError('FAIL TO CONNECT', 'XUXO_ERROR_CODE_004');\n\t\t\tif(!$this->_auto_commit && !$this->_begin) {\n\t\t\t\t$this->_connection->beginTransaction();\n\t\t\t\t$this->_begin = true;\n\t\t\t}\n\t\t\treturn $this->_connection;\n\t\t} catch (Exception $e) {\n\t\t\t$this->_RenderError('UNABLE TO CONNECT - '.$e->getMessage(), 'XUXO_ERROR_CODE_004');\n\t\t}\n\t}",
"function createConection(){\n\n\t\tglobal $db_host;\n\t\tglobal $db_usr;\n\t\tglobal $db_pwd;\n\t\tglobal $db_name;\n\t\tglobal $db_port;\n\n\t\treturn pg_connect('user='.$db_usr.' password='.$db_pwd.' host= '.$db_host.' dbname = '.$db_name.' port = '.$db_port);\n\t}",
"private function connectToDB()\n {\n $this->handler = new DBConnect();\n $this->handler = $this->handler->startConnection();\n }",
"public function getDbConnection()\n {\n $this->conn = Registry::get('db');\n }",
"function __construct() {\n $this->createConnection();\n }",
"protected function connect()\n\t\t{\n\t\t\t$conn = new PDO(\"mysql:dbname=$this->m_db;host=$this->m_host\", $this->m_username, $this->m_password); /* Create a new connection */\n\n\t\t\tif (DEBUG) /* If the global variable DEBUG is true */\n\t\t\t\techo 'Connecting to database.<br>'; /* Display debug messages */\n\t\t\t\n\t\t\treturn $conn; /* Return the database connection */\n\t\t}",
"public static function Create( ) {\n\t\t\t$iConfig = Config::LoadConfig( );\n\t\t\t$iMySQLConnection = new DataBase( $iConfig->database_host, $iConfig->database_user, $iConfig->database_pass, $iConfig->database_name, $iConfig->database_port );\n\t\t\treturn $iMySQLConnection;\n\t\t}",
"private function connect ()\n {\n $dbConfig = require_once 'config/configuration.php';\n list('host' => $host, 'port' => $port, 'database' => $database, 'username' => $username, 'password' => $password) = $dbConfig;\n\n $this->connection = new \\mysqli($host, $username, $password, $database, $port);\n\n if ($this->connection->connect_errno) {\n throw new \\Exception('Failed to connect to database');\n }\n }",
"protected function getConnection()\n\t{\n\t\treturn $this->createDefaultDBConnection(TEST_DB_PDO(), TEST_GET_DB_INFO()->ldb_name);\n\t}",
"protected function getConnection()\n {\n $pdo = new PDO(DB_DSN, DB_USER, DB_PASS);\n return new DefaultConnection($pdo, DB_NAME);\n }",
"protected function getConnection()\n {\n $host = DB_HOST;\n $dbName = DB_NAME;\n $dbUser = DB_USER;\n $dbPass = DB_PASS;\n // mysql\n $dsn = 'mysql:host=' . $host . ';dbName=' . $dbName;\n $db = new \\PDO($dsn, $dbUser, $dbPass);\n $connection = $this->createDefaultDBConnection($db, $dbName);\n return $connection;\n }",
"public function getConnection(){\n \n $this->conn = null;\n $dsn=\"mysql:host=\" . $this->host . \";port=\" . $this->port . \";dbname=\" . $this->db_name;\n \n try{\n $this->conn = new PDO($dsn, $this->username, $this->password);\n //$this->conn = new PDO(\"pgsql:host=localhost;port=5432;dbname=PHP_tutorial\", $this->username, $this->password);\n \n }catch(PDOException $exception){\n echo \"Connection error: \" . $exception->getMessage() . \"\\n\";\n echo \"DSN = \" . $dsn;\n }\n return $this->conn;\n }",
"public function getConnection() {\n return Database::instance();\n }",
"public static function connect()\n {\n try {\n $db_host = DbConfig::$host_url;\n $db_name = DbConfig::$database_name;\n $db_user = DbConfig::$database_user;\n $user_pw = DbConfig::$password;\n \n $con = new PDO('mysql:host='.$db_host.'; dbname='.$db_name, $db_user, $user_pw); \n $con->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n $con->setAttribute( PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ );\n $con->setAttribute( PDO::ATTR_EMULATE_PREPARES, false );\n $con->exec(\"SET CHARACTER SET utf8\");\n\n return $con;\n }\n catch (PDOException $err) { \n $err->getMessage() . \"<br/>\";\n file_put_contents(__DIR__.'/log/PDOErrors.txt', $err.PHP_EOL.PHP_EOL, FILE_APPEND);\n die( $err->getMessage());\n }\n }"
] | [
"0.79795027",
"0.77789724",
"0.77789724",
"0.77789724",
"0.77789724",
"0.77789724",
"0.77789724",
"0.77789724",
"0.77789724",
"0.77789724",
"0.77789724",
"0.77789724",
"0.77789724",
"0.77706695",
"0.7720689",
"0.766594",
"0.7566156",
"0.754082",
"0.7521264",
"0.7518258",
"0.7500786",
"0.7437217",
"0.7426977",
"0.7420797",
"0.7399251",
"0.7380057",
"0.73703635",
"0.73627955",
"0.73627925",
"0.7356345",
"0.7353291",
"0.7347171",
"0.7315527",
"0.73144025",
"0.72989726",
"0.72908807",
"0.727639",
"0.72748643",
"0.72692937",
"0.72549146",
"0.7245809",
"0.724579",
"0.7238197",
"0.7231916",
"0.72216016",
"0.7216214",
"0.7215844",
"0.7212265",
"0.7207178",
"0.71981317",
"0.7197423",
"0.71964467",
"0.7194568",
"0.7187649",
"0.7179708",
"0.7177023",
"0.7169125",
"0.7164168",
"0.7154497",
"0.7153746",
"0.7148219",
"0.7139261",
"0.71271235",
"0.71256083",
"0.71237916",
"0.7123774",
"0.7111315",
"0.71017104",
"0.7100375",
"0.71003354",
"0.7097142",
"0.7097058",
"0.7094866",
"0.7093085",
"0.70882106",
"0.70810694",
"0.7079433",
"0.7079433",
"0.70772606",
"0.70770764",
"0.7073281",
"0.70726067",
"0.7071798",
"0.70715505",
"0.7062937",
"0.7060102",
"0.70582795",
"0.7054525",
"0.7051263",
"0.7050871",
"0.70468915",
"0.70442635",
"0.70402056",
"0.7018063",
"0.70178324",
"0.70114726",
"0.701012",
"0.7002303",
"0.7000413",
"0.6996116"
] | 0.7103437 | 67 |
Method to execute a SQL request Declaration of the static "select" method which takes 2 arguments, a sql query and an array of conditions (which can be null) | public static function select($sql, $cond=null)
{
$result = false;
try
{
// prepare the query with the $sql parameter
$stmt = self::connect()->prepare($sql);
// execute the query with the $cond parameter
$stmt->execute($cond);
// fetchAll on the query to organize the results in a 2-dimensional array
$result = $stmt->fetchAll();
}
// catch errors with stop and display of errors
catch (Exception $ex)
{
die($ex->getMessage());
}
$stmt = null;
return $result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function Select($cond)\r\n\t\r\n {\r\n\t\tglobal $db;\r\n if($cond==\"\")\r\n {\r\n $sql = \"SELECT * FROM \".$this->TableName;\r\n } else\r\n {\t\r\n\t\t \t\r\n\t\t $sql = \"SELECT * FROM \". $this->TableName.\" \".$cond;\r\n }\r\n try{\r\n $query = $db->prepare($sql);\r\n $query->execute();\r\n $arr['rows'] = $query->fetchAll(PDO::FETCH_ASSOC);\r\n $arr['err'] = false;\r\n } catch(PDOException $e){\r\n $arr['err'] = true;\r\n $arr['msg'] = $e->getMessage(); \r\n } \r\n return $arr;\r\n }",
"protected function prepareSelectStatement() {}",
"public function query($sql, $arguments = array());",
"private function Select()\n {\n $return = false;\n $action = $this->Action();\n $columns = $this->Columns();\n $table = $this->Table();\n $where = (Checker::isArray($this->Where(), false))?$this->Where():array(Where::QUERY => \"\", Where::VALUES => array());\n $order = (Checker::isString($this->Order()))?$this->Order():\"\";\n $limit = (Checker::isInt($this->Limit()))?\" LIMIT \".$this->Limit():\"\";\n if($columns && $table && Checker::isArray($where, false))\n {\n $return[Where::QUERY] = \"$action $columns FROM $table\".$where[Where::QUERY].\"$order$limit\";\n\n if(Checker::isArray($where, false) && isset($where[Where::VALUES])) $return[Where::VALUES] = $where[Where::VALUES];\n else $return[Where::VALUES] = array();\n }\n return $return;\n }",
"protected abstract function getSelectStatement();",
"protected abstract function getSelectStatement();",
"abstract public function prepareSelect();",
"abstract public function query($sql);",
"public function select($tableName, $conditions = \"\", array $datasCond = array(), array $fieldsList = array()){\r\n //We try to perform the task\r\n try{\r\n //We check if any database is opened\r\n if (!$this->checkOpenDB()) {\r\n throw new Exception(\"There isn't any opened DataBase !\");\r\n }\r\n \r\n //Process fields to select\r\n if(count($fieldsList) == 0)\r\n $fields = \"*\";\r\n else {\r\n $fields = implode(\", \", $fieldsList);\r\n }\r\n\r\n //Generating SQL\r\n $sql = \"SELECT \".$fields.\" FROM \".$tableName.\" \".$conditions;\r\n $selectOBJ = $this->db->prepare($sql);\r\n $selectOBJ->execute($datasCond);\r\n \r\n //Preparing return\r\n $return = array();\r\n foreach($selectOBJ as $process){\r\n $result = array();\r\n \r\n //Processing datas\r\n foreach($process as $name => $data){\r\n //We save the data only if it is not an integer\r\n if (!is_int($name)) {\r\n $result[$name] = $data;\r\n }\r\n }\r\n \r\n //Saving result\r\n $return[] = $result;\r\n }\r\n \r\n //Returning result\r\n return $return;\r\n }\r\n catch(Exception $e){\r\n exit($this->echoException($e));\r\n }\r\n catch(PDOException $e){\r\n exit($this->echoPDOException($e));\r\n }\r\n }",
"function buildSelect($db_name,$table_name,$columns,$where_select){\n\n\t$query_select = \"SELECT \";\n\t//FILL COLUMNS FOR GET\n\tforeach ($columns as $c) {\n\t\t$query_select .= $c;\n\t\tif(array_search($c,$columns) != count($columns) - 1) $query_select .= \",\";\n\t}\n\tif($where_select != \"*\"){//GET \n\t\t//INTERMEDIATE\n\t\t$query_select .= \" FROM $table_name WHERE \";\n\t\t//FILL VALUES WHERE\n\t\tend($where_select);\n\t\t$last_key = key($where_select);\n\t\tforeach ($where_select as $key => $value) {\n\t\t\t$query_select .= $key . \"=\" . \":\" . $key;\n\t\t\tif($key != $last_key) $query_select .= \" AND \";\n\t\t}\n\t\texecuteQuery(\"USE $db_name\");\n\t\treturn executeQuery($query_select,$where_select);\n\t}\n\telse{//GET ALL SELECT\n\t\t//INTERMEDIATE\n\t\t$query_select .= \" FROM $table_name\";\n\t\texecuteQuery(\"USE $db_name\");\n\t\treturn executeQuery($query_select,\"*\");\n\t}\n\n}",
"public function querySelect($sql, $fields = NULL, $fetchMode = NULL) : Collection;",
"public static function query($sql);",
"function select_sql($table='', $fields='*', ...$get_args) {\n\t\t$this->select_result = false;\n return $this->selecting($table, $fields, ...$get_args);\t \n }",
"public function query($sql);",
"public function query($sql);",
"public function query($sql);",
"public function query($sql);",
"public function doQuery($sql, $params);",
"static function select($sql, $params = array()) {\n $sth = static::execute($sql, $params);\n\n $result = $sth->fetchAll();\n\n return $result;\n }",
"protected abstract function getSelectStatement(array $columns);",
"public function createSelectSql(): \\Hx\\Db\\Sql\\SelectInterface;",
"public function query($sql = null);",
"private function __select() {\n $from_str = $this->getFromStr();\n $field = $this->field_str;\n if (empty($field)) {\n $field = '*';\n }\n $sql = \"SELECT {$field} FROM {$from_str}\";\n if (!empty($this->join_str_list)) {\n $temp = implode(' ', $this->join_str_list);\n $sql .= \" {$temp}\";\n }\n if (!empty($this->where_str)) {\n $sql .= \" WHERE {$this->where_str}\";\n }\n if (!empty($this->group_str)) {\n $sql .= \" GROUP BY {$this->group_str}\";\n }\n if (!empty($this->order_str)) {\n $sql .= \" ORDER BY {$this->order_str}\";\n }\n if (!empty($this->limit_str)) {\n $sql .= \" LIMIT {$this->limit_str}\";\n }\n $list = $this->query($sql);\n return $list;\n }",
"public function _select ($table, $fields_array = array(), $where_params_array = array(), $order_array = array(), $limit = null, $offset = null)\n {\n // if not set a wildcard to return everything\n if ( !empty ($fields_array) )\n {\n\n $fields = implode (', ', $fields_array);\n }\n else\n {\n\n $fields = '*';\n }\n\n // create the basic query\n $query = \"\n\t\tSELECT {$fields}\n\t\tFROM {$table}\n\t\t\";\n\n $bind_params_array = array();\n\n // if there are any WHERE parameters then add them to the query and the bind params array\n if ( !empty ($where_params_array) )\n {\n\n $query .= \"WHERE\n \";\n $count = 0;\n foreach ($where_params_array as $key => $value) {\n\n $bind_params_array[$count] = $value;\n\n if ( $count > 0 )\n {\n $query .= \" AND \";\n }\n $query .= \"`{$key}` = ?\n \";\n $count++;\n }\n }\n\n // if an order by setting has been received then add it to the query\n if ( !empty ($order_array) )\n {\n\n $query.= \"ORDER BY\n \";\n foreach ($order_array as $key => $value) {\n\n $query.= \"{$key} {$value},\n \";\n }\n $query = rtrim (trim ($query), ',');\n }\n\n // if an LIMIT setting has been received then add it to the query\n if ( is_numeric ($limit) )\n {\n $query.= \"\n LIMIT {$limit}\n \";\n }\n\n // if an OFFSET setting has been received then add it to the query\n if ( $limit !== null && $offset != null )\n {\n if ( !is_int ($offset) )\n {\n\n throw new Exception ('Non integer passed to function as OFFSET value');\n return false;\n }\n\n $query.= \"\n OFFSET {$offset}\n \";\n }\n\n return $this->queryDatabase ($query, $bind_params_array, true);\n }",
"public function select()\n\t{\n\t\treturn call_user_func_array([$this->queryFactory->__invoke('select'), 'select'], func_get_args());\n\t}",
"public function select($params){\n\t\t$DB = Registry::getInstance()->DB;\n\t\t$prefix = \"SELECT \";\n\t\t$p = $this->clean($params);\n\t\t$statement = $prefix.\" \".$this->genFrom($p['cols']).\" \".$this->genTable($p['tables']).$this->genWhere($p['where']);\t\n\t\treturn $DB->select($statement);\t\n\t}",
"public function select($whereCondition, $orderBy = '', $offset = 0, $limit = 0, $fields = []) \n\t{\n\t\t$sql = \"SELECT * FROM `\" . $this->table . '` ';\n\n\t\t//get fields sql\n\t\tif ($fields && is_array($fields)) {\n\t\t\t$sql = \"SELECT \" . $this->_stringFieldsSelect($fields) . ' FROM `' . $this->table . '` ';\n\t\t}\n\n\t\t//get where sql\n\t\t$sql .= $this->_whereCondition($whereCondition);\n\n\t\t//get order by sql\n\t\tif ($orderBy) {\n\t\t\t$sql .= ' ' . $this->_stringOrderBy($orderBy);\n\t\t}\n\n\t\t//get limit sql\n\t\tif ($limit) {\n\t\t\t$sql .= ' LIMIT '. $offset . ',' . $limit;\n\t\t}\n\n\t\t$sql .= ';';\n//echo $sql;exit;\n\t\t$result = $this->_getSelectResult($sql);\n\n\t\treturn $result;\n\t}",
"public function select($values = []) {\r\n\t\t$_fields = implode(\",\", $this->clausules['fields']);\r\n\r\n\t\t$query[] = \"SELECT\";\r\n\t\t$query[] = $_fields;\r\n\t\t$query[] = \"FROM\";\r\n\t\t$query[] = $this->clausules['table'];\r\n\r\n\t\tif (isset($this->clausules['join'])) {\r\n\t\t\t$query[] = \"INNER JOIN \" . $this->clausules['join']['table'];\r\n\t\t\t$query[] = \"ON \" . $this->clausules['join']['param'];\r\n\t\t}\r\n\r\n\t\t$query[] = $this->testClausules();\r\n\r\n\t\t// Transforma as query[] em uma string sql\r\n\t\t$sql = implode(\" \", $query);\r\n\r\n\t\treturn $this->executeSelect($sql, $values);\r\n\t}",
"abstract protected function doQuery( $sql );",
"public function query(string $sql);",
"public function select()\r\n\t{\r\n\t\t$this->clear();\r\n\t\t$where = null;\r\n\t\t// no args, so I'm searching for ALL... or doing a specific search\r\n\t\tif(func_num_args() === 0\r\n\t\t || ($where = call_user_func_array(array($this->obj, 'buildWhere'), func_get_args())))\r\n\t\t{\r\n\t\t\t$query = 'SELECT *\r\n\t\t\t\tFROM '.$this->obj->buildFrom();\r\n\t\t\t// pass args to where generator\r\n\t\t\tif($where)\r\n\t\t\t{\r\n\t\t\t\t$query .= ' WHERE '.$where;\r\n\t\t\t}\r\n\t\t\t$results = $this->site->db->query($query);\r\n\t\t\t$success = ($results->num_rows > 0);\r\n\t\t\twhile($row = $results->fetch_assoc())\r\n\t\t\t{\r\n\t\t\t\t$obj = new $this->obj->__CLASS__($this->obj->site);\r\n\t\t\t\tif($obj->loadRow($row))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->push($obj);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $success;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public function select($table,$conditions = array()){\r\n\r\n $sql = 'SELECT *'; \r\n $sql .= ' FROM '.$table;\r\n\r\n if(is_array($conditions) && count($conditions)>0){\r\n $sql .= ' WHERE ';\r\n $i = 0;\r\n foreach($conditions as $key => $value){\r\n $pre = ($i > 0)?' AND ':'';\r\n $sql .= $pre.$key.\" = '\".$value.\"'\";\r\n $i++;\r\n }\r\n }\r\n \r\n $query = $this->db->prepare($sql);\r\n\r\n $query->execute(); \r\n \r\n $data = $query->fetchAll();\r\n\r\n return $data;\r\n }",
"private function _select(){\n $this->debugBacktrace();\n $parameter = $this->selectParam; //transfer to local variable.\n $this->selectParam = \"\"; //reset updateParam.\n\n \n \n $sql = \"\";\n if($this->hasRawSql){\n $sql = $parameter;\n $this->hasRawSql = false;\n }\n else{\n $tableName = $this->tableName;\n $this->tableName = \"\"; //reset.\n\n $columns = \"\";\n if(!isset($parameter) || empty($parameter)){\n $columns = \"*\";\n $sql = $this->_prepare_select_sql($columns,$tableName);\n }\n else{\n //first check whether it has 'select' keyword\n $parameter = trim($parameter);\n $keyWord = substr($parameter,0,6);\n if(strtoupper($keyWord)==\"SELECT\") {\n $sql = $parameter;\n }\n else{\n $columns = $parameter;\n $sql = $this->_prepare_select_sql($columns,$tableName);\n }\n }\n }\n\n \n $queryObject = $this->_perform_mysql_query($sql);\n \n if(empty($this->selectModifier)){\n //No select modifier (first, firstOrDefault, single, singleOrDefault) found ---->\n $quantity = 0;\n $rows = array();\n switch ($this->fetchType){\n case \"fetch_object\":\n while ($row = mysqli_fetch_object($queryObject)) {\n if(isset($tableName)){\n $meta = new stdClass();\n $meta->type = $tableName;\n $row->__meta = $meta;\n }\n $rows[] = $row;\n $quantity++;\n }\n break;\n case \"fetch_assoc\":\n while ($row = mysqli_fetch_assoc($queryObject)) {\n $rows[] = $row;\n $quantity++;\n }\n break;\n case \"fetch_array\":\n while ($row = mysqli_fetch_array($queryObject)) {\n $rows[] = $row;\n $quantity++;\n }\n break;\n case \"fetch_row\":\n while ($row = mysqli_fetch_row($queryObject)) {\n $rows[] = $row;\n $quantity++;\n }\n break;\n case \"fetch_field\":\n while ($row = mysqli_fetch_field($queryObject)) {\n $rows[] = $row;\n $quantity++;\n }\n break;\n }\n\n if($quantity>0){\n mysqli_free_result($queryObject);\n }\n\n return $rows;\n //<----No select modifier (first, firstOrDefault, single, singleOrDefault) found \n }\n else{ \n //select modifier (first, firstOrDefault, single, singleOrDefault) found ---->\n $selectModifier = $this->selectModifier;\n $this->selectModifier = \"\";\n $row;\n switch($selectModifier){\n case \"first\":\n $numRows = mysqli_num_rows($queryObject);\n if($numRows == 0){\n throw new ZeroException(\"No data found.\");\n }\n break;\n \n case \"firstOrNull\":\n $numRows = mysqli_num_rows($queryObject);\n if($numRows == 0){\n return NULL;\n }\n break;\n\n case \"single\":\n $numRows = mysqli_num_rows($queryObject);\n if($numRows == 0){\n throw new ZeroException(\"No data found.\");\n }\n if($numRows > 1){\n throw new ZeroException(\"Multiple records found.\");\n }\n break;\n\n case \"singleOrNull\":\n $numRows = mysqli_num_rows($queryObject);\n if($numRows == 0){\n return NULL;\n }\n if($numRows > 1){\n return NULL;\n }\n break;\n }\n\n return $this->_prepareSingleRecord($queryObject);\n //<---- select modifier (first, firstOrDefault, single, singleOrDefault) found *212*062#\n }\n }",
"public function select($fields=null) { if ($fields) $this->fields($fields); return $this->execute($this->get_select()); }",
"function select($sql) {\n global $conn;\n\n if($result = $conn->query($sql)) {\n while($row = mysqli_fetch_assoc($result))\n $result_rows[] = $row;\n\n if($result_rows != null)\n DB::return_json($result_rows);\n\n else\n throw new Exception(\"no results\");\n } else\n throw new Exception(\"query failed\");\n }",
"public function query($statement, array $parameters = null);",
"public function Select($ConditionArray){\n\t\t \n\t\t$ReturnData = \"\";\n\t\t\n\t\tif(isset($ConditionArray['tablename']) and !empty($ConditionArray['tablename'])){\n\t\t\t$TableName = $ConditionArray['tablename'];\n\t\t}else{return\"\";}\n\t\t\n\t\tif(isset($ConditionArray['fields']) and !empty($ConditionArray['fields'])){ \n\t\t\t\n\t\t\t$FieldsArray = explode(\",\",$ConditionArray['fields'][0]);\n\t\t\t$Fields = \"\";\n\t\t\tforeach($FieldsArray as $FAKey=>$FAKRow){\n\t\t\t\t$Fields.=\"`\".$FAKRow.\"`, \"; \t\n\t\t\t}\n\t\t\t$Fields = rtrim($Fields,\", \");\n\t\t\t\n\t\t}else{$Fields = \"*\";}\n\t\t\n\t\tif(isset($ConditionArray['join']) and !empty($ConditionArray['join'])){\n\t\t\t$Join\t= $ConditionArray['join'];\n\t\t}else{$Join = \"\";}\n\t\t\n\t\tif(isset($ConditionArray['AndCondition']) and !empty($ConditionArray['AndCondition'])){\n\t\t\t$AndCondition\t= $ConditionArray['AndCondition'];\n\t\t}else{$AndCondition = \"\";}\n\t\t\n\t\tif(isset($ConditionArray['OrCondition']) and !empty($ConditionArray['OrCondition'])){\n\t\t\t$OrCondition\t= $ConditionArray['OrCondition'];\n\t\t}else{$OrCondition = \"\";}\n\t\t\n\t\tif(isset($ConditionArray['LikeCondition']) and !empty($ConditionArray['LikeCondition'])){\n\t\t\t$LikeCondition\t = $ConditionArray['LikeCondition'];\n\t\t}else{$LikeCondition = \"\";}\n\t\t\n\t\t\n\t\t\n\t\t$this->db->select($Fields); \n\t\t$this->db->from($TableName);\n\t\t\n\t\tif(!empty($Join)){\n\t\t\t$TablePrimaryField = ltrim($TableName,\"ll_\").\"_id\"; \n\t\t\t\n\t\t\tforeach($Join as $JKey=>$JRow){\n\t\t\t\t$JoinTablePrimaryField = \"\";\n\t\t\t\t$JoinTablePrimaryField = ltrim($JRow,\"ll_\").\"_id\";\n\t\t\t\t$this->db->join($JRow,$TableName.\".\".$JoinTablePrimaryField.\" = \".$JRow.\".\".$JoinTablePrimaryField,'left'); \n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!empty($OrCondition)){\n\t\t\t$this->db->where($OrCondition); \n\t\t}\t\t\n\t\tif(!empty($AndCondition)){\n\t\t\t$this->db->where($AndCondition); \n\t\t}\n\t\tif(!empty($LikeCondition)){\n\t\t\t$this->db->like($LikeCondition); \n\t\t}\n\t\t\n\t\t$query = $this->db->get(); \n\t\tif ($query->num_rows() > 0){\n\t\t\tforeach($query->result() as $row){\n\t\t\t $ReturnData[] = $row;\n\t\t\t}\n\t\t\treturn $ReturnData;\n\t\t}else{\n\t\t\treturn false;\t\t\t\n\t\t}\n\t\t\n\t\t\n\t }",
"protected function _sql_select ( /* void */ )\n {\n /*\n Start SQL query.\n */\n $sql = ($this->bDistinct) ? 'SELECT DISTINCT ' : 'SELECT ';\n /*\n Select which fields ?\n */\n $sql .= (empty($this->aFields)) ? '*' : implode(', ', $this->aFields);\n /*\n From which tables ?\n */\n $sql .= (empty($this->aTables)) ? '' : \"\\nFROM \" . implode(', ', $this->aTables);\n /*\n Join something ?\n */\n if (!empty($this->aJoin))\n {\n foreach ($this->aJoin as $j)\n {\n $sql .= \"\\n{$j[0]} JOIN {$j[1]} ON {$j[2]}\";\n }\n }\n /*\n Where ?\n */\n if (!empty($this->aWhere))\n {\n $sql .= \"\\nWHERE \" . implode(\"\\n\", $this->aWhere);\n $sql .= (!empty($this->aLike)) ? implode(\"\\n\", $this->aLike) : '';\n }\n elseif (!empty($this->aLike))\n {\n $sql .= \"\\nWHERE \" . implode(\"\\n\", $this->aLike);\n }\n /*\n Group by ?\n */\n if (!empty($this->aGroupBy))\n {\n $sql .= \"\\nGROUP BY \" . implode(', ', $this->aGroupBy);\n }\n /*\n Having ?\n */\n if (!empty($this->aHaving))\n {\n $sql .= \"\\nHAVING \";\n foreach ($this->aHaving as $i)\n {\n $sql .= \"\\n{$i[0]}{$i[1]} {$i[2]}\";\n }\n }\n /*\n Order by ?\n */\n if (!empty($this->aOrderBy))\n {\n $sql .= \"\\nORDER BY \";\n foreach ($this->aOrderBy as $i)\n {\n $sql .= \"{$i[0]} {$i[1]}, \";\n }\n $sql = trim($sql, ', ');\n }\n /*\n Query limit ?\n */\n if ($this->nLimit !== false)\n {\n if ($this->nOffset !== false)\n {\n $sql .= \"\\nLIMIT \" . $this->nOffset . ', ' . $this->nLimit;\n }\n else\n {\n $sql .= \"\\nLIMIT 0, \" . $this->nLimit;\n }\n }\n /*\n Return SQL.\n */\n return $sql;\n }",
"public function Select($Condition)\r\n {\r\n global $db;\r\n \r\n if ($Condition == \"\") {\r\n $Sql = \"SELECT * FROM \".$this->TableName;\r\n }\r\n else {\r\n $Sql = \"SELECT * FROM \".$this->TableName.\" \".$Condition;\r\n }\r\n \r\n try{\r\n $query = $db->prepare($Sql);\r\n $query->execute();\r\n if($query->rowCount()>0){\r\n $result['err'] = false;\r\n $result['rows'] = $query->fetchAll(PDO::FETCH_ASSOC);\r\n } else {\r\n $result['err'] = true;\r\n $result['msg'] = \"No Records Available\";\r\n }\r\n }catch(PDOException $e){\r\n $result['err'] = true;\r\n $result['msg'] = $e->getMessage();\r\n }\r\n\r\n return $result;\r\n }",
"static function query($sql,$values=array(),$className=null) {\n\t\tforeach($values as $k=>$v) {\n\t\t\t$sql = preg_replace('/\\?/', \"'\".self::$resource->real_escape_string($v).\"'\", $sql, 1);\n\t\t}\n\t\t$res = self::$resource->query($sql);\n\t\t$rows = array();\n\t\tif(!$className) {\n\t\t\twhile($row = $res->fetch_object()) {\n\t\t\t\t$rows[] = $row;\n\t\t\t}\n\t\t} else {\n\t\t\twhile($row = $res->fetch_object($className)) {\n\t\t\t\t$rows[] = $row;\n\t\t\t}\n\t\t}\n\t\t$res->free();\n\t\treturn $rows;\n\t}",
"function callQuery($sql, $paramArray = NULL, $datatypeArray = NULL)\n {\n $sth = $this->dbhandle->prepare($sql);\n \n if( isset( $paramArray ) )\n Database::bind_params($sth, $paramArray, $datatypeArray);\n \n $sth->execute();\n if( $this->dbhandle->errorCode() <> '00000' ){\n $_mysqlErrorInfo = $this->dbhandle->errorInfo();\n throw new PDOException(\"Database::callSQL() error: \" . $_mysqlErrorInto[2]);\n }\n \n return $sth->fetchAll(PDO::FETCH_ASSOC);\n }",
"static function callSQL($sql, $paramArray = NULL, $datatypeArray = NULL)\n {\n self::init();\n \n $sth = self::$_dbh->prepare($sql);\n \n if( isset( $paramArray ) )\n self::bind_params($sth, $paramArray, $datatypeArray);\n \n $sth->execute();\n if( self::$_dbh->errorCode() <> '00000' ){\n self::$_mysqlErrorInfo = self::$_dbh->errorInfo();\n throw new PDOException(\"Database::callSQL() error: \" . self::$_mysqlErrorInto[2]);\n }\n \n return $sth->fetchAll(PDO::FETCH_ASSOC);\n }",
"public function select($params = []) {\n\t\t\t// Get the target table\n\t\t\t$table = $params['table'] ?? $this->table;\n\t\t\t// Get columns names [col1, col2, col3] => \"col1, col2, col3\"\n\t\t\t$columns = isset($params['columns']) ? implode(', ', $params['columns']) : '*';\n\t\t\t// Get WHERE condition\n\t\t\t$where = $this->get_where_condition($params['where'] ?? []);\n\t\t\t// Get the params to bind\n\t\t\t$bindings = $this->bindings;\n\n\t\t\t// Execute the query and return results\n\t\t\treturn $this->query(\"SELECT $columns FROM $table $where\", $bindings);\n\t\t}",
"private function _createSQLSelect(array $params){\n\t\t$select = 'SELECT ';\n\t\tif(isset($params['columns'])){\n\t\t\t$this->clear();\n\t\t\t$select.= $params['columns'];\n\t\t} else {\n\t\t\t$select.= join(', ', $this->_getAttributes());\n\t\t}\n\t\tif($this->_schema){\n\t\t\t$select.= ' FROM '.$this->_schema.'.'.$this->_source;\n\t\t} else {\n\t\t\t$select.= ' FROM '.$this->_source;\n\t\t}\n\t\t$return = 'n';\n\t\t$primaryKeys = $this->_getPrimaryKeyAttributes();\n\t\tif(isset($params['conditions'])&&$params['conditions']){\n\t\t\t$select.= ' WHERE '.$params['conditions'].' ';\n\t\t} else {\n\t\t\tif(!isset($primaryKeys[0])){\n\t\t\t\tif($this->isView==true){\n\t\t\t\t\t$primaryKeys[0] = 'id';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($params[0])){\n\t\t\t\tif(is_numeric($params[0])){\n\t\t\t\t\tif(isset($primaryKeys[0])){\n\t\t\t\t\t\t$params['conditions'] = $primaryKeys[0].' = '.$this->_db->addQuotes($params[0]);\n\t\t\t\t\t\t$return = '1';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new ActiveRecordException('No se ha definido una llave primaria para este objeto');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif($params[0]===''){\n\t\t\t\t\t\tif(isset($primaryKeys[0])){\n\t\t\t\t\t\t\t$params['conditions'] = $primaryKeys[0].\" = ''\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new ActiveRecordException('No se ha definido una llave primaria para este objeto');\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$params['conditions'] = $params[0];\n\t\t\t\t\t}\n\t\t\t\t\t$return = 'n';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($params['conditions'])){\n\t\t\t\t$select.= ' WHERE '.$params['conditions'];\n\t\t\t}\n\t\t}\n\t\tif(isset($params['group'])&&$params['group']) {\n\t\t\t$select.= ' GROUP BY '.$params['group'];\n\t\t}\n\t\tif(isset($params['order'])&&$params['order']) {\n\t\t\t$select.= ' ORDER BY '.$params['order'];\n\t\t}\n\t\tif(isset($params['limit'])&&$params['limit']) {\n\t\t\t$select = $this->_limit($select, $params['limit']);\n\t\t}\n\t\tif(isset($params['for_update'])&&$params['for_update']==true){\n\t\t\t$select = $this->_db->forUpdate($select);\n\t\t}\n\t\tif(isset($params['shared_lock'])&&$params['shared_lock']==true){\n\t\t\t$select = $this->_db->sharedLock($select);\n\t\t}\n\t\treturn array('return' => $return, 'sql' => $select);\n\t}",
"abstract protected function _query($sql);",
"private function query() {\n return ApplicationSql::query($this->_select, $this->_table, $this->_join, $this->_where, $this->_order, $this->_group, $this->_limit, $this->_offset);\n }",
"public function select($table_name, $fields = array(), $where = array(), $order_by = '')\r\n {\r\n }",
"function performSQLSelect($tableName, $filter) {\n $conn = $GLOBALS[\"connection\"];\n\n $sql = \"SELECT * FROM \" . $tableName;\n if ($filter <> NULL) {\n $sql = $sql . \" WHERE \";\n\n foreach ($filter as $key => $value) {\n $whereClause[] = $key . \"='\" . $value . \"'\";\n }\n\n $sql = $sql . implode(\" AND \", $whereClause);\n }\n $result = mysqli_query($conn, $sql);\n if (!$result) {\n printCallstackAndDie();\n }\n $results = NULL;\n while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {\n $results[] = $row;\n }\n\n\n return $results;\n}",
"function selecting($table='', $fields='*', ...$get_args) { \n\t\t$getfromtable = $this->fromtable;\n\t\t$getselect_result = $this->select_result; \n\t\t$getisinto = $this->isinto;\n \n\t\t$this->fromtable = null;\n\t\t$this->select_result = true;\t\n\t\t$this->isinto = false;\t\n \n $skipwhere = false;\n $wherekeys = $get_args;\n $where = '';\n\t\t\n if ( ! isset($table) || $table=='' ) {\n $this->setParamaters();\n return false;\n }\n \n $columns = $this->to_string($fields);\n \n\t\tif (isset($getfromtable) && ! $getisinto) \n\t\t\t$sql=\"CREATE TABLE $table AS SELECT $columns FROM \".$getfromtable;\n elseif (isset($getfromtable) && $getisinto) \n\t\t\t$sql=\"SELECT $columns INTO $table FROM \".$getfromtable;\n else \n\t\t\t$sql=\"SELECT $columns FROM \".$table;\n\n if (!empty($get_args)) {\n\t\t\tif (is_string($get_args[0])) {\n $args_by = '';\n $groupbyset = false; \n $havingset = false; \n $orderbyset = false; \n\t\t\t\tforeach ($get_args as $where_groupby_having_orderby) {\n if (strpos($where_groupby_having_orderby,'WHERE')!==false ) {\n $args_by .= $where_groupby_having_orderby;\n $skipwhere = true;\n } elseif (strpos($where_groupby_having_orderby,'GROUP BY')!==false ) {\n $args_by .= ' '.$where_groupby_having_orderby;\n $groupbyset = true;\n } elseif (strpos($where_groupby_having_orderby,'HAVING')!==false ) {\n if ($groupbyset) {\n $args_by .= ' '.$where_groupby_having_orderby;\n $havingset = true;\n } else {\n $this->setParamaters();\n return false;\n }\n } elseif (strpos($where_groupby_having_orderby,'ORDER BY')!==false ) {\n $args_by .= ' '.$where_groupby_having_orderby; \n $orderbyset = true;\n }\n }\n if ($skipwhere || $groupbyset || $havingset || $orderbyset) {\n $where = $args_by;\n $skipwhere = true;\n }\n\t\t\t}\t\t\n\t\t} else {\n $skipwhere = true;\n } \n \n if (! $skipwhere)\n $where = $this->where( ...$wherekeys);\n \n if (is_string($where)) {\n $sql .= $where;\n if ($getselect_result) \n return (($this->getPrepare()) && !empty($this->getParamaters())) ? $this->get_results($sql, OBJECT, true) : $this->get_results($sql); \n else \n return $sql;\n } else {\n $this->setParamaters();\n return false;\n } \n }",
"abstract public function arrQuery($sql);",
"public abstract function getSelectSQL($fields, $from, $joins, $where, $having, $group, $order, $limit, $values, $forupdate);",
"public function select($arguments)\n {\n $this->_validate($arguments);\n $this->_QUERYCOUNT++;\n\n return $this->_query->select($arguments);\n }",
"public function selectQuery($sql_stmt)\n {\n return DB::select($sql_stmt);\n }",
"function query(/* $sql [, ... ] */)\n {\n // SQL statement\n $sql = func_get_arg(0);\n\n // parameters, if any\n $parameters = array_slice(func_get_args(), 1);\n\n // try to connect to database\n static $handle;\n if (!isset($handle))\n {\n try\n {\n // connect to database\n $handle = new PDO(\"mysql:dbname=\" . DATABASE . \";host=\" . SERVER, USERNAME, PASSWORD);\n\n // ensure that PDO::prepare returns false when passed invalid SQL\n $handle->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); \n }\n catch (Exception $e)\n {\n // trigger (big, orange) error\n trigger_error($e->getMessage(), E_USER_ERROR);\n exit;\n }\n }\n\n // prepare SQL statement\n $statement = $handle->prepare($sql);\n if ($statement === false)\n {\n // trigger (big, orange) error\n trigger_error($handle->errorInfo()[2], E_USER_ERROR);\n exit;\n }\n\n // execute SQL statement\n $results = $statement->execute($parameters);\n\n // return result set's rows, if any\n if ($results !== false)\n {\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }\n else\n {\n return false;\n }\n }",
"public function SqlQuery($sql, $parameters)\n {\n \n }",
"function q($sql){\r\n return $this->ixd->query($sql);\r\n }",
"public function select($where = null, $order = null, $limit = null, $fields = '*')\n {\n $where = strlen($where) ? 'WHERE ' . $where : '';\n $order = strlen($order) ? 'ORDER BY ' . $order : '';\n $limit = strlen($limit) ? 'LIMIT ' . $limit : '';\n\n //Montando query\n $query = 'SELECT ' . $fields . ' FROM ' . $this->table . ' ' . $where . ' ' . $order . ' ' . $limit;\n return $this->execute($query);\n }",
"function SelectSQL() {\n\t\t$sFilter = $this->getSessionWhere();\n\t\tif ($this->CurrentFilter <> \"\") {\n\t\t\tif ($sFilter <> \"\") $sFilter = \"(\" . $sFilter . \") AND \";\n\t\t\t$sFilter .= \"(\" . $this->CurrentFilter . \")\";\n\t\t}\n\t\t$sFilter = $this->ApplyUserIDFilters($sFilter);\n\t\t$sSort = $this->getSessionOrderBy();\n\t\treturn ew_BuildSelectSql($this->SqlSelect(), $this->SqlWhere(), $this->SqlGroupBy(),\n\t\t\t$this->SqlHaving(), $this->SqlOrderBy(), $sFilter, $sSort);\n\t}",
"public function select($table, $fields, $where, $order, $start);",
"function SelectSQL() {\n\t\t$sFilter = $this->getSessionWhere();\n\t\tew_AddFilter($sFilter, $this->CurrentFilter);\n\t\t$sFilter = $this->ApplyUserIDFilters($sFilter);\n\t\t$this->Recordset_Selecting($sFilter);\n\t\t$sSort = $this->getSessionOrderBy();\n\t\treturn ew_BuildSelectSql($this->getSqlSelect(), $this->getSqlWhere(), $this->getSqlGroupBy(),\n\t\t\t$this->getSqlHaving(), $this->getSqlOrderBy(), $sFilter, $sSort);\n\t}",
"function SelectSQL() {\n\t\t$sFilter = $this->getSessionWhere();\n\t\tew_AddFilter($sFilter, $this->CurrentFilter);\n\t\t$sFilter = $this->ApplyUserIDFilters($sFilter);\n\t\t$this->Recordset_Selecting($sFilter);\n\t\t$sSort = $this->getSessionOrderBy();\n\t\treturn ew_BuildSelectSql($this->getSqlSelect(), $this->getSqlWhere(), $this->getSqlGroupBy(),\n\t\t\t$this->getSqlHaving(), $this->getSqlOrderBy(), $sFilter, $sSort);\n\t}",
"public function queryByField($conditions = array(), $params=array(), $columns = \"*\", $order = array()) {\n \n \tif ( is_array($columns) ) {\n \t\t$columns = implode(\",\", $columns);\n \t}\n \n \t$dbkey = $this->getDbKey();\n \t$selectObj = Yii::app()->$dbkey->createCommand()\n \t->select($columns)\n \t->from($this->tableName());\n \t\n \tif (! empty($conditions) ) {\n \t\t$selectObj->where($conditions, $params);\n \t}\n \n \tif (! empty($order) ) {\n \t\t$selectObj->order($order);\n \t}\n\n \tif ( strpos($columns, \",\") === false &&\n \tstrpos($columns, \"*\") === false ) {\n \t\t$result = $selectObj->queryColumn();\n \t} else {\n \t\t$result = $selectObj->queryAll();\n \t}\n \treturn $result;\n }",
"protected function query($sql, array $params)\n {\n }",
"public function select();",
"public function select();",
"public function select();",
"function createQuery() ;",
"function select($fields = '*', $fetch_type = \\PDO::FETCH_ASSOC)\n {\n $this->db->table($this->getTableFullName());\n return call_user_func_array([$this->db, __FUNCTION__], func_get_args());\n }",
"public function query($sql,$params=[]){ // (when no condition , we pass by it , sinon we pass by action methode then by it)\n $this->_error=false;\n $this->_query=$this->_pdo->prepare($sql);\n if($this->_query){\n $x=1;\n if(count($params)>0)\n {\n foreach($params as $param){\n // ;\n $this->_query->bindValue($x++,$param);\n }\n }\n\n \n if($this->_query->execute()){\n $this->_results=$this->_query->fetchALL(PDO::FETCH_OBJ);\n $this->_count=$this->_query->rowCount();\n \n }else{\n $this->_error=true;\n }\n }\n return $this; //chainning\n }",
"protected function ejecutarSelect($sql){ \n $conf = $_SESSION['config']['base'];\n $pass = \\Core\\Encriptador::desencriptar($conf['dbclaveAll']);\n $obd = new \\Core\\DataBase($conf['dbhost'], $conf['dbport'], $conf['dbuserAll'], $pass, $conf['dbdatabase']);\n $datos = $obd->select($sql);\n if(!empty($datos)){\n return $datos;\n }\n return 0;\n }",
"function GenericSQL($sql, $param_type_array, $param_array, $sql_op){\n\tglobal $mysqli;\n\n\ttry{\n\t\tif($stmt=$mysqli->prepare($sql)){\n if($param_type_array !== NULL && $param_array !== NULL)\n call_user_func_array(\n array($stmt, \"bind_param\"), \n array_merge(\n passByReference($param_type_array), \n passByReference($param_array)\n )\n );\n\n $stmt->execute();\n\n if($stmt->affected_rows === 0 && $sql_op !== SQL_SELECT){\n return NOTHING_AFFECTED;\n }elseif($stmt->affected_rows === -1 && $sql_op !== SQL_SELECT){\n return $stmt->errno;\n }elseif($sql_op === SQL_SELECT){\n $data = returnJson($stmt);\n return $data;\n }else{\n return SUCCESS; \n }\n }else{\n // Throw error\n fwrite(STDOUT, \"else\");\n return FAILURE;\n }\n\t}catch (Exception $e) {\n // Return generic error\n fwrite(STDOUT, \"exception\");\n\t\treturn FAILURE;\n }\n}",
"public function executeSelect($sql) {\r\n\r\n $res = mysql_query($sql);\r\n $this->response = $res;\r\n\r\n return $this->resultToArray($res);\r\n\r\n }",
"public function select($tablename,$condition='*'){\n if (!$this->select_db($this->_currentDB))\n return FALSE;\n \tif(!$this->_table_exists($this->_currentDB,$tablename)){\n $errmsg= sprintf(self::$_error_code_list[23],$this->_currentDB.'.'.$tablename);\n $this->_trigger_error($errmsg);\n return FALSE;\n \t}\n if($condition=='*'){\n $result=$this->_select_all_in_table($this->_currentDB,$tablename);\n return $result;\n }\n if(!is_array($condition) || count($condition)!=1 ){\n $errmsg=self::$_error_code_list[19];\n $this->_trigger_error($errmsg);\n return FALSE;\n \t}\n $field=key($condition);\n \tif ( ($key=$this->_field_exists($this->_currentDB,$tablename,$field)) === FALSE){\n $errmsg= sprintf(self::$_error_code_list[20], $field,$this->_currentDB.'.'.$tablename);\n $this->_trigger_error($errmsg);\n return FALSE;\n \t}\n \t$datf=$this->_table_path($this->_currentDB,$tablename).$this->_data_ext;\n \t$data=$this->_select_by_field($datf,$key,$condition[$field]);\n \tif($data===FALSE){\n $errmsg=sprintf(self::$_error_code_list[21], $tablename);\n $this->_trigger_error($errmsg);\n return FALSE;\n \t}\n if($data==array()){\n return array();\n }\n $data=$this->_unescape_data($data);\n $frame_data=$this->_read_frame($this->_currentDB,$tablename);\n $data=$this->_array_combine($frame_data,$data);\n \treturn $data;\n }",
"public function selectDbQ($values, $where = '1'){ //$values is indexed array, ex:\n // [0] => luminosity\n // [1] => temperature\n //$where is string, accepts AND,OR,NOT conditionals\n if(debug){echo \"SelectDbQ()\" . PHP_EOL;}\n\n try{\n $where = \\multiExplode(['and','or','not'], $where, true);\n $splitString = $this->genSqlWhereArray($where);\n\n if(isset($splitString)){\n $sqlArgStr = sqlArgStringSelect($values);\n \n $whereStr = sqlArgStringWhere($splitString);\n $stmt = \"SELECT $sqlArgStr FROM $this->tableName WHERE $whereStr[0]\";\n $sql = $this->conn->prepare($stmt);\n //print_r($whereStr[1]);\n $sql->execute($whereStr[1]);\n //echo $stmt . PHP_EOL;\n //print_r($sql->fetchAll());\n return $sql->fetchAll();\n }\n return null;\n }\n catch(Exception $e){\n eHandle(500,$e);\n return null;\n }\n }",
"function buildQuery(){\n\t\t$r = ($this->fieldName == \"\") ? \"SELECT * FROM \" . $this->tableName . \";\" : \"SELECT * FROM \" . $this->tableName . \" WHERE \" . $this->fieldName . \" = \" . $this->fieldValue . \";\";\n\t\t//print \"executing $r <br/>\";\n\t\treturn $r;\n\t}",
"protected function runSelect()\n {\n return $this->connection->select(\n $this->toSql(),\n $this->getBindings(),\n $this->option->setUseWrite($this->useWritePdo)\n );\n }",
"public function query($statement);",
"public function select(string $fields, $where, $bind = null, $fetchAll = true)\n {\n $fields = is_array($fields) ? $fields : explode(',', $fields);\n $sql = \"SELECT \" . join(',', $fields) . \" FROM \" . $this->table;\n\n if (!empty($where)) {\n if (is_array($where)) {\n $whereConvert = '';\n foreach ($where as $key => $value) {\n $whereConvert .= empty($whereConvert) ? '' : ' AND ';\n $whereConvert .= $key . ' = ' . (is_string($value) ? \"'$value'\" : $value);\n }\n $where = $whereConvert;\n }\n $sql .= \" WHERE \" . $where;\n }\n $sql .= \";\";\n\n return $this->executeQuery($sql, $bind, $fetchAll);\n }",
"function select($where = false){\n $query=\"SELECT * FROM \". $this->tableName ;\n $separator=\" WHERE \";\n if ($where){\n foreach ( $where as $key => $value){\n\t$query .= $separator . $key . \" = '\" . $value . \"'\";\n\t$separator = \" AND \";\n }\n }\n $query .= \";\";\n \n $results = array();\n $res = $this->dbh->query($query);\n while ($row = $res->fetch_assoc()){\n array_push($results, $row);\n }\n return $results;\n }",
"public function query ($sqlString);",
"private function GeneraSelectQuery($fields,$where)\r\n\t{\r\n\t\t$sql=\"select \r\n\t\t\t\".$fields.\" \r\n\t\t\tfrom Tabla\r\n\t\t\tinner join Tabla1 on Tabla1.id=Tabla.idTabla1\r\n\t\t\t\".(($where)?\" WHERE \".$where:\"\");\r\n\t\treturn $sql;\r\n\t}",
"protected function Select($sql) { \n if ((empty($sql)) || (!eregi(\"^select\",$sql)) || (empty($this->CONNECTION))) { \n $this->ERROR_MSG = \"\\r\\n\" . \"SQL Statement is <code>null</code> or not a SELECT - \" . date('H:i:s'); \n $this->debug(); \n return false; \n } else { \n $conn = $this->CONNECTION; \n $results = mysql_query($sql,$conn); \n if ((!$results) || (empty($results))) { \n $this->ERROR_MSG = \"\\r\\n\" . mysql_error().\" - \" . date('H:i:s'); \n $this->debug(); \n return false; \n } else { \n// $i = 0; \n// $data = array(); \n// while ($row = mysql_fetch_array($results)) { \n// $data[$i] = $row; \n// $i++; \n// } \n// mysql_free_result($results); \n// return $data; \n return $results;\n } \n } \n }",
"function BDDselect($sql, $param){\n $bdd = BDDopen();\n $req = $bdd->prepare($sql);\n if($req->execute($param) === FALSE){\n echo 'Errore de la requette';\n print_r($param);\n }\n return $req;\n}",
"function queryDB($db, $query, $params) {\r\n // Silex will catch the exception\r\n $stmt = $db->prepare($query);\r\n $results = $stmt->execute($params);\r\n $selectpos = stripos($query, \"select\");\r\n if (($selectpos !== false) && ($selectpos < 6)) {\r\n $results = $stmt->fetchAll();\r\n }\r\n return $results;\r\n}",
"public function build_query(/* ... */)\n {\n $query = [\"SELECT\"];\n $model = $this->get_model();\n // Field selection\n $fields = [];\n foreach ($this->_fields as $_field) {\n $fields[] = $this->_build_select_field($_field);\n }\n $query[] = implode(', ', $fields);\n // Table Selection\n $query[] = 'FROM';\n $query[] = '`' . $model->get_table() . '`';\n // WHERE lookup\n $query[] = $this->build_where();\n if (null !== $this->_orderby) {\n $query[] = $this->_orderby;\n }\n if (null !== $this->_limit) {\n $query[] = $this->_limit;\n }\n return $model->get_connection()->prepare(implode(\" \", $query));\n }",
"public function Fetch($table, $input, $cond){\r\n\t\tif($cond == \"null\"){\r\n\t\t\t$query = \"SELECT \".$input.\" FROM \".$table;\r\n\t\t}else{\r\n\t\t\t$query = \"SELECT \".$input.\" FROM \".$table.\" WHERE \".$cond;\r\n\t\t}\r\n\t\t\r\n\t\tfile_put_contents(\"gquery.txt\", $query);\r\n\t\t$dbcontroller = new DBController();\r\n\t\t$this->QuerySQL = $dbcontroller->executeSelectQuery($query);\r\n\t\treturn $this->QuerySQL;\r\n\t}",
"abstract public function query($type, $sql, $asObject = false, array $params = null);",
"function selectQuery($query) \t{\n\t\tif($query != '')\t\t{\n\t $res = $this->execute($query);\n\t\t\treturn $this->fetchAll($res);\n\t\t}\n\t}",
"public function query ($select,$table,$where=null,$data = array()){\n\t\tif ($where != null){\n\t\t\t$this->_query = \"SELECT $select FROM $table WHERE $where\";\n\t\t}else {\n\t\t\t$this->_query = \"SELECT $select FROM $table \";\n\t\t}\n\t\t$stmt = $this->db->prepare($this->_query);\n\t\t$stmt->execute($data);\n\t\treturn $stmt->fetchAll(PDO::FETCH_OBJ);\n\t}",
"abstract public function query($sql, $execute =FALSE);",
"abstract function getSQL();",
"function exec_SELECTquery($select_fields, $from_table, $where_clause, $groupBy = '', $orderBy = '', $limit = '') {\n\t\t// Added to log select queries\n\t\tforeach($this->preProcessHookObjects as $preProcessHookObject) { /* @var $preProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPreProcessHookInterface */\n\t\t\t$preProcessHookObject->exec_SELECTquery_preProcessAction($select_fields, $from_table, $where_clause, $groupBy, $orderBy, $limit, $this);\n\t\t}\n\n\t\t$res = parent::exec_SELECTquery($select_fields, $from_table, $where_clause, $groupBy, $orderBy, $limit);\n\n\t\t// Added to log select queries\n\t\tforeach($this->postProcessHookObjects as $postProcessHookObject) { /* @var $postProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPostProcessHookInterface */\n\t\t\t$postProcessHookObject->exec_SELECTquery_postProcessAction($select_fields, $from_table, $where_clause, $groupBy, $orderBy, $limit, $this);\n\t\t}\n\n\t\treturn $res;\n\t}",
"function exec_SELECTquery($select_fields, $from_table, $where_clause, $groupBy = '', $orderBy = '', $limit = '') {\n\t\t// Added to log select queries\n\t\tforeach($this->preProcessHookObjects as $preProcessHookObject) { /* @var $preProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPreProcessHookInterface */\n\t\t\t$preProcessHookObject->exec_SELECTquery_preProcessAction($select_fields, $from_table, $where_clause, $groupBy, $orderBy, $limit, $this);\n\t\t}\n\n\t\t$res = parent::exec_SELECTquery($select_fields, $from_table, $where_clause, $groupBy, $orderBy, $limit);\n\n\t\t// Added to log select queries\n\t\tforeach($this->postProcessHookObjects as $postProcessHookObject) { /* @var $postProcessHookObject Tx_SandstormmediaPlumber_Hooks_DbPostProcessHookInterface */\n\t\t\t$postProcessHookObject->exec_SELECTquery_postProcessAction($select_fields, $from_table, $where_clause, $groupBy, $orderBy, $limit, $this);\n\t\t}\n\n\t\treturn $res;\n\t}",
"private function buildQuery( array $request )\n\t{\n\t\treturn $this->buildSelect($request);\n\t}",
"public function select($table = NULL, $values = NULL, $condition = 1, $db = 'DB', $fetch = 'fetch')\n\t{\n\t\tif($table == NULL || $values == NULL)\n\t\t\treturn false;\n\t\t$this->$db();\n\t\t$values = implode(',', $values);\n\t\t$sql = \"SELECT $values FROM $table WHERE $condition\";\n\t\t$query = $this->$db->prepare($sql);\n\t\t$query->execute();\n\t\t$result = array();\n\t\twhile ( $row = $query->fetch() ) {\n\t\t\tarray_push( $result, $row );\n }\n\t\t$this->$db = null;\n\t\treturn $result;\n\t}",
"public function query(string $sql, array $parameters = []): void;",
"function query($sql, $arguments = null) {\n $query = $this->connection->prepare($sql);\n try {\n $query->execute($arguments);\n }\n catch (Exception $ex) {\n throw new Exception($ex->getMessage() . \" \\n\" . $sql);\n }\n return $query;\n }",
"public function cpSelect($tablename,$value1=0,$value2=0) {\n /*\n * Prepare the select statement\n */\n $sql=\"SELECT * FROM $tablename\";\n if($value1!=0)\n { $key1= key($value1);\n $sql.=\" where $key1='$value1[$key1]'\";\n }\n if($value1!=0 && $value2!=0) \n {\n $key2= key($value2);\n $sql.=\" AND $key2='$value2[$key2]'\";\n }\n \n $sth = $this->dbh->prepare($sql);\n $sth->execute();\n $result = $sth->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n \n}",
"function adv_select($table, array $where = null, array $fields = null, $order = '', $limit = null, $offset = null);",
"public function queryRow($sql, $params = array());"
] | [
"0.67380726",
"0.6704076",
"0.66701883",
"0.665414",
"0.6618875",
"0.6618875",
"0.6618179",
"0.6583949",
"0.6582402",
"0.6562671",
"0.6531247",
"0.6528722",
"0.6508728",
"0.64906394",
"0.64906394",
"0.64906394",
"0.64906394",
"0.64816064",
"0.64802384",
"0.63958675",
"0.6359125",
"0.6334241",
"0.6324177",
"0.63218415",
"0.63161796",
"0.6312383",
"0.62922066",
"0.6292094",
"0.62725985",
"0.62642044",
"0.62575847",
"0.62561125",
"0.6243688",
"0.6226979",
"0.62184405",
"0.620385",
"0.6192553",
"0.61851877",
"0.6180769",
"0.61804",
"0.6180162",
"0.61774814",
"0.6168903",
"0.61654556",
"0.61587316",
"0.6155081",
"0.6131477",
"0.61313593",
"0.6122092",
"0.61210054",
"0.61198264",
"0.6108454",
"0.6106297",
"0.6105257",
"0.6104387",
"0.6102105",
"0.609162",
"0.60863614",
"0.60824823",
"0.60822535",
"0.60822535",
"0.6074604",
"0.60655",
"0.60587573",
"0.60587573",
"0.60587573",
"0.6054622",
"0.60524106",
"0.6041893",
"0.60360575",
"0.6035139",
"0.6032979",
"0.60320985",
"0.602899",
"0.6022942",
"0.60193455",
"0.6017149",
"0.60166246",
"0.60084355",
"0.60080266",
"0.6004846",
"0.60012746",
"0.5995482",
"0.59949714",
"0.59943235",
"0.59899807",
"0.5985809",
"0.5978118",
"0.5956419",
"0.5954343",
"0.5953976",
"0.59537137",
"0.59537137",
"0.5947407",
"0.5932965",
"0.59165096",
"0.5912311",
"0.59026486",
"0.59009284",
"0.58965665"
] | 0.6669564 | 3 |
Method to return the last ID inserted in the Data Base | public static function lastId()
{
return self::connect()->lastInsertId();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function getLastID()\n {\n return $this->driver->getInsertId();\n }",
"public function getLastInsertID();",
"public function getLastId()\n {\n return $this->adodb->insert_Id();\n }",
"public function getLastId(){\n return $this->con->insertId();\n }",
"public function getLastInsertId();",
"public function getLastInsertId();",
"public function getLastInsertId();",
"public function getLastID() {\n return $this->db->insert_id();\n }",
"public function last_id() {\n return $this->_connection->lastInsertId();\n }",
"public function lastID() {\n return $this->getPDO()->lastInsertId();\n }",
"public function lastInsertId();",
"public function lastInsertId();",
"public function lastInsertId();",
"abstract public function getLastInsertId();",
"public function getLastId() {\n return $this->LastInsertId;\n }",
"function getLastId()\n {\n return mysqli_insert_id($this->Db);\n }",
"public function getLastInsertedID(){\n // Return last created id\n return $this->connection->insert_id();\n }",
"public function lastId()\n\t{\n\t\treturn mysqli_insert_id($this->connection);\n\t}",
"public function lastId()\n\t{\n\t\treturn $this->_instance->lastInsertId();\n\t}",
"function get_last_id() {\n if ($this->is_valid())\n return @mysql_insert_id($this->connection);\n }",
"public function lastID(){\n return $this->_lastInsertID;\n }",
"public function lastInsertId () {\r\n return $this->cachedLastInsertId; // $this->db->lastInsertId();\r\n }",
"public function lastId()\n\t{\n\t\treturn $this->lastInsertID();\n\t}",
"public function insertGetId()\n {\n return $this->lastId;\n }",
"public function insertGetId()\n {\n return $this->lastId;\n }",
"public function getLastInsertId(): int;",
"function lastId() {\n return mysqli_insert_id($this->con);\n }",
"public function getLastInsertId()\r\n {\r\n return $this->getMaster()->lastInsertId();\r\n }",
"public function getLastInsertID()\n {\n\t return $this->connections[ $this->activeConnection]->insert_id;\n }",
"public function lastId()\n {\n return $this->mysqli->insert_id;\n }",
"public function lastId();",
"public static function getLastInsertId()\n {\n return self::$sql->lastInsertId();\n }",
"public function getLastInsertedID(){\r\n try {\r\n //Get & return last inserted ID\r\n return $this->db->lastInsertId();\r\n }\r\n catch(Exception $e){\r\n exit($this->echoException($e));\r\n }\r\n catch(PDOException $e){\r\n exit($this->echoPDOException($e));\r\n }\r\n }",
"public function getLastInsertedId() {\n\t\treturn $this->lastInsertedID;\n\t}",
"public function getLastInsertId()\n {\n return $this->PDO->lastInsertId();\n }",
"public function lastId () {\n\treturn mysql_insert_id();\n }",
"function lastInsertId()\n\t{\n\t\treturn @$this->functions['insert_id']($this->connection_master);\n\t}",
"function lastInsertId() {\n\t\treturn sqlite_last_insert_rowid($this->connection);\n\t}",
"public function getLastInsertID()\n {\n return $this->_lastInsertID;\n }",
"public function lastID(): int;",
"public function lastInsertId()\n {\n return @db2_last_lastInsertId($this->connection);\n }",
"public function lastInsertId()\n {\n return $this->_adapter->lastInsertId();\n }",
"public function last_insert_id() {\n\t\treturn $this->adapter->lastInsertId();\n\t}",
"function getLastInsertID(){\r\n $query = 'SELECT DISTINCT LAST_INSERT_ID() FROM ' . $this->table_name; \r\n $stmt = $this->dbConn->prepare($query);\r\n \r\n $stmt->execute();\r\n \r\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\r\n \r\n $lastID = $row['LAST_INSERT_ID()'];\r\n \r\n return $lastID;\r\n }",
"public function getLastInsertId()\n {\n return $this->getPdo()->lastInsertId();\n }",
"function lastInsertId() {\n return $this->pdo->lastInsertId();\n }",
"public function getLastInsertId(){\n return $this->lastInsertId;\n }",
"function getLastInsertID(){\r\n\t\t\r\n\t\treturn $this->connection->insert_id;\r\n\t}",
"public function getLastInsertedId()\r\n\t{\r\n\t\treturn $this->db->getLastInsertedId();\r\n\t}",
"public function getLastInsertId()\n {\n return $this->getHandler()->getConnection()->lastInsertId();\n }",
"public function getLastInsertId()\n {\n return $this->lastInsertId;\n }",
"public function LastInsertId() {\n\t\t\t\treturn $this->connection->lastInsertId();\n\t\t\t}",
"public function lastInsertId() {\n return $this->connection->lastInsertId();\n }",
"public function getLastInsertId()\t{\n\t\treturn $this->_hDb->lastInsertId();\n\t}",
"public function getLastId();",
"public function getLastId();",
"public function lastInsertId(){\n return $this->pdo->lastInsertId();\n }",
"public function getLastInsertId(){\n\t\treturn $this->connection->insert_id;\n\t}",
"public function lastInsertId()\n{\n\t$stmt = 'SELECT IDENTITY_VAL_LOCAL() AS LASTID FROM SYSIBM.SYSDUMMY1';\n\t$sth = db2_prepare($this->dbh, $stmt);\n\tdb2_execute($sth);\n\treturn (db2_fetch_row($sth)) ? db2_result($sth, 0) : FALSE;\n}",
"public function lastInsertId()\n\t{\n\t\treturn $this->connection->lastInsertId();\n\t}",
"public function getAutoIncrementID()\n {\n $this->sql_query->query(\"SELECT LAST_INSERT_ID()\");\n $result = $this->sql_query->getSingleResult();\n return $result[0];\n }",
"function getLastid(){\n $this->lastid = mysqli_insert_id($this->dcon);\n return $this->lastid;\n }",
"public function lastInsert(){\n\t\treturn $this->dbh->lastInsertId();\n\t}",
"public static function getId() {\n\t\treturn self::getConexao()->lastInsertId();\n\t}",
"public function lastInsertID() {\n return $this->_pdo->lastInsertId();\n }",
"public static function getLastInsertId() : string\n {\n return static::getConn()->lastInsertId();\n }",
"public function lastInsertedId() {\n return $this->_dbh->lastInsertId();\n\n }",
"function lastInsertId() \r\n\t{\r\n\t\t \r\n\t\treturn $this->socket->insert_id;\r\n\t\t \r\n\t}",
"public function lastInsertId() {\n return $this->pdo->lastInsertId();\n }",
"public function lastInsertId() {\n return $this->pdo->lastInsertId();\n }",
"public function lastInsertId()\n {\n return $this->pdo->lastInsertId();\n }",
"public function lastInsertId()\n {\n return $this->pdo->lastInsertId();\n }",
"public function lastInsertId()\n {\n return $this->pdo->lastInsertId();\n }",
"public function lastInsertId()\n {\n return $this->pdo->lastInsertId();\n }",
"public function lastInsertId()\n {\n return $this->pdo->lastInsertId();\n }",
"public function lastInsertId()\n {\n return $this->pdo->lastInsertId();\n }",
"public function lastInsertId(){\n return $this->conn->lastInsertId();\n }",
"public static function lastInsertId(): string {\r\n return self::getConnection()->lastInsertId();\r\n }",
"protected function getLastInsertId(){\n $iLastInsertId = $this->objDbConn->lastInsertId();\n return $iLastInsertId;\n }",
"function lastID()\r\n\t{\r\n\t\tassert($this->link != null);\r\n\t\treturn intval($this->link->lastInsertId());\r\n\t}",
"function lastId()\n {\n return mysql_insert_id();\n }",
"public function GetLastInsertID()\r\n\t{\r\n\t\treturn $this->last_insert_id;\r\n\t}",
"function getLastinsertId (){\n return $this->pdo->lastInsertId();\n }",
"public function get_last_insert_id()\n\t\t{\n\t\t\treturn( $this->last_insert_id );\n\t\t}",
"public function lastId() : int\n\t{\n\t\treturn $this->handle->lastId();\n\t}",
"function get_last_inserted_id() {\n return $this->db->insert_id();\n }",
"public function lastInsertedId()\n {\n $query = 'MATCH (n) RETURN MAX(id(n)) AS lastIdCreated';\n\n $statement = $this->getCypherQuery($query, []);\n $result = $statement->getResultSet();\n\n return $result[0][0];\n }",
"public function lastInsertedId()\n {\n $id = $this->pdo->lastInsertId();\n return $id;\n }",
"function lastId() {\r\n return mysql_insert_id();\r\n }",
"public static function get_last_id(){\r\n\t\treturn self::$last_id;\r\n\t}",
"function getLastInsertID() {\n return mysql_insert_id($this->CONNECTION);\n }",
"public function lastId()\r\n {\r\n return $this->getKey('last_id');\r\n }",
"public function get_last_id() {\n\t\treturn $this->last_id;\n\t}",
"public function getLastInsertedId(): string\n {\n return $this->db->lastInsertId();\n }",
"public function last_insert_id() {\n\t\t\n\t\treturn $this->pdo->lastInsertId();\n\t\n\t}",
"public function getLastInsertId()\n {\n if (!$id = $this->db->Insert_Id()) {\n throw new Exception(\"Method 'Insert_Id' is not supported!\");\n }\n\n return $id;\n }",
"protected function getLastPrimaryKey()\n {\n return $this->getLastEntityId();\n }",
"function get_last_id()\n {\n // TODO: Implement get_last_id() method.\n }",
"public function id() {\n return $this->lastInsertId();\n }",
"public function lastInsertId()\n {\n return sqlite_last_insert_rowid($this->connection);\n }"
] | [
"0.9073959",
"0.9028953",
"0.89754564",
"0.8962095",
"0.88951576",
"0.88951576",
"0.88951576",
"0.88909173",
"0.88230807",
"0.88121706",
"0.8793769",
"0.8793769",
"0.8793769",
"0.8740648",
"0.873952",
"0.8723548",
"0.8715857",
"0.86657685",
"0.86584306",
"0.864105",
"0.8628708",
"0.86279416",
"0.8623247",
"0.8615378",
"0.8615378",
"0.8603912",
"0.8599907",
"0.8596213",
"0.8577521",
"0.85726684",
"0.85609794",
"0.853347",
"0.8525281",
"0.8524823",
"0.85036254",
"0.85032475",
"0.8498577",
"0.8496326",
"0.8493674",
"0.8492314",
"0.84915596",
"0.8489794",
"0.8489711",
"0.8484223",
"0.848214",
"0.8469685",
"0.84689766",
"0.8461453",
"0.84578127",
"0.84566927",
"0.8452043",
"0.8451104",
"0.84505004",
"0.84489846",
"0.8447901",
"0.8447901",
"0.8446768",
"0.8446215",
"0.8443958",
"0.8432338",
"0.843108",
"0.8427307",
"0.8426888",
"0.8424154",
"0.8418229",
"0.84145504",
"0.8414277",
"0.84042805",
"0.839659",
"0.839659",
"0.8395859",
"0.8395859",
"0.8395859",
"0.8395859",
"0.8395859",
"0.8395859",
"0.83939004",
"0.83906716",
"0.8385565",
"0.83834463",
"0.837416",
"0.8369508",
"0.83682346",
"0.83665025",
"0.8364826",
"0.8364633",
"0.8355966",
"0.835494",
"0.8351796",
"0.8350543",
"0.83458763",
"0.8339658",
"0.83392227",
"0.8332001",
"0.8322731",
"0.8312715",
"0.83116305",
"0.8311442",
"0.8311426",
"0.8300393"
] | 0.88478386 | 8 |
Get all provider keys. | public function getProviderKeys(): array
{
return array_keys($this->config['providers']);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAllKey();",
"public function getProviders();",
"public function getProviders();",
"public function getProviderNames();",
"public function retrieveKeys()\n {\n return $this->start()->uri(\"/api/key\")\n ->get()\n ->go();\n }",
"public function getKeys() {}",
"function getAllKeys() {\n return $this->memcached->getAllKeys();\n }",
"public function getKeys() {\n\t\treturn $this->getAllKeys();\n\t}",
"public function getProvider()\n {\n return [\n [\n [],\n [],\n '/'\n ],\n [\n ['key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3'],\n ['key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3'],\n '/'\n ],\n [\n 'value1',\n ['key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3'],\n '/key1'\n ],\n ];\n }",
"public function getKeys();",
"public function keypathProvider()\n {\n return [[[]]];\n }",
"public function getActiveServiceProviderList()\n {\n return array_keys($this->activeProviders);\n }",
"abstract public function getProviders();",
"protected function getProviderLookup()\n {\n // to skip loading those providers completely.\n return array_merge($this->providerLookup, [\n 'keycloak' => KeycloakProvider::class\n ]);\n }",
"public function getKeys()\n {\n $response = $this->get('user/keys');\n\n return $response['public_keys'];\n }",
"static function getKeys();",
"public function getKeys()\n {\n $private_key = $this->config->getAppValue($this->appName, \"privatekey\");\n $public_key = $this->config->getAppValue($this->appName, \"publickey\");\n\n return [$private_key, $public_key];\n }",
"public function provides() {\n $providers = array();\n foreach ($this->providers as $key => $value) {\n $providers[] = $key;\n }\n return $providers;\n }",
"public static function get_providers() {\n\t\treturn self::$providers;\n\t}",
"public function getKeys() {\n\t\treturn $this->config->getKeys();\n\t}",
"abstract public function getKeys();",
"public function get_providers()\n {\n }",
"public function keys();",
"public function keys();",
"public function keys();",
"public function keys();",
"public function keys();",
"public function keys();",
"public function getProviders(): array\n {\n return $this->providers;\n }",
"public function getProviders(): array\n {\n return $this->providers;\n }",
"public function getProviders()\n\t{\n\t\t$publicKey\t= Mage::getStoreConfig('payment/base/publickey');\n\t\t$privateKey\t= Mage::getStoreConfig('payment/base/privatekey');\n\t\t$mode\t\t= intval(Mage::getStoreConfig('payment/base/mode')) == 1;\n\t\t$quote\t\t= Mage::getModel('checkout/session')->getQuote();\n\t\t$quoteData\t= $quote->getData();\n\n\t\t$client\t\t= (new sdkCash)->withKeys($publicKey, $privateKey);\n\t\t$providers\t= $client->getProviders(\n\t\t\t$quoteData['grand_total'],\n\t\t\tMage::app()->getStore()->getCurrentCurrencyCode()\n\t\t);\n\n\t\t$filter = explode(',', $this->getConfigData('providers_available'));\n\t\t$record = [];\n\t\tforeach ($providers as $provider)\n\t\t{\n\t\t\tforeach ($filter as $value)\n\t\t\t{\n\t\t\t\tif ($provider['internal_name'] == $value)\n\t\t\t\t{\n\t\t\t\t\t$record[] = $provider;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $record;\n\t}",
"private function getAllCacheKeys(){\n $keys = array();\n foreach ($this->storages as $name => $storage){\n $keys[] = $this->getCacheKey($name);\n }\n return $keys;\n }",
"protected function getProviders() {\n\n\t\treturn $this->providers;\n\t}",
"public function getExtensionKeys() {}",
"public function getKeys(){\n\t\treturn $this->keys;\n\t}",
"private function getProvidersConfig()\n {\n $config = [];\n foreach (self::PROVIDERS as $provider) {\n $config[ucfirst($provider)] = [\n 'enabled' => (bool)$this->scopeConfig->getValue(\n sprintf(self::CONFIG_PATH_SOCIAL_LOGIN_PROVIDER_ENABLED, $provider),\n ScopeInterface::SCOPE_STORE\n ),\n 'keys' => [\n 'key' => $this->scopeConfig->getValue(\n sprintf(self::CONFIG_PATH_SOCIAL_LOGIN_PROVIDER_KEY, $provider),\n ScopeInterface::SCOPE_STORE\n ),\n 'secret' => $this->scopeConfig->getValue(\n sprintf(self::CONFIG_PATH_SOCIAL_LOGIN_PROVIDER_SECRET, $provider),\n ScopeInterface::SCOPE_STORE\n ),\n ]\n ];\n }\n return $config;\n }",
"public function getSortedProviders();",
"public function getProviders()\n {\n return $this->providers;\n }",
"public function getProviders()\n {\n return $this->providers;\n }",
"public function getKeys()\n {\n return $this->keys;\n }",
"public function getKeys()\n {\n return $this->keys;\n }",
"public function getKeys()\n {\n return $this->keys;\n }",
"public function getKeys()\n {\n return $this->keys;\n }",
"public function getKeys()\n {\n return $this->keys;\n }",
"public function retrieveIdentityProviders()\n {\n return $this->start()->uri(\"/api/identity-provider\")\n ->get()\n ->go();\n }",
"public function providerGet()\n {\n $getList = $this->getMethodsName('get');\n $provider = [];\n\n foreach ($getList as $name) {\n $provider[$name] = [\n 'name' => $name,\n 'arguments' => $this->getArgumentsForMethod($name),\n ];\n }\n\n return $provider;\n }",
"public function getKeys()\n {\n return $this->getNames();\n }",
"public function keys()\n {\n return static::from($this->keyR);\n }",
"public function getServiceProviderList()\n {\n return $this->providers;\n }",
"public function getProviders(){\n\t\n\t\t$db\t\t= $this->getDbo();\n\t\t\n\t\t$query\t= $db->getQuery( true );\n\t\t$query->select( '*' );\n\t\t$query->from( '#__zbrochure_providers' );\n\t\t$query->order( 'provider_name' );\n\t\t\n\t\t$db->setQuery( $query );\n\t\t$providers = $db->loadObjectList();\n\t\t\n\t\treturn $providers;\n\t}",
"public function fetchPublicKeys() {\n $data = json_decode(file_get_contents(self::CognitoIdentityKeyEndpoint), fasle);\n $publicKeys = array();\n foreach ($data[\"keys\"] as $keyEntry) {\n $publicKeys[$keyEntry['kid']] = $keyEntry;\n }\n\n //@todo Implement local cache\n return $publicKeys;\n }",
"public function getKeys(): array;",
"protected function getAllRegisteredKeys($userId)\n {\n return WebauthnKey::where('user_id', $userId)\n ->get()\n ->map(function ($webauthnKey): PublicKeyCredentialSource {\n return $webauthnKey->publicKeyCredentialSource;\n });\n }",
"public function getRawProviders(): array\n {\n return $this->providers->toArray();\n }",
"public function getKeys()\n {\n $this->prepare();\n\n return $this->_keys;\n }",
"public function setProvider()\n {\n return [\n [\n ['key1' => 'value1'],\n [],\n 'key1',\n 'value1'\n ],\n [\n ['key1' => 'value1', 'key2' => 'value2', 'key3' => 'value33'],\n ['key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3'],\n '/key3',\n 'value33'\n ],\n [\n ['key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3'],\n [],\n '/',\n ['key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3'],\n ],\n [\n ['key1' => 'value1', 'key2' => 'value2'],\n ['key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3'],\n '/key3',\n null,\n ],\n [\n ['key1' => 'value1', 'key2' => 'value2', 'foo' => 'test'],\n ['key1' => 'value1', 'key2' => 'value2'],\n '//foo',\n 'test',\n ],\n ];\n }",
"public function getProviders()\n {\n return $this->oauth_providers;\n }",
"public function getAllProviders() {\n\t\t$em = $this->getEntityManager();\n\t\t$providers = $em->createQueryBuilder()\n\t\t\t->select('e.providerNPI')\n\t\t\t->from('Provider', 'e')\n\t\t\t->orderBy('e.employeeID')\n\t\t\t->getQuery()\n\t\t\t->getResult();\n\t\t\n\t\t$response = array(\n\t\t\t\"providers\" => $providers\n\t\t);\n\t\t\n\t\treturn $this->respond($response);\n\t}",
"public function GetAllKeys()\n {\n return array_keys($this->_keyValPairs);\n }",
"public function getSupportedLocalesKeys();",
"public function all($usename, $repo)\n {\n return $this->_all(\"repos/$username/$repo/keys\");\n }",
"public static function getProviders()\n {\n return config('socialauth.providers', []);\n }",
"public static function keys()\n {\n return static::$keys;\n }",
"public function getKeys(): array\n {\n return $this->keys;\n }",
"public function getKeys()\n {\n $catalog = $this->fetch($this->catalog_key);\n $catalog = \\is_array($catalog) ? $catalog : Array();\n \\ksort($catalog);\n return $catalog;\n }",
"public function keyFileProvider()\n {\n $base = __DIR__.'/../../resources/';\n return [\n [$base.'rsa-nopw.pem.pub', $base.'rsa-nopw.pem', null],\n [$base.'rsa-pw.pem.pub', $base.'rsa-pw.pem', self::KEYFILE_PASSWORD],\n [$base.'dsa-nopw.pem.pub', $base.'dsa-nopw.pem', null],\n [$base.'dsa-pw.pem.pub', $base.'dsa-pw.pem', self::KEYFILE_PASSWORD],\n ];\n }",
"public function providerList()\n {\n $this->getData();\n $this->getDefaultValue();\n\n $list = $this->getMethodsName('list');\n $provider = [];\n\n foreach ($list as $name) {\n $provider[$name] = [\n 'name' => $name,\n 'productId' => $this->allMethods[$name]['countRequiredParams'] > 0\n ? $this->argList\n : []\n ];\n }\n\n return $provider;\n }",
"public static function getLoadedProviders(){\n return \\Illuminate\\Foundation\\Application::getLoadedProviders();\n }",
"public function keys()\n\t{\n\t\treturn $this->toBase()->keys();\n\t}",
"public function keys(): self;",
"public function loadKeys() {\n\t\treturn end($this->getKeys());\n\t}",
"public function getKeys()\n {\n if (!file_exists($this->keysPath())) {\n return [];\n }\n\n return json_decode(file_get_contents($this->keysPath()), true) ?? [];\n }",
"public function keys()\n {\n }",
"private function getKeySet()\n {\n $oConfig = $this->getOpenIdConfiguration();\n\n try {\n $response = $this->getHttpClient()->get($oConfig->jwks_uri, array('http_errors' => true));\n } catch(\\Exception $e) {\n throw new \\Exception(\"JWT signing keys could not be fetched from IDP.\");\n }\n\n return json_decode($response->getBody(), true);\n }",
"public function extensionKeyDataProvider() {}",
"public function getKeys()\n {\n $keys = array_keys($this->cache) + array_keys($this->factories);\n return array_unique($keys);\n }",
"protected static function getServiceProviders()\n {\n return [];\n }",
"public function getSupportedKeys()\n {\n return $this->supportedKeys;\n }",
"public function getLoadedProviders(): array\n {\n return $this->loadServiceProviders;\n }",
"public static function listOfKeys()\n {\n return array_keys((new static)->_all);\n }",
"public function getProviderNamesOrdered();",
"public function GetAll()\n {\n return $this->_keyValPairs;\n }",
"public function getKeys() {\n\t\treturn file('/home4/statelib/keys.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);\n\t}",
"public function getProviders()\n {\n $providers = [];\n $hybridProviders = $this->hybridAuth->getProviders();\n\n foreach ($hybridProviders as $key => $provider) {\n $providers[strtolower($key)]['url'] = $this->getUrl('sociallogin/login', [\n 'provider' => strtolower($key),\n '_secure' => $this->_storeManager->getStore()->isCurrentlySecure()\n ]);\n $providers[strtolower($key)]['order'] = $provider['order'];\n }\n\n return $providers;\n }",
"public function provider()\n {\n return array(\n array('¬`!\"£$%^&*()+=', '%C2%AC%60%21%22%C2%A3%24%25%5E%26%2A%28%29%2B%3D'),\n array('{}[]:;<>,@~#', '%7B%7D%5B%5D%3A%3B%3C%3E%2C%40%7E%23'),\n array('-_. ', '-_.+'),\n );\n }",
"public function getServiceProviders();",
"public function getProviderTokens()\n {\n return $this->provider_tokens;\n }",
"function KeyNameList ( ) { return $this->_KeyNameList; }",
"public function getSupportedKeys()\n {\n return $this->fieldConfig->getSupportedKeys();\n }",
"public function get_all()\n {\n $sql = <<<SQL\n SELECT \n pigeon_keys.id as keys_id, pigeon_keys.users_id, profiles.first_name, profiles.last_name, users.username, pigeon_keys.key, pigeon_keys.level, pigeon_keys.date_created\n FROM \n profiles , users, {$this->rest_keys_table} pigeon_keys\n WHERE\n pigeon_keys.users_id = users.id\n AND\n profiles.user_id = users.id\nSQL;\n\n return $this->db->query($sql)->result_array();\n\n }",
"public function getPublicKeysForProvider($providerName, $limited = null, $purpose = null)\n {\n $suffix = '';\n if (!is_null($limited)) {\n $suffix = $limited ? ' AND pk.limited' : ' AND NOT pk.limited';\n }\n\n $usePurpose = false;\n if (is_null($purpose)) {\n $suffix .= ' AND pk.purpose IS NULL';\n } elseif ($purpose !== '') {\n $suffix .= ' AND pk.purpose = ?';\n $usePurpose = true;\n }\n $queryString = \"SELECT pk.publickey FROM gossamer_provider_publickeys pk \" .\n \"JOIN gossamer_providers prov ON pk.provider = prov.id \" .\n \"WHERE prov.name = ? AND NOT pk.revoked\" . $suffix;\n\n if ($usePurpose) {\n $query = $this->db->prepare($queryString, $providerName, $purpose);\n } else {\n $query = $this->db->prepare($queryString, $providerName);\n }\n\n /** @var array<array-key, string> $pubKeys */\n $pubKeys = $this->db->get_col($query);\n\n if (empty($pubKeys)) {\n return array();\n }\n return $pubKeys;\n }",
"public static function getAvailableCategoryKeys() {}",
"public function index()\n {\n $provider=Provider::all();\n return ProviderResource::collection($provider);\n }",
"public function providers()\n {\n return $this->request('get', '/api/teams/'.Helpers::config('team').'/providers');\n }",
"public function getAllItems(){\n\n\t\treturn $this->redis_client->keys(\"*\");\n\t}",
"public static function getProviderParameters();",
"private function getEncryptionKeys(){\n\t\treturn $this->cryptokeys;\n\t\t/*\n\t\treturn array('REGISTRATION'=> array(\n\t\t\t\t\t\t\t\t\t\t'h'=>array(\n\t\t\t\t\t\t\t\t\t\t\t'hash_size'=> \t64,\n\t\t\t\t\t\t\t\t\t\t\t'hash_key'=>\t'mysecretkey' ),\n\t\t\t\t\t\t\t\t\t\t'c'=>array(\t\n\t\t\t\t\t\t\t\t\t\t\t'nonce'=>\t\t'f5de5a2935a8927268be7a358dbfe73334a7dc38d57f23df',\n\t\t\t\t\t\t\t\t\t\t\t'secretkey'=>\t'8b49a72bb1addff71e630692e2a0c6a0f0cfa3657ff527642700b247364c19e8',\n\t\t\t\t\t\t\t\t\t\t\t'blocksize'=>\t16 )\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t 'EMAIL'=> \tarray(\n\t\t\t\t\t\t\t\t\t\t'h'=>array(\n\t\t\t\t\t\t\t\t\t\t\t'hash_size'=> \t32,\n\t\t\t\t\t\t\t\t\t\t\t'hash_key'=>\t'mysecretkey' ),\n\t\t\t\t\t\t\t\t\t\t'c'=>array(\t\n\t\t\t\t\t\t\t\t\t\t\t'nonce'=>\t\t'f5de5a2935a8927268be7a358dbfe73334a7dc38d57f23df',\n\t\t\t\t\t\t\t\t\t\t\t'secretkey'=>\t'8b49a72bb1addff71e630692e2a0c6a0f0cfa3657ff527642700b247364c19e8',\n\t\t\t\t\t\t\t\t\t\t\t'blocksize'=>\t16 )\n\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t 'PROFILE'=> array(\n\t\t\t\t\t\t\t\t\t\t'h'=>array(\n\t\t\t\t\t\t\t\t\t\t\t'hash_size'=> \t64,\n\t\t\t\t\t\t\t\t\t\t\t'hash_key'=>\t'mysecretkey' ),\n\t\t\t\t\t\t\t\t\t\t'c'=>array(\t\n\t\t\t\t\t\t\t\t\t\t\t'nonce'=>\t\t'f5de5a2935a8927268be7a358dbfe73334a7dc38d57f23df',\n\t\t\t\t\t\t\t\t\t\t\t'secretkey'=>\t'8b49a72bb1addff71e630692e2a0c6a0f0cfa3657ff527642700b247364c19e8',\n\t\t\t\t\t\t\t\t\t\t\t'blocksize'=>\t16 )\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t*/\n\t\t\n\t\t\t\t\t \t\t\t\n\t}",
"public function keys(): array;",
"public function keys(): array;",
"public function keys(): array;"
] | [
"0.7434844",
"0.70270675",
"0.70270675",
"0.6984621",
"0.69273",
"0.69063944",
"0.6888709",
"0.6882201",
"0.6858453",
"0.67454326",
"0.6735779",
"0.66732335",
"0.666168",
"0.6645941",
"0.6609066",
"0.66000277",
"0.65987337",
"0.6579623",
"0.65228564",
"0.65209067",
"0.64908344",
"0.6486685",
"0.64743495",
"0.64743495",
"0.64743495",
"0.64743495",
"0.64743495",
"0.64743495",
"0.6441594",
"0.6441594",
"0.6413375",
"0.6359625",
"0.6344304",
"0.63438475",
"0.6343165",
"0.6340758",
"0.63274217",
"0.6313568",
"0.6313568",
"0.62927103",
"0.62927103",
"0.62927103",
"0.62927103",
"0.62927103",
"0.62644535",
"0.62375325",
"0.62364167",
"0.6233885",
"0.6214885",
"0.6208167",
"0.62006557",
"0.6199834",
"0.6190702",
"0.6168055",
"0.61561006",
"0.615007",
"0.6146684",
"0.61458665",
"0.61361104",
"0.6126319",
"0.61129785",
"0.6110703",
"0.61098856",
"0.61060727",
"0.60995644",
"0.6095499",
"0.6093085",
"0.6085276",
"0.60656226",
"0.60477626",
"0.6046381",
"0.6042363",
"0.6041431",
"0.60317194",
"0.60181016",
"0.60174644",
"0.6011689",
"0.60027784",
"0.599368",
"0.5991945",
"0.598986",
"0.5968192",
"0.5956129",
"0.5952321",
"0.59330285",
"0.59264654",
"0.59149116",
"0.59082574",
"0.59040946",
"0.5895732",
"0.5894851",
"0.58930486",
"0.5887726",
"0.58822495",
"0.58776665",
"0.5865598",
"0.5864539",
"0.58628553",
"0.58628553",
"0.58628553"
] | 0.8154769 | 0 |
Get a provider by key. | public function getProvider(string $key): OpenIdConfigurationProvider
{
if (!isset($this->providers[$key]) && isset($this->config['providers'][$key])) {
$options = $this->config['providers'][$key];
$providerOptions = [
'openIDConnectMetadataUrl' => $options['metadata_url'],
'clientId' => $options['client_id'],
'clientSecret' => $options['client_secret'],
] + $this->config['default_providers_options'];
if (isset($options['redirect_uri'])) {
$providerOptions['redirectUri'] = $options['redirect_uri'];
} elseif (isset($options['redirect_route'])) {
$providerOptions['redirectUri'] = $this->router->generate(
$options['redirect_route'],
$options['redirect_route_parameters'] ?? [],
UrlGeneratorInterface::ABSOLUTE_URL
);
}
if (isset($options['leeway'])) {
$providerOptions['leeway'] = $options['leeway'];
}
if (isset($options['allow_http'])) {
$providerOptions['allowHttp'] = $options['allow_http'];
}
$this->providers[$key] = new OpenIdConfigurationProvider($providerOptions);
}
if (isset($this->providers[$key])) {
return $this->providers[$key];
}
throw new InvalidProviderException(sprintf('Invalid provider: %s', $key));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function provider($key);",
"public function getProvider($provider_id);",
"public function getByKey($key);",
"public function getProvider();",
"public function getProvider();",
"public function getProvider();",
"public function request($providerKey);",
"public function getProvider(): ProviderInterface;",
"public function get(string $key);",
"public function get(string $key);",
"public function get(string $key);",
"public function get(string $key);",
"public function get(string $key);",
"public function get(string $key);",
"public function get(string $key);",
"public function get(string $key);",
"protected function getDriver(string $key): DriverInterface\n {\n return $this->drivers->get($key);\n }",
"public static function buildProvider($key, $config)\n {\n $class = ucfirst($config['type']);\n if (class_exists('\\\\PHPCensor\\\\Security\\\\Authentication\\\\UserProvider\\\\' . $class)) {\n $class = '\\\\PHPCensor\\\\Security\\\\Authentication\\\\UserProvider\\\\' . $class;\n }\n\n return new $class($key, $config);\n }",
"public static function get($key);",
"public static function get($key);",
"public function get($key)\n {\n return $this->driver->get($key);\n }",
"public function get( $key );",
"public function getServiceProvider($provider);",
"public static function retrieve( $key )\n {\n return self::get( $key, $valid = false );\n }",
"public static function get(string $key)\n {\n return (self::$registeredServices[$key])();\n }",
"public function getBykey($key)\n {\n return $this->where(['llave' => strtoupper($key)]);\n }",
"public function getProvider($provider)\n {\n return array_values($this->getProviders($provider))[0] ?? null;\n }",
"public function get(string $key)\n {\n return $this->factoryFromKey($key)->get($key);\n }",
"public function getItem($key);",
"public function getItem($key);",
"public function getItem($key);",
"public function getItem($key);",
"public function get_provider() {\n\t\treturn $this->session->get($this->config['session_key'] . '_provider', null);\n\t}",
"public function get($key)\n {\n return $this->getRegistryBackend()->get($key);\n }",
"protected function getProvider($provider) : Provider\n {\n if (is_string($provider)) {\n $provider = new $provider;\n }\n\n return $provider;\n }",
"public function __get($key)\n\t{\n\t\treturn t('lib')->driver('payment_card', $key);\n\t}",
"public function get($key);",
"public function get($key);",
"public function get($key);",
"public function get($key);",
"public function get($key);",
"public function get($key);",
"public function get($key);",
"public function get($key);",
"public function get($key);",
"public function get($key);",
"public function get($key);",
"public function get($key);",
"public function get($key);",
"public function get($key);",
"public function get($key);",
"public function get($key);",
"public function get($key);",
"public function get($key);",
"public function get($key);",
"public function get($key);",
"public function get($key);",
"public function get($key);",
"public function get($key);",
"public function get($key);",
"public function get($key);",
"public function get($key);",
"public function get($key);",
"public function get($key);",
"public static function findByProvider($provider, $identifier);",
"public static function get(string $key)\n {\n return static::getInstance()->get($key);\n }",
"public function get_provider_by_id($id = 0)\n {\n $provider = null;\n\n if ($id)\n {\n $providers = self::get_providers(array('id' => $id));\n\n if (count($providers))\n {\n $provider = $providers[0];\n }\n }\n\n return $provider;\n }",
"public function get($key)\n {\n return $this->adapter->get($key);\n }",
"public function get($strKey);",
"public function getProvider($name, $first = true);",
"function get_by_key() {\t\n\t\t$sql = \"SELECT * \n\t\t\t\tFROM evs_database.evs_key_component\n\t\t\t\tWHERE kcp_id=?\";\n\t\t$this->db->query($sql, array($this->kcp_id));\n\t\treturn $query;\n\t}",
"public function retrieve($key) {\n return $this->connection->get($this->key($key));\n }",
"public static function getProvider()\n {\n return self::$provider;\n }",
"public function getConnectionByKey($key)\n {\n $hashablePart = Helpers::extractKeyTag($key);\n $keyHash = $this->distributor->generateKey($hashablePart);\n\n return $this->distributor->get($keyHash);\n }",
"public function resolve($key);",
"public function findContentProviderByKeyAndToken($key, $token)\n {\n return $this->contentProviderProperty->where('api_key', $key)\n ->where('api_token', $token)\n ->first();\n }",
"public function get_provider($name)\n {\n }",
"public function getProvider($provider)\n {\n $name = is_string($provider) ? $provider : get_class($provider);\n\n return array_first($this->serviceProviders, function ($key, $value) use ($name) {\n return $value instanceof $name;\n });\n }",
"public function get($key, $regionName = null) {\n return $this->provider->get($key, $regionName);\n }",
"public function get($key)\n {\n $class = $key . 'Repository';\n\n if (!isset($this->items[$key])) {\n $class = 'app\\\\models\\\\repositories\\\\' . $class;\n\n if (class_exists($class)) {\n $this->items[$key] = new $class();\n } else {\n \\trigger_error(\n 'Couldn`t load class: ' . $class,\n E_USER_WARNING\n );\n }\n\n }\n\n return $this->items[$key];\n }",
"public function getProvider()\n {\n return $this->provider;\n }",
"public function getProvider()\n {\n return $this->provider;\n }",
"public function getProvider()\n {\n return $this->Provider;\n }",
"public function getProvider(ServiceProvider $provider)\n {\n return $provider;\n }",
"public function __get(string $key);",
"function get($key) {\n\t\t\treturn $this->inst->get($key);\n\t\t}",
"public function get($key)\n {\n $this->init();\n\n try {\n return $this->adapter->get($key);\n } catch (\\Exception $e) {\n if ($this->throwExceptions) {\n throw $e;\n }\n\n return null;\n }\n }",
"private static function getProvider($query, array $providers, Provider $currentProvider = null): Provider\n {\n if (null !== $currentProvider) {\n return $currentProvider;\n }\n\n if ([] === $providers) {\n throw ProviderNotRegistered::noProviderRegistered();\n }\n\n // Take first\n $key = key($providers);\n\n return $providers[$key];\n }",
"abstract protected function retrieve($key);",
"public function get($configKey, $key);",
"public function get(string $key) {\n $return = \"\";\n if ($this->driver) {\n $return = $this->driver->get($key);\n }\n return $return;\n }",
"public function getProvider() {\n return $this->provider;\n }",
"public function get_provider_by_name($name = '')\n {\n $provider = null;\n\n if (strlen($name))\n {\n $providers = self::get_providers(array('name' => $name));\n\n if (count($providers))\n {\n $provider = $providers[0];\n }\n }\n\n return $provider;\n }",
"public static function getProvider($provider){\n return \\Illuminate\\Foundation\\Application::getProvider($provider);\n }",
"public function get(string $key)\n {\n // TODO: Implement get() method.\n }",
"public function get($key)\n {\n }",
"public function get($key)\n {\n return $this->find($key);\n }",
"public function lookup($key)\r\n {\r\n\t\t// create the unique cache key of the entity\r\n \t$cacheKey = $this->getCacheKey($key);\r\n \t// check if a entity with the passed primary key is available\r\n if (array_key_exists($cacheKey, $this->_entities)) {\r\n \treturn $this->_entities[$cacheKey];\r\n }\r\n // check if the requested entity exists in cache\r\n elseif($this->getCache()->test($cacheKey)) {\r\n \treturn $this->getCache()->load($cacheKey);\r\n }\r\n // if not return null\r\n else {\r\n \treturn null;\r\n }\r\n }",
"public function getAccount($key = null);",
"public function getItem($key){}"
] | [
"0.79584163",
"0.70912457",
"0.68683034",
"0.6798033",
"0.6798033",
"0.6798033",
"0.64259785",
"0.6342989",
"0.62667394",
"0.62667394",
"0.62667394",
"0.62667394",
"0.62667394",
"0.62667394",
"0.62667394",
"0.62667394",
"0.620686",
"0.6204548",
"0.61937875",
"0.61937875",
"0.6176526",
"0.6140256",
"0.61329883",
"0.61115456",
"0.6105074",
"0.60928434",
"0.60920763",
"0.608262",
"0.6079582",
"0.6079582",
"0.6079582",
"0.6079582",
"0.60719216",
"0.60654473",
"0.60442954",
"0.6034595",
"0.60249597",
"0.60249597",
"0.60249597",
"0.60249597",
"0.60249597",
"0.60249597",
"0.60249597",
"0.60249597",
"0.60249597",
"0.60249597",
"0.60249597",
"0.60249597",
"0.60249597",
"0.60249597",
"0.60249597",
"0.60249597",
"0.60249597",
"0.60249597",
"0.60249597",
"0.60249597",
"0.60249597",
"0.60249597",
"0.60249597",
"0.60249597",
"0.60249597",
"0.60249597",
"0.60249597",
"0.60249597",
"0.60234624",
"0.6022937",
"0.6022021",
"0.5996132",
"0.5969953",
"0.5963722",
"0.59566486",
"0.59316754",
"0.5910456",
"0.59054226",
"0.58997726",
"0.589905",
"0.5883804",
"0.5877868",
"0.58574826",
"0.5856858",
"0.5850476",
"0.5850476",
"0.5837934",
"0.5836038",
"0.5833649",
"0.5827945",
"0.58180857",
"0.58135843",
"0.5809341",
"0.5805533",
"0.5802793",
"0.5797777",
"0.57918143",
"0.57863444",
"0.5783458",
"0.5782683",
"0.57807446",
"0.57655376",
"0.5741894",
"0.5733896"
] | 0.67896754 | 6 |
/toggle feature not found in foundation 6 documentation public $toggleText = 'Menu'; public $showToggleIcon = true; public $toggleOptions = ['class' => 'toggletopbar']; | public function init()
{
parent::init();
Html::addCssClass($this->options, 'top-bar');
$options = $this->options;
$tag = ArrayHelper::remove($options, 'tag', 'div');
if (!empty($this->containerOptions)) {
$containerOptions = $this->containerOptions;
$containerTag = ArrayHelper::remove($containerOptions, 'tag', 'div');
echo Html::beginTag($containerTag, $this->containerOptions);
}
echo Html::beginTag($tag, $options);
if (!empty($this->titleLabel)) {
echo Html::tag('div', implode("\n", $this->headerItems()), ['class' => 'top-bar-title']);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function draw_toggle ()\n {\n echo $this->toggle_as_html ();\n }",
"function cyon_toggle( $atts, $content = null ) {\n\t$atts = shortcode_atts(\n\t\tarray(\n\t\t\t'title' \t\t=> __( 'Title Here' , 'cyon' ),\n\t\t\t'icon'\t\t\t=> '',\n\t\t\t'active'\t\t=> false\n\t\t), $atts);\n\t\t\n\t$icon = '';\n\tif($atts['icon']){\n\t\t$icon = '<span class=\"icon-'.$atts['icon'].'\"></span>';\n\t}\n\t$active = '';\n\tif($atts['active']) {\n\t\t$active = ' toggle-active';\n\t}\n\t$toggle_content .= '<div class=\"toggle'.$active.'\"><h3 class=\"toggle-title\">' . $icon . $atts['title'] . '</h3><div class=\"toggle-wrapper\"><div class=\"toggle-content clearfix\">'. do_shortcode( $content ) . '</div></div></div>';\n\treturn $toggle_content;\n}",
"function wp_admin_bar_sidebar_toggle($wp_admin_bar)\n {\n }",
"function theme_haarlem_add_toggle_link(\\ElggMenuItem &$item) {\n\t$children = $item->getChildren();\n\tif (empty($children)) {\n\t\treturn;\n\t}\n\t$item->setText($item->getText() . elgg_view_icon('angle-right', 'elgg-menu-site-toggle'));\n\t\n\tforeach ($children as $child) {\n\t\ttheme_haarlem_add_toggle_link($child);\n\t}\n}",
"function twenty_twenty_one_add_sub_menu_toggle( $output, $item, $depth, $args ) {\n\tif ( 0 === $depth && in_array( 'menu-item-has-children', $item->classes, true ) ) {\n\n\t\t// Add toggle button.\n\t\t$output .= '<button class=\"sub-menu-toggle\" aria-expanded=\"false\" onClick=\"twentytwentyoneExpandSubMenu(this)\">';\n\t\t$output .= '<span class=\"icon-plus\">' . twenty_twenty_one_get_icon_svg( 'ui', 'plus', 18 ) . '</span>';\n\t\t$output .= '<span class=\"icon-minus\">' . twenty_twenty_one_get_icon_svg( 'ui', 'minus', 18 ) . '</span>';\n\t\t$output .= '<span class=\"screen-reader-text\">' . esc_html__( 'Open menu', 'twentytwentyone' ) . '</span>';\n\t\t$output .= '</button>';\n\t}\n\treturn $output;\n}",
"function tz_toggle( $atts, $content = null ) {\n\t\n extract(shortcode_atts(array(\n\t\t'title' \t => 'Title goes here',\n\t\t'state'\t\t => 'open'\n ), $atts));\n\n\t$out = '';\n\t\n\t$out .= \"<div data-id='\".$state.\"' class=\\\"toggle\\\"><h4>\".$title.\"</h4><div class=\\\"toggle-inner\\\">\".do_shortcode($content).\"</div></div>\";\n\t\n return $out;\n\t\n}",
"function echotheme_toggle( $atts, $content = null ) {\n extract(shortcode_atts(array(\n\t 'title' => '',\n ), $atts));\n\n $html = '<h4 class=\"slide_toggle\"><a href=\"#\">' .$title. '</a></h4>';\n $html .= '<div class=\"slide_toggle_content\" style=\"display: none;\">'.wpautop(do_shortcode($content)).'</div>';\n \n\treturn $html;\n}",
"public function getToggleNoView() {}",
"function toggle_icon($notify) {\n\n if ($notify == TRUE) {\n return '_on';\n } elseif ($notify == FALSE) {\n return '_off';\n }\n}",
"public function quickSidebarAction();",
"function add_friendly_tinymce_plugin_toggles($plugin_array) {\n\tglobal $fscb_base_dir;\n\t$plugin_array['friendly_toggle'] = $fscb_base_dir . 'toggle-shortcode.js';\n\treturn $plugin_array;\n}",
"function simple_set_toggle( $pFeature, $pPackageName = NULL ) {\n\t// make function compatible with {html_checkboxes}\n\tif( isset( $_REQUEST[$pFeature][0] ) ) {\n\t\t$_REQUEST[$pFeature] = $_REQUEST[$pFeature][0];\n\t}\n\ttoggle_preference( $pFeature, ( isset( $_REQUEST[$pFeature] ) ? $_REQUEST[$pFeature] : NULL ), $pPackageName );\n}",
"function menuConfig()\t{\n\t\tglobal $LANG;\n\t\t$this->MOD_MENU = Array (\n\t\t\t\"function\" => Array (\n\t\t\t\t\"2\" => \"Update typo3conf\",\n\t\t\t\t\"1\" => \"Check cluster health\",\n\t\t\t)\n\t\t);\n\t\tparent::menuConfig();\n\t}",
"public function actions() {\n return array(\n 'toggle' => 'ext.jtogglecolumn.ToggleAction',\n 'switch' => 'ext.jtogglecolumn.SwitchAction', // only if you need it\n );\n }",
"public function menuConfig() {}",
"public function menuConfig() {}",
"public function menuConfig() {}",
"public function menuConfig() {}",
"public function menuConfig() {}",
"public function menuConfig() {}",
"function farmhouse_responsive_menu_settings() {\n\n $settings = array(\n 'mainMenu' => __( 'Menu', 'farmhouse-theme' ),\n 'menuIconClass' => 'dashicons-before dashicons-menu',\n 'subMenu' => __( 'Submenu', 'farmhouse-theme' ),\n 'subMenuIconsClass' => 'dashicons-before dashicons-arrow-down-alt2',\n 'menuClasses' => array(\n 'combine' => array(\n '.nav-primary',\n '.nav-header',\n '.nav-header-left',\n '.nav-header-right',\n '.nav-secondary',\n ),\n 'others' => array(\n '.nav-footer',\n ),\n ),\n 'addMenuButtons' => false,\n );\n\n return $settings;\n\n}",
"function sp_framework_toggle_content_sc( $atts, $content = null ) {\n\n\t\textract( shortcode_atts( array(\n\t\t\t'title' => ''\n\t\t), $atts ) );\n\t\t\n\t\t$output = '<div class=\"toggle-wrap\">';\n\t\t$output .= '<span class=\"trigger\"><a href=\"#\">' . esc_attr( $title ) . '</a></span><div class=\"toggle-container\">';\n\t\t$output .= $content; \n\t\t$output .= '</div></div>';\n\n\t\treturn $output;\n\t\n\t}",
"public function toggleSecondarySidebarNav()\n {\n if (empty(ee('Request')->get('owner'))) {\n ee()->output->send_ajax_response(['error']);\n }\n $state = json_decode(ee()->input->cookie('secondary_sidebar'));\n if (is_null($state)) {\n $state = new \\stdClass();\n }\n $owner = ee('Security/XSS')->clean(ee('Request')->get('owner'));\n $state->$owner = (int) ee()->input->get('collapsed');\n ee()->input->set_cookie('secondary_sidebar', json_encode($state), 31104000);\n\n ee()->output->send_ajax_response(['success']);\n }",
"public function ajax_toggle_fav() { \n }",
"function friendly_shortcode_toggles() {\n\t// Don't bother doing this stuff if the current user lacks permissions\n\tif ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') )\n\t\treturn;\n\t \n\t// Add only in Rich Editor mode\n\tif ( get_user_option('rich_editing') == 'true') {\n\t\t// filter the tinyMCE buttons and add our own\n\t\tadd_filter(\"mce_external_plugins\", \"add_friendly_tinymce_plugin_toggles\");\n\t\tadd_filter('mce_buttons', 'register_friendly_toggles');\n\t}\n}",
"private function renderToggleButton(): string\n {\n return\n Html::beginTag('a', $this->toggleOptions) .\n $this->renderToggleIcon() .\n\n Html::endTag('a');\n }",
"public function get_help_sidebar()\n {\n }",
"function rb_init()\n{\n register_nav_menu( 'topbar_menu', __( 'Top Bar Menu' ) );\n}",
"protected function _renderToggleButton()\n\t{\n\t\tif( $toggleButton = $this->toggleButton ) {\n\t\t\t\n\t\t\tif( is_array( $toggleButton ) ) {\n\t\t\t\t\n\t\t\t\t$tag = ArrayHelper::remove( $toggleButton, 'tag', 'button' );\n\t\t\t\t$label = ArrayHelper::remove( $toggleButton, 'label', 'Show' );\n\t\t\t\t\n\t\t\t\tif( $tag === 'button' && !isset( $toggleButton['type'] ) ) {\n\t\t\t\t\t$toggleButton['type'] = 'button';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn Html::tag( $tag, $label, $toggleButton );\n\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t\treturn $toggleButton;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"public function alternateMenu() {\r\n return [\r\n '#markup' => $this->t('This will be in the Main menu instead of the default Tools menu'),\r\n ];\r\n\r\n }",
"function showMenu()\n {\n $menu = config('app.menu') ;\n\n $text = '' ;\n \n\n foreach ($menu as $name => $item)\n {\n $active = false ;\n \n if(isset($item['dropdown']))\n {\n $text .= '<li class=\"dropdown menu-'. $name .'\">' . PHP_EOL ;\n $text .= '<a href=\"javascript:;\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"> '. PHP_EOL;\n }\n else \n {\n $text .= '<li class=\"menu-'. $name .'\">' . PHP_EOL ;\n $text .= '<a href=\"'.(isset($item['action']) ? route($item['action']) : '' ).'\">' . PHP_EOL;\n }\n\n $text .= '<i class=\"'. $item['icon'] .'\"></i>'. PHP_EOL;\n $text .= '<span>'. $item['title'] .'</span>'. PHP_EOL;\n \n if(isset($item['dropdown']))\n {\n $text .= '<b class=\"caret\"></b>';\n $text .= '</a>'. PHP_EOL;\n $text .= '<ul class=\"dropdown-menu\">' ;\n foreach ($item['dropdown'] as $subName => $subItem) \n {\n $text .= '<li>' . PHP_EOL ;\n $text .= '<a href=\"'.(isset($subItem['action']) ? route($subItem['action']) : '' ).'\">' . PHP_EOL;\n $text .= '<span>'. $subItem['title'] .'</span>'. PHP_EOL;\n $text .= '</a>'. PHP_EOL; \n $text .= '</li>'. PHP_EOL;\n\n $active = (!$active && isset($subItem['action'])) \n ? $subItem['action'] == Request::route()->getName() : $active ; \n }\n $text .= '</ul>' ;\n }\n else \n {\n $text .= '</a>'. PHP_EOL;\n $active = (!$active && isset($item['action'])) \n ? $item['action'] == Request::route()->getName() : $active ;\n }\n\n $text .= '</li>'. PHP_EOL;\n\n if($active)\n {\n $text = str_replace('menu-'. $name , 'active', $text);\n }\n }\n\n return $text ;\n }",
"function quadro_site_menu() {\n\tglobal $quadro_options;\n\tif ( $quadro_options['menu_header_display'] == 'hide' ) return false;\n\t?>\n\t<h1 class=\"menu-toggle\">\n\t\t<a href=\"#msite-navigation\">\n\t\t\t<span class=\"menu-toggle-icon menu-toggle-icon-1\"></span>\n\t\t\t<span class=\"menu-toggle-icon menu-toggle-icon-2\"></span>\n\t\t\t<span class=\"menu-toggle-icon menu-toggle-icon-3\"></span>\n\t\t</a>\n\t</h1>\n\t<nav id=\"site-navigation\" class=\"main-navigation\">\n\t\t<div class=\"inner-nav\">\n\t\t\t<a class=\"skip-link screen-reader-text\" href=\"#content\"><?php esc_html_e( 'Skip to content', 'indigo' ); ?></a>\n\t\t\t<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>\n\t\t</div>\n\t</nav><!-- #site-navigation -->\n\t<?php\n}",
"function ft_hook_menu() {}",
"function start_received_or_sent_proposals_div($toggle){ ?>\n <div class= \"proposals-container-title\">\n <h1><?php echo ($toggle) ? \"Received Proposals Status\" : \"Sent Proposals Status\";?> <span class=\"material-icons-round\"><?php echo ($toggle) ? \"call_received\" : \"call_made\";?></span></h1>\n </div>\n <div class=\"<?php echo ($toggle) ? 'received' : 'sent';?>-proposals-container\">\n\n<?php }",
"public function sidebarAction();",
"public function modMenu() {}",
"public function modMenu() {}",
"public function modMenu() {}",
"protected function renderToggleButton()\n {\n return Button::widget($this->toggleButtonOptions);\n }",
"function activate_bitwise_sidebar_content() {\n\trequire_once __DIR__ . '/includes/class-bitwise-sidebar-content-activator.php';\n\tBitwise_Sidebar_Content_Activator::activate();\n}",
"abstract public function getAdminToggle($count);",
"public function toggle_as_html ()\n {\n if ($this->context->dhtml_allowed ())\n {\n if ($this->visible)\n {\n $icon = $this->context->resolve_icon_as_html ('{icons}tree/collapse', '', '[-]', 'inline-icon', \"{$this->name}_image\");\n }\n else\n {\n $icon = $this->context->resolve_icon_as_html ('{icons}tree/expand', '', '[+]', 'vertical-align: middle', \"{$this->name}_image\");\n }\n\n return '<a href=\"#\" onclick=\"toggle_visibility(\\'' . $this->name . '\\'); return false;\">' . $icon . '</a>';\n }\n \n return '';\n }",
"public function toggleSidebarNav()\n {\n ee()->input->set_cookie('collapsed_nav', (int) ee()->input->get('collapsed'), 31104000);\n\n ee()->output->send_ajax_response(['success']);\n }",
"function menuConfig() {\n global $LANG;\n $this->MOD_MENU = Array (\n \"function\" => Array (\n \"1\" => $LANG->getLL(\"overview\"),\n \"2\" => $LANG->getLL(\"new\"),\n \"3\" => $LANG->getLL(\"function3\"),\n )\n );\n parent::menuConfig();\n }",
"public function menu()\n {\n add_settings_field(\n 'menu',\n apply_filters($this->plugin_name . 'label-menu', esc_html__('Menu', $this->plugin_name)),\n [$this->builder, 'checkbox'],\n $this->plugin_name,\n $this->plugin_name . '-general',\n [\n 'description' => 'Show security.txt menu at the top of the WordPress admin interface. You should turn this off after you have the plugin configured.',\n 'id' => 'menu',\n 'value' => isset($this->options['menu']) ? $this->options['menu'] : false,\n ]\n );\n }",
"protected function menus()\n {\n\n }",
"public function wishlist_toggle()\n\t{\n\t\t// no return needed as page is reloaded\n\t\t$this->EE->job_wishlists->wishlist_toggle();\t\t\n\t}",
"function thirty_eight_sidebar_options(){\n\n echo 'Customize your sidebar!';\n\n}",
"private function setupIfAction() {\n \n Blade::directive('if_action', function($expression) {\n $act = $this->stringParamAsString($expression); //gets act\n return '<?php '\n .' if ( (isset($show_actions) && array_search('.$act.',$show_actions)!==FALSE) || '\n . '(isset($hide_actions) && array_search('.$act.',$hide_actions)===FALSE) || '\n .' (!isset($show_actions) && !isset($hide_actions)) ): ?>';\n\n });\n }",
"function quadro_hamburger_menu() {\n\tglobal $quadro_options;\n\tif ( $quadro_options['menu_header_display'] == 'hide' ) return false;\n\t?>\n\t<nav id=\"hamburger-navigation\" class=\"hamburger-menu-navigation\">\n\t\t<?php wp_nav_menu( array( 'theme_location' => 'user' ) ); ?>\n\t</nav>\n\t<?php\n}",
"public function menuConfig() {\r\n $this->MOD_MENU = array(\r\n 'function' => array(\r\n '1' => $GLOBALS['LANG']->getLL('function1')\r\n )\r\n );\r\n parent::menuConfig();\r\n }",
"public function menuConfig() {\n\t\t$this->MOD_MENU = array(\n\t\t\t'function' => array(\n\t\t\t\t'1' => tx_laterpay_helper_string::tr('Dashboard'),\n\t\t\t\t'2' => tx_laterpay_helper_string::tr('Pricing'),\n\t\t\t\t'3' => tx_laterpay_helper_string::tr('Appearance'),\n\t\t\t\t'4' => tx_laterpay_helper_string::tr('Account'),\n\t\t\t)\n\t\t);\n\t\tparent::menuConfig();\n\t}",
"public function setToggle($selector = 'extended', $operator = 'toggle')\n\t{\n\t\t$sig = md5(serialize(array($selector, $operator)));\n\n\t\t// Only load once\n\t\tif (isset(self::$loaded[__METHOD__][$sig]))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Include JS frameworks\n\t\tNFWHtml::loadJsFramework();\n\n\t\t// Attach the function to the document\n\t\tJFactory::getDocument()->addScriptDeclaration(\n\t\t\t\"jQuery(function($)\n\t\t\t{\n\t\t\t\t$('.\" . $selector . \"').hide();\n\t\t\t\t$('#\" . $operator . \"').click(function () {\n\t\t\t\t\t$('.inverse-\" . $selector . \"').slideToggle('fast');\n\t\t\t\t\t$('.inverse-\" . $selector . \"').hide();\n\t\t\t\t\t$('.\" . $selector . \"').slideToggle('fast');\n\t\t\t\t\tif ($('#\" . $operator . \"').hasClass('active')) {\n\t\t\t\t\t\t$('#\" . $operator . \"').removeClass('active');\n\t\t\t\t\t\t$('.inverse-\" . $selector . \"').slideToggle('fast');\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$('#\" . $operator . \"').addClass('active');\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\\n\"\n\t\t);\n\n\t\tself::$loaded[__METHOD__][$sig] = true;\n\n\t\treturn;\n\t}",
"function wooadmin_wp_fluency_admin_bar_unhide_menu() {\n global $wp_admin_bar;\n ?> <span class=\"unique\"><?php $wp_admin_bar->add_menu( array( 'id' => 'wp-eshopbox-messages-menu', 'title' => __('Messages','eshopbox-admin'), 'href' => '#abc', 'meta'=>array('class'=>'unhidden') ) );?> </span><?php\n}",
"function flexfour_topbar_menu() {\n\t// display the wp3 menu if available\n wp_nav_menu( \n\tarray( \n\t'menu' => 'topbar', /* menu name */\n\t\t'menu_class' => 'right',\n\t\t'theme_location' => 'topbar', /* where in the theme it's assigned */\n\t\t'container' => 'false', /* container tag */\n\t\t'fallback_cb' => 'wp_page_menu', /* menu fallback */\n\t\t'depth' => '2',\n\t\t\n \t)\n );\n}",
"public static function toggleFullscreen() {}",
"function setup_menus() {\n\n\telgg_unregister_menu_item('topbar', 'elgg_logo');\n\n\telgg_register_menu_item('topbar', array(\n\t\t'name' => 'logo',\n\t\t'href' => false,\n\t\t'text' => elgg_view('page/elements/topbar_logo'),\n\t\t'item_class' => 'name',\n\t\t'section' => 'title-area',\n\t));\n\n\telgg_register_menu_item('topbar', array(\n\t\t'name' => 'toggle',\n\t\t'href' => '#',\n\t\t'text' => '<span>' . elgg_echo('menu') . '</span>',\n\t\t'item_class' => 'toggle-topbar menu-icon',\n\t\t'priority' => 900,\n\t\t'section' => 'title-area',\n\t));\n\n\tif (elgg_is_admin_logged_in()) {\n\t\t$counter = '';\n\t\t$admin_notices = elgg_get_entities(array(\n\t\t\t'types' => 'object',\n\t\t\t'subtypes' => 'admin_notice',\n\t\t\t'count' => true\n\t\t));\n\t\tif ($admin_notices) {\n\t\t\t$counter = '<span class=\"messages-new\">' . $admin_notices . '</span>';\n\t\t}\n\t\telgg_register_menu_item('topbar', array(\n\t\t\t'name' => 'administration',\n\t\t\t'href' => 'admin',\n\t\t\t'text' => elgg_view_icon('dashboard') . elgg_echo('admin') . $counter,\n\t\t\t'priority' => 100,\n\t\t\t'section' => 'alt',\n\t\t));\n\t}\n}",
"function register_friendly_toggles($buttons) {\n\t// inserts a separator between existing buttons and our new one\n\t// \"friendly_button\" is the ID of our button\n\tarray_push($buttons, \"friendly_toggle\");\n\treturn $buttons;\n}",
"function v2_mumm_menu_link__menu_header(&$variables) {\n\n $element = $variables ['element'];\n $sub_menu = '';\n\n if ($element ['#below']) {\n $sub_menu = drupal_render($element ['#below']);\n }\n\n if (in_array('search-btn', $element['#localized_options']['attributes']['class'])) {\n\n $output = '<button id=\"search-btn\" class=\"icon icon-search-gray search-btn\" data-trigger-toggle=\"search-box\" title=\"\" name=\"search-btn\" type=\"button\"\n data-tracking data-track-action=\"click\" data-track-category=\"header\" data-track-label=\"search\" data-track-type=\"event\">\n </button>';\n }\n else {\n $class = $element['#localized_options']['attributes']['class'];\n $element['#localized_options']['attributes'] = array(\n 'class' =>$class,\n 'data-tracking' => '',\n 'data-track-action' => 'click',\n 'data-track-category' => 'header',\n 'data-track-label' => 'book_a_visit',\n 'data-track-type' => 'event',\n );\n\n $output = l($element ['#title'], $element ['#href'] , $element['#localized_options']);\n }\n return $output;\n}",
"public function get_name()\n {\n return 'akash-menu';\n }",
"public function getName()\n {\n return \"menu\";\n }",
"function inhabitant_features() {\n add_theme_support('title-tag');\n add_theme_support('post-thumbnails');\n \n register_nav_menus(array(\n 'main' => 'Main Menu'\n ));\n\n}",
"function ft_hook_sidebar() {}",
"public function makeMenu() {}",
"public function get_icon()\n {\n return 'eicon-nav-menu';\n }",
"public function showEnableInstallToolButtonAction() {}",
"protected function makeActionMenu() {}",
"function wpct_settings_section_render( $args ) {\n\t\techo __(\"Select checkboxes below for any toolbar sections to hide for the {$args['title']} role.\");\n\t}",
"function menuConfig()\t{\n\t\tglobal $LANG;\n\t\t$this->MOD_MENU = Array (\n\t\t\"function\" => Array (\n\t\t\"1\" => $LANG->getLL(\"function1\"),\n\t\t\"2\" => $LANG->getLL(\"function2\"),\n\t\t)\n\t\t);\n\t\tparent::menuConfig();\n\t}",
"function menuConfig()\t{\n\t\t\t\t\tglobal $LANG;\n\t\t\t\t\t$this->MOD_MENU = Array (\n\t\t\t\t\t\t'function' => Array (\n\t\t\t\t\t\t\t'1' => $LANG->getLL('function1')/*,\n\t\t\t\t\t\t\t'2' => $LANG->getLL('function2'),\n\t\t\t\t\t\t\t'3' => $LANG->getLL('function3'),*/\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t\tparent::menuConfig();\n\t\t\t\t}",
"function techmarket_header_action_button() {\n\t\t\n\t\t$action_button_args = apply_filters( 'techmarket_header_action_button_args', array(\n\t\t\t'url'\t=> '#',\n\t\t\t'text' => esc_html__( 'Go to TechMarket Shop', 'techmarket' ),\n\t\t\t'icon'\t=> is_rtl() ? 'tm tm-long-arrow-left' : 'tm tm-long-arrow-right'\n\t\t) );\n\n\n\t\tif ( apply_filters( 'techmarket_show_header_action_button', true ) && ! empty( $action_button_args ) ) : ?>\n\t\t<a role=\"button\" class=\"header-action-btn\" href=\"<?php echo esc_url( $action_button_args['url'] );?>\">\n\t\t\t<?php echo esc_html( $action_button_args['text'] ); ?>\n\t\t\t<?php if( ! empty( $action_button_args['icon'] ) ) : ?>\n\t\t\t\t<i class=\"<?php echo esc_attr( $action_button_args['icon'] );?>\"></i>\n\t\t\t<?php endif; ?>\n\t\t</a>\n\t\t<?php endif;\n\t}",
"public function __construct()\n {\n View::share('menu_active', \"core_lessons\");\n }",
"function folio_register_nav_menu()\n{\n register_nav_menu('primary', 'Sidebar Menu');\n}",
"function display_tsm_menu() {\n\t/* 页名称,菜单名称,访问级别,菜单别名,点击该菜单时的回调函数(用以显示设置页面) */\n\tadd_options_page('Set Shortcode Manager', 'Shorcode Manager Menu', 'administrator', 'display_tsm','display_tsm_html_page');\n}",
"function ibm_apim_theme_process_region(&$vars) {\r\n // Add the click handle inside region menu bar\r\n if ($vars['region'] === 'menu_bar') {\r\n $vars['inner_prefix'] = '<h2 class=\"menu-toggle\"><a href=\"#\">' . t('Menu') . '</a></h2>';\r\n }\r\n}",
"function menuConfig()\t{\n\t\tglobal $LANG;\n\t\t$this->MOD_MENU = Array (\n\t\t\t'function' => Array (\n\t\t\t\t'1' => $LANG->getLL('function1'),\n\t\t\t\t'2' => $LANG->getLL('function2'),\n\t\t\t\t'3' => $LANG->getLL('function3'),\n\t\t\t)\n\t\t);\n\t\tparent::menuConfig();\n\t}",
"function register_my_menus() {\r\n register_nav_menus(\r\n array(\r\n 'sidebar-menu' => __( 'Sidebar Menu' )\r\n \r\n\r\n) ); }",
"function sidebar() {\n\t\t}",
"function admin_menu()\n {\n }",
"function admin_menu()\n {\n }",
"function admin_menu()\n {\n }",
"function wprt_topbar_social_options() {\n\treturn apply_filters ( 'wprt_topbar_social_options', array(\n\t\t'facebook' => array(\n\t\t\t'label' => esc_html__( 'Facebook', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-facebook',\n\t\t),\n\t\t'twitter' => array(\n\t\t\t'label' => esc_html__( 'Twitter', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-twitter',\n\t\t),\n\t\t'googleplus' => array(\n\t\t\t'label' => esc_html__( 'Google Plus', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-google-plus',\n\t\t),\n\t\t'youtube' => array(\n\t\t\t'label' => esc_html__( 'Youtube', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-youtube',\n\t\t),\n\t\t'vimeo' => array(\n\t\t\t'label' => esc_html__( 'Vimeo', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-vimeo',\n\t\t),\n\t\t'linkedin' => array(\n\t\t\t'label' => esc_html__( 'LinkedIn', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-linkedin',\n\t\t),\n\t\t'pinterest' => array(\n\t\t\t'label' => esc_html__( 'Pinterest', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-pinterest',\n\t\t),\n\t\t'instagram' => array(\n\t\t\t'label' => esc_html__( 'Instagram', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-instagram',\n\t\t),\n\t\t'skype' => array(\n\t\t\t'label' => esc_html__( 'Skype', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-skype',\n\t\t),\n\t\t'Apple' => array(\n\t\t\t'label' => esc_html__( 'Apple', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-apple',\n\t\t),\n\t\t'android' => array(\n\t\t\t'label' => esc_html__( 'Android', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-android',\n\t\t),\n\t\t'behance' => array(\n\t\t\t'label' => esc_html__( 'Behance', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-behance',\n\t\t),\n\t\t'dribbble' => array(\n\t\t\t'label' => esc_html__( 'Dribbble', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-dribbble',\n\t\t),\n\t\t'flickr' => array(\n\t\t\t'label' => esc_html__( 'Flickr', 'fundrize' ),\n\t\t\t'icon_class' => 'inf-icon-flickr',\n\t\t),\n\t) );\n}",
"public function mainMenu(FactoryInterface $factory, array $options)\n {\n // Use push_right if you want your menu on the right\n $menu = $factory->createItem('root', array(\n 'navbar' => true,\n 'pull-right' => true,\n ));\n\n // Regular menu item, no change\n //$menu->addChild('TSK ERP System', array('route' => 'sonata_admin_dashboard'));\n\t\t$menu->addChild('TSK ERP System', array('route' => 'tsk_user_default_index'));\n\n // Create a dropdown\n $orgDropdown = $menu->addChild('Organization', array(\n 'dropdown' => true,\n 'caret' => true,\n ));\n\n $orgDropdown->addChild('Manage Permissions', array('route' => 'tsk_user_permission_index'));\n $orgDropdown->addChild('List Organizations', array('route' => 'admin_tsk_user_organization_list'));\n $orgDropdown->addChild('List Programs', array('route' => 'admin_tsk_program_program_list'));\n $orgDropdown->addChild('List Users', array('route' => 'admin_tsk_user_user_list'));\n $orgDropdown->addChild('List Ranks', array('route' => 'admin_tsk_rank_rank_list'));\n $orgDropdown->addChild('Register New User', array('route' => 'admin_tsk_user_user_create'));\n\n // Create class dropdown\n $classDropdown = $menu->addChild('Classes', array(\n 'dropdown' => true,\n 'caret' => true,\n ));\n $classDropdown->addChild('List Classes', array('route' => 'admin_tsk_class_classes_list'));\n $classDropdown->addChild('List Class Types', array('route' => 'admin_tsk_class_classtype_list'));\n // $this->addDivider($classDropdown);\n $classDropdown->addChild('Manage Schedules', array('route' => 'admin_tsk_schedule_scheduleentity_list'));\n $classDropdown->addChild('View Class Schedule', array('route' => 'tsk_schedule_default_index'));\n\n // Create school dropdown\n $schoolDropdown = $menu->addChild('Schools', array(\n 'dropdown' => true,\n 'caret' => true,\n ));\n $schoolDropdown->addChild('List Schools', array('route' => 'admin_tsk_school_school_list'));\n $schoolDropdown->addChild('List Instructors', array('route' => 'admin_tsk_instructor_instructor_list'));\n\n // Create student dropdown\n $studentDropdown = $menu->addChild('Students', array(\n 'dropdown' => true,\n 'caret' => true,\n ));\n $studentDropdown->addChild('List Students', array('route' => 'admin_tsk_student_student_list'));\n $studentDropdown->addChild('Register Student', array('route' => 'tsk_student_default_registerstudent'));\n // $this->addDivider($studentDropdown);\n $studentDropdown->addChild('Receive Payment', array('route' => 'tsk_payment_default_index'));\n $studentDropdown->addChild('Deferred Revenue Simulator', array('route' => 'deferral_graph'));\n\n return $menu;\n }",
"function morganceken_register_menus() {\r\n\tadd_theme_support( 'menus' );\r\n}",
"function genesis_sample_responsive_menu_settings() {\n\n\t$settings = array(\n\t\t'mainMenu' => __( 'Menu', 'genesis-sample' ),\n\t\t'menuIconClass' => 'dashicons-before dashicons-menu',\n\t\t'subMenu' => __( 'Submenu', 'genesis-sample' ),\n\t\t'subMenuIconsClass' => 'dashicons-before dashicons-arrow-down-alt2',\n\t\t'menuClasses' => array(\n\t\t\t'combine' => array(\n\t\t\t\t'.nav-primary',\n\t\t\t\t'.nav-header',\n\t\t\t),\n\t\t\t'others' => array(),\n\t\t),\n\t);\n\n\treturn $settings;\n\n}",
"function genesis_sample_responsive_menu_settings() {\n\n\t$settings = array(\n\t\t'mainMenu' => __( 'Menu', 'genesis-sample' ),\n\t\t'menuIconClass' => 'dashicons-before dashicons-menu',\n\t\t'subMenu' => __( 'Submenu', 'genesis-sample' ),\n\t\t'subMenuIconsClass' => 'dashicons-before dashicons-arrow-down-alt2',\n\t\t'menuClasses' => array(\n\t\t\t'combine' => array(\n\t\t\t\t'.nav-primary',\n\t\t\t\t'.nav-header',\n\t\t\t),\n\t\t\t'others' => array(),\n\t\t),\n\t);\n\n\treturn $settings;\n\n}",
"function thesis_openhooks_menu() {\n\tglobal $wp_admin_bar;\n\t$wp_admin_bar->add_menu(array(\n\t\t\t'id' => 'openhook',\n\t\t\t'title' => __('OpenHook'),\n\t\t\t'href' => admin_url('options-general.php?page=openhook&tab=tha')\n\t\t\t//'href' => $bloginfo('url')'/wp-admin/options-general.php?page=openhook&tab=tha'\n\t));\n}",
"function menuConfig()\t{\n\t\tglobal $LANG;\n\t\t$this->MOD_MENU = Array (\n\t\t\t'function' => Array (\n\t\t\t\t/*'1' => $LANG->getLL('function1'),\n\t\t\t\t'2' => $LANG->getLL('function2'),\n\t\t\t\t'3' => $LANG->getLL('function3'),*/\n\t\t\t)\n\t\t);\n\t\tparent::menuConfig();\n\t}",
"public function setShowInMenu($show = NULL ){\n\t\t$this->showInMenu = isset($show) ? $show : $this->show_ui;\n\t}",
"function trimestral_module_init_menu_items()\n{\n $CI = &get_instance();\n\n $CI->app->add_quick_actions_link([\n 'name' => _l('trimestral_name'),\n 'url' => 'trimestral',\n ]);\n\n $CI->app_menu->add_sidebar_children_item('utilities', [\n 'slug' => 'trimestral',\n 'name' => _l('trimestral_name'),\n 'href' => admin_url('trimestral'),\n ]);\n}",
"function reactor_do_nav_bar() { \n\tif ( has_nav_menu('main-menu') ) {\n\t\t$nav_class = ( reactor_option('mobile_menu', 1) ) ? 'class=\"hide-for-small\" ' : ''; ?>\n\t\t<div class=\"main-nav\">\n\t\t\t<nav id=\"menu\" <?php echo $nav_class; ?>role=\"navigation\">\n\t\t\t\t<div class=\"section-container horizontal-nav\" data-section=\"horizontal-nav\" data-options=\"one_up:false;\">\n\t\t\t\t\t<?php reactor_main_menu(); ?>\n\t\t\t\t</div>\n\t\t\t</nav>\n\t\t</div><!-- .main-nav -->\n\t\t\n\t<?php\t\n\tif ( reactor_option('mobile_menu', 1) ) { ?> \n\t\t<div id=\"mobile-menu-button\" class=\"show-for-small\">\n\t\t\t<button class=\"secondary button\" id=\"mobileMenuButton\" href=\"#mobile-menu\">\n\t\t\t\t<span class=\"mobile-menu-icon\"></span>\n\t\t\t\t<span class=\"mobile-menu-icon\"></span>\n\t\t\t\t<span class=\"mobile-menu-icon\"></span>\n\t\t\t</button>\n\t\t</div><!-- #mobile-menu-button --> \n\t<?php }\n\t}\n}",
"public function bootAddon()\n {\n Nav::extend(function ($nav) {\n $nav->tools('Settings')\n ->route('stata-mailer.edit')\n ->icon('<svg width=\"20\" height=\"14\" viewBox=\"0 0 20 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M19 0.9H1C0.944772 0.9 0.9 0.944771 0.9 1V13C0.9 13.0552 0.944772 13.1 1 13.1H19C19.0552 13.1 19.1 13.0552 19.1 13V1C19.1 0.944772 19.0552 0.9 19 0.9ZM1 0C0.447715 0 0 0.447716 0 1V13C0 13.5523 0.447716 14 1 14H19C19.5523 14 20 13.5523 20 13V1C20 0.447715 19.5523 0 19 0H1Z\" fill=\"black\"/><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M2.61413 3.76848C2.742 3.55537 3.01842 3.48626 3.23153 3.61413L10.4918 7.9703L17.2567 3.62147C17.4657 3.48708 17.7441 3.5476 17.8785 3.75666C18.0129 3.96572 17.9524 4.24414 17.7433 4.37853L10.7433 8.87853C10.5993 8.97111 10.4153 8.97395 10.2685 8.88587L2.76848 4.38587C2.55537 4.25801 2.48627 3.98159 2.61413 3.76848ZM6.89071 8.27674C7.01402 8.49252 6.93905 8.76741 6.72327 8.89071L3.22327 10.8907C3.00748 11.014 2.7326 10.939 2.60929 10.7233C2.48599 10.5075 2.56096 10.2326 2.77674 10.1093L6.27674 8.10929C6.49252 7.98599 6.76741 8.06096 6.89071 8.27674ZM14.1256 8.25039C14.2634 8.0436 14.5428 7.98772 14.7496 8.12558L17.7496 10.1256C17.9564 10.2634 18.0123 10.5428 17.8744 10.7496C17.7366 10.9564 17.4572 11.0123 17.2504 10.8744L14.2504 8.87442C14.0436 8.73657 13.9877 8.45718 14.1256 8.25039Z\" fill=\"black\"/></svg>')\n ->active('settings');\n });\n\n // Register Event And Listeners\n $this->registerEventListeners();\n }",
"function reactor_do_mobile_nav() {\n\tif ( reactor_option('mobile_menu', 1) && has_nav_menu('main-menu') ) { ?> \n\t\t<nav id=\"mobile-menu\" class=\"show-for-small\" role=\"navigation\">\n\t\t\t<div class=\"section-container accordion\" data-section=\"accordion\" data-options=\"one_up:false\">\n\t\t\t\t<?php reactor_main_menu(); ?>\n\t\t\t</div>\n\t\t</nav>\n<?php }\n}",
"function _s_contact_menu_atts( $atts, $item, $args ) {\n $classes = $item->classes;\n \n \t if ( in_array( 'get-started', $classes ) ) {\n\t\t$atts['data-open'] = 'contact';\n\t }\n\t return $atts;\n}",
"public function globalMenu( FactoryInterface $factory, array $options ) {\n /**\n * @var Request $request\n */\n $request = $this->container->get(\"request\");\n \n $menu = $factory->createItem( 'root' );\n $menu->setChildrenAttribute( \"class\", \"tc-global-menu tc-menu\" );\n \n // Account Settings\n $menu\n ->addChild( 'Account Settings', array(\n 'route' => 'fos_user_profile_edit'\n ) )\n ->setExtra( 'icon_classes', 'glyphicon glyphicon-cog' );\n \n // Leave feedback\n $menu\n ->addChild( 'Leave your feedback', array('uri' => '#')) \n ->setAttribute( \"data-toggle\", \"modal\" ) \n ->setAttribute( \"data-target\", \"#feedbackModal\" ) \n ->setExtra( 'icon_classes', 'glyphicon glyphicon-send' );\n\n // Sign out\n $menu\n ->addChild( 'Sign out', array(\n 'route' => 'fos_user_security_logout'\n ) )\n ->setExtra( 'icon_classes', 'glyphicon glyphicon-log-out' );\n \n return $menu;\n }",
"function dblions_general_options() {\n\techo 'Edit general features';\n}",
"public function admin_menu() {\n\t\t$intrusion_count = (int) Mute_Screamer::instance()->get_option( 'new_intrusions_count' );\n\t\t$intrusions_menu_title = sprintf( __( 'Intrusions %s', 'mute-screamer' ), \"<span class='update-plugins count-$intrusion_count' title='$intrusion_count'><span class='update-count'>\" . number_format_i18n( $intrusion_count ) . '</span></span>' );\n\t\tadd_dashboard_page( __( 'Mute Screamer Intrusions', 'mute-screamer' ), $intrusions_menu_title, 'activate_plugins', 'mscr_intrusions', array( $this, 'intrusions' ) );\n\t\tadd_options_page( __( 'Mute Screamer Configuration', 'mute-screamer' ), __( 'Mute Screamer', 'mute-screamer' ), 'activate_plugins', 'mscr_options', array( $this, 'options' ) );\n\n\t\t// Modify the Dashboard menu updates count\n\t\t$this->set_update_badge();\n\t}",
"function cardMenu($name)\n\t\t{\n\t\t\techo \"\n\t\t\t<div class=menu onclick=this.parentNode.classList.toggle('folded')>\n\t\t\t\t<button></button>\n\t\t\t\t$name\n\t\t\t</div>\n\t\t\t\";\n\t\t}",
"public function getShowInHome();",
"public function getIsMenuLinkEnabled(): bool;",
"function checkbox()\n {\n ?>\n <input type=\"hidden\" <?php $this->name_tag(); ?> value=\"0\" />\n <input type=\"checkbox\" <?php $this->name_tag(); ?> value=\"1\" class=\"inferno-setting\" <?php $this->id_tag('inferno-concrete-setting-'); if($this->setting_value) echo ' checked'; ?> />\n <label <?php $this->for_tag('inferno-concrete-setting-'); ?> data-true=\"<?php _e('On'); ?>\" data-false=\"<?php _e('Off'); ?>\"><?php if($this->setting_value) _e('On'); else _e('Off'); ?></label>\n <?php \n }"
] | [
"0.61864126",
"0.6122896",
"0.5891796",
"0.5883761",
"0.58017635",
"0.5790806",
"0.5670175",
"0.54417706",
"0.5419536",
"0.5411639",
"0.53943336",
"0.53794885",
"0.53713244",
"0.5318666",
"0.5310829",
"0.5310496",
"0.5310496",
"0.5310496",
"0.530998",
"0.530998",
"0.529168",
"0.52595484",
"0.5225237",
"0.5218864",
"0.521563",
"0.5207315",
"0.51721025",
"0.51632947",
"0.5125534",
"0.50933784",
"0.5083655",
"0.5071692",
"0.5058421",
"0.5044675",
"0.5038568",
"0.50087357",
"0.5008413",
"0.5008164",
"0.500754",
"0.4992277",
"0.4990283",
"0.4978311",
"0.49585402",
"0.49318677",
"0.49293205",
"0.4924458",
"0.4922473",
"0.4920912",
"0.49087185",
"0.49070758",
"0.48975596",
"0.4897517",
"0.488536",
"0.48807108",
"0.4874778",
"0.48746568",
"0.48719788",
"0.485711",
"0.48565337",
"0.48532155",
"0.48355573",
"0.4833665",
"0.48205417",
"0.48185387",
"0.48151973",
"0.48122036",
"0.48119205",
"0.48063838",
"0.48058656",
"0.48029718",
"0.48025644",
"0.47990602",
"0.47978702",
"0.4792776",
"0.47859424",
"0.4783675",
"0.47830883",
"0.47797427",
"0.47769812",
"0.47769812",
"0.47769812",
"0.47767913",
"0.47737038",
"0.4771243",
"0.47709998",
"0.47709998",
"0.47510558",
"0.47468603",
"0.47413644",
"0.47371882",
"0.47358018",
"0.47280815",
"0.47271612",
"0.47162184",
"0.47132796",
"0.47128212",
"0.4709497",
"0.47077155",
"0.4705681",
"0.46984738",
"0.4697211"
] | 0.0 | -1 |
Execute the loginflow to get the keywords | public function getKeywords($keywords = false)
{
$this->time_restrict = 5; // In Minutes;
$accounts = json_decode(file_get_contents(__DIR__ . "/../../../accounts.json"));
foreach ($accounts as $key => $value) {
$gv = new \GoogleLoginCurl($value->email, $value->password, $value->recovery, $value->cc);
$token = $this->getTopKeywords($value->email, $keywords);
$rkey = $this->getRelatedKeywords($value->email, $keywords);
return response()->json(["keywords" => $token, "related_keywords" => $rkey]);
}
return response()->json(["keywords" => '', "related_keywords" => '']);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function executeLogin()\n {\n }",
"public function loginActivities();",
"function login()\n\t{\n\t\t$GLOBALS['appshore']->session->createSession();\n\n\t\t$GLOBALS['appshore_data']['layout'] = 'auth';\n\t\t\n\t\t// define next action\n\t\t$result['action']['auth'] = 'login';\n\n\t\t// if a query_string was passed without being auth we keep it to deliver it later\n\t\tif( strpos( $_SERVER[\"QUERY_STRING\"], 'op=') !== false )\n\t\t\t$result['nextop'] = base64_encode($_SERVER[\"QUERY_STRING\"]);\n\t\t\t\n\t\treturn $result;\n\t}",
"public function loginDo(){\n\n\t\t$this->Login_model->loginDo();\t\n\n\t\n\n\t}",
"public function doLogin($ceredentials){\n\t}",
"private function doLogin()\n {\n if (!isset($this->token)) {\n $this->createToken();\n $this->redis->set('cookie_'.$this->token, '[]');\n }\n\n $loginResponse = $this->httpRequest(\n 'POST',\n 'https://sceneaccess.eu/login',\n [\n 'form_params' => [\n 'username' => $this->username,\n 'password' => $this->password,\n 'submit' => 'come on in',\n ],\n ],\n $this->token\n );\n\n $this->getTorrentsFromHTML($loginResponse);\n }",
"public function processLoginDataProvider() {}",
"public function processLogin(): void;",
"public function login()\n\t{\n\t\tredirect($this->config->item('bizz_url_ui'));\n\t\t// show_404();\n\t\t// ////import helpers and models\n\n\t\t// ////get data from database\n\n\t\t// //set page info\n\t\t// $pageInfo['pageName'] = strtolower(__FUNCTION__);\n\n\t\t// ////sort\n\t\t\n\t\t// //render\n\t\t// $this->_render($pageInfo);\n\t}",
"function login() {\n\t\t$this->getModule('Laravel4')->seeCurrentUrlEquals('/libraries/login');\n\t\t$this->getModule('Laravel4')->fillField('Bibliotek', 'Eksempelbiblioteket');\n\t\t$this->getModule('Laravel4')->fillField('Passord', 'admin');\n\t\t$this->getModule('Laravel4')->click('Logg inn');\n }",
"private function login(){\n \n }",
"abstract protected function doLogin();",
"protected function loginAuthenticate(){\n\n\t\t\n\t}",
"function authGet()\n{\n global $PHP_SELF, $QUERY_STRING;\n\n print_header(0, 0, 0, 0, \"\");\n\n echo \"<p>\".get_vocab(\"norights\").\"</p>\\n\";\n\n $TargetURL = basename($PHP_SELF);\n if (isset($QUERY_STRING))\n {\n $TargetURL = $TargetURL . \"?\" . $QUERY_STRING;\n }\n printLoginForm($TargetURL);\n\n exit();\n}",
"public function keywords(){\n\t\t\t\n\t\t\tif(!$this->session->userdata('admin_logged_in')){\n\t\t\t\t\t\t\t\t\n\t\t\t\t$url = 'admin/login?redirectURL='.urlencode(current_url());\n\t\t\t\tredirect($url);\t\t\t\t\t\t\t\n\t\t\t\t//redirect('admin/login/','refresh');\n\t\t\t\t\n\t\t\t}else{\t\t\t\n\n\t\t\t\t$username = $this->session->userdata('admin_username');\n\t\t\t\t\n\t\t\t\t$data['user_array'] = $this->Admin->get_user($username);\n\t\t\t\t\t\n\t\t\t\t$fullname = '';\n\t\t\t\tif($data['user_array']){\n\t\t\t\t\tforeach($data['user_array'] as $user){\n\t\t\t\t\t\t$fullname = $user->admin_name;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$data['fullname'] = $fullname;\n\t\t\t\t\t\n\t\t\t\t$data['unread_contact_us'] = $this->Contact_us->count_unread_messages();\n\t\t\t\t\t\n\t\t\t\t$messages_unread = $this->Messages->count_unread_messages($username);\n\t\t\t\tif($messages_unread == '' || $messages_unread == null){\n\t\t\t\t\t$data['messages_unread'] = 0;\n\t\t\t\t}else{\n\t\t\t\t\t$data['messages_unread'] = $messages_unread;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$data['header_messages_array'] = $this->Messages->get_header_messages($username);\n\t\t\t\t\n\t\t\t\t$enquiries_unread = $this->Sale_enquiries->count_unread_enquiries();\n\t\t\t\tif($enquiries_unread == '' || $enquiries_unread == null){\n\t\t\t\t\t$data['enquiries_unread'] = 0;\n\t\t\t\t}else{\n\t\t\t\t\t$data['enquiries_unread'] = $enquiries_unread;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//assign page title name\n\t\t\t\t$data['pageTitle'] = 'Keywords';\n\t\t\t\t\t\t\t\t\n\t\t\t\t//assign page title name\n\t\t\t\t$data['pageID'] = 'keywords';\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t//load header and page title\n\t\t\t\t$this->load->view('admin_pages/header', $data);\n\t\t\t\t\t\t\t\n\t\t\t\t//load main body\n\t\t\t\t$this->load->view('admin_pages/keywords_page', $data);\t\n\t\t\t\t\t\n\t\t\t\t//load footer\n\t\t\t\t$this->load->view('admin_pages/footer');\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\n\t\t}",
"public function run()\n {\n $keywords = ['JavaScript', 'CSS', 'HTML', 'C++', 'Web Design'];\n\n foreach ($keywords as $keyword) {\n Keyword::create(['term' => $keyword]);\n }\n }",
"abstract function getKeywords();",
"function SubmitLoginDetails()\n\t{\n\t\t// Login logic is handled by Application::CheckAuth method\n\t\tAuthenticatedUser()->CheckAuth();\n\t}",
"function loginBegin()\r\n\t{\r\n\t\t// if we have extra perm\r\n\t\tif( isset( $this->config[\"scope\"] ) && ! empty( $this->config[\"scope\"] ) )\r\n\t\t{\r\n\t\t\t$this->scope = $this->scope . \", \". $this->config[\"scope\"];\r\n\t\t}\r\n\r\n\t\t// get the login url \r\n\t\t$url = $this->api->getLoginUrl( array( 'scope' => $this->scope, 'redirect_uri' => $this->endpoint ) );\r\n\r\n\t\t// redirect to facebook\r\n\t\tHybrid_Auth::redirect( $url ); \r\n\t}",
"public function run()\n\t{\n\t\tsession_start();\n\t\tDB::connect();\n\t\n\t\tLoginManager::assert_auth_level(LoginManager::$AUTH_READ_ONLY);\t//CHANGE required authorization level for this page, ADMIN is the strictest\n\t\n\t\t$this->get_input(); \n\t\t\n\t\t$this->verify_input();\n\t\t\n\t\t$this->process_input();\n\t\t\n\t\t$this->show_output();\n\t}",
"public function get_login_data()\n\t{\n\t\tthrow new steam_exception( $this->get_login_user_name(), \"Error: get_login_data is not available using steam_connector_lite\", 980 );\n\t}",
"protected function collectDataKeywords()\n {\n /* Even if the original website uses POST with the search page, GET works too */\n $url = $this->getSearchURI();\n $this->collectDeals($url);\n }",
"public function login() {\n return $this->run('login', array());\n }",
"protected function quicksearch()\n {\n $words = $this->getWords();\n $logged_in = APP_User::isBWLoggedIn('NeedMore,Pending');\n if (!$logged_in) {\n $request = PRequest::get()->request;\n if (!isset($request[0])) {\n $login_url = 'login';\n } else switch ($request[0]) {\n case 'login':\n case 'main':\n case 'start':\n $login_url = 'login';\n break;\n default:\n $login_url = 'login/'.htmlspecialchars(implode('/', $request), ENT_QUOTES);\n }\n } else {\n $username = isset($_SESSION['Username']) ? $_SESSION['Username'] : '';\n }\n\n if (class_exists('MOD_online')) {\n $who_is_online_count = MOD_online::get()->howManyMembersOnline();\n } else {\n // echo 'MOD_online not active';\n if (isset($_SESSION['WhoIsOnlineCount'])) {\n $who_is_online_count = $_SESSION['WhoIsOnlineCount']; // MOD_whoisonline::get()->whoIsOnlineCount();\n } else {\n $who_is_online_count = 0;\n }\n }\n PPostHandler::setCallback('quicksearch_callbackId', 'SearchmembersController', 'index');\n\n require TEMPLATE_DIR . 'shared/roxpage/quicksearch.php';\n }",
"public function login()\n {\n $authorized = $this->authorize( $_POST );\n if( !empty( $authorized ) && $authorized !== false ){\n $this->register_login_datetime( $authorized );\n ( new Events() )->trigger( 1, true );\n } else {\n ( new Events() )->trigger( 2, true );\n }\n }",
"function actionLogin(){\n\t\t//session_start();\n\t\t\n\t\tif (!empty($_POST['id'])){\n\t\t\t$url = 'http://localhost:8090/BlogServer/ServletDemo?username=%3Bl&password=';\n\t\t\t$html = file_get_contents($url); \n\t\t\t$respObject = json_decode($html);\n\t\t\tif (!Empty($respObject->user->$_POST['id'])){\t\t\t\t\n\t\t\t\t$_SESSION['views'] = $respObject->user->$_POST['id'];\n\t\t\t\t$art = new Article();\n\t\t\t\t$this->findall = $art->findAll();\n\t\t\t\t$this->display(\"kmblog/km_index.html\");\n\t\t\t}\n\t\t}\n\t}",
"public function index() {\n $this->login();\n }",
"public function doAuthentication();",
"public function login()\n {\n $loginPostArray = $this->_getLoginPostArray();\n \n // Reset the client\n //$this->_client->resetParameters();\n \n // To turn cookie stickiness on, set a Cookie Jar\n $this->_client->setCookieJar();\n \n // Set the location for the login request\n $this->_client->setUri($this->_login_endPoint);\n \n // Set the post variables\n foreach ($loginPostArray as $loginPostKey=>$loginPostValue) {\n $this->_client->setParameterPost($loginPostKey, $loginPostValue);\n }\n \n // Submit the reqeust\n $response = $this->_client->request(Zend_Http_Client::POST);\n }",
"public function invoke()\n {\n $this->authenticationManager->authenticate();\n }",
"public function getKeywords();",
"protected function check_login()\n\t{\n\t\tif (isset($_GET['oauth_token']))\n\t\t{\n\n $this->handle_callback();\n\n\t\t\t$tokens = $this->get_access_token();\n\n if ( ! empty($tokens['access_key']) && ! empty($tokens['oauth_token'] ) )\n\t\t\t{\n\n $this->set_shard_id( $tokens['shard_id'] );\n $this->set_evernote_user_id( $tokens['evernote_user_id'] );\n $this->set_expires( $tokens['expires'] );\n\t\t\t}\n\n\t\t\t\\Response::redirect(\\Uri::current());\n\t\t\treturn null;\n\t\t}\n\n\t}",
"public function login()\n\t{\n\n\t\tif ( ( $this->get_access_key() === null || $this->get_access_secret() === null ) )\n\t\t{\n echo 'case 1';\n $oauth = new \\OAuth( $this->tokens['consumer_key'], $this->tokens['consumer_secret'] );\n\n $request_token_info = $oauth->getRequestToken( $this->request_token_url, $this->get_callback() );\n\n if ($request_token_info)\n {\n\n $this->set_request_tokens( $request_token_info );\n }\n\n // Now we have the temp credentials, let's get the real ones.\n\n // Now let's get the OAuth token\n\t\t\t\\Response::redirect( $this->get_auth_url() );\n return;\n\t\t}\n\n\t\treturn $this->check_login();\n\t}",
"private function readKeywordsConfig(){\r\t\tif(empty($this->langService) || $this->langService->IsDefaultSelected()){\r\t\t\tif($this->CI->config->item(\"zt_site_keywords\")){\r\t\t\t\t$keywords = $this->CI->config->item(\"zt_site_keywords\");\r\t\t\t\t$this->head->AddKeywords($keywords);\r\t\t\t}\r\t\t} else {\r\t\t\tif($this->CI->config->item(\"zt_site_keywords_\" . $this->langService->GetLangCode())){\r\t\t\t\t$keywords = $this->CI->config->item(\"zt_site_keywords_\" . $this->langService->GetLangCode());\r\t\t\t\tif(empty($keywords)){\r\t\t\t\t\t$keywords = $this->CI->config->item(\"zt_site_keywords\");\r\t\t\t\t}\r\t\t\t\t$this->head->AddKeywords($keywords);\r\t\t\t}\r\t\t}\r\r\n\t}",
"public function index()\n\t{\n\t\t$this->login();\n }",
"public function login(){\n\n\t\t$this->Login_model->login();\t\n\n\t\n\n\t}",
"public function index()\n\t{\n\t\t$this->login();\n\t}",
"public function loginAction()\r\n\t{\r\n\t\t$this->setSubTitle($this->loginSubTitle);\r\n\t\t\r\n\t\t$this->view->form = new $this->loginFormClassName();\r\n\t\t\r\n\t\t$this->checkAuth();\r\n\t}",
"private function login(): void\r\n {\r\n $crawler = $this->client->request('GET', self::URL_BASE.'Home/Login');\r\n $form = $crawler->selectButton('Login')->form();\r\n $this->client->submit(\r\n $form,\r\n ['EmailAddress' => $this->username, 'Password' => $this->password]\r\n );\r\n }",
"function Login()\n{\n\tglobal $txt, $context;\n\n\t// You're not a guest, why are you here?\n\tif (we::$is_member)\n\t\tredirectexit();\n\n\t// We need to load the Login template/language file.\n\tloadLanguage('Login');\n\tloadTemplate('Login');\n\twetem::load('login');\n\n\t// Get the template ready.... not really much else to do.\n\t$context['page_title'] = $txt['login'];\n\t$context['default_username'] =& $_REQUEST['u'];\n\t$context['default_password'] = '';\n\t$context['never_expire'] = false;\n\t$context['robot_no_index'] = true;\n\n\t// Add the login chain to the link tree.\n\tadd_linktree($txt['login'], '<URL>?action=login');\n\n\t// Set the login URL - will be used when the login process is done (but careful not to send us to an attachment).\n\tif (isset($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'dlattach') === false && strhas($_SESSION['old_url'], array('board=', 'topic=', 'board,', 'topic,')))\n\t\t$_SESSION['login_url'] = $_SESSION['old_url'];\n\telse\n\t\tunset($_SESSION['login_url']);\n}",
"public function actionIndex() {\n $data = new LoginClass();\n $data->dbConnect();\n\n\t\t$test = $data->getData();\n\t\tforeach($test as $key => $value) {\n\t\t\tforeach($value as $key2 => $value2) {\n\t\t\t\terror_log($key2 . \": \" . $value2);\n\t\t\t}\n\t\t}\n\n $this->setLayoutVar('pageTitle', 'Kogu - Login');\n $this->setLayout('basicPage');\n $this->setLayoutVar('pageName', 'Login');\n $this->setLayoutVar('pageNameSmall', ' or create an account below');\n }",
"public function login(){\n\t\t\t$this->modelLogin();\n\t\t}",
"function OnProcess() {\n\n $this->login = $this->Request->ToString(\"login\", \"\", 1, 32);\n $this->password = $this->Request->ToString(\"password\", \"\", 1, 32);\n $this->packagefrom = $this->Request->ToString(\"frompackage\", \"\");\n $this->former_query = $this->Request->ToString(\"query\", \"\");\n\n $UsersTable = new UsersTable($this->Kernel->Connection, $this->Kernel->Settings->GetItem(\"Authorization\", \"AuthorizeTable\"));\n //die(pr($UsersTable));\n $data = $UsersTable->GetByFields(array($this->Kernel->Settings->GetItem(\"Authorization\", \"FLD_login\") => $this->login));\n\n if (!count($data) || $data[\"active\"]==0) {\n $this->AddErrorMessage(\"UserLogonPage\", \"INVALID_LOGIN\");\n return;\n }\n\n $_pass = $data[$this->Kernel->Settings->GetItem(\"Authorization\", \"FLD_password\")];\n if($this->Kernel->Settings->GetItem(\"Authorization\", \"FLG_MD5_PASSWORD\")) {\n $this->password = md5($this->password);\n }\n\n if($_pass != $this->password){\n $this->AddErrorMessage(\"UserLogonPage\", \"INVALID_PASSWORD\");\n return;\n }\n\n if(!$this->Kernel->Settings->GetItem(\"Authorization\", \"FLG_MD5_PASSWORD\")) {\n $this->password = md5($this->password);\n }\n\n $this->Session = new ControlSession($this, $CookieName);\n session_start();\n $login_var = $this->Kernel->Settings->GetItem(\"Authorization\", \"SESSION_Var_Login\");\n $password_var = $this->Kernel->Settings->GetItem(\"Authorization\", \"SESSION_Var_Password\");\n\n $GLOBALS[$login_var] = $this->login;\n $GLOBALS[$password_var] = $this->password;\n\n $this->Session->Set($this->Kernel->Settings->GetItem(\"Authorization\", \"SESSION_Var_Login\"), $this->login);\n $this->Session->Set($this->Kernel->Settings->GetItem(\"Authorization\", \"SESSION_Var_Password\"), $this->password);\n $this->Session->Set($this->Kernel->Settings->GetItem(\"Authorization\", \"SESSION_Var_UserId\"), $data[$this->Kernel->Settings->GetItem(\"Authorization\", \"FLD_user_id\")]);\n\n if (strlen($this->camefrom)) {\n $this->Response->Redirect($this->Kernel->Settings->GetItem(\"MODULE\",\"SiteURL\").$this->camefrom);\n } else {\n $this->Auth->DefaultRedirect(\"Frontend\");\n }\n }",
"public function login_page_working()\n {\n $this->browse(function ($browser) {\n $browser->visit(new Login);\n });\n }",
"public function login();",
"public function login();",
"public function getSeoKeywords();",
"private function _login() {\n if( !$this->_connection->getCookieJar()->getCookie( $this->_baseUrl,\n 'auth_tkt', Zend_Http_CookieJar::COOKIE_OBJECT ) ) {\n $this->_connection->setUri( $this->_baseUrl . self::URL_LOGIN );\n $this->_connection->setParameterPost( array(\n 'login_username' => $this->_username,\n 'login_password' => $this->_password,\n 'back' => $this->_baseUrl,\n 'login' => 'Log In' ) );\n $this->_doRequest( Zend_Http_Client::POST );\n if( !$this->_connection->getCookieJar()->getCookie( $this->_baseUrl,\n 'auth_tkt', Zend_Http_CookieJar::COOKIE_OBJECT ) ) {\n throw new Opsview_Remote_Exception( 'Login failed for unknown reason' );\n }\n }\n }",
"public function login(){\n \t\t//TODO redirect if user already logged in\n \t\t//TODO Seut up a form\n \t\t//TODO Try to log in\n \t\t//TODO Redirect\n \t\t//TODO Error message\n \t\t//TODO Set subview and load layout\n\n \t}",
"public function login()\n {\n self::$facebook = new \\Facebook(array(\n 'appId' => $this->applicationData[0],\n 'secret' => $this->applicationData[1],\n ));\n\n $user = self::$facebook->getUser();\n if (empty($user) && empty($_GET[\"state\"])) {\n \\Cx\\Core\\Csrf\\Controller\\Csrf::header('Location: ' . self::$facebook->getLoginUrl(array('scope' => self::$permissions)));\n exit;\n }\n\n self::$userdata = $this->getUserData();\n $this->getContrexxUser($user);\n }",
"function run(){\n\t\t$code = $this->checkAuth($this->host->ipAdress);\n\t\tif($code==401){\n\t\t\t//Curl Multi Handler\n\t\t\t$curl_options = array(\n\t\t\t CURLOPT_USERAGENT => 'Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7B405',\n\t\t\t\tCURLOPT_NOBODY => true,\n\t\t\t);\n\t\t\t$parallel_curl = new ParallelCurl(100, $curl_options);\n\t\t\t//Logins\n\t\t\t$logins = array(\"\", \"admin\", \"1234\", \"root\", \"guest\");\n\t\t\t//Password\n\t\t\t$passwords = array(\"\", \"admin\", \"1234\", \"root\", \"guest\");\n\t\t\tforeach($logins as $login){\n\t\t\t\tforeach($passwords as $password){\n\t\t\t\t\t$auth = $login . \":\" . $password;\n\t\t\t\t\t//echoCli(\"Trying to login with: \".$auth, \"notice\");\n\t\t\t\t $parallel_curl->startRequest($this->host->ipAdress, array($this, 'checkLogin'), $auth, null, $auth);\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Got Milk?\n\t\t\tif($this->data){\n\t\t\t\t$this->status = 1;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t$parallel_curl->finishAllRequests();\n\t\t}else{\n\t\t\techoCli(\"Target not Vulnerable\", \"failure\");\n\t\t}\n\t}",
"public function run()\n {\n $keywords = ['new', 'internal', 'expensive', 'second hand', 'antique', 'electronic', 'furniture'];\n\n foreach ($keywords as $keywordName) {\n $keyword = new Keyword();\n $keyword->name = $keywordName;\n $keyword->save();\n }\n }",
"public function process()\n\t{\n \n $this->load->model('login_model');\n \n $result = $this->login_model->validate();\n \n if(count($result) == 0) { \n\t\t\n $msg = 'Invalid username and/or password.';\n\n $this->index($msg);\n\n } else { \t \t\n\n \tif($result['is_admin']) {\n \t\tredirect(base_url().'configuration');\t\n \t}\n\n \t$this->load->model('location_model'); \t\n\n \t$result = $this->location_model->validate();\n\n \tif(! $result) {\n \t\t$msg = 'You are not inside the 20 km radius.';\n\n $this->session->sess_destroy();\n \n \t$this->index($msg);\n \t} else {\n\n $data = $this->session->get_userdata();\n\n \t\tredirect(base_url().'search');\t\n\n \t}\n \n } \n }",
"public function index($args = [])\n\t\t{\n\t\t\t$this -> redirect();\n\t\t\t$data['title'] = 'Login - Ecom';\n\n\t\t\tif(isset($args['query']))\n\t\t\t\t$data['query'] = $args['query'];\n\t\t\t\n\t\t\t$this -> loadView('login', $data);\n\t\t}",
"public function beginLogin() {\n \n $this->info(\"beginning login...\");\n \n $status = $this->requestAuthentication($this->requestURL, $this->authURL);\n \n if(!$status) {\n $this->error(\"problem launching Yahoo authenication: \".$this->getError());\n }\n \n return true;\n }",
"public function keywords()\r\n {\r\n }",
"protected function executeLogic()\n {\n $request = Craft::$app->getRequest();\n $settings = $this->getSettings();\n\n // Only run if all the settings are set\n if (!$settings->enableLogin || empty($settings->clientId)) {\n return;\n }\n\n if ($request->getIsLoginRequest()) {\n $view = Craft::$app->getView();\n $view->registerAssetBundle(OpenidLoginAsset::class);\n //$view->registerMetaTag([\n // 'name' => 'google-signin-scope',\n // 'content' => 'profile email'\n //]);\n \n // Leaving this in as it's easier to retrieve the clientId from\n // here than pass it into the Asset JS.\n $view->registerMetaTag([\n 'name' => 'google-signin-client_id',\n 'content' => $settings->clientId\n ]);\n $view->registerJsFile(\"https://accounts.google.com/gsi/client\");\n }\n }",
"public function keywordresultAction()\n {\n $this->view->title = 'FENS様検索エンジン管理システム|FENS';\n $this->render();\n }",
"private function loginToWigle() {\n\t\t$this->sendCurlRequest(self::WIGLE_LOGIN_URL,array(\"credential_0\"=>$this->user,\"credential_1\"=>$this->password));\n }",
"public function login() {\n $messages = $this->messages;\n require_once $this->root_path_views.\"login.php\";\n }",
"protected function loginIfRequested() {}",
"function login($username, $authtoken) {\n\t\t$this->login = ( $this->send(\"login $username\\npk=$authtoken\\n\\0\") ? true : true );\n\t}",
"public function login()\n {\n $this->vista->index();\n }",
"private function login() {\n\t\t$args = array(\"key\" => $this->akismetKey);\n\t\t$host = $this->akismetURL;\n\t\t$url = \"http://$host/\" . $this->akismetVersion . \"/verify-key\";\n\t\t$valid = $this->send($args, $host, $url);\n\t\treturn ($valid == \"valid\") ? true : false; \n\t}",
"public function login_step($factors)\n {\n // replace handler for login form\n $this->login_factors = array_values($factors);\n $this->api->output->add_handler('loginform', array($this, 'auth_form'));\n\n // focus the code input field on load\n $this->api->output->add_script('$(\"input.kolab2facode\").first().select();', 'docready');\n\n $this->api->output->send('login');\n }",
"public function invoke(FbCrawler $fb, KeyValueStorage $kvs)\n\t{\n\t\t$url = $fb->getLoginUrl();\n\t\t$this->out->writeln('<info>Open the following url in browser and authenticate:</info>');\n\t\t$this->out->writeln(\" $url\");\n\t\t$this->out->writeln(\"<info>Once you are done and redirected to http://copy.this.url, copy the full url and paste it here.</info>\\n\");\n\n\t\t$helper = new QuestionHelper();\n\t\t$question = new Question('Return url: ');\n\t\t$url = $helper->ask($this->in, $this->out, $question);\n\n\t\t$accessToken = $fb->getAccessTokenFromUrl($url);\n\t\t$accessToken = $accessToken->extend();\n\t\t$this->out->writeln(\"<info>Extended access token: $accessToken</info>\");\n\n\t\t$exp = $accessToken->getExpiresAt();\n\t\t$kvs->save($kvs::FACEBOOK_ACCESS_TOKEN, (string) $accessToken);\n\n\t\tif ($exp) {\n\t\t\t$kvs->save($kvs::FACEBOOK_ACCESS_TOKEN_EXPIRES, $exp->getTimestamp());\n\t\t\t$date = $exp->format('c');\n\t\t\t$this->out->writeln(\"Token expires at $date\");\n\t\t}\n\n\t}",
"function index()\n {\t \t\n \t$this->login(); \n }",
"protected static function login() {\n $wsdl = FS_APP_ROOT.'/lib/third_party/salesforce/soapclient/partner.wsdl.xml';\n\n if (self::getSessionData('salesforce_sessionId') == NULL) {\n self::getConn()->createConnection($wsdl);\n self::getConn()->login(self::$_username, self::$_password . self::$_token);\n\n // Now we can save the connection info for the next page\n self::setSessionData('salesforce_location', self::getConn()->getLocation());\n self::setSessionData('salesforce_sessionId', self::getConn()->getSessionId());\n self::setSessionData('salesforce_wsdl', $wsdl);\n } else {\n // Use the saved info\n self::getConn()->createConnection(self::getSessionData('salesforce_wsdl'));\n self::getConn()->setEndpoint(self::getSessionData('salesforce_location'));\n self::getConn()->setSessionHeader(self::getSessionData('salesforce_sessionId'));\n }\n }",
"function staff_alllogin() {\n \n $this->setLoginRedirects();\n \n $this->layout = 'login_layout';\n\t\t// Display error message on failed authentication\n\t\tif (!empty($this->data) && !$this->Auth->_loggedIn) {\n\t\t\t$this->Session->setFlash($this->Auth->loginError);\n $this->redirect(\"http://\" . $_SERVER['HTTP_HOST']);\n\t\t}else{\n $this->redirect(\"http://\" . $_SERVER['HTTP_HOST']);\n }\n\t\t// Redirect the logged in user to respective pages\n\t\t\n\t}",
"public function login(){\n\n }",
"public function invoke() {\n if(isset($_GET[\"login\"])){\n authenticateUser($this->model);\n \n } else if(isset($_GET[\"timeline\"])){\n fetchTimeLineData($this->model);\n\n } else if(isset($_GET[\"authenticated\"])){ // This is not return the correct output to front-end.\n isAuthenticated($this->model);\n\n } else if(isset($_GET[\"addTimeLine\"])){\n addTimeLines($this->model);\n\n } else if(isset($_GET[\"showTimeLineDB\"])){\n fetchTimeLineData($this->model);\n\n } else if(isset($_GET[\"events\"])){\n fetchEventData($this->model);\n \n } else if(isset($_GET[\"addEvent\"])){\n addEvents($this->model);\n\n } else if(isset($_GET[\"partner\"])){\n fetchPartnerData($this->model);\n \n } else if(isset($_GET[\"addPartner\"])){\n addPartner($this->model);\n\n } else if(isset($_GET[\"footer\"])){\n fetchFooterData($this->model);\n \n } else if(isset($_GET[\"addFooter\"])){\n addFooter($this->model);\n \n } else if(isset($_GET[\"deleteStory\"])){\n deleteRow($this->model);\n \n } else if(isset($_GET[\"getStory\"]) && isset($_GET[\"storyId\"])){\n fetchTimeLineById($this->model, $_GET[\"storyId\"]);\n \n } else if(isset($_GET[\"updateTimeLineId\"])){\n updateTimeLineByStoryId($this->model);\n \n } else if(isset($_GET[\"users\"])){\n getUsers($this->model);\n \n }\n \n }",
"private function doLoginWithPostData() {\r\n\t\tif ($this->checkLoginFormDataNotEmpty()) {\r\n\t\t\r\n\t\t\t/**\r\n\t\t\t * Generate access token using Agave API\r\n\t\t\t */\r\n\t\t\t \r\n\t\t\t$ch = curl_init();\r\n\r\n\t\t\t$pf = \"grant_type=password&username=\".$_POST['user_name'].\"&password=\".$_POST['user_password'].\"&scope=PRODUCTION\";\r\n\t\t\t$key_and_secret = $this->key.\":\".$this->secret;\r\n\t\t\t$encoding = \"Content-Type: application/x-www-form-urlencoded\";\r\n\t\t\t\r\n\t\t\tcurl_setopt($ch, CURLOPT_URL, \"https://agave.iplantc.org/token\");\r\n\t\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\r\n\t\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"POST\");\r\n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $pf);\r\n\t\t\tcurl_setopt($ch, CURLOPT_USERPWD, $key_and_secret);\r\n\t\t\tcurl_setopt($ch, CURLOPT_ENCODING, $encoding);\r\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n\t\t\t\r\n\t\t\t$response = curl_exec($ch);\r\n\t\t\t$response_arr = json_decode($response, true);\r\n\t\t\t$_SESSION['access_token'] = $response_arr['access_token'];\r\n\t\t\t\r\n\t\t\tcurl_close ($ch);\r\n\t\t\t/**\r\n\t\t\t * Get Login info using access token\r\n\t\t\t */\r\n\t\t\t \r\n\t\t\t$ch = curl_init();\r\n\t\t\t$data = array(\"Authorization: Bearer \".$_SESSION['access_token']);\r\n\t\t\t$url = \"https://agave.iplantc.org:443/profiles/v2/\".$_POST['user_name'];\r\n\t\t\tcurl_setopt($ch, CURLOPT_URL, $url);\r\n\t\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, $data);\r\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n\t\t\tcurl_setopt($ch, CURLOPT_VERBOSE, 1);\r\n\t\t\t\t\t\t\r\n\t\t\t$response = curl_exec($ch);\r\n\t\t\tcurl_close ($ch);\r\n\t\t\t$response_arr = json_decode($response, true);\r\n\t\t\t\r\n\t\t\tif($response_arr['status'] == \"success\"){\r\n\t\t\t\t$user_info = $response_arr['result'];\r\n\t\t\t\t$_SESSION['user_name'] = $user_info['username'];\r\n\t\t\t\t$_SESSION['user_email'] = $user_info['email'];\r\n\t\t\t\t$this->user_is_logged_in = true;\r\n\t\t\t\t$_SESSION['user_is_logged_in'] = true;\r\n\t\t\t} else {\r\n\t\t\t\t$this->feedback = \"Invalid Username or Password \";//.$_SESSION['access_token'];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n }",
"public function login()\n {\n }",
"public function login()\n {\n }",
"public function actionLogin() {\n \n }",
"public function test_admin_search_keyword()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/SearchResult', 'index']);\n $this->assertResponseCode(404);\n }",
"public function indexAction()\n\t{\t\t\n\t\tif(!authorization::areWeLoggedIn())\n\t\t{\n\t\t\t//we do it this way so that certain applicatiob classes can override the super Login action\n\t\t\tglobalRegistry::getInstance()->setRegistryValue('event','login_application_grabs_control','true');\n\t\t\t$this->doLogin();\n\t\t}\n\t\t\n\t\t\n\t\t\t\t\n\t}",
"public function p_login() {\n\n\t\t# Sanitize the user entered data to prevent any funny-business (re: SQL Injection Attacks)\n\t\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\t\t# Hash submitted password so we can compare it against one in the db\n\t\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']);\n\n\t\t# Search the db for this email and password\n\t\t# Retrieve the token if it's available\n\t\t$q = \"SELECT token \n\t\t\tFROM users \n\t\t\tWHERE email = '\".$_POST['email'].\"' \n\t\t\tAND password = '\".$_POST['password'].\"'\";\n\n\t\t$token = DB::instance(DB_NAME)->select_field($q);\n\n\t\t# If we didn't find a matching token in the database, it means login failed\n\t\tif(!$token) {\n\n\t\t\t# Send them back to the login page\n\t\t\tRouter::redirect(\"/users/login/error\");\n\n\t\t# But if we did, login succeeded! \n\t\t} else {\n\t\t\tsetcookie(\"token\", $token, strtotime('+1 year'), '/');\n\t\t\t# Send them to the main page - or whever you want them to go\n\t\t\tRouter::redirect(\"/\");\n\t\t}\n\t}",
"public function index()\n\t{\n\t\t$requestUrl = $this->input->get(\"redirect\");\n\t\t\n\t\tif ($this->login_util->isUserLoggedIn()){\n\t\t\t// session exists\n\t\t\tredirect($requestUrl, 'refresh');\n\t\t}\n\t\t\n\t\t$this->display_login($requestUrl);\n\t}",
"public function login()\n {\n //$this->username = $username; // we are gonnna use the above property: $username here\n //$this->password = $password;\n // we want to call authuser from within login so\n $this->auth_user(); // we don't need to pass any arguments here because we know the class properties above this line\n\n }",
"abstract public function login(array $input);",
"public function loginAction()\n {\n // get the view vars\n $errors = $this->view->errors;\n $site = $this->view->site;\n $loginUser = $this->view->loginUser;\n\n if ( $loginUser ) {\n $homeUrl = $site->getUrl( 'home' );\n return $this->_redirect( $homeUrl );\n }\n\n // set the input params\n $this->processInput( null, null, $errors );\n\n // check if there were any errors\n if ( $errors->hasErrors() ) {\n return $this->renderPage( 'errors' );\n }\n\n return $this->renderPage( 'authLogin' );\n }",
"abstract public function loginAction(Celsus_Parameters $parameters, Celsus_Response_Model $responseModel);",
"public function loginUser()\r\n {\r\n $req = $this->login->authenticate($this->user);\r\n $req_result = get_object_vars($req);\r\n print(json_encode($req_result));\r\n }",
"function login(){\n\t\t$apikey = $this->get_api_key();\n\t\t$apisecret = $this->get_api_secret();\n\t\t$authorization = $this->get_authorization();\n\t\t$user = new \\gcalc\\db\\api_user( $apikey, $apisecret, $authorization );\n\t\tif ( $user->login() ) {\n\t\t\t$credetials = $user->get_credentials();\t\t\t\t\n\t\t} else {\n\t\t\t$credetials = array(\n\t\t\t\t'login' => 'anonymous',\n\t\t\t\t'access_level' => 0\n\t\t\t);\n\t\t}\n\t\treturn $credetials;\n\t}",
"function login() {\n\t $login_parameters = array(\n\t\t \"user_auth\" => array(\n\t\t \"user_name\" => $this->username,\n\t\t \"password\" => $this->hash,\n\t\t \"version\" => \"1\"\n\t\t ),\n\t\t \"application_name\" => \"mCasePortal\",\n\t\t \"name_value_list\" => array(),\n\t );\n\n\t $login_result = $this->call(\"login\", $login_parameters);\n\t $this->session = $login_result->id;\n\t return $login_result->id;\n\t}",
"public function loginCheckAction()\n {\n }",
"Public Function login()\n\t{\n\t\t$Arr = array();\n\t\t\n\t\t$Arr['a'] = 'login';\n\t\t$Arr['j'] = '';\n\t\t$Arr['LogType'] = 'a';\n\t\t$Arr['UserName'] = $this->publisherLogin;\n\t\t$Arr['Password'] = $this->publisherPassword;\n\t\t\n\t\t\n\t\t$this->loginUrl\t= 'https://secure.essociate.com/login';\n\t\t\n\t\t$postdata = '';\n\t\tforeach ($Arr as $Key => $Value)\n\t\t{\n\t\t\t$postdata .= urlencode($Key).'='.urlencode($Value).'&';\n\t\t}\n\t\t\n\t\t$arrParams = array('CURLOPT_SSL_VERIFYPEER' => FALSE,\n\t\t\t\t\t\t'CURLOPT_USERAGENT' => \"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6\",\n\t\t\t\t\t\t'CURLOPT_TIMEOUT' => 60,\n\t\t\t\t\t\t'CURLOPT_FOLLOWLOCATION' => 1,\n\t\t\t\t\t\t'CURLOPT_COOKIEJAR' => sys_get_temp_dir().'/cookiemonster'.md5($this->publisherLogin).'.txt',\n\t\t\t\t\t\t'CURLOPT_COOKIEFILE' => sys_get_temp_dir().'/cookiemonster'.md5($this->publisherLogin).'.txt',\n\t\t\t\t\t\t'CURLOPT_REFERER' => $this->loginUrl,\n\t\t\t\t\t\t'CURLOPT_POSTFIELDS' => $postdata,\n\t\t\t\t\t\t'CURLOPT_POST' => 1,\n\t\t\t\t\t\t'CURLOPT_HEADER' => 1);\n\t\t$Header = $this->curlIt($this->loginUrl, $arrParams);\n\t\t\n\t\tif (strstr($Header, 'Summary for Today')) \n\t\t{\n\t\t\treturn true;\t\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public function test_keywordOrder() : void\n {\n $subject = <<<'EOT'\n{showencoded: \"text\" urlencode: idnencode:}\nEOT;\n\n $command = $this->parseCommand($subject);\n\n $this->assertTrue($command->isURLEncoded());\n $this->assertTrue($command->isIDNEncoded());\n\n $list = $command->getActiveEncodings();\n $this->assertCount(2, $list);\n $this->assertSame(Mailcode_Commands_Keywords::TYPE_URLENCODE, $list[0]);\n $this->assertSame(Mailcode_Commands_Keywords::TYPE_IDN_ENCODE, $list[1]);\n }",
"public static function login()\n {\n (new Authenticator(request()))->login();\n }",
"function login() { }",
"public function webtestLogin() {\n //$this->open(\"{$this->sboxPath}user\");\n $password = $this->settings->adminPassword;\n $username = $this->settings->adminUsername;\n // Make sure login form is available\n $this->waitForElementPresent('edit-submit');\n $this->type('edit-name', $username);\n $this->type('edit-pass', $password);\n $this->click('edit-submit');\n $this->waitForPageToLoad('30000');\n }",
"public function index() {\r\n\t\t$this->show_login_page();\r\n\t}",
"private function loginPanel() {\n $this->user_panel->processLogin();\n }",
"public function action_index()\n\t{\n\t\t// Can't authenticate twice\n\t\tif (Auth::instance()->logged_in()) {\n\t\t\t$this->request->redirect('');\n\t\t}\n\n\t\t// If the login form was posted...\n\t\tif ($this->request->post()) {\n\n\t\t\t// Try to login\n\t\t\tif (Auth::instance()->login($this->request->post('user'), $this->request->post('pass'))) {\n\t\t\t\t$this->request->redirect($this->dash);\n\t\t\t} else {\n\t\t\t\tNotify::msg('Authentication failed!', 'error');\n\t\t\t}\n\n\t\t\t// Auth failed\n\t\t\t$this->request->redirect($this->_login_url);\n\t\t}\n\t}",
"public function indexAction()\n {\n $scopes = ['basic', 'comments', 'relationships', 'likes'];\n Helper::redirectToUrl($this->instagram->getLoginUrl($scopes));\n }",
"public function getFormLoginPage();",
"public function invoke()\n {\n try {\n $this->authenticationManager->authenticate();\n } catch (\\Doctrine\\ORM\\EntityNotFoundException $exception) {\n throw new \\TYPO3\\Flow\\Security\\Exception\\AuthenticationRequiredException('Could not authenticate. Looks like a broken session.', 1358971444, $exception);\n } catch (\\TYPO3\\Flow\\Security\\Exception\\NoTokensAuthenticatedException $noTokensAuthenticatedException) {\n // We still need to check if the resource is available to \"Everybody\".\n try {\n $this->accessDecisionManager->decideOnJoinPoint($this->joinPoint);\n return;\n } catch (\\TYPO3\\Flow\\Security\\Exception\\AccessDeniedException $accessDeniedException) {\n throw $noTokensAuthenticatedException;\n }\n }\n $this->accessDecisionManager->decideOnJoinPoint($this->joinPoint);\n }",
"protected function Auth()\n {\n if( !$this->Validate() ){\n throw new Exception(\"The connection could not be validated\");\n }\n\n $search = $_GET[\"openid_identity\"];\n $steamid = substr($search, strrpos($search, '/') + 1);\n \n $infos = $this->GetInfos($steamid);\n \n $infos = $this->ParseData($infos);\n\n $_SESSION[\"user\"] = $infos;\n\n $url = $this->redirectParams[\"openid.return_to\"];\n\n header(\"Location: $url\");\n exit(); \n }",
"public function indexAction()\n {\n $redirectionUri = $this->backendRedirectionService->getAfterLoginRedirectionUri($this->request);\n if ($redirectionUri === null) {\n $redirectionUri = $this->uriBuilder->uriFor('index', array(), 'Login', 'Neos.Neos');\n }\n $this->redirectToUri($redirectionUri);\n }"
] | [
"0.612615",
"0.5849091",
"0.5761457",
"0.56873304",
"0.5620077",
"0.56164354",
"0.5468236",
"0.54382974",
"0.54165643",
"0.5341868",
"0.5324999",
"0.52909476",
"0.5275352",
"0.52658594",
"0.5257317",
"0.52563334",
"0.52484804",
"0.5243896",
"0.52389663",
"0.5234039",
"0.5230193",
"0.5207884",
"0.5180469",
"0.5133542",
"0.5133132",
"0.511735",
"0.51112115",
"0.50969815",
"0.5091205",
"0.5073543",
"0.50578153",
"0.50472134",
"0.504459",
"0.5035289",
"0.5033439",
"0.5017387",
"0.50095344",
"0.50084597",
"0.49993342",
"0.49952975",
"0.49831063",
"0.49826205",
"0.49588424",
"0.4951262",
"0.49489847",
"0.49489847",
"0.49360615",
"0.49269342",
"0.49203664",
"0.4911654",
"0.4909867",
"0.48984933",
"0.48930353",
"0.4891634",
"0.48912856",
"0.48883396",
"0.48875076",
"0.48847732",
"0.48748845",
"0.48726374",
"0.48706576",
"0.48689547",
"0.48685464",
"0.48648408",
"0.48591924",
"0.48457173",
"0.4845011",
"0.48392764",
"0.48385996",
"0.4835152",
"0.48318127",
"0.4825907",
"0.48115948",
"0.48115948",
"0.48108768",
"0.48051056",
"0.47947806",
"0.47844455",
"0.47823238",
"0.47792882",
"0.47756684",
"0.47734013",
"0.47719485",
"0.4770462",
"0.47684133",
"0.4766533",
"0.47662413",
"0.4763515",
"0.47632954",
"0.4763247",
"0.47509924",
"0.47505182",
"0.47489592",
"0.4733386",
"0.471985",
"0.47163358",
"0.47147343",
"0.47108662",
"0.47108328",
"0.4709707"
] | 0.4749166 | 92 |
/ / Get the XSRF Token / | public function getXsrfToken($login)
{
$tokenURL = "https://ads.google.com/aw/keywordplanner/ideas/";
$chnd = curl_init();
curl_setopt($chnd, CURLOPT_URL, $tokenURL);
curl_setopt($chnd, CURLOPT_POST, FALSE);
curl_setopt($chnd, CURLOPT_FOLLOWLOCATION, TRUE);
// Required to fetch the webmaster URL
// curl_setopt ($chnd, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($chnd, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($chnd, CURLOPT_USERAGENT, "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36");
curl_setopt($chnd, CURLOPT_HTTPHEADER, [
'Connection: keep-alive'
]);
curl_setopt($chnd, CURLOPT_COOKIEJAR, storage_path('gvoicecookies/') . $login . '.txt');
curl_setopt($chnd, CURLOPT_COOKIEFILE, storage_path('gvoicecookies/') . $login . '.txt');
$data = curl_exec($chnd);
if (curl_error($chnd))
print_r(curl_errno($chnd) . ' ' . curl_error($chnd));
curl_close($chnd);
file_put_contents(storage_path('gvoicecookies/') . 'sample.html', $data);
preg_match("/xsrfToken: '(.+)',};window/", $data, $match);
return @$match[1];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getXSRFToken() {\r\n return !is_null(Session::get('xsrf_token')) ? Session::get('xsrf_token') : NULL;\r\n }",
"public static function getSubmittedXSRFToken() {\r\n return isset($_POST['xsrf_token']) ? $_POST['xsrf_token'] : NULL;\r\n }",
"public function getCSRFToken():string;",
"public function generateCSRFToken();",
"public function loadTokenCSRFToken();",
"public function getToken()\n {\n if (!isset($_SESSION['MFW_csrf-token'])) {\n $this->generateNewToken(128);\n }\n\n return $_SESSION['MFW_csrf-token'];\n }",
"public function getCSRFToken() {\r\n\t // The CSRF token should always be stored in the user's session.\r\n\t // If it doesn't, the user is not logged in.\r\n\t return $this->input('session', 'token');\r\n\t}",
"public function get_request_token()\n {\n $sess_id = $_COOKIE[ini_get('session.name')];\n if (!$sess_id) $sess_id = session_id();\n $plugin = $this->plugins->exec_hook('request_token', array('value' => md5('RT' . $this->get_user_id() . $this->config->get('des_key') . $sess_id)));\n return $plugin['value'];\n }",
"public function get_csrf_token() {\n if(isset($_SESSION['token_value'])) {\n return $_SESSION['token_value']; \n } else {\n $token = hash('sha256', self::$instance->random(500));\n\n self::$instance->startSession();\n\n $_SESSION['token_value'] = $token;\n return $token;\n }\n \n\t}",
"public static function get_token() {\n\t\t\t\n\t\t\t// Bring in the $session variable\n\t\t\tglobal $session;\n\t\t\t// Check if there is a csrf_token in the $_SESSION\n\t\t\tif(!$session->get('csrf_token')) {\n\t\t\t\t// Token doesn't exist, create one\n\t\t\t\tself::set_token();\n\t\t\t} \n\t\t\t// Return the token\n\t\t\treturn $session->get('csrf_token');\n\t\t}",
"public function getToken();",
"public function getToken();",
"public function getToken();",
"public function getToken();",
"public static function getSecurityToken()\n {\n return Utilities::getSecurityToken();\n }",
"function csrf_token()\n {\n return shy(Shy\\Http\\Contracts\\Session::class)->token();\n }",
"public static function getToken() {\n return session(\"auth_token\", \"\");\n }",
"private function get_token() {\n\n\t\t$query = filter_input( INPUT_GET, 'mwp-token', FILTER_SANITIZE_STRING );\n\t\t$header = filter_input( INPUT_SERVER, 'HTTP_AUTHORIZATION', FILTER_SANITIZE_STRING );\n\n\t\treturn ( $query ) ? $query : ( $header ? $header : null );\n\n\t}",
"public static function csrfTokenGet() {\n $csrfToken = null;\n\n if(!isset($_SESSION['csrfTokenCreatedAt']) || ($_SESSION['csrfTokenCreatedAt'] - time() > 21600)) { //1hr\n $_SESSION['csrfToken'] = password_hash(uniqid(self::$applicationName), PASSWORD_BCRYPT);\n $_SESSION['csrfTokenCreatedAt'] = time();\n }\n $csrfToken = $_SESSION['csrfToken'];\n\n return $csrfToken;\n }",
"public function getToken(): string;",
"public function getToken(): string;",
"public function getToken(): string;",
"public function getToken(): string;",
"protected function retrieveSessionToken() {}",
"protected function retrieveSessionToken() {}",
"protected function retrieveSessionToken() {}",
"protected function retrieveSessionToken() {}",
"function get_token()\n\t{\n\t\treturn session_id();\n\t}",
"function token(){\n return Request::session('internal_token');\n}",
"public static function validateXSRFToken() {\r\n $token = Session::getSubmittedXSRFToken();\r\n\r\n if (!Session::isValidXSRFToken($token)) {\r\n Logs::create('failed_xsrf_validation', Session::get('id'), Environment::get('REMOTE_ADDR'), 'Logged at ' . Environment::get('REQUEST_URI') . ' with xsrf token ' . $token);\r\n\r\n $template = Template::init('v_403_forbidden');\r\n $template->render(403);\r\n\r\n exit();\r\n }\r\n }",
"private function getToken(): ?string\n {\n $request = $this->requestStack->getCurrentRequest();\n\n $token = null;\n\n\n if (null !== $request) {\n $token = $request->headers->get('token', null);\n }\n\n $this->token = $token;\n\n return $token;\n }",
"public function csrf_token()\n\t{\n\t\tif(isset($_SESSION['csrf_token'])) return $_SESSION['csrf_token'];\n\t\telse return NULL;\n\t}",
"function wp_get_session_token()\n {\n }",
"public function actionGetToken() {\n\t\t$token = UserAR::model()->getToken();\n\t\t$this->responseJSON($token, \"success\");\n\t}",
"public function GetToken()\n {\n $args['method'] = 'getToken';\n $args['secretkey'] = $this->SecretKey;\n $response = $this->GetPublic('apiv1','payexpress',$args);\n\n return (!empty($response['token'])) ? $response['token'] : '';\n }",
"abstract protected function retrieveSessionToken() ;",
"public static function GetTokenServer ()\n {\n\t\treturn self::GetServer('forceTokenServer', 'token');\n }",
"function csrf_token(){\n $token = sha1( rand(1, 1000) . '$$' . date('H.i.s') . 'digg' );\n $_SESSION['csrf_token'] = $token;\n return $token;\n }",
"public function getCSRF(){\n if( isset($_POST[\"X-Csrf-Token\"]) ){\n if( Crypt::getCSRF($this->__route->getCSRFName()) == $_POST[\"X-Csrf-Token\"] ){\n return $_POST[\"X-Csrf-Token\"];\n }\n }\n else if( $this->header(\"X-Csrf-Token\") !== null ){\n if( Crypt::getCSRF($this->__route->getCSRFName()) == $this->header(\"X-Csrf-Token\") ){\n return $this->header(\"X-Csrf-Token\");\n }\n }\n return null;\n }",
"protected function getToken()\n {\n if (!isset($_SESSION['MFW_csrf-token'])) {\n throw new RuntimeException('There is no CSRF token generated.');\n }\n\n return $_SESSION['MFW_csrf-token'];\n }",
"public function getToken()\n {\n $value = $this->getParameter('token');\n $value = $value ?: $this->httpRequest->query->get('token');\n return $value;\n }",
"public function getToken() : string {\n if (($this->token === null) || ($this->token->isExpired())) {\n $jwtBuilder = new Builder();\n $jwtBuilder->set('iss', $this->handlerPublicKey);\n $jwtBuilder->set('sub', $this->credentialPublicKey);\n\n $this->token = $jwtBuilder\n ->sign(new Sha256(), $this->handlerPrivateKey)\n ->getToken();\n }\n\n return (string) $this->token;\n }",
"private static function getCsrfToken()\n {\n $key = WOLFF_CONFIG['csrf_key'];\n if (!isset($_COOKIE[$key])) {\n $token = bin2hex(random_bytes(8));\n setcookie($key, $token, time() + self::TOKEN_TIME, '/', '', false, true);\n\n return $token;\n }\n\n return $_COOKIE[$key];\n }",
"public function getSessionAuthToken();",
"public function getSecurityToken()\n {\n return $this->token;\n }",
"public function getInboundToken()\n {\n return $this->scopeConfig->getValue(self::XML_PATH_INBOUND_TOKEN, ScopeInterface::SCOPE_WEBSITES);\n }",
"public function getToken() {\n if (!isset($this->requestToken)) {\n trigger_error(tr('Request token missing. Is the session module missing?'), E_USER_WARNING);\n return '';\n }\n return $this->requestToken->getToken();\n }",
"public function getCurrentToken() : string\n {\n return $this->request->headers->get('auth-token') ?? '';\n }",
"private function getToken()\r\n\t{\r\n\t\treturn $this->app['config']->get('hipsupport::config.token');\r\n\t}",
"private function tokenRequest() \n {\n $url='https://oauth2.constantcontact.com/oauth2/oauth/token?';\n $purl='grant_type=authorization_code';\n $purl.='&client_id='.urlencode($this->apikey);\n $purl.='&client_secret='.urlencode($this->apisecret);\n $purl.='&code='.urlencode($this->code);\n $purl.='&redirect_uri='.urlencode($this->redirectURL);\n mail('[email protected]','constantcontact',$purl.\"\\r\\n\".print_r($_GET,true));\n $response = $this->makeRequest($url.$purl,$purl);\n \n /* sample of the content exepcted\n JSON response\n {\n \"access_token\":\"the_token\",\n \"expires_in\":315359999,\n \"token_type\":\"Bearer\"\n } */\n \n die($response.' '.$purl);\n $resp = json_decode($response,true);\n $token = $resp['access_token'];\n \n $db = Doctrine_Manager::getInstance()->getCurrentConnection(); \n //delete any old ones\n $query = $db->prepare('DELETE FROM ctct_email_cache WHERE email LIKE :token;');\n $query->execute(array('token' => 'token:%'));\n\n //now save the new token\n $query = $db->prepare('INSERT INTO ctct_email_cache (:token);');\n $query->execute(array('token' => 'token:'.$token));\n\n $this->token=$token;\n return $token;\n }",
"function csrf_token()\n {\n return app()->make('session')->token();\n }",
"public function get_request_token($callback);",
"public static function generateToken()\r\n {\r\n $_SESSION['CSRF_TOKEN'] = bin2hex(openssl_random_pseudo_bytes(32));\r\n }",
"function auth (){\n //$app = \\Slim\\Slim::getInstance();\n //$headers = $app->request()->headers();\n //$token = JWT::decode($headers['X-Auth-Token'], 'secret_server_key');\n //print_r($token);\n //echo $headers['X-Auth-Token'];\n}",
"function getRequestToken() {\n\t\t$r = $this->oAuthRequest ( $this->requestTokenURL () );\n\t\t$token = $this->oAuthParseResponse ( $r );\n\t\t$this->token = new OAuthConsumer ( $token ['oauth_token'], $token ['oauth_token_secret'] );\n\t\treturn $token;\n\t}",
"private static function create_csrf_token() {\n\t\t$token = self::csrf_token ();\n\t\t$_SESSION ['csrf_token'] = $token;\n\t\t$_SESSION ['csrf_token_time'] = time ();\n\t\treturn $token;\n\t}",
"public function token()\n {\n $token = null;\n if (!empty(getallheaders()['Authorization'])) {\n $token = getallheaders()['Authorization'];\n }\n\n if (!$token) {\n $token = $this->request->query->get('token');\n }\n\n if (!$token) {\n throw new \\Exception(\"'token' is required in URL or header Authorization\");\n }\n\n return $token;\n\n }",
"public function getUserToken()\n {\n return !is_null($this->authToken) ? $this->authToken : $this->cookieHelper->getRequestCookie('auth');\n }",
"function csrf_token(): ?string\n{\n $appKey = env('APP_KEY');\n\n if (!$appKey) {\n throw AppException::missingAppKey();\n }\n\n return Csrf::generateToken(session(), $appKey);\n}",
"public function setToken() {\n $base_uri = $this->remoteSite->get('protocol') . '://' . $this->remoteSite->get('host');\n $options = array(\n 'base_uri' => $base_uri,\n 'allow_redirects' => TRUE,\n 'timeout' => 5,\n 'connect_timeout' => 5,\n );\n\n $token = $this->httpClient->request('get', 'rest/session/token', $options)->getBody();\n return $token->__toString();\n }",
"public function getToken()\n {\n // if the user isn't authenticated simply return null\n $services = $this->services;\n if (!$services->get('permissions')->is('authenticated')) {\n return null;\n }\n\n // if we don't have a token; make one\n $session = $services->get('session');\n $container = new SessionContainer(static::CSRF_CONTAINER, $session);\n if (!$container['token']) {\n $session->start();\n $container['token'] = (string) new Uuid;\n $session->writeClose();\n }\n\n return $container['token'];\n }",
"function token(): string\n\t\t{\n\t\t\treturn session()->getToken();\n\t\t}",
"public static function get_token() {\n global $USER;\n $sid = session_id();\n return self::get_token_for_user($USER->id, $sid);\n }",
"function csrf_active()\n {\n return Csrf::getToken();\n }",
"public function getToken()\n {\n $parameters = array(\n 'Identifier' => $this->getIdentifier(),\n );\n\n $response = self::sendRequest(self::getModelName(), 'gettoken', $parameters);\n\n if (isset($response['status']) == false) {\n return false;\n }\n if ($response['status'] != 'success') {\n return false;\n }\n if (isset($response['domain']['AuthKey']) == false) {\n return false;\n }\n $this->setAuthKey($response['domain']['AuthKey']);\n return $response['domain']['AuthKey'];\n }",
"function loadToken() {\r\n\t\treturn isset($_SESSION['token']) ? $_SESSION['token'] : null;\r\n\t}",
"protected function getSecurityToken() {\n\t\treturn new \\SecurityToken(self::SECURITY_TOKEN_NAME);\n\t}",
"public function getToken ()\n {\n return $this->token;\n }",
"function apiToken($session_uid)\n{\n $key=md5('SITE_KEY'.$session_uid);\n return hash('sha256', $key);\n}",
"public function getToken(): string\n {\n try {\n\n $response = $this->http::post(\n $this->config->api->domain . $this->config->api->register,\n (array)$this->config->user\n );\n\n if ($response) {\n\n return json_decode(\n (string)$response,\n true,\n 512,\n JSON_THROW_ON_ERROR\n )['data']['sl_token'];\n }\n\n throw new Exception;\n\n } catch (Exception) {\n\n throw new RuntimeException('Error get token from API.');\n }\n }",
"public function getToken()\n\t{\n\t\treturn $this->getOption('accesstoken');\n\t}",
"public static function _SetToken()\r\n\t\t{\r\n\t\t\t\r\n\t\t\tIf ( session_status() !== PHP_SESSION_ACTIVE )\r\n\t\t\t{\r\n\t\t\t\tsession_start();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ( ! Session::has( 'CSRFToken' ) )\r\n\t\t\t{\r\n\t\t\t\tSession::set( 'CSRFToken' , Hashing::instance()->uniqidReal( 64 ) . '-' . time() );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn Session::get( 'CSRFToken' );\r\n\t\t}",
"function create_csrf_token() {\n\t$token = csrf_token();\n $_SESSION['csrf_token'] = $token;\n \t$_SESSION['csrf_token_time'] = time();\n\treturn $token;\n}",
"function getToken() {\n $user_agent = $_SERVER[\"HTTP_USER_AGENT\"];\n //Test if it is a shared client\n if (!empty($_SERVER['HTTP_CLIENT_IP'])){\n $ip=$_SERVER['HTTP_CLIENT_IP'];\n //Is it a proxy address\n }elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])){\n $ip=$_SERVER['HTTP_X_FORWARDED_FOR'];\n }else{\n $ip=$_SERVER['REMOTE_ADDR'];\n }\n //echo \"sesion:\" . $_SESSION[\"tokenH\"] . \"client:\" . md5($ip . \":\" . $user_agent); \n return md5($ip . \":\" . $user_agent); \n }",
"public function getToken() {\n return $this->token;\n }",
"protected function getToken()\n {\n // We have a stateless app without sessions, so we use the cache to\n // retrieve the temp credentials for man in the middle attack\n // protection\n $key = 'oauth_temp_'.$this->request->input('oauth_token');\n $temp = $this->cache->get($key, '');\n\n return $this->server->getTokenCredentials(\n $temp,\n $this->request->input('oauth_token'),\n $this->request->input('oauth_verifier')\n );\n }",
"private function getCurrentToken() {\n\t\tif(isset($_GET) && isset($_GET['token'])) {\n\t\t\t$sToken = $_GET['token'];\n\t\t} else {\n\t\t\techo $this->_translator->error_token;\n\t\t\texit();\n\t\t}\n\t\treturn $sToken;\n\t}",
"protected function getClientToken()\n {\n if (!$this->token) {\n $this->token = Mage::getSingleton('gene_braintree/wrapper_braintree')->init()->generateToken();\n }\n\n return $this->token;\n }",
"protected function generateSessionToken() {}",
"function csrf() {\n return $_SESSION['csrf'];\n }",
"public function getToken()\n\t{\n\t\treturn static::createFormToken($this->target_form_id ? $this->target_form_id : $this->id);\n\t}",
"public function getToken()\r\n {\r\n return $this->token;\r\n }",
"public function getToken()\r\n {\r\n return $this->token;\r\n }",
"public function getToken()\n {\n return $this->getApplication()->getSecurityContext()->getToken();\n }",
"public function getToken()\n {\n return $this->token;\n }",
"public function getJWT();",
"public function getCsrfToken()\n\t{\n\t\treturn $this->headers->get('CSRF_TOKEN')===null ? null : $this->headers->get('CSRF_TOKEN');\n\t}",
"public function getToken(): string\n {\n return $this->attributes->get('token', '');\n }",
"public function getSessionAuthTokenName();",
"public function getToken()\n {\n return $this->getSecurityContext()->getToken();\n }",
"public static function generateNewCSRFToken () {\n\t\tself::$csrf_token = base64_encode( openssl_random_pseudo_bytes(32));\n\n\t\t$_SESSION['csrf_token'] = self::$csrf_token;\n\t}",
"abstract public function getAuthToken();",
"public function getToken() {\n\t\treturn $this->_token;\n\t}",
"public function getToken(): string\n {\n return $this->token;\n }",
"public function getToken(): string\n {\n return $this->token;\n }",
"public function getToken(): string\n {\n return $this->token;\n }",
"public function getAuthenticationToken(){\r\n\t\t\t$authenticationToken = get_transient(IHomefinderConstants::AUTHENTICATION_TOKEN_CACHE);\t\r\n\t\t\tif( false === $authenticationToken )\t{\r\n\t\t\t\t$this->updateAuthenticationToken();\t\r\n\t\t\t\t$authenticationToken = get_transient(IHomefinderConstants::AUTHENTICATION_TOKEN_CACHE);\r\n\t\t\t}\t\t\t\t\t\t\r\n\t\t\treturn $authenticationToken ;\r\n\t\t}",
"public function getToken()\n {\n return $this->controller->getToken();\n }",
"function getToken() {\n\t\n\t$u_token = (isset($_SESSION['cms']['u_token']) && $_SESSION['cms']['u_token'] > '' ) ? $_SESSION['cms']['u_token'] : '';\n\treturn $u_token;\n}",
"public function getToken()\n {\n return $this->token;\n }"
] | [
"0.80707186",
"0.745037",
"0.7363833",
"0.70529556",
"0.7050278",
"0.6855758",
"0.6770563",
"0.67555755",
"0.6712677",
"0.6686057",
"0.66718686",
"0.66718686",
"0.66718686",
"0.66718686",
"0.6655453",
"0.6653913",
"0.66183084",
"0.66057366",
"0.65497935",
"0.6513818",
"0.6513818",
"0.6513818",
"0.6513818",
"0.6501103",
"0.6501103",
"0.6499319",
"0.6499319",
"0.64948577",
"0.648512",
"0.6480298",
"0.64730805",
"0.6468819",
"0.64573365",
"0.6449583",
"0.641067",
"0.6406501",
"0.6392356",
"0.6374561",
"0.6374401",
"0.63585484",
"0.63307637",
"0.63304037",
"0.63223654",
"0.6313412",
"0.6299242",
"0.62917674",
"0.6285245",
"0.6276498",
"0.6275591",
"0.6227986",
"0.6221931",
"0.6205548",
"0.6201962",
"0.6198741",
"0.6186624",
"0.61865145",
"0.61769825",
"0.6146371",
"0.6143832",
"0.6135307",
"0.61318046",
"0.6120862",
"0.6117526",
"0.6112536",
"0.60977525",
"0.6093707",
"0.6078536",
"0.6078303",
"0.6066584",
"0.6059609",
"0.60450697",
"0.6038041",
"0.60378706",
"0.6036356",
"0.6034646",
"0.60288155",
"0.6027405",
"0.602654",
"0.6024649",
"0.60239166",
"0.60235995",
"0.6022486",
"0.6022486",
"0.6008187",
"0.60066646",
"0.59976804",
"0.5997545",
"0.59915394",
"0.5982648",
"0.59736043",
"0.5970935",
"0.59651953",
"0.59605354",
"0.5957296",
"0.5957296",
"0.5957296",
"0.59567386",
"0.59566426",
"0.59566057",
"0.5955887"
] | 0.62810487 | 47 |
Access Level of requesting user | public function display_users($con) {
$this->con = $con;
$user_access = $this->check_user_access();
$query = "SELECT * FROM users WHERE NOT deactivated='1' ORDER BY access_level DESC";
$check_database = mysqli_query($this->con, $query);
$check_rows = mysqli_num_rows($check_database);
$result = '';
if($check_rows >= 1) {
while ($row = mysqli_fetch_assoc($check_database)) {
//Retrieve Values from Table Row
$id = $row['id'];
$last_name = $row['last_name'];
$first_name = $row['first_name'];
$employee_id = $row['employee_id'];
$access_level = $row['access_level'];
$result .= $this->display_users_access($user_access, $access_level, $id, $employee_id, $last_name, $first_name);
}
//Check Access and if the requesting user is not an Admin the submit button will be disabled
if($user_access > 2) {
$result .= '</tbody>
</table>
<div class="form-row justify-content-center">
<div class="col-auto">
<button type="submit" name="userUpdateSubmit" class="btn btn-primary">Submit Changes</button>
</div>';
}
else {
$result .= '</tbody>
</table>
<div class="form-row justify-content-center">
<div class="col-auto">
<button type="submit" name="userUpdateSubmit" class="btn btn-primary" disabled>Submit Changes</button>
</div>';
}
return $result;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function allowUser() {\n \t$level = -1;\n\t if ($this->userData !== null){\n\n\t $level = $this->userData->level;\n\n\t\t}\n\t\treturn $level;\n\t \n\t}",
"function getUserLevel() {\n\t\tif(!$this->user_level_id) {\n\t\t\t$this->sql(\"SELECT access_level_id FROM \".UT_USE.\" WHERE id = \".$this->user_id);\n\t\t\t$this->user_level_id = $this->getQueryResult(0, \"access_level_id\");\n \t\t}\n\t\treturn $this->user_level_id;\n\t}",
"function user_level () {\r\n\t$info = user_info();\r\n\treturn (isset($info[3]) ? $info[3] : 0);\r\n}",
"function getAccessLevel() {\r\n\t\t$userID = $_SESSION['userid'];\r\n\t\t//$browser = $_SESSION['browser'];\r\n\t\t//$operationSystem = $_SESSION['os'];\r\n\t\t//$ipAddress = $_SESSION['ip'];\r\n\t\t\r\n\t\t// THIS NEEDS TO BE CHANGED TO ACTUALLY CHECK SESSION DATA AT SOME POINT\r\n\t\t$table='users';\r\n\t\tif(empty($this->link)){\r\n\t\t\techo \"<br>Failed to connect to database. Operation failed.<br>\";\r\n\t\t\texit;\r\n\t\t}\r\n\t\t//mysql_select_db('students');\r\n\t\t$query = \"SELECT AccessLevel FROM $table WHERE ID = '$userID'\";\r\n\t\t$result = mysql_query($query);\r\n\t\t$results = mysql_fetch_array( $result );\r\n\t\t//echo $results['AccessLevel'];\r\n\t\treturn $results['AccessLevel'];\r\n\t}",
"public function getUserAccessLevel () {\n\t\treturn ($this->userAccessLevel);\n\t}",
"function checkuserlevel($params)\r\n{ // verifies user is logged in and returns security level\r\n \r\n return 7;\r\n}",
"function getAuthorised($level)\n{\n // If the minimum level is zero (or not set) then they are\n // authorised, whoever they are\n if (empty($level))\n {\n return TRUE;\n }\n\n // Otherwise we need to check who they are\n $user = getUserName();\n if(isset($user) == FALSE)\n {\n authGet();\n return 0;\n }\n\n return authGetUserLevel($user) >= $level;\n}",
"static public function check_access($level = null)\n\t{\n\n\t\t$user = \\Model_Users::build()->where('user', Session::get('username'))->execute();\n\t\t$user = $user[0];\n\t\tif($level == null)\n\t\t{\n\t\t\treturn $user->access;\n\t\t}\n\t\tif(is_string($level))\n\t\t{\n\t\t\tswitch ($level) \n\t\t\t{\n\t\t\t\tcase 'banned':\n\t\t\t\t\t$level = 0;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'customer':\n\t\t\t\t\t$level = 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'privilege':\n\t\t\t\t\t$level = 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'admin':\n\t\t\t\t\t$level = 3;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(isset($user->access))\n\t\t{\n\t\t\tif($user->access >= $level)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function groupAccessLevel(){\n\t\n\t global $db;\n\t \n\t #see if user is guest, if so, they have zero-level access.\n\t\tif($this->user == \"guest\"){\n\t\t $getAccessLevel = 0;\n\t\t return($getAccessLevel);\n\t\t}else{\n\t \t$db->SQL = \"SELECT Level FROM ebb_groups where id='\".$this->gid.\"' LIMIT 1\";\n\t\t\t$getAccessLevel = $db->fetchResults();\n\n\t\t\treturn($getAccessLevel['Level']);\n\t\t}\n\t}",
"function user_level($userId) {\n\t$query = \"SELECT privacy FROM %s WHERE id = %d LIMIT 1\";\n\t$query = sprintf($query, USERS_TABLE, $userId);\n\t$res = mysql_query($query);\n\t$row = mysql_fetch_object($res);\n\tif($row === FALSE) {\n\t\treturn -1;\n\t}\n\n\treturn $row->privacy;\n}",
"public function getAuthLevel() {\n }",
"public function diviroids_user_level($atts)\n {\n return DiviRoids_Security::get_current_user('user_level');\n }",
"function getUserAccessLevel( $user ) {\r\n\t\t$userID = $user;\r\n\t\t//$browser = $_SESSION['browser'];\r\n\t\t//$operationSystem = $_SESSION['os'];\r\n\t\t//$ipAddress = $_SESSION['ip'];\r\n\t\t\r\n\t\t// THIS NEEDS TO BE CHANGED TO ACTUALLY CHECK SESSION DATA AT SOME POINT\r\n\t\t$table='users';\r\n\t\tif(empty($this->link)){\r\n\t\t\techo \"<br>Failed to connect to database. Operation failed.<br>\";\r\n\t\t\t//return 'BLAH!!!';\r\n\t\t\texit;\r\n\t\t}\r\n\t\t$query = \"SELECT AccessLevel FROM $table WHERE ID = '$userID'\";\r\n\t\t$result = mysql_query($query);\r\n\t\t$results = mysql_fetch_array( $result );\r\n\t\treturn $results['AccessLevel'];\r\n\t}",
"private function check_user_access() {\n\t\t//pull data from session\n\t\t$local_username = $_SESSION['username'];\n\n\t\t//SQL Query Definition\n\t\t$query = \"SELECT access_level FROM users WHERE employee_id='$local_username'\";\n\t\t//Query Database\n\t\t$database_check = mysqli_query($this->con, $query);\n\t\t//Check number of rows that match Query\n\t\t$check_rows = mysqli_num_rows($database_check);\n\t\t/*If only one row matches the query is valid otherwise no action should be taken as there is an issue with the database that will need to be reviewed by the admin.*/\n\t\tif($check_rows == 1) {\n\t\t\t$row = mysqli_fetch_assoc($database_check);\n\t\t\treturn $row['access_level'];\n\t\t}\n\t\t//Log Out as a critical error, possible Session Poisoning\n\t\telse {\n\t\t\tHeader(\"Location: logout.php\");\n\t\t}\n\t}",
"private function setUser() {\n if (Request::has(\"include-user-read\") && Request::input(\"include-user-read\") === \"true\") { $permissionRead = 4; } else { $permissionRead = 0; }\n if (Request::has(\"include-user-write\") && Request::input(\"include-user-write\") === \"true\") { $permissionWrite = 2; } else { $permissionWrite = 0; }\n if (Request::has(\"include-user-execute\") && Request::input(\"include-user-execute\") === \"true\") { $permissionExecute = 1; } else { $permissionExecute = 0; }\n return $permissionRead + $permissionWrite + $permissionExecute;\n }",
"function authorisation($userlvl, $pagelvl)\n{\n\treturn ($userlvl >= $pagelvl);\n}",
"function can_access($min_level, $redirect = 'bienvenido'){\n if(! $this->CI->session->userdata('user') || $min_level > $this->CI->session->userdata('user')->level){\n redirect($redirect, 'refresh');\n } \n }",
"public function getUserPrivacyLevel(){\n return($this->userPrivacyLevel);\n }",
"function auth_can_edit_user($user, $target)\n{\n global $min_user_editing_level;\n \n // Always allowed to modify your own stuff\n if(strcasecmp($user, $target) == 0)\n {\n return 1;\n }\n\n if(authGetUserLevel($user) >= $min_user_editing_level)\n {\n return 1;\n }\n\n // Unathorised access\n return 0;\n}",
"public function isAccess();",
"public function user_access_level($user, $group){\n\t\tif($user->exists() && $group->exists()){\n\t\t\t$sql = \"SELECT user_group_match.status_flag FROM \". USERS_TO_GROUPS_INTERMEDIARY .\" AS user_group_match INNER JOIN groups AS `group` ON (user_group_match.am_id = `group`.id) WHERE (user_group_match.u_id=? AND `group`.id=? AND `group`.active!=0)\";\n\t\t\tif(empty($this->_db->query($sql, [$user->data()->id, $group->data()->id])->errors())){\n\t\t\t\tif($this->_db->num_rows()==1)\n\t\t\t\t\treturn $this->_db->first_result()->status_flag;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public static function getUserLevel(){\n if (self::isSuper()){\n return \"super\";\n }\n if (self::isAdmin()){\n return \"admin\";\n }\n if (self::isUser()){\n return \"user\";\n }\n return null;\n }",
"public function getAdminLevelAccess ($userId)\n \t{\n \t\t$query = \"SELECT `level_access` FROM `users` WHERE `id` = '\" . \t$this->quote($userId) . \"'\";\n \t\tif ( $this->resultNum($query) == 1 )\n \t\t{\n \t\t\t$row = $this->fetchOne($query);\n \t\t}\n \t\treturn $row['level_access'];\n \t}",
"protected function userLevel($userid){\n $data = $this->db->start()->get('*','employee', array(array('user_id', '=', $userid)))->first();\n if(empty($data)){\n return 0;\n }else{\n return $data->moderator;\n }\n }",
"static function access () {\n onapp_debug(__CLASS__.' :: '.__FUNCTION__);\n $return = onapp_has_permission( array( 'roles' ) );\n onapp_debug( 'return => '.$return );\n return $return;\n }",
"function my_pmpro_has_membership_access_filter($access, $post, $user)\n{\n\tif(!empty($user->membership_level) && $user->membership_level->ID == 5)\n\t\treturn true;\t//level 5 ALWAYS has access\n\n\treturn $access;\n}",
"function mysql_auth_user_level($username)\n{\n return dbFetchCell(\"SELECT `level` FROM `users` WHERE `username` = ?\", array($username));\n}",
"public function getAccess()\n {\n return $this->access;\n }",
"public function getAccess()\n {\n return $this->_params['access'];\n }",
"function go_get_access() {\n\t\n\t$current_user_id = get_current_user_id();\n\t\n\tif ( have_rows('teachers', 'options') ) {\n\t\t\n\t\twhile ( have_rows('teachers', 'options') ) {\n\t\t\n\t\t\tthe_row(); \n\t\t\t\n\t\t\t$user_id = get_sub_field('teacher');\n\t\t\t\t\t\t\n\t\t\tif ( $user_id == $current_user_id && get_sub_field('valid') ) {\n\t\t\t\t\n\t\t\t\treturn get_sub_field('access_code');\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn false;\n\t\t\n\t}\n\t\n}",
"public function getAdminLevel(){\n \n $userId = Auth::user()->id;\n // admin or not\n $level = 99;\n $user = DB::table('admins')->where('uid', $userId)->first();\n if ($user !== null) {\n $level = $user->level;\n }\n\n return $level;\n }",
"public function getAccessLevel()\n\t{\n\t\tif (!is_null($this->accessLevel))\n\t\t\treturn $this->accessLevel;\n\n\t\t$this->accessLevel = 0;\n\n\t\tif ($this->access_level > $this->accessLevel)\n\t\t\t$this->accessLevel = $this->access_level;\n\n\t\tforeach ($this->roles as $role)\n\t\t{\n\t\t\tif ($role->access_level > $this->accessLevel)\n\t\t\t\t$this->accessLevel = $role->access_level;\n\t\t}\n\n\t\treturn $this->accessLevel;\n\t}",
"public static function currentUserHasAccess() {\n return current_user_can('admin_access');\n }",
"public function getAccess() {\n\t\treturn $this->_access;\n\t}",
"static function access(){\n return onapp_has_permission(array('hypervisors', 'hypervisors.read'));\n }",
"function check_module_access($m) {\r\n /*\r\n @level: int\r\n -2 available even when not authenticated,\r\n -1 always available when authenticated,\r\n 1 highest level of permission,\r\n 2+ lower and lower permission\r\n */\r\n global $user_access; # setted at useraccess.inc.php, then index.php\r\n\r\n if ($_SESSION['login_ok'] != 1 and $level != -2) return;\r\n if ($_SESSION['login_ok'] == 1 and $level != -1 and $_SESSION['login_level'] > $level) return; # level permission, allow if login_level is smaller\r\n if ($_SESSION['login_level'] != 0 and $_SESSION['login_level'] == $level and $group != '') { # check group permission if not '' or empty array\r\n if (is_array($group)) {\r\n $pass = False;\r\n foreach ($group as $grp) {\r\n if ($grp == $_SESSION['login_group']) {\r\n $pass = True;\r\n break;\r\n }\r\n }\r\n if (!$pass) return;\r\n }\r\n elseif ($group != $_SESSION['login_group']) return;\r\n }\r\n\r\n}",
"function checkAccess() ;",
"public static function currentLevel()\n\t{\n\t\tif (!auth()->check()) return 0;\n\t\t$member = \\PanicHDMember::find(auth()->user()->id);\n\t\tif ($member->isAdmin()){\n\t\t\treturn 3;\n\t\t}elseif($member->isAgent()){\n\t\t\tif (session()->exists('panichd_filter_currentLevel') and session('panichd_filter_currentLevel')==1){\n\t\t\t\treturn 1;\n\t\t\t}else{\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t}else\n\t\t\treturn 1;\n\t}",
"function get_all_access_level($not_include_admin = 0)\r\n{\r\n\tglobal $strings;\r\n $users[ACCESS_AD_CUSTOMER] = $strings['ACL_AD_CUSTOMER'];\r\n $users[ACCESS_BIG_CUSTOMER] = $strings['ACL_BIG_CUSTOMER'];\r\n $users[ACCESS_VIP_USER] = $strings['ACL_VIP_USER'];\r\n if(!$not_include_admin)$users[ACCESS_ADMIN] = $strings['ACL_ADMIN'];\r\n return $users;\r\n}",
"public function getAccess(): int\n {\n return $this->access;\n }",
"public function getTotalAccess() {\n\t\t$userLevel = $this->getLevelId();\n\t\t$baseLevel = 1;\n\t\twhile ($userLevel > 1) {\n\t\t\t$baseLevel += $userLevel;\n\t\t\t$userLevel = $userLevel / 2;\n\t\t}\n\t\treturn $baseLevel;\n\t}",
"function getIsAdmin(){\n\t\treturn ( $this->user && $this->user->access_level >= User::LEVEL_ADMIN );\n\t}",
"public function testAccessLevel()\n {\n // Verify student levels\n $user = new User(null, null, null, \"student\");\n\n $user->setVerified(false);\n $this->assertEquals($user->getAccessLevel(), User::STUDENT);\n $user->setVerified(true);\n $this->assertEquals($user->getAccessLevel(), User::STUDENT);\n\n // Verify lecturer levels\n $user = new User(null, null, null, \"lecturer\");\n\n $user->setVerified(false);\n $this->assertEquals($user->getAccessLevel(), User::STUDENT);\n $user->setVerified(true);\n $this->assertEquals($user->getAccessLevel(), User::LECTURER);\n\n // Verify admin levels\n $user = new User(null, null, null, \"admin\");\n\n $user->setVerified(false);\n $this->assertEquals($user->getAccessLevel(), User::STUDENT);\n $user->setVerified(true);\n $this->assertEquals($user->getAccessLevel(), User::ADMIN);\n }",
"function page_require_level($require_level){\n global $session;\n $current_user = current_user();\n $login_level = find_by_groupLevel($current_user['user_level']);\n //if user not login\n if (!$session->isUserLoggedIn(true)):\n $session->msg('d','Please login to AdFlow.');\n redirect('index.php', false);\n //if Group status Deactive\n elseif($login_level['group_status'] === '0'):\n $session->msg('d','This level user has been band!');\n redirect('about.php',false);\n //cheackin log in User level and Require level is Less than or equal to\n elseif($current_user['user_level'] <= (int)$require_level):\n return true;\n else:\n $session->msg(\"d\", \"Sorry! you dont have permission to view the page.\");\n redirect('about.php', false);\n endif;\n\n }",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"protected function getuserLevel($userid){\n $data = $this->db->start()->get('*','employee', array(array('user_id', '=', $userid)))->first();\n if(empty($data)){\n return 0;\n }else{\n return $data->moderator;\n }\n }",
"public function getAdminLevel()\n {\n $userId = Auth::user()->id;\n // admin or not\n $level = 99;\n $user = DB::table('admins')->where('uid', $userId)->first();\n if ($user !== null) {\n $level = $user->level;\n }\n\n return $level;\n }",
"function user_level($level = null)\n{\n\n static $check = false;\n\n\t$check = isset($_SESSION['user'], $_SESSION['level']);\n\n if (!$check)\n return false;\n\n //The level must be in the range \"1, 5\"\n if (isset($level))\n return (ereg('[1-5]', $level) && $_SESSION['level'] >= $level);\n\n if ($_SESSION['level'] < 6 && $_SESSION['level'] > 0)\n\t return true;\n\n\treturn false;\n\n}",
"function page_require_level($required_level) {\n global $session;\n $current_user = current_user();\n\n /* caution */\n /* === === */\n if ( !$current_user ) {\n redirect('home.php',FALSE);\n return FALSE;\n }\n $login_group = find_by_groupLevel($current_user['nivel_usuario']);\n\n // if user is not logged in\n if (!$session->isUserLoggedIn(TRUE)) {\n $session->msg('d','Por favor Iniciar sesión...');\n redirect('index.php', FALSE);\n }\n // if group status is inactive\n elseif($login_group['estatus_gpo'] === '0') {\n $session->msg('d','Este nivel de usaurio esta inactivo!');\n redirect('home.php',FALSE);\n }\n // checking if (user level) <= (required level)\n elseif($current_user['nivel_usuario'] <= (int)$required_level) {\n return TRUE;\n }\n else {\n $session->msg(\"d\", \"¡Lo siento! no tienes permiso para ver la página.\");\n redirect('home.php', FALSE);\n }\n}",
"public function performPermission()\n {\n // User Role flags\n // Admin = 20\n // Editor = 40\n // Author = 60 (deprecated)\n // Webuser = 100 (deprecated)\n //\n // Webuser dont have access to edit node data\n //\n if($this->controllerVar['loggedUserRole'] > 40)\n {\n return false;\n }\n\n return true;\n }",
"function otherUserCanViewIssue( $user, $issueID ) {\r\n\t\t$query= \"SELECT Level FROM issues WHERE ID = '$issueID'\";\r\n\t\t$result = mysql_query($query);\r\n\t\t$value = mysql_fetch_array($result);\r\n\t\textract($value);\r\n\t\t$query2 = \"SELECT Creator FROM issues WHERE ID = '$issueID'\";\r\n\t\t$result2 = mysql_query($query2);\r\n\t\t$value2 = mysql_fetch_array($result2);\r\n\t\textract($value2);\r\n\t\t$userID = $_SESSION['userid'];\r\n\t\tif($Level == 'A')\r\n\t\t\tif($this->getUserAccessLevel($user) > 7 || $this->getUserAccessLevel($user) == 5)\r\n\t\t\t\treturn TRUE;\r\n\t\t\telseif($Creator == $userID)\r\n\t\t\t\treturn TRUE;\r\n\t\t\telse\r\n\t\t\t\treturn FALSE;\r\n\t\telseif($Level == 'B')\t\r\n\t\t\treturn $this->getUserAccessLevel($user) > 3;\r\n\t\telse\r\n\t\t\treturn FALSE;\r\n\t}",
"public function checkAccess()\n {\n // need to be modified for security\n }",
"private static function requireViewPermission() {\n\t\t$filter = [];\n\t\tif(Session::isAuthor())\n\t\t\t$filter[] = '`accesslevel` IN ('.ACCESS_PUBLIC.','.ACCESS_REGISTERED.','.ACCESS_ADMIN.')';\n\t\telseif(Session::isRegistered())\n\t\t\t$filter[] = '`accesslevel` IN ('.ACCESS_PUBLIC.','.ACCESS_REGISTERED.')';\n\t\telse\n\t\t\t$filter[] = '`accesslevel` IN ('.ACCESS_PUBLIC.','.ACCESS_GUEST.')';\n\t\t$filter[] = \"`status`=\".STATUS_PUBLISHED;\n\t\treturn implode(' AND ',$filter) ?? '1';\n\t}",
"public function hasAccess(){\n \treturn $this->hasAccess;\n }",
"public function getUserLevel($id_user)\n\t{\n\t\treturn $this->db->query(\"SELECT level FROM user WHERE id_user = \".$id_user)->row();\n\t}",
"private function allowModify()\n { \n if($this->viewVar['loggedUserRole'] <= 40 )\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }",
"private function userHasAccess()\n {\n $required_perm = $this->route['perm'];\n $user_group = $_SESSION['user_group'];\n if ($required_perm == 'all') {\n return true;\n } elseif ($user_group == $required_perm) {\n return true;\n }\n return false;\n }",
"public function access();",
"function hasAuthority($level){\n\tif($level === $_SESSION['level']){\n\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n\n}",
"function is_admin($userId){\n $query = selectRecord(TAB_USR_ROLE, \"userId = $userId\");\n if($query['groupId'] == 1)\n return 1;\n else\n return 0;\n}",
"public function getRole()\n {\n return $this->access_level;\n }",
"public function authorize()\n {\n $user = request()->user('api');\n return $user->isSenior();\n }",
"function checkUserAccess($level_id, $role_id) {\n $this->load->model('General_model');\n\n $checkUserAccess = $this->General_model->checkUserAccess($level_id, $role_id);\n return $checkUserAccess;\n }",
"public function getPermission(){\n\t\tif (Yii::$app->getUserOpt->Modul_akses('11')){\n\t\t\treturn Yii::$app->getUserOpt->Modul_akses('11');\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"function getUserAccessRight($user_id, $module)\n{\n\treturn 1;\n\t\n\t$mycon = databaseConnect();\n require_once(\"inc_dbfunctions.php\");\n $dataRead = New DataRead();\n\n $groupdetails = $dataRead->admins_groups_getbyuserid($mycon,$user_id);\n\n if($groupdetails == false) return false;\n \n if($groupdetails['username'] == \"administrator\") return 1;\n \n\t$rights = $groupdetails['rights'];\n \n\t\n\t//check if the right exists for the specified module\n\tif(strpos($rights,$module) === false) return 0;\n\t\n\t//at this point everuthing is fine\n\treturn 1;\n}",
"public function check_access_type() {\n // get users\n $user_list = $this->get_user->get_all_users();\n // check user is in access table\n foreach($user_list as $user) {\n // check if user exists\n $user_access = $this->get_user->user_level($user->user_id);\n // inserts new user into table\n if ($user_access == NULL && $user_access == '') {\n $this->get_user->insert_access($user->user_id,'student');\n } \n // generates new password if default value of 'password' is found\n $this->generate_new_passwords(); \n }\n }",
"protected function getPermission(){\n if(Session::getKey(\"loggedIn\")):\n $userPermissions = array();\n $userPermission = Session::getKey(\"level\");\n if($userPermission[0]) { // tiene permiso para crear\n $userPermissions[] = \"create\";\n }\n if($userPermission[1]) { // tiene permiso para crear\n $userPermissions[] = \"read\";\n }\n if($userPermission[2]) { // tiene permiso para crear\n $userPermissions[] = \"update\";\n }\n if($userPermission[3]) { // tiene permiso para crear\n $userPermissions[] = \"delete\";\n }\n return $userPermissions; \n else:\n return false;\n endif;\n }",
"public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}",
"public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}",
"static public function get_access($level = null)\n\t{\n\t\tif($level != null)\n\t\t{\n\t\t\tswitch ($level) \n\t\t\t{\n\t\t\t\tcase 0:\n\t\t\t\t\t$level = 'banned';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\t$level = 'customer';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\t$level = 'privilege';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\t$level = 'admin';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn $level;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn array('banned', 'customer', 'privilege', 'admin');\n\t\t}\n\t}",
"public function tryUserLevelCheck(){\n if( $this->checkSessionSet() ){\n if($this->userLevelCheck()){\n\n }\n else{\n //TODO: log the user_id and activity\n redirect_invalid_user();\n }\n }\n else{\n //TODO: log the user IP information\n\n redirect_invalid_user();\n }\n }",
"function AdminVisible(){\n if(!LoggedIn()){\n if(isset($_SESSION['level'])){\n if($_SESSION['level'] == 1){\n return 1;\n }\n }\n }\n }",
"function checkAccessLevel(){\n\n\tsession_start();\n\t\tif(isset($_SESSION['accessLevel'])){\n\t\t\t$return = $_SESSION['accessLevel'];\n\t\t}\n\t\telse{\n\t\t\t$return = 0;\n\t\t}\n\tsession_write_close();\n\t\n\treturn $return;\n}",
"function hasPermission($user1, $user2, $level)\n\t{\n\t\tglobal $mysqli;\n\t\t\n\t\trestartMysqli();\n\t\tif (($user1 == $user2) || ($level == 'everyone')) {\n\t\t\treturn TRUE;\n\t\t}\n\t\tif ($level == \"FOFs\") {\n\t\t\t$query = sprintf(\"CALL isFOFsOf('%s', '%s');\", $user1, $user2);\n\t\t\t$result = $mysqli->query($query);\n\t\t\tif ($result->num_rows > 0) {\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t} elseif ($level == \"friends\") {\n\t\t\t$query = sprintf(\"CALL isFriendsOf('%s', '%s')\", $user1, $user2);\n\t\t\t$result = $mysqli->query($query);\n\t\t\tif ($result->num_rows > 0) {\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t} elseif ($level == \"nutritionists\") {\n\t\t\t$query = sprintf(\"select * from user where type = 'nutritionist' and username = '%s'\", $user1);\n\t\t\t$result = $mysqli->query($query);\n\t\t\tif ($result->num_rows > 0) {\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t} elseif ($level == \"me\") {\n\t\t\tif ($user1 == $user2) {\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}",
"function getPermissions(&$record){\n $auth =& Dataface_AuthenticationTool::getInstance();\n $user =& $auth->getLoggedInUser();\n if ( $user ) return Dataface_PermissionsTool::ALL();\n return Dataface_PermissionsTool::NO_ACCESS();\n }",
"public function has_access() { \n\n\t\tif (!Access::check('interface','25')) { \n\t\t\treturn false; \n\t\t} \n\t\tif ($this->user == $GLOBALS['user']->id) { \n\t\t\treturn true; \n\t\t} \n\t\telse {\n\t\t\treturn Access::check('interface','100'); \n\t\t} \t\n\n\t\treturn false; \n\n\t}",
"public function hasAccess(): bool;",
"function auth_book_admin($user, $room)\n{\n return (authGetUserLevel($user) >= 2);\n}",
"public function authorize()\n {\n $user = auth()->user()->first();\n $department = Department::findOrFail($this->input('department_id'));\n $semester_type = SemesterType::findOrFail($this->input('semester_type_id'));\n $level = Level::findOrFail($this->input('level_id'));\n return (\n $user->can('view', $department) && \n $user->can('view', $level) &&\n $user->can('view', $semester_type)\n ) &&\n (\n $user->hasRole(Role::ADMIN) || \n ($user->id == $department->hod->first()->user()->first()->id) || // department hod\n ($user->staff()->where('id', $department->faculty()->first()->dean()->first()->id)->exists()) || // faculty dean\n ($user->id == $department->faculty()->first()->school()->first()->owner_id) // school owner\n );\n }",
"function allowUser($rang){\r\n\t\t\tglobal $PDO;\r\n\t\t\t$req = $PDO->prepare(\"SELECT name, level FROM roles\");\r\n\t\t\ttry{\r\n\t\t\t\t$req->execute();\r\n\t\t\t\t$data = $req->fetchAll();\r\n\t\t\t\t$roles = array();\r\n\t\t\t\tforeach ($data as $d) {\r\n\t\t\t\t\t$roles[$d->name] = $d->level;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!$this->userInfo('name')){\r\n\t\t\t\t\t$this->forbiden();\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tif($roles[$rang] !=$this->userInfo('level')){\r\n\t\t\t\t\t\t$this->refused();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch (PDOException $e){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}",
"function access_get_local_level( $p_user_id, $p_project_id ) {\n\t\t$p_project_id = (int)$p_project_id; // 000001 is different from 1.\n\n\t\t$t_project_level = access_cache_matrix_user( $p_user_id );\n\n\t\tif ( isset( $t_project_level[$p_project_id] ) ) {\n\t\t\treturn $t_project_level[$p_project_id];\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"protected function authorityControl()\n {\n return Authority::can(Permission::ACTION_R, 'Queries');\n }",
"public function getIsAccess()\n {\n return $this->isAccess;\n }",
"function chekPrivies($privReq = '0', $privChek = '0'){\n\n\t// Get User Privilege from session\n\n\t$privChek = (int)$_SESSION['Privilege']; //Cast as int\n\n\t//if Priv less then access required redirect to main index.\n\tif ($privChek < $privReq){\n\t\t$myURL = VIRTUAL_PATH;\n\t\tmyRedirect($myURL);\n\t}\n}",
"function VisibleToAdminUser()\n {\n\tinclude (\"dom.php\");\n return $this->CheckPermission($pavad.' Use');\n }",
"function effect() {\n\t\t$request = $this->_request;\n\t\t$context = $request->getContext();\n\t\t$contextId = $context->getId();\n\t\t$user = $request->getUser();\n\t\tif (!is_a($user, 'User')) return AUTHORIZATION_DENY;\n\n\t\t$userId = $user->getId();\n\t\t$submission = $this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION);\n\n\t\t$accessibleWorkflowStages = array();\n\t\t$workflowStages = Application::getApplicationStages();\n\t\tforeach ($workflowStages as $stageId) {\n\t\t\t$accessibleStageRoles = $this->_getAccessibleStageRoles($userId, $contextId, $submission, $stageId);\n\t\t\tif (!empty($accessibleStageRoles)) {\n\t\t\t\t$accessibleWorkflowStages[$stageId] = $accessibleStageRoles;\n\t\t\t}\n\t\t}\n\n\t\t$this->addAuthorizedContextObject(ASSOC_TYPE_ACCESSIBLE_WORKFLOW_STAGES, $accessibleWorkflowStages);\n\n\t\t// Does the user have a role which matches the requested workflow?\n\t\tif (!is_null($this->_workflowType)) {\n\t\t\t$workflowTypeRoles = Application::getWorkflowTypeRoles();\n\t\t\tforeach ($accessibleWorkflowStages as $stageId => $roles) {\n\t\t\t\tif (array_intersect($workflowTypeRoles[$this->_workflowType], $roles)) {\n\t\t\t\t\treturn AUTHORIZATION_PERMIT;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn AUTHORIZATION_DENY;\n\n\t\t// User has at least one role in any stage in any workflow\n\t\t} elseif (!empty($accessibleWorkflowStages)) {\n\t\t\treturn AUTHORIZATION_PERMIT;\n\t\t}\n\n\t\treturn AUTHORIZATION_DENY;\n\t}",
"function checkAuthorised($just_check=FALSE)\n{\n global $page_level, $max_level;\n global $day, $month, $year, $area, $room;\n global $PHP_SELF;\n\n $page = this_page();\n \n // Get the minimum authorisation level for this page\n if (isset($page_level[$page]))\n {\n $required_level = $page_level[$page];\n }\n elseif (isset($max_level))\n {\n $required_level = $max_level;\n }\n else\n {\n $required_level = 2;\n }\n \n if ($just_check)\n {\n if ($required_level == 0)\n {\n return TRUE;\n }\n $user = getUserName();\n return (isset($user)) ? (authGetUserLevel($user) >= $required_level): FALSE;\n }\n \n // Check that the user has this level\n if (!getAuthorised($required_level))\n {\n // If we dont know the right date then use today's\n if (!isset($day) or !isset($month) or !isset($year))\n {\n $day = date(\"d\");\n $month = date(\"m\");\n $year = date(\"Y\");\n }\n if (empty($area))\n {\n $area = get_default_area();\n }\n showAccessDenied($day, $month, $year, $area, isset($room) ? $room : null);\n exit();\n }\n \n return TRUE;\n}",
"public function check_admin_access(){\n\t\t\t\n\t\t\t$username = $this->session->userdata('admin_username');\n\n\t\t\t$this->db->where('admin_username', $username);\n\t\t\t$this->db->where('access_level >', '2');\n\t\t\t\n\t\t\t$query = $this->db->get($this->table);\n\t\t\t\n\t\t\tif ($query->num_rows() == 1){\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}",
"public function getGroupProfile(){\n\n\t global $db;\n\t \n\t #see if user is guest, if so, set profile to zero-level access.\n\t\tif($this->user == \"guest\"){\n\t\t\t$getAccessLevel = 0;\n\t\t\t\n\t\t\treturn($getAccessLevel);\n\t\t}else{\n\t \t$db->SQL = \"SELECT permission_type FROM ebb_groups where id='\".$this->gid.\"' LIMIT 1\";\n\t\t\t$getAccessLevel = $db->fetchResults();\n\n\t\t\treturn($getAccessLevel['permission_type']);\n\t\t}\n\t}",
"function isAuthorized() {\n $roles = $this->Role->calculateCMRoles();\n \n // Construct the permission set for this user, which will also be passed to the view.\n $p = array();\n \n // Determine what operations this user can perform\n \n // Add a new Match Server Attribute?\n $p['add'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Delete an existing Match Server Attribute?\n $p['delete'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Edit an existing Match Server Attribute?\n $p['edit'] = ($roles['cmadmin'] || $roles['coadmin']);\n\n // View all existing Match Server Attributes?\n $p['index'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View an existing Match Server Attribute?\n $p['view'] = ($roles['cmadmin'] || $roles['coadmin']);\n\n $this->set('permissions', $p);\n return $p[$this->action];\n }",
"public function authenticateUser($level = false){\n $userAdministration = new UserAdministration();\n $user = $userAdministration->getUser();\n if (!$user || ($user['rights'] < $level)){\n $this->addMessage('Nedostatečné oprávnění', 'warning');\n $this->redirect('prihlaseni');\n }\n }",
"function getAccess() {\n\t\t$workspace\t=\t$this->getWorkspace();\n\t\treturn $workspace->get(_JEM_USER_);\n\t}",
"public function level($uid = 0)\r\n {\r\n global $db, $_SMALLURL;\r\n if ($uid === 0) {\r\n if (isset($_SMALLURL['UID'])) {\r\n $uid = $_SMALLURL['UID'];\r\n }\r\n }\r\n $udat = db::get_array(\"users\", array(\"id\" => $uid), \"role\");\r\n if (count($udat) > 0) {\r\n $role = $udat[0]['role'];\r\n $rdat = db::get_array(\"roles\", array(\"id\" => $role));\r\n if (count($rdat) > 0) {\r\n return (int)$rdat[0]['level'];\r\n } else {\r\n return 0;\r\n }\r\n } else {\r\n return 0;\r\n }\r\n }",
"function index(){\n if($this->session->userdata('level')==='1'){\n $data['mahasiswa'] = $this->info_model->get_data($this->session->userdata('user_id'));\n $this->load->view('user_dashboard_view',$data);\n }else{\n echo \"Access Denied\";\n echo $this->session->userdata('level');\n }\n\n }"
] | [
"0.79449844",
"0.74749154",
"0.74349743",
"0.73864317",
"0.73555446",
"0.73167056",
"0.7227028",
"0.7106556",
"0.709184",
"0.70585805",
"0.705158",
"0.70482635",
"0.7042903",
"0.6987455",
"0.6877064",
"0.6858385",
"0.679101",
"0.6752148",
"0.6736806",
"0.67190635",
"0.6698857",
"0.66742384",
"0.667191",
"0.66430736",
"0.6637575",
"0.6618789",
"0.66001993",
"0.6578213",
"0.6575046",
"0.6549597",
"0.65398526",
"0.65365547",
"0.65346634",
"0.65321094",
"0.65153474",
"0.6505256",
"0.6485458",
"0.64847237",
"0.6465176",
"0.64497274",
"0.6448274",
"0.64343506",
"0.643191",
"0.6412547",
"0.6411056",
"0.6411056",
"0.641032",
"0.641032",
"0.641032",
"0.6409888",
"0.6409888",
"0.6409888",
"0.6409457",
"0.6356264",
"0.63535434",
"0.63421905",
"0.63328016",
"0.63284886",
"0.6326571",
"0.63262635",
"0.63233143",
"0.63206196",
"0.631414",
"0.6311479",
"0.62848467",
"0.6284459",
"0.6281133",
"0.62711215",
"0.62553895",
"0.62511575",
"0.6250353",
"0.6248533",
"0.6239514",
"0.623892",
"0.6234505",
"0.6234505",
"0.6232857",
"0.62248015",
"0.62116724",
"0.62071145",
"0.6199417",
"0.6196717",
"0.6190769",
"0.61884165",
"0.61604315",
"0.6132221",
"0.6130603",
"0.6129458",
"0.61294204",
"0.6118972",
"0.6118507",
"0.6117114",
"0.6113545",
"0.6106825",
"0.6106554",
"0.60979766",
"0.6096577",
"0.6087194",
"0.6083601",
"0.60826904",
"0.60743624"
] | 0.0 | -1 |
Pull Current Access Level and Loss Date from database | public function update_user_access($id, $req_access) {
$query1 = "SELECT access_level, loss_date FROM users WHERE id='$id'";
$check_database1 = mysqli_query($this->con, $query1);
$currentRow = mysqli_fetch_assoc($check_database1);
//Check if Submitted Access level is not the same as the current level. If it is the same Return Null.
if($req_access !== $currentRow['access_level']) {
//Pull Employee ID of posted ID for dataase update
$employee_id = $this->check_employee_id($id);
$nameOfUser = $this->get_nameOfUser($_SESSION['username']);
$curr_access = $currentRow['access_level'];
//Pull Data from Database to update user_history
//Check if the submitted access change is 0 (No Access)
if($req_access == 0) {
//Update user access to 0
$date = date("Y-m-d");
$query2 = "UPDATE users SET access_level='$req_access', loss_date='$date' WHERE id='$id'";
$update_database = mysqli_query($this->con, $query2);
//Document User History
$query2 = "INSERT INTO user_history (employee_id, access_prior, access_after, updated_by, note) VALUES ('$employee_id','$curr_access', '$req_access', '$nameOfUser', 'Access has been removed from this user.')";
$insert_database = mysqli_query($this->con, $query2);
}
//If Submitted access level is above 0.
else {
//Update User Access on the table
$query2 = "UPDATE users SET access_level='$req_access' WHERE id='$id'";
$update_database = mysqli_query($this->con, $query2);
//Document User History
$query2 = "INSERT INTO user_history (employee_id, access_prior, access_after, updated_by, note) VALUES ('$employee_id','$curr_access', '$req_access', '$nameOfUser', 'Access Level has been changed.')";
$insert_database = mysqli_query($this->con, $query2);
}
}
//Check if the Current Access Level is equal to 0
else if($currentRow['access_level'] == 0) {
$startDate = new DateTime($currentRow['loss_date']);
$currentDate = date("Y/m/d");
$endDate = new DateTime($currentDate);
$diff = $startDate->diff($endDate);
//Deactivate User if they have had no access to the system for 180 days (6 Months)
if($diff->d >= 180) {
$this->deactivate_user($id);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getAccessLevel() {\r\n\t\t$userID = $_SESSION['userid'];\r\n\t\t//$browser = $_SESSION['browser'];\r\n\t\t//$operationSystem = $_SESSION['os'];\r\n\t\t//$ipAddress = $_SESSION['ip'];\r\n\t\t\r\n\t\t// THIS NEEDS TO BE CHANGED TO ACTUALLY CHECK SESSION DATA AT SOME POINT\r\n\t\t$table='users';\r\n\t\tif(empty($this->link)){\r\n\t\t\techo \"<br>Failed to connect to database. Operation failed.<br>\";\r\n\t\t\texit;\r\n\t\t}\r\n\t\t//mysql_select_db('students');\r\n\t\t$query = \"SELECT AccessLevel FROM $table WHERE ID = '$userID'\";\r\n\t\t$result = mysql_query($query);\r\n\t\t$results = mysql_fetch_array( $result );\r\n\t\t//echo $results['AccessLevel'];\r\n\t\treturn $results['AccessLevel'];\r\n\t}",
"public static function auditAccess() {\n\t\t\t$memberid = getLoggedOnMemberID();\n\t\t\t$auditid = $_SESSION['SESS_LOGIN_AUDIT'];\n\n\t\t\t$sql = \"UPDATE {$_SESSION['DB_PREFIX']}members SET \n\t\t\t\t\tlastaccessdate = NOW(), \n\t\t\t\t\tmetamodifieddate = NOW(), \n\t\t\t\t\tmetamodifieduserid = $memberid\n\t\t\t\t\tWHERE member_id = $memberid\";\n\t\t\t$result = mysql_query($sql);\n\t\t\t\n\t\t\t$sql = \"UPDATE {$_SESSION['DB_PREFIX']}loginaudit SET \n\t\t\t\t\ttimeoff = NOW(), \n\t\t\t\t\tmetamodifieddate = NOW(), \n\t\t\t\t\tmetamodifieduserid = $memberid\n\t\t\t\t\tWHERE id = $auditid\";\n\t\t\t$result = mysql_query($sql);\n\t\t}",
"public function getLastAccessDate();",
"function get_last_tool_access($tool, $course_code='', $user_id='')\r\n{\r\n\tglobal $_course, $_user;\r\n\r\n\t// The default values of the parameters\r\n\tif ($course_code=='')\r\n\t{\r\n\t\t$course_code=$_course['id'];\r\n\t}\r\n\tif ($user_id=='')\r\n\t{\r\n\t\t$user_id=$_user['user_id'];\r\n\t}\r\n\r\n\t// the table where the last tool access is stored (=track_e_lastaccess)\r\n\t$table_last_access=Database::get_statistic_table('track_e_lastaccess');\r\n\r\n\t$sql=\"SELECT access_date FROM $table_last_access WHERE access_user_id='\".Database::escape_string($user_id).\"'\r\n\t\t\t\tAND access_cours_code='\".Database::escape_string($course_code).\"'\r\n\t\t\t\tAND access_tool='\".Database::escape_string($tool).\"'\";\r\n\t$result=api_sql_query($sql,__FILE__,__LINE__);\r\n\t$row=mysql_fetch_array($result);\r\n\treturn $row['access_date'];\r\n}",
"function getUserAccessLevel( $user ) {\r\n\t\t$userID = $user;\r\n\t\t//$browser = $_SESSION['browser'];\r\n\t\t//$operationSystem = $_SESSION['os'];\r\n\t\t//$ipAddress = $_SESSION['ip'];\r\n\t\t\r\n\t\t// THIS NEEDS TO BE CHANGED TO ACTUALLY CHECK SESSION DATA AT SOME POINT\r\n\t\t$table='users';\r\n\t\tif(empty($this->link)){\r\n\t\t\techo \"<br>Failed to connect to database. Operation failed.<br>\";\r\n\t\t\t//return 'BLAH!!!';\r\n\t\t\texit;\r\n\t\t}\r\n\t\t$query = \"SELECT AccessLevel FROM $table WHERE ID = '$userID'\";\r\n\t\t$result = mysql_query($query);\r\n\t\t$results = mysql_fetch_array( $result );\r\n\t\treturn $results['AccessLevel'];\r\n\t}",
"private function _get_info() {\n\n\t\t/* Grab the basic information from the catalog and return it */\n\t\t$sql = \"SELECT * FROM `access_list` WHERE `id`='\" . Dba::escape($this->id) . \"'\";\n\t\t$db_results = Dba::query($sql);\n\n\t\t$results = Dba::fetch_assoc($db_results);\n\n\t\treturn $results;\n\n\t}",
"public function listsaccessLevelget()\r\n {\r\n $response = AccessLevel::all();\r\n return response()->json($response,200);\r\n }",
"public function getAccess()\n {\n return $this->access;\n }",
"private function check_user_access() {\n\t\t//pull data from session\n\t\t$local_username = $_SESSION['username'];\n\n\t\t//SQL Query Definition\n\t\t$query = \"SELECT access_level FROM users WHERE employee_id='$local_username'\";\n\t\t//Query Database\n\t\t$database_check = mysqli_query($this->con, $query);\n\t\t//Check number of rows that match Query\n\t\t$check_rows = mysqli_num_rows($database_check);\n\t\t/*If only one row matches the query is valid otherwise no action should be taken as there is an issue with the database that will need to be reviewed by the admin.*/\n\t\tif($check_rows == 1) {\n\t\t\t$row = mysqli_fetch_assoc($database_check);\n\t\t\treturn $row['access_level'];\n\t\t}\n\t\t//Log Out as a critical error, possible Session Poisoning\n\t\telse {\n\t\t\tHeader(\"Location: logout.php\");\n\t\t}\n\t}",
"function getUserLevel() {\n\t\tif(!$this->user_level_id) {\n\t\t\t$this->sql(\"SELECT access_level_id FROM \".UT_USE.\" WHERE id = \".$this->user_id);\n\t\t\t$this->user_level_id = $this->getQueryResult(0, \"access_level_id\");\n \t\t}\n\t\treturn $this->user_level_id;\n\t}",
"public function groupAccessLevel(){\n\t\n\t global $db;\n\t \n\t #see if user is guest, if so, they have zero-level access.\n\t\tif($this->user == \"guest\"){\n\t\t $getAccessLevel = 0;\n\t\t return($getAccessLevel);\n\t\t}else{\n\t \t$db->SQL = \"SELECT Level FROM ebb_groups where id='\".$this->gid.\"' LIMIT 1\";\n\t\t\t$getAccessLevel = $db->fetchResults();\n\n\t\t\treturn($getAccessLevel['Level']);\n\t\t}\n\t}",
"public function getLov()\n {\n return\n DB::table('attendances')\n ->select(\n 'code',\n 'name'\n )\n ->where([\n ['tenant_id', $this->requester->getTenantId()],\n ['company_id', $this->requester->getCompanyId()]\n ])\n ->get();\n }",
"public static function getAccessState()\n {\n return self::$access;\n }",
"public function getAccess() {\n\t\treturn $this->_access;\n\t}",
"function usp_ews_get_course_lastaccess_sql($accesssince='') {\n if (empty($accesssince)) {\n return '';\n }\n if ($accesssince == -1) { // never\n return 'ul.timeaccess = 0';\n } else {\n return 'ul.timeaccess != 0 AND ul.timeaccess < '.$accesssince;\n }\n}",
"function getChangeLog(\\PDO $dbh, $naIndex, $stDate = \"\", $endDate = \"\") {\r\n if ($stDate == \"\" && $endDate == \"\" && $naIndex < 1) {\r\n return \"Set a Start date. \";\r\n }\r\n\r\n $logDates = \"\";\r\n $whDates = \"\";\r\n $whereName = \"\";\r\n\r\n if ($stDate != \"\") {\r\n $logDates = \" and Date_Time >= '$stDate' \";\r\n $whDates = \" and a.Effective_Date >= '$stDate' \";\r\n }\r\n\r\n if ($endDate != \"\") {\r\n $logDates .= \" and Date_Time <= '$endDate' \";\r\n $whDates .= \" and a.Effective_Date <= '$endDate' \";\r\n }\r\n\r\n $whereName = ($naIndex == 0) ? \"\" : \" and idName = \" . $naIndex;\r\n\r\n $result2 = $dbh->query(\"SELECT * FROM name_log WHERE 1=1 \" . $whereName . $logDates . \" order by Date_Time desc limit 200;\");\r\n\r\n $data = \"<table id='dataTbl' class='display'><thead><tr>\r\n <th>Date</th>\r\n <th>Type</th>\r\n <th>Sub-Type</th>\r\n <th>User Id</th>\r\n <th>Member Id</th>\r\n <th>Log Text</th></tr></thead><tbody>\";\r\n\r\n while ($row2 = $result2->fetch(\\PDO::FETCH_ASSOC)) {\r\n\r\n $data .= \"<tr>\r\n <td>\" . date(\"Y-m-d H:i:s\", strtotime($row2['Timestamp'])) . \"</td>\r\n <td>\" . $row2['Log_Type'] . \"</td>\r\n <td>\" . $row2['Sub_Type'] . \"</td>\r\n <td>\" . $row2['WP_User_Id'] . \"</td>\r\n <td>\" . $row2['idName'] . \"</td>\r\n <td>\" . $row2['Log_Text'] . \"</td></tr>\";\r\n }\r\n\r\n\r\n // activity table has volunteer data\r\n $query = \"select a.idName, a.Effective_Date, a.Action_Codes, a.Other_Code, a.Source_Code, g.Description as Code, g2.Description as Category, ifnull(g3.Description, '') as Rank\r\nfrom activity a left join gen_lookups g on substring_index(Product_Code, '|', 1) = g.Table_Name and substring_index(Product_Code, '|', -1) = g.Code\r\nleft join gen_lookups g2 on g2.Table_Name = 'Vol_Category' and substring_index(Product_Code, '|', 1) = g2.Code\r\nleft join gen_lookups g3 on g3.Table_Name = 'Vol_Rank' and g3.Code = a.Other_Code\r\n where a.Type = 'vol' $whereName $whDates order by a.Effective_Date desc limit 100;\";\r\n\r\n $result3 = $dbh->query($query);\r\n\r\n while ($row2 = $result3->fetch(\\PDO::FETCH_ASSOC)) {\r\n\r\n $data .= \"<tr>\r\n <td>\" . date(\"Y-m-d H:i:s\", strtotime($row2['Effective_Date'])) . \"</td>\r\n <td>Volunteer</td>\r\n <td>\" . $row2['Action_Codes'] . \"</td>\r\n <td>\" . $row2['Source_Code'] . \"</td>\r\n <td>\" . $row2['idName'] . \"</td>\r\n <td>\" . $row2['Category'] . \"/\" . $row2[\"Code\"] . \", Rank = \" . $row2[\"Rank\"] . \"</td></tr>\";\r\n }\r\n\r\n\r\n return $data . \"</tbody></table>\";\r\n}",
"public function getLov()\n {\n $now = Carbon::now();\n return\n DB::table('grades')\n ->select(\n 'code',\n 'name'\n )\n ->where([\n ['tenant_id', '=', $this->requester->getTenantId()],\n ['company_id', '=', $this->requester->getCompanyId()],\n ['eff_begin', '<=', $now],\n ['eff_end', '>=', $now]\n ])\n ->get();\n }",
"public static function accessLog(){\n\t\t$al = new AccessLogModel();\n\t\t$ip = new Ip();\n\t\t$type \t= 1;\n\t\t$spider = 'null';\n\t\t$ipaddr\t= self::getIp();\n\t\t$addr \t= $ip->ip2addr($ipaddr);\n\t\t$date\t= date('Y-m-d');\n\t\tif(self::is_spider()){\n\t\t\t$spider = self::robot();\n\t\t\t$type = 2;\n\t\t}\n\t\t$data = [\n\t\t\t\t'ip'\t\t=> $ipaddr,\n\t\t\t\t'type'\t\t=> $type,\n\t\t\t\t'spider'\t=> $spider,\n\t\t\t\t'num'\t\t=> 1,\n\t\t\t\t'country'\t=> $addr['country'],\n\t\t\t\t'area'\t\t=> $addr['area'],\n\t\t\t\t'cdate' \t=> $date,\n\t\t];\n\t\t$find = $al->where(\"ip = '\".$ipaddr.\"' AND cdate = '\".$date.\"'\")->fRow();\n\t\tif($find){\n\t\t\t$data['num'] = $find['num'] + 1;\n\t\t\t$al->where('id ='.$find['id'])->update($data);\n\t\t}else{\n\t\t\t$al->insert($data);\n\t\t}\t\t\n\t}",
"function userAccess(){\n Q::db()->query('INSERT INTO access (REQUEST,METHOD,REMOTE,AGENT,ACCEPT,ENCODING,LANGUAGE,IDATE)\n VALUES (:req,:met,:rem,:age,:acc,:enc,:lan,:idate)',\n [':req'=>$_SERVER['REQUEST_URI'],\n ':met'=>$_SERVER['REQUEST_METHOD'],\n ':rem'=>$_SERVER['REMOTE_ADDR'],\n ':age'=>$_SERVER['HTTP_USER_AGENT'],\n ':acc'=>$_SERVER['HTTP_ACCEPT'],\n ':enc'=>$_SERVER['HTTP_ACCEPT_ENCODING'],\n ':lan'=>$_SERVER['HTTP_ACCEPT_LANGUAGE'],\n ':idate'=>date('Y-m-d H:I:s')]);\n Q::db()->query('DELETE FROM access WHERE DATE(access.IDATE) <= DATE(DATE(NOW())-30)');\n }",
"function usp_ews_get_user_lastaccess_sql($accesssince='') {\n if (empty($accesssince)) {\n return '';\n }\n if ($accesssince == -1) { // never\n return 'u.lastaccess = 0';\n } else {\n return 'u.lastaccess != 0 AND u.lastaccess < '.$accesssince;\n }\n}",
"public function getAccess()\n\t{\n\t\t$column = self::COL_ACCESS;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}",
"public function getAccessLevel()\n\t{\n\t\tif (!is_null($this->accessLevel))\n\t\t\treturn $this->accessLevel;\n\n\t\t$this->accessLevel = 0;\n\n\t\tif ($this->access_level > $this->accessLevel)\n\t\t\t$this->accessLevel = $this->access_level;\n\n\t\tforeach ($this->roles as $role)\n\t\t{\n\t\t\tif ($role->access_level > $this->accessLevel)\n\t\t\t\t$this->accessLevel = $role->access_level;\n\t\t}\n\n\t\treturn $this->accessLevel;\n\t}",
"public function getAudits(){\n\t\t$query = $this->db->query('SELECT * FROM `user_audit_trails`');\n\t\treturn $query->result();\n\t}",
"function get_rad_audit_labs($conn, $audit_id) {\n\t$query_labs = \"SELECT building, room FROM rad_audit_labs WHERE audit_id = \" . $audit_id;\n\treturn exec_query($conn, $query_labs);\n}",
"private function read(){\n\t\t$result = $this->clsAccessPermission->toRead();\n\t\tif(!$result){\n\t\t\t$this->msg->setWarn(\"You don't have permission to reade!\");\n\t\t\treturn;\n\t\t}\n\t\t// Take the id from session.\n\t\tif(!empty($_SESSION ['PK']['ACCESSCRUD'])){\n\t\t\t$id = $_SESSION ['PK']['ACCESSCRUD'];\n\t\t\t$this->objAccessCrud->readOne ( $id );\n\t\t}\n\n\t\t$this->fieldValue[\"cl_id_access_profile\"] = $this->objAccessCrud->getIdAccessProfile();\n\t\t$this->fieldValue[\"cl_id_access_page\"] = $this->objAccessCrud->getIdAccessPage();\n\n\t\t$this->fieldValue[\"cl_crud\"] = $this->objAccessCrud->getCread();\n\t\t$this->fieldValue[\"cl_read\"] = $this->objAccessCrud->getRead();\n\t\t$this->fieldValue[\"cl_update\"] = $this->objAccessCrud->getUpdate();\n\t\t$this->fieldValue[\"cl_delete\"] = $this->objAccessCrud->getDelete();\n\n\t\t$this->fieldValue[\"cl_date_insert\"] = $this->objAccessCrud->getDateInsert();\n\t\t$this->fieldValue[\"cl_date_update\"] = $this->objAccessCrud->getDateUpdate();\n\n\t\treturn;\n\t }",
"public function getAccess(): int\n {\n return $this->access;\n }",
"public function getAccess(): string\n {\n return $this->access;\n }",
"public function getLogOn() {\n $conn = $this->getConnection();\n $getQuery = \"SELECT * from logon group by username\";\n $q = $conn->prepare($getQuery);\n $q->execute();\n return $q->fetchAll();\n }",
"public function view_reader(){\n\t\t$result = $this->con()->query(\"Select * from req ORDER BY tdate DESC\");\n\t\treturn $result;\n\t}",
"public function getLastAccessTimestamp()\n {\n return $this->lastAccessTimestamp;\n }",
"function get_all_access_level($not_include_admin = 0)\r\n{\r\n\tglobal $strings;\r\n $users[ACCESS_AD_CUSTOMER] = $strings['ACL_AD_CUSTOMER'];\r\n $users[ACCESS_BIG_CUSTOMER] = $strings['ACL_BIG_CUSTOMER'];\r\n $users[ACCESS_VIP_USER] = $strings['ACL_VIP_USER'];\r\n if(!$not_include_admin)$users[ACCESS_ADMIN] = $strings['ACL_ADMIN'];\r\n return $users;\r\n}",
"function srTracker($access) {\n\t\t$sql= \"SELECT `date`, `sr` FROM `match` WHERE `sr`!=0 GROUP BY `date`;\";\n\t\t$data=$access->query($sql);\n\t\twhile ($row=$data->fetch_assoc()) {\n\t\t\techo \"['\" . $row[\"date\"] . \"', \" . $row[\"sr\"] . \"],\";\n\t\t}\n\t}",
"public function showData(){\n\t\t//$sql = \"SELECT * FROM EC_GR_STATUS WHERE LOT_NUMBER = 66\";\n\n\t\t//$sql = \"UPDATE EC_GR_STATUS SET STATUS=1 WHERE STATUS = 4\";\n\t\t//$sql = \"UPDATE EC_GR_LOT SET STATUS=1 WHERE STATUS = 4\";\n\t\t//$data = $this->db->query($sql);\n\n\t\t//$sql = \"SELECT * FROM EC_ROLE_ACCESS WHERE ROLE_AS = 'APPROVAL GR LVL 1' AND OBJECT_AS = 'LEVEL'\";\n\t\t//$sql = \"UPDATE EC_ROLE_ACCESS SET VALUE='1,4' WHERE ROLE_AS = 'APPROVAL GR LVL 1' AND OBJECT_AS = 'LEVEL'\";\n\t\t//$data = $this->db->query($sql)->result_array();\n\t\tvar_dump($this->session->userdata);\n\t}",
"function econsole_user_outline($course, $user, $mod, $econsole) {\r\n if ($logs = get_records_select(\"log\", \"userid='$user->id' AND module='econsole'\r\n AND action='view' AND info='$econsole->id'\", \"time ASC\")) {\r\n\r\n $numviews = count($logs);\r\n $lastlog = array_pop($logs);\r\n\r\n $result = new object();\r\n $result->info = get_string(\"numviews\", \"\", $numviews);\r\n $result->time = $lastlog->time;\r\n\r\n return $result;\r\n }\r\n return NULL;\r\n}",
"function getHistory() {\n\t\treturn db_query_params ('SELECT * FROM artifact_history_user_vw WHERE artifact_id=$1 ORDER BY entrydate DESC, id ASC',\n\t\t\t\t\tarray ($this->getID())) ;\n\t}",
"public function getUserAccessLevel () {\n\t\treturn ($this->userAccessLevel);\n\t}",
"public function getAccess()\n {\n return $this->_params['access'];\n }",
"public function bivapointhistory(){\n\t\t$this->db->where('CustomerMail', $this->session->userdata('useremail'));\n\t\t$this->db->order_by('ReferenceId', 'desc');\n\t\t$this->db->select('TrDate, EarnedPotint,Note');\n\t\t$query=$this->db->get('tbl_bvpoint_data');\n\t\treturn $query->result();\n\t}",
"function exeGetUserLevel() {\n $exeGetUserLevel = $this->db->query(\"SELECT *\n FROM userlevel \n WHERE status = 1 \");\n \n if($exeGetUserLevel->num_rows() > 0) {\n return $exeGetUserLevel->result_array();\n } else {\n return false;\n }\n }",
"function mysql_auth_user_level($username)\n{\n return dbFetchCell(\"SELECT `level` FROM `users` WHERE `username` = ?\", array($username));\n}",
"public function getTotalAccess() {\n\t\t$userLevel = $this->getLevelId();\n\t\t$baseLevel = 1;\n\t\twhile ($userLevel > 1) {\n\t\t\t$baseLevel += $userLevel;\n\t\t\t$userLevel = $userLevel / 2;\n\t\t}\n\t\treturn $baseLevel;\n\t}",
"function to_get_assignmnt_histroy(){\r\n\t\treturn $this->db->query('SELECT a.employee_id,c.role_name AS assigned_under,c.role_id AS assig_id,b.name,date_format(a.assigned_on,\"%d/%m/%y\") as assigned_on,date_format(a.modified_on,\"%d/%m/%y\") as modified_on,d.job_title,e.role_name,d.name AS emp_name\r\n\t\t\t\t\t\t\t\tFROM `m_employee_rolelink` a\r\n\t\t\t\t\t\t\t\tJOIN `m_employee_info`b ON b.employee_id=parent_emp_id\r\n\t\t\t\t\t\t\t\tJOIN `m_employee_roles`c ON c.role_id=b.job_title \r\n\t\t\t\t\t\t\t\tJOIN `m_employee_info`d ON d.employee_id=a.employee_id\r\n\t\t\t\t\t\t\t\tJOIN `m_employee_roles`e ON e.role_id = d.job_title\r\n\t\t\t\t \t\t\t\twhere c.is_suspended=0\r\n\t\t\t\t ORDER BY c.role_id DESC')->result_array();\r\n\t}",
"function tab_user_outline($course, $user, $mod, $tab) {\n global $DB;\n\n if ($logs = $DB->get_records('log', array('userid' => $user->id, 'module' => 'tab',\n 'action' => 'view', 'info' => $tab->id . ' - ' . $tab->name), 'time ASC')) {\n\n $numviews = count($logs);\n $lastlog = array_pop($logs);\n\n $result = new stdClass();\n $result->info = get_string('numviews', '', $numviews);\n $result->time = $lastlog->time;\n\n return $result;\n }\n return NULL;\n}",
"public function\tGetAccess(&$conn,$val_user,$val_parent,$val_type)\r\n\t{\r\n\t\ttry {\r\n\t\t\t$conn->StartTrans();\r\n\t\t\t$sel \t\t=\t\"SELECT MODULEID FROM \".WMS_LOOKUP.\".MODULES \";\r\n\t\t\t$sel \t\t.=\t\"WHERE MODULENAME = '{$val_type}' and MODULETYPE = '{$val_parent}' AND ACTIVE = 'Y' \";\r\n\t\t\t$rssel\t\t=\t$conn->Execute($sel);\r\n\t\t\tif ($rssel==false) \r\n\t\t\t{\r\n\t\t\t\tself::AdminErrorLogs($sel,$conn->ErrorMsg(),__FILE__,__LINE__);\r\n\t\t\t\tthrow new Exception($conn->ErrorMsg());\r\n\t\t\t}\r\n\t\t\t$id\t \t\t=\t$rssel->fields['MODULEID'];\r\n\t\t\t$access\t\t=\t\"SELECT COUNT(*) AS CNT FROM \".WMS_LOOKUP.\".ACCESSLEVEL WHERE MODULEID = '{$id}' AND USERID = '{$val_user}' \";\r\n\t\t\t$rsaccess\t=\t$conn->Execute($access);\r\n\t\t\tif ($rsaccess == false) \r\n\t\t\t{\r\n\t\t\t\tself::AdminErrorLogs($access,$conn->ErrorMsg(),__FILE__,__LINE__);\r\n\t\t\t\tthrow new Exception($conn->ErrorMsg());\r\n\t\t\t}\r\n\t\t\tif ($rsaccess->fields['CNT'] > 0) \r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t$conn->CompleteTrans();\r\n\t\t}\r\n\t\tcatch (Exception $e)\r\n\t\t{\r\n\t\t\techo $e->__toString();\r\n\t\t\t$conn->CompleteTrans();\r\n\t\t}\r\n\t}",
"public function last_pass_change() \n {\n global $_SESSION;\n \n $date = date('Y-m-d H:i:s');\n \n $db = new ossim_db();\n $conn = $db->connect();\n \n $pass = md5($this->pass);\n $login = $this->login;\n \n $params = array($login, $pass);\n $query = 'SELECT * FROM users WHERE login = ? AND pass = ?';\n \n $rs = $conn->Execute($query, $params);\n \n if (!$rs) \n {\n Av_exception::write_log(Av_exception::DB_ERROR, $conn->ErrorMsg()); \n } \n else\n {\n if (!$rs->EOF) \n { \n $date = $rs->fields['last_pass_change'];\n }\n }\n \n $db->close();\n \n return $date;\n }",
"function getlastlogin($username) {\r\n\r\n\t\r\n\r\n\t$qry=\"SELECT logintime FROM biashara_access_logs WHERE username='$username' ORDER BY logintime DESC LIMIT 0,1\";\r\n\r\n\t$result=mysql_query($qry);\r\n\r\n\t$login = mysql_fetch_assoc($result);\r\n\r\n\t$lastlogin = $login['logintime'];\r\n\r\n\treturn date(\"d/m/Y, h:m a\",php_date($lastlogin));\r\n\r\n\t\r\n\r\n}",
"function GetAccessRestriction($user) {\r\n global $dbUser;\r\n global $dbPass;\r\n global $dbName;\r\n global $connection;\r\n $nuser=strip_tags($user);\r\n $result=$connection->query(\"select * from accessres where username='$nuser'\") or die(json_encode(array(\"err\"=>mysqli_error($connection))));\r\n $failResult=$result->fetch_assoc();\r\n if ($result->num_rows>=1) {\r\n if ($failResult[\"attempt\"]==1) return true;\r\n elseif ($failResult[\"attempt\"]==2){\r\n // Checks time. Has 15 minutes passed?\r\n $lastFail= new DateTime($failResult[\"endtime\"]);\r\n $nowDate= new DateTime(date(\"Y-m-d H:i:s\"));\r\n $fark=$nowDate->diff($lastFail)->i;\r\n if ($fark<15) return false; //you must change this number with suspension time you'd like to\r\n else {\r\n ClearAccessRestriction($nuser);\r\n return true;\r\n }\t\r\n }\r\n else return true;\r\n }\r\n else return true;\r\n }",
"function get_download_history($FID){\n\t\t$this->db=new DB(\"QuinnFM\");\n\t\t$this->db->set_query(\"select a.login_name,date_format(b.download_date,'%M %D, %Y %l:%i%p')as ddate from users a, download_tracking b where a.ID=b.UID and b.FID=$FID\");\n\t\t$this->db->execute_query();\n\t\twhile($row=$this->db->get_results(\"assoc\")){\n\t\t\tprint $row[\"login_name\"].\" on \".$row[\"ddate\"].\"<br>\";\n\t\t}\n\t}",
"public function get_edit_date()\n {\n $query = 'SELECT MAX(date_and_time) FROM ' . get_table_prefix() . 'actionlogs WHERE ' . db_string_equal_to('the_type', 'NOTIFICATIONS_LOCKDOWN');\n return $GLOBALS['SITE_DB']->query_value_if_there($query);\n }",
"function getLastAccess()\n\t{\n\t\t$lastAccess = (int) $this->query(\"SELECT created\n\t\t\tFROM files\n\t\t\tWHERE queueID = '\" . sqlite_escape_string($this->getQueueID()) . \"'\n\t\t\tORDER BY created DESC\")->fetchSingle();\n\t\treturn $lastAccess;\n\t}",
"public function getLastAudit();",
"public function getAccessList() {\n return $this->_get(16);\n }",
"public function f_get_leaveAlloaction_table()\r\n {\r\n\r\n $sql = $this->db->query(\" SELECT * FROM td_leave_dtls WHERE trans_type = 'O'\r\n AND YEAR(trans_dt) = YEAR(CURDATE()) \");\r\n return $sql->result();\r\n\r\n }",
"public function getAccessInformation() {\n $fields = array(\n 'accessInformation' => array(\n 'accessUrl',\n 'accessUrlDescriptor',\n 'accessUrlDisplay',\n )\n );\n return TingOpenformatMethods::parseFields($this->_getDetails(), $fields);\n }",
"function user_level () {\r\n\t$info = user_info();\r\n\treturn (isset($info[3]) ? $info[3] : 0);\r\n}",
"public function getAdminLevelAccess ($userId)\n \t{\n \t\t$query = \"SELECT `level_access` FROM `users` WHERE `id` = '\" . \t$this->quote($userId) . \"'\";\n \t\tif ( $this->resultNum($query) == 1 )\n \t\t{\n \t\t\t$row = $this->fetchOne($query);\n \t\t}\n \t\treturn $row['level_access'];\n \t}",
"public function totalAudits()\r\n {\r\n $sql='SELECT * FROM `audit`';\r\n $dbOps=new DBOperations();\r\n return $dbOps->fetchData($sql);\r\n }",
"function dbCheckAuthLevel($unm)\n{\n\t$result = 0;\n\t$sql = \"SELECT level FROM _account WHERE username = '$unm'\";\n\ttry {\n\t\t$stmt = Database :: prepare ( $sql );\n\t\t$stmt->execute();\n\t\t$result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t$stmt->closeCursor () ;\n\t}\n\tcatch(PDOException $e)\n\t{\n\t\techo $e->getMessage();\n\t}\n\treturn $result[0]['level'];\n}",
"public function getLogs() {\n\t\tif(check($this->_identifier)) {\n\t\t\tif($this->_limit > 0) {\n\t\t\t\t$result = $this->db->queryFetch(\"SELECT * FROM \"._WE_CREDITSYSLOG_.\" WHERE `log_identifier` = ? ORDER BY `log_id` DESC LIMIT ?\", array($this->_identifier, $this->_limit));\n\t\t\t} else {\n\t\t\t\t$result = $this->db->queryFetch(\"SELECT * FROM \"._WE_CREDITSYSLOG_.\" WHERE `log_identifier` = ? ORDER BY `log_id` DESC\", array($this->_identifier));\n\t\t\t}\n\t\t} else {\n\t\t\tif($this->_limit > 0) {\n\t\t\t\t$result = $this->db->queryFetch(\"SELECT * FROM \"._WE_CREDITSYSLOG_.\" ORDER BY `log_id` DESC LIMIT ?\", array($this->_limit));\n\t\t\t} else {\n\t\t\t\t$result = $this->db->queryFetch(\"SELECT * FROM \"._WE_CREDITSYSLOG_.\" ORDER BY `log_id` DESC\");\n\t\t\t}\n\t\t}\n\t\tif(is_array($result)) return $result;\n\t}",
"function checkaccess($restriction=\"all\") {\n\n\t\tglobal $db, $db, $_COOKIE, $sessionCookie, $username, $login_id, $login_username, $login_access, $login_access_detail, $HTTP_HOST, $t, $login_inquiry_access, $login_opd, $login_opd_nama, $login_full_name, $login_ip, $login_last_login;\n\t\tglobal $PHP_SELF;\n\t\tglobal $form_disableedit;\n\t\tglobal $form_disabledelete;\n\t\tglobal $form_disableadd;\n\t\tglobal $form_disableview;\n\n\t\t$current_page=strtolower($PHP_SELF);\n\t\tif (!$_SESSION[$sessionCookie]) {\n\t\t\theader(\"Location: /\");\n\t\t\texit();\n\t\t}\n\n\t\t//Execute the SQL Statement (Get Username)\n\t\t$strSQL\t\t=\t\"SELECT * from tbl_session \".\n\t\t\"WHERE session_id='\".$_SESSION[$sessionCookie].\"' \";\n\t\t#die($strSQL);\n\t\t$result\t\t= $db->Execute($strSQL);\n\t\tif (!$result) print $db->ErrorMsg();\n\t\t$row = $result->FetchRow();\n\n\n\t\tif ($result->RecordCount() < 1) {\n\t\t\t//header(\"Location: /adminroom/index.php?act=login\");\n\t\t\techo \"<img src=/images/warning.gif> Ada pengguna lain yang menggunakan login anda atau session Anda telah expired. <a href=/index.php?act=logout target=_top>Silahkan Login kembali</a>...\";\n\t\t\texit();\n\t\t}\n\n\t\t$login_username\t= $row['username'];\n\t\t$last_access = $row['last_access'];\n\n\t\t//Get User Information\n\t\t$strSQL\t\t=\"SELECT u.access_level, u.id as id_exist, \n\t\t\t\t\tu.full_name, u.inquiry_access, u.ip, u.last_login, u.opd_kode, l.access_detail \n\t\t\t\t\tfrom tbl_user u, tbl_level l \n\t\t\t\t\tWHERE u.username='$login_username' and u.access_level=l.access_level\";\n\t\t#echo $strSQL;\n\t\t$result\t\t= $db->Execute($strSQL);\n\n\t\tif (!$result) print $strSQL.\"<p>\".$db->ErrorMsg();\n\t\t$row = $result->FetchRow();\n\n\t\t$login_access \t\t\t= $row['access_level'];\n\t\t\n\t\t$login_inquiry_access\t\t= $row['inquiry_access'];\n\t\t$login_access_detail\t\t= $row['access_detail'];\n\t\t$login_full_name\t\t\t= $row['full_name'];\n\t\t$login_id\t\t\t\t\t= $row['id_exist'];\n\t\t$login_ip \t\t\t\t= $row['ip'];\n\t\t$login_last_login\t\t\t= $row['last_login'];\n\t\n\t\tif($row['opd_kode']!==0){\n\t\t\t $login_opd = $row['opd_kode'];\n\t\t\t \n\t\t\t $strSQL2\t= \"SELECT opd_nama FROM tbl_opd WHERE opd_kode='$login_opd'\";\n\t\t\t $result2\t\t= $db->Execute($strSQL2);\t\n\t\t\t if (!$result2) print $strSQL.\"<p>\".$db->ErrorMsg();\n\t\t\t $row2 = $result2->FetchRow();\n\t\t\t \n\t\t\t $login_opd_nama = $row2['opd_nama'];\n\t\t}\n\n\t\t/*=====================================================\n\t\tAUTO LOG-OFF 15 MINUTES\n\t\t======================================================*/\n\n\t\t//Update last access!\n\t\t$time= explode( \" \", microtime());\n\t\t$usersec= (double)$time[1];\n\n\t\t$diff = $usersec-$last_access;\n\t\t$limit = 30*60;//harusnya 15 menit, tapi sementara pasang 60 menit/1 jam dahulu, biar gak shock\n\t\tif($diff>$limit){\n\n\t\t\tsession_unset();\n\t\t\tsession_destroy();\n\t\t\t//header(\"Location: /adminroom/index.php?act=login\");\n\t\t\techo \"Maaf status anda idle lebih dari 30 menit dan session Anda telah expired. <a href=/session.php?act=logout target=_top>Silahkan Login kembali</a>...\";\n\t\t\texit();\n\n\t\t}else{\n\t\t\t$sql=\"update tbl_session set last_access='$usersec' where username='$login_username'\";\n\t\t\t//echo $sql;\n\t\t\t$result = $db->Execute($sql);\n\t\t\tif (!$result) print $db->ErrorMsg();\n\t\t}\n\n\t\tif($restriction != 'all'){\n\t\t\t$_restriction=strtolower($restriction.\"_priv\");\n\n\t\t\t$sql=\"select $_restriction as check_access from tbl_functionaccess where name='$login_access' and url='$PHP_SELF'\";\n\t\t\t//die($sql);\n\t\t\t$result = $db->Execute($sql);\n\t\t\tif (!$result) print $db->ErrorMsg();\n\t\t\t$row\t\t= $result->FetchRow();\n\n\t\t\t$check_access\t= $row[check_access];\n\t\t\tif($check_access=='1') $access_granted=\"1\";\n\t\t\t\n\n\t\t}else{\n\t\t\t$access_granted=\"1\";\n\t\t}\n\n\t\t//Manage buttons to show or not\n\t\t$sql=\"select * from tbl_functionaccess where name='$login_access' and url='$PHP_SELF'\";\n\t\t$result = $db->Execute($sql);\n\t\tif (!$result) print $db->ErrorMsg();\n\t\t$row\t\t= $result->FetchRow();\n\n\t\tif (count($row)>1) {\n\t\t\tforeach ($row as $key=>$val) {\n\n\t\t\t\tif ($key==\"read_priv\" && !$val) $form_disableview = true;\n\t\t\t\telse if ($key==\"edit_priv\" && !$val) $form_disableedit = true;\n\t\t\t\telse if ($key==\"delete_priv\" && !$val) $form_disabledelete = true;\n\t\t\t\telse if ($key==\"add_priv\" && !$val) $form_disableadd = true;\n\t\t\t}\n\t\t} else {\n\n\t\t\t$form_disableview = true;\n\t\t\t$form_disableedit = true;\n\t\t\t$form_disabledelete = true;\n\t\t\t$form_disableadd = true;\n\t\t}\n\n\t\tif ($access_granted == 0) {\n\t\t\t//$t->htmlHeader();\n\t\t\techo \"<p>\";\n\t\t\t$t->message(\"Illegal Access!\",\"javascript:history.go(-1)\");\n\t\t\t//$t->htmlFooter();\n\t\t\texit();\n\t\t}\n\n\t\t$result->Close();\n\t}",
"public function getDate(){\n\t\treturn $this->laDate;\n\t}",
"function writeAccessInfo(){\r\n\t\t$sql=\"INSERT INTO \".$this->schema.\".accessi_log(ipaddr,username,data_enter,application) VALUES('$this->user_ip','$this->username',CURRENT_TIMESTAMP(1),'$app')\";\r\n\t\t$this->db->sql_query($sql);\r\n\t}",
"public function listsaccessLevelByIdget($accessLevel_id)\r\n {\r\n $accessLevel = AccessLevel::findOrFail($accessLevel_id);\r\n return response()->json($accessLevel,200);\r\n }",
"protected function fetchDetails() {\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t'tstamp, crdate, cruser_id, name',\n\t\t\t'tx_passwordmgr_group',\n\t\t\t'uid=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this['uid'],'tx_passwordmgr_group')\n\t\t);\n\t\t$row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);\n\t\t$this['name'] = $row['name'];\n\t\t$this['timeStamp'] = $row['timeStamp'];\n\t\t$this['createDate'] = $row['crdate'];\n\t\t$this['cruserUid'] = $row['cruser_id'];\n\t}",
"private function getAccInfo(){\n try {\n $stmt = $this->dbh->prepare(\"SELECT * FROM `Locations` WHERE P_Id = :id\");\n $stmt->bindParam(\":id\", $this->accId);\n $stmt->execute();\n } catch (Exception $e){\n error_log(\"Error: \" . $e->getMessage());\n }\n\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n $this->accName = $row[\"AccName\"];\n $this->accStrAdd = $row[\"AccStrAdd\"];\n $this->accAptNum = $row[\"AccAptNum\"];\n $this->accState = $row[\"AccState\"];\n $this->accZip = $row[\"AccZip\"];\n $this->currentUnits = $row[\"AccUnits\"];\n }",
"function dataGetAllAccessRights()\n {\n \n $sql = 'SELECT moduleid, ';\n $sql .= 'name ';\n $sql .= 'FROM user_module ';\n $sql .= 'WHERE isactive = 1 '; \n \n $result_mysqli = parent::query($sql);\n $result = parent::fetchAllRows($result_mysqli);\n parent::clear($result_mysqli); \n\n return $result; \n }",
"function sci_building_level($userid,$id)\n {\n $db3 = new cl_extended_database;\n $db3->query(\"SELECT level FROM user_sci WHERE userid=$userid AND sciid=$id\"); $this->err();\n if($db3->numrows() <= 0)\n {\n unset($db3);\n //echo \"level 0<br>\";\n return 0;\n }\n else\n {\n $row = $db3->fetch();\n unset($db3);\n // echo \"level is \".$row['level'].\"<br>\";\n return $row['level'];\n }\n return -1;\n }",
"protected function get_legacy_logdata() {\n $name = $this->get_legacy_eventname();\n $url = preg_replace('/^.*\\/mod\\/reader\\//', '', $this->get_url());\n return array($this->courseid, 'reader', $name, $url, $this->objectid, $this->contextinstanceid);\n }",
"function econsole_user_complete($course, $user, $mod, $econsole) {\r\n global $CFG;\r\n\r\n if ($logs = get_records_select(\"log\", \"userid='$user->id' AND module='econsole'\r\n AND action='view' AND info='$econsole->id'\", \"time ASC\")) {\r\n $numviews = count($logs);\r\n $lastlog = array_pop($logs);\r\n\r\n $strmostrecently = get_string(\"mostrecently\");\r\n $strnumviews = get_string(\"numviews\", \"\", $numviews);\r\n\r\n echo \"$strnumviews - $strmostrecently \".userdate($lastlog->time);\r\n\r\n } else {\r\n print_string(\"neverseen\", \"econsole\");\r\n }\r\n}",
"public function getAccessRulesInfo();",
"public function getAccessLevels() : array {\n return [\n 'B-SP' => \"Bronze - Service Provider\",\n 'B-EP' => \"Bronze - Education Provider\",\n 'S-SP' => \"Silver - Service Provider\",\n 'S-EP' => \"Silver - Education Provider\",\n 'S-SP-EB' => \"Silver - Service Provider Early Bird\",\n 'S-EP-EB' => \"Silver - Education Provider Early Bird\",\n 'G-SP-EB' => \"Gold - Service Provider Early Bird\",\n 'G-EP-EB' => \"Gold - Education Provider Early Bird\",\n 'G-SP' => \"Gold - Service Provider\",\n 'G-EP' => \"Gold - Education Provider\",\n ];\n }",
"public function view() {\r\n $this->db->select('*');\r\n $this->db->from('tbl_access_log_backup');\r\n $query = $this->db->get();\r\n return $query->result();\r\n }",
"public function getCurrentStatus(){\n\t\t/* $status = \"Unknown\";\t\n\t\tif($this->reliever_approve === NULL)\n\t\t\treturn \"Waiting on Reliever\";\n\t\tif($this->sup_approve === NULL)\n\t\t\treturn \"Waiting on Supervisor\";\n\t\tif($this->hr_approve === NULL)\n\t\t\treturn \"Waiting on HR\";\n\t\treturn $status; */\n\t\tswitch($this->next_lvl_id){\n\t\t\tcase HrisAccessLvl::$ULTIMATELY_APPROVED:\n\t\t\t\t$status = \"Approved\";\n\t\t\tbreak;\n\t\t\tcase HrisAccessLvl::$ULTIMATELY_DENIED:\n\t\t\t\t$status = \"Denied\";\n\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:$status=\"\".$this->nextLvl->status;\n\t\t}\n\t\treturn $status;\t\t\n\t}",
"public function getDr(){\n $data = $this->db->get_where('user', array('Level' => 'Dokter'));\n\n return $data;\n }",
"public function getCategoryAccessData()\n\t{\n\t\treturn $this->categoryAccess;\n\t}",
"protected function get_level()\n {\n return $this->m_voxy_connect->_get_list_voxy_level();\n }",
"function statReceiveAuth()\n{\n $post = getPostInfo();\n $startDate= isset($post['reportstartdate'])?$post['reportstartdate']:'2016-11-01';\n $endDate = isset($post['reportenddate'])?$post['reportenddate']:'2017-01-20';\n\n XLog::formatLog(\"statReceiveAuth\", json_encode($post), XLog::$errorFile);\n\n $dateArr = parseDate($startDate,$endDate);\n\n $curTime = date('Y-m-d H:i:s');\n\n $pageInfo = DB::fetchAll(DB_NUMBER, \"\n SELECT SUM(`Received`) AS total,SUM(`Authorised`) AS auths,date_format(`CreateDate`, '%Y-%m-%d') as `day`\n FROM `dashboard`\n WHERE `CreateDate` <= '{$curTime}' AND `CreateDate` BETWEEN '{$dateArr['start']}' AND '{$dateArr['end']}'\n GROUP BY `day`\n \");\n\n return $pageInfo;\n}",
"function checkAccessLevel(){\n\n\tsession_start();\n\t\tif(isset($_SESSION['accessLevel'])){\n\t\t\t$return = $_SESSION['accessLevel'];\n\t\t}\n\t\telse{\n\t\t\t$return = 0;\n\t\t}\n\tsession_write_close();\n\t\n\treturn $return;\n}",
"function get_db_stat($mode)\n{\n\tglobal $db;\n\n\tswitch( $mode )\n\t{\n\t\tcase 'usercount':\n\t\t\t$sql = \"SELECT COUNT(user_id) AS total\n\t\t\t\tFROM \" . USERS_TABLE . \"\n\t\t\t\tWHERE user_id <> \" . ANONYMOUS;\n\t\t\tbreak;\n\n\t\tcase 'newestuser':\n\t\t\t$sql = \"SELECT user_id, username\n\t\t\t\tFROM \" . USERS_TABLE . \"\n\t\t\t\tWHERE user_id <> \" . ANONYMOUS . \"\n\t\t\t\tORDER BY user_id DESC\n\t\t\t\tLIMIT 1\";\n\t\t\tbreak;\n\n\t\tcase 'postcount':\n\t\tcase 'topiccount':\n\t\t\t$sql = \"SELECT SUM(forum_topics) AS topic_total, SUM(forum_posts) AS post_total\n\t\t\t\tFROM \" . FORUMS_TABLE;\n\t\t\tbreak;\n\t}\n\n\tif ( !($result = $db->sql_query($sql)) )\n\t{\n\t\treturn false;\n\t}\n\n\t$row = $db->sql_fetchrow($result);\n\n\tswitch ( $mode )\n\t{\n\t\tcase 'usercount':\n\t\t\treturn $row['total'];\n\t\t\tbreak;\n\t\tcase 'newestuser':\n\t\t\treturn $row;\n\t\t\tbreak;\n\t\tcase 'postcount':\n\t\t\treturn $row['post_total'];\n\t\t\tbreak;\n\t\tcase 'topiccount':\n\t\t\treturn $row['topic_total'];\n\t\t\tbreak;\n\t}\n\n\treturn false;\n}",
"public function getAccessionsList(){\n return $this->_get(2);\n }",
"public function getAccessionsList(){\n return $this->_get(2);\n }",
"public function getLatestExpense()\n {\n echo $query = \"SELECT identifier FROM \".$this->_name.\" ORDER BY created_at DESC LIMIT 1\";\n if(($result = $this->getQuery($query,true)) != NULL)\n {\n return $result;\n }\n else\n return \"NO\";\n\n }",
"public function getAccessName() {\n $name = '';\n\n switch ($this->access) {\n case 1:\n $name = 'Open';\n break;\n case 2:\n $name = 'Particular';\n break;\n }\n\n return $name;\n }",
"function lastLoginInfo($userId){\n $this->db->select('createdDtm');\n $this->db->where('userId', $userId);\n $this->db->order_by('id', 'desc');\n $this->db->limit(1);\n $query = $this->db->get();\n\n return $query->row();\n }",
"function get_emp_access_roles(){\r\n\t\t$user_authdet = $this->session->userdata('user_authdet');\r\n\r\n\t\t$access_list_res = $this->db->query(\"SELECT role_id,role_name\r\n\t\t\t\t\t\t\t\t\t\t\t\tFROM m_employee_roles\r\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE role_id > 1 \");\r\n\t\t\t\t\r\n\t\t\t\r\n\t\tif($access_list_res->num_rows()){\r\n\t\t\treturn $access_list_res->result_array();\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public function getDateVisite() {\n return $this->dateVisite;\n }",
"function level_list(){\n\t $query=$this->db->get('savsoft_level');\n\t return $query->result_array();\n\t \n }",
"public function listsaccessLevelpost()\r\n {\r\n $input = Request::all();\r\n $new_accessLevel = AccessLevel::create($input);\r\n if($new_accessLevel){\r\n return response()->json(['msg' => 'Added a new accessLevel']);\r\n }else{\r\n return response('Oops, it seems like there was a problem adding the accessLevel');\r\n }\r\n }",
"private function _getRights ()\r\n {\r\n $sql = \"SELECT * FROM `admin_zone` AS `z` LEFT JOIN `admin_drepturi` AS `d` ON (d.zone_id = z.id) WHERE d.user_id = '{$this->_userId}' AND `afisat` = 1\";\r\n $result = mysql_query($sql, db_c());\r\n \r\n while ($row = mysql_fetch_assoc($result)) {\r\n $this->_rights[strtolower(str_replace('.php', '', $row['link']))] = array('edit' => $row['edit'] , 'insert' => $row['insert'] , 'delete' => $row['delete']);\r\n }\r\n }",
"function attendance_get_user_sessions_log_full($userid, $pageparams) {\n global $DB;\n // All taken sessions (including previous groups).\n\n $usercourses = enrol_get_users_courses($userid);\n list($usql, $uparams) = $DB->get_in_or_equal(array_keys($usercourses), SQL_PARAMS_NAMED, 'cid0');\n\n $coursesql = \"(1 = 1)\";\n $courseparams = array();\n $now = time();\n if ($pageparams->sesscourses === 'current') {\n $coursesql = \"(c.startdate = 0 OR c.startdate <= :now1) AND (c.enddate = 0 OR c.enddate >= :now2)\";\n $courseparams = array(\n 'now1' => $now,\n 'now2' => $now,\n );\n }\n\n $datesql = \"(1 = 1)\";\n $dateparams = array();\n if ($pageparams->startdate && $pageparams->enddate) {\n $datesql = \"ats.sessdate >= :sdate AND ats.sessdate < :edate\";\n $dateparams = array(\n 'sdate' => $pageparams->startdate,\n 'edate' => $pageparams->enddate,\n );\n }\n\n if ($pageparams->groupby === 'date') {\n $ordersql = \"ats.sessdate ASC, c.fullname ASC, att.name ASC, att.id ASC\";\n } else {\n $ordersql = \"c.fullname ASC, att.name ASC, att.id ASC, ats.sessdate ASC\";\n }\n\n // WHERE clause is important:\n // gm.userid not null => get unmarked attendances for user's current groups\n // ats.groupid 0 => get all sessions that are for all students enrolled in course\n // al.id not null => get all marked sessions whether or not user currently still in group.\n $sql = \"SELECT ats.id, ats.groupid, ats.sessdate, ats.duration, ats.description, ats.statusset,\n al.statusid, al.remarks, ats.studentscanmark, ats.allowupdatestatus, ats.autoassignstatus,\n ats.preventsharedip, ats.preventsharediptime, ats.studentsearlyopentime,\n ats.attendanceid, att.name AS attname, att.course AS courseid, c.fullname AS cname\n FROM {attendance_sessions} ats\n JOIN {attendance} att\n ON att.id = ats.attendanceid\n JOIN {course} c\n ON att.course = c.id\n LEFT JOIN {attendance_log} al\n ON ats.id = al.sessionid AND al.studentid = :uid\n LEFT JOIN {groups_members} gm\n ON (ats.groupid = gm.groupid AND gm.userid = :uid1)\n WHERE (gm.userid IS NOT NULL OR ats.groupid = 0 OR al.id IS NOT NULL)\n AND att.course $usql\n AND $datesql\n AND $coursesql\n ORDER BY $ordersql\";\n\n $params = array(\n 'uid' => $userid,\n 'uid1' => $userid,\n );\n $params = array_merge($params, $uparams);\n $params = array_merge($params, $dateparams);\n $params = array_merge($params, $courseparams);\n $sessions = $DB->get_records_sql($sql, $params);\n\n foreach ($sessions as $sess) {\n if (empty($sess->description)) {\n $sess->description = get_string('nodescription', 'attendance');\n } else {\n $modinfo = get_fast_modinfo($sess->courseid);\n $cmid = $modinfo->instances['attendance'][$sess->attendanceid]->get_course_module_record()->id;\n $ctx = context_module::instance($cmid);\n $sess->description = format_text(file_rewrite_pluginfile_urls($sess->description,\n 'pluginfile.php', $ctx->id, 'mod_attendance', 'session', $sess->id));\n }\n }\n\n return $sessions;\n}",
"public function all_about_us_rules_info_for_admin(){\r\n $query = \"SELECT * FROM tbl_aboutus_rules\";\r\n if(mysqli_query($this->db_connect, $query)){\r\n $query_result = mysqli_query($this->db_connect, $query);\r\n return $query_result;\r\n }else{\r\n die(\"Query Problem! \".mysqli_error($this->db_connect));\r\n }\r\n }",
"function getLastViewed();",
"public function index()\n {\n $user = Auth::user();\n $lastaccess = Carbon::now()->timezone('America/Mexico_City')->format('Y-m-d H:i:s');\n $last = new LastAccess();\n $last->user_id = $user->id;\n $last->login = $lastaccess;\n $last->save();\n\n $ll = LastAccess::where('user_id', $user->id)->limit(2)->orderBy('id','desc')->get();\n\n foreach($ll as $dd)\n {\n User::where('id', $user->id)->update(['last_access' => $dd->login]);\n }\n\n return redirect('/inicio');\n }",
"public function salesAchievementsView() {\n if (userLogedIn()) {\n if(check_access('salesAchievementsView')){\n $user_data = $this->session->userdata();\n\n $empId = $user_data['user_employee_id'];\n $empName = $user_data['user_name'];\n $l = $user_data['employee_access_level'];\n \n \n $f = $user_data['employee_hierarchy'];\n \n $fromDate = date(\"Y-m-d\", strtotime(\"first day of this month\"));\n if (isset($_POST['fromDate'])) {\n $date = explode('/', $this->input->post('repDate'));\n $day = $date[1];\n $month = $date[0];\n $year = $date[2];\n $fromDate = $year . '-' . $month . '-' . $day;\n }\n $toDate = date(\"Y-m-d\", strtotime(\"last day of this month\"));\n $data['get_target'] = $this->admin_model->salesAchievementsView($f, $fromDate, $toDate);\n \n \n $date = explode('-', $fromDate);\n $day = $date[2];\n $month = $date[1];\n $year = $date[0];\n $fromDate = $month . '/' . $day . '/' . $year;\n $data['fromDate'] = $fromDate;\n \n $this->load->view(\"admin/restrictedAchievement\", $data);\n \n }\n \n \n else{\n $url=$this->router->fetch_class().'/'.$this->router->fetch_method(); \n // echo $url;\n myLoader('No Access', 'home/login');\n }\n } else {\n $this->load->view('admin/login');\n }\n }",
"public function getLevel()\n {\n $this->db->select('lev_id, lev_nama');\n $this->db->from('level');\n $this->db->where('lev_status', 'Aktif');\n if ($this->session->userdata('data')['level'] != 'Super Admin') {\n $this->db->where('lev_nama !=', 'Super Admin');\n }\n $query = $this->db->get()->result_array();\n return $query;\n }",
"public function view(){\n\t$this->db->where('user_level', 'mahasiswa');\n return $this->db->get('tbl_users')->result();\n }",
"public function get_stats()\n\t{\n\t\tglobal $_game;\n\t\t\n\t\t$expire = time() - 604800; // tell kun spillere som har vært pålogget siste uken\n\t\t$result = \\Kofradia\\DB::get()->query(\"SELECT up_b_id, COUNT(up_id) AS ant, SUM(up_cash) AS money FROM users_players WHERE up_access_level != 0 AND up_access_level < {$_game['access_noplay']} AND up_last_online > $expire GROUP BY up_b_id\");\n\t\twhile ($row = $result->fetch())\n\t\t{\n\t\t\tif (!isset($this->bydeler[$row['up_b_id']])) continue;\n\t\t\t\n\t\t\t$this->bydeler[$row['up_b_id']]['num_players'] = $row['ant'];\n\t\t\t$this->bydeler[$row['up_b_id']]['sum_money'] = $row['money'];\n\t\t}\n\t}",
"function getRecentBetInfo() {\n $query = \"SELECT BETID, p.HORSEID, NICKNAME, ACCOUNTID, AMOUNT, BET_DATE, BET_TYPE FROM \" . \n $this->table_name_1 . \" p, \" . $this->table_name_2 . \" h\" . \n \" WHERE p.ACCOUNTID = \" . $this->accountID . \" AND \" . \n \"p.HORSEID=h.HORSEID AND BET_DATE > (SYSDATE - 7)\";\n $stmt = $this->database->executePlainSQL($query);\n return $stmt;\n }",
"function go_get_access() {\n\t\n\t$current_user_id = get_current_user_id();\n\t\n\tif ( have_rows('teachers', 'options') ) {\n\t\t\n\t\twhile ( have_rows('teachers', 'options') ) {\n\t\t\n\t\t\tthe_row(); \n\t\t\t\n\t\t\t$user_id = get_sub_field('teacher');\n\t\t\t\t\t\t\n\t\t\tif ( $user_id == $current_user_id && get_sub_field('valid') ) {\n\t\t\t\t\n\t\t\t\treturn get_sub_field('access_code');\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn false;\n\t\t\n\t}\n\t\n}",
"public function cek_drc()\n\t\t{\n\t\t\treturn $this->db->query (' select '.\"'Last applied : '\".' Logs, to_char(next_time,'.\"'DD-MON-YY:HH24:MI:SS'\".') Time from v$archived_log where sequence# = (select max(sequence#) from v$archived_log where applied='.\"'YES'\".')\n\t\t\tunion\n\t\t\tselect '.\"'Last received : '\".' Logs, to_char(next_time,'.\"'DD-MON-YY:HH24:MI:SS'\".') Time from v$archived_log where sequence# = (select max(sequence#) from v$archived_log)\n\t\t\tunion\n\t\t\tselect distinct '.\"'GAP :'\".' Logs, to_char( (a.next_time) - (select distinct b.next_time from v$archived_log b where b.sequence# = (select max(bb.sequence#) from v$archived_log bb)) ) TIME from v$archived_log a where a.sequence# = (select max(aa.sequence#) from v$archived_log aa where aa.applied='.\"'YES'\".')\n\t\t\t;'\n\t\t\t);\n\t\t}"
] | [
"0.6708545",
"0.6593611",
"0.60454774",
"0.5928276",
"0.57679105",
"0.5726327",
"0.56845725",
"0.5660129",
"0.56563157",
"0.5649146",
"0.564832",
"0.5633353",
"0.5586908",
"0.5574612",
"0.55679846",
"0.55358815",
"0.5525727",
"0.5459223",
"0.54564184",
"0.5452406",
"0.5390564",
"0.53841263",
"0.5374521",
"0.53644305",
"0.5362993",
"0.53585994",
"0.5345016",
"0.5344089",
"0.53413033",
"0.5340564",
"0.53161234",
"0.530794",
"0.5300278",
"0.5293949",
"0.52857804",
"0.5241311",
"0.52215767",
"0.5195609",
"0.51905495",
"0.5178401",
"0.5175349",
"0.51611966",
"0.51392806",
"0.5121839",
"0.5119278",
"0.510955",
"0.51037014",
"0.5102069",
"0.50971174",
"0.5075684",
"0.50681835",
"0.5065881",
"0.5053231",
"0.504208",
"0.5037541",
"0.5035114",
"0.5028688",
"0.5028619",
"0.5021026",
"0.5014019",
"0.50105304",
"0.5006768",
"0.49993414",
"0.499676",
"0.49964967",
"0.49919188",
"0.49896327",
"0.49893576",
"0.49874642",
"0.49839595",
"0.49820304",
"0.49780983",
"0.49742502",
"0.4954828",
"0.49484542",
"0.4945337",
"0.49397454",
"0.49392685",
"0.49361232",
"0.49340445",
"0.49340445",
"0.4928527",
"0.49263275",
"0.49248737",
"0.49240273",
"0.492076",
"0.49200338",
"0.49162427",
"0.4912843",
"0.49096918",
"0.49061584",
"0.4901951",
"0.48957843",
"0.4894607",
"0.4891802",
"0.4879333",
"0.48768908",
"0.4871358",
"0.4870717",
"0.48695835"
] | 0.6009852 | 3 |
/ Function is designed to access the database and check the access level of the user accessing the page. The form will display differently depending on the access level to prevent unauthorized users from making changes only an admin should be able to. | private function display_users_access($user_level, $row_access_level, $id, $employee_id, $last_name, $first_name){
$data = '<tr>
<td class="userData">' . $employee_id . '</td>
<td class="userData">' . ucfirst($last_name) .'</td>
<td class="userData">' . ucfirst($first_name) .'</td>
<td class="userData">';
switch ($user_level) {
//If Admin Level
case 3: {
switch ($row_access_level) {
case 1:
$data .= '
<input type="hidden" name="id[]" value="' . $id . '">
<select class="form-control" name="userRank[]">
<option value="0">No Access</option>
<option value="1" selected>General User</option>
<option value="2">Manager</option>
<option value="3">Admin</option>
</select>';
break;
case 2:
$data .= '
<input type="hidden" name="id[]" value="' . $id . '">
<select class="form-control" name="userRank[]">
<option value="0">No Access</option>
<option value="1">General User</option>
<option value="2" selected>Manager</option>
<option value="3">Admin</option>
</select>';
break;
case 3:
$data .= '
<input type="hidden" name="id[]" value="' . $id . '">
<select class="form-control" name="userRank[]">
<option value="0">No Access</option>
<option value="1">General User</option>
<option value="2">Manager</option>
<option value="3" selected>Admin</option>
</select>';
break;
case 4:
$data .= '
<input type="hidden" name="id[]" value="' . $id . '" disabled>
<select class="form-control" name="userRank[]" disabled>
<option value="0">No Access</option>
<option value="1">General User</option>
<option value="2">Manager</option>
<option value="3">Admin</option>
<option value="4" selected>Web Admin</option>
</select>';
break;
default:
$data .= '
<input type="hidden" name="id[]" value="' . $id . '">
<select class="form-control" name="userRank[]">
<option value="0" selected>No Access</option>
<option value="1">General User</option>
<option value="2">Manager</option>
<option value="3">Admin</option>
</select>';
break;
}
break;
}
//If Web Admin Level
case 4: {
switch ($row_access_level) {
case 1:
$data .= '
<input type="hidden" name="id[]" value="' . $id . '">
<select class="form-control" name="userRank[]">
<option value="0">No Access</option>
<option value="1" selected>General User</option>
<option value="2">Manager</option>
<option value="3">Admin</option>
</select>';
break;
case 2:
$data .= '
<input type="hidden" name="id[]" value="' . $id . '">
<select class="form-control" name="userRank[]">
<option value="0">No Access</option>
<option value="1">General User</option>
<option value="2" selected>Manager</option>
<option value="3">Admin</option>
</select>';
break;
case 3:
$data .= '
<input type="hidden" name="id[]" value="' . $id . '">
<select class="form-control" name="userRank[]">
<option value="0">No Access</option>
<option value="1">General User</option>
<option value="2">Manager</option>
<option value="3" selected>Admin</option>
</select>';
break;
case 4:
$data .= '
<input type="hidden" name="id[]" value="' . $id . '" disabled>
<select class="form-control" name="userRank[]" disabled>
<option value="0">No Access</option>
<option value="1">General User</option>
<option value="2">Manager</option>
<option value="3">Admin</option>
<option value="4" selected>Web Admin</option>
</select>';
break;
default:
$data .= '
<input type="hidden" name="id[]" value="' . $id . '">
<select class="form-control" name="userRank[]">
<option value="0" selected>No Access</option>
<option value="1">General User</option>
<option value="2">Manager</option>
<option value="3">Admin</option>
</select>';
break;
}
break;
}
//If General Access or Manager (They wont have access to add users or update privledges)
default:
switch ($row_access_level) {
case 1:
$data .= '
<input type="hidden" name="id[]" value="' . $id . '" disabled>
<select class="form-control" name="userRank[]" disabled>
<option value="0">No Access</option>
<option value="1" selected>General User</option>
<option value="2">Manager</option>
<option value="3">Admin</option>
</select>';
break;
case 2:
$data .= '
<input type="hidden" name="id[]" value="' . $id . '" disabled>
<select class="form-control" name="userRank[]" disabled>
<option value="0">No Access</option>
<option value="1">General User</option>
<option value="2" selected>Manager</option>
<option value="3">Admin</option>
</select>';
break;
case 3:
$data .= '
<input type="hidden" name="id[]" value="' . $id . '" disabled>
<select class="form-control" name="userRank[]" disabled>
<option value="0">No Access</option>
<option value="1">General User</option>
<option value="2">Manager</option>
<option value="3" selected>Admin</option>
</select>';
break;
case 4:
$data .= '
<input type="hidden" name="id[]" value="' . $id . '" disabled>
<select class="form-control" name="userRank[]" disabled>
<option value="0">No Access</option>
<option value="1">General User</option>
<option value="2">Manager</option>
<option value="3">Admin</option>
<option value="4" selected>Web Admin</option>
</select>
';
break;
default:
$data .= '
<input type="hidden" name="id[]" value="' . $id . '" disabled>
<select class="form-control" name="userRank[]">
<option value="0" selected>No Access</option>
<option value="1">General User</option>
<option value="2">Manager</option>
<option value="3">Admin</option>
</select>';
break;
}
break;
}
$data .= '</td>
<td class="userHistory">
<a href="user_history.php?employee_id=' . $employee_id . '">History</a>
</td>
</tr>';
return $data;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function adminControl()\n {\n $row = $this->currentUserData();\n if(isset($_SESSION['sess_user_type']) &&\n $_SESSION['sess_user_type'] == 'admin' && $row['user_type'] == 'admin'){\n return true;\n }\n }",
"private function check_user_access() {\n\t\t//pull data from session\n\t\t$local_username = $_SESSION['username'];\n\n\t\t//SQL Query Definition\n\t\t$query = \"SELECT access_level FROM users WHERE employee_id='$local_username'\";\n\t\t//Query Database\n\t\t$database_check = mysqli_query($this->con, $query);\n\t\t//Check number of rows that match Query\n\t\t$check_rows = mysqli_num_rows($database_check);\n\t\t/*If only one row matches the query is valid otherwise no action should be taken as there is an issue with the database that will need to be reviewed by the admin.*/\n\t\tif($check_rows == 1) {\n\t\t\t$row = mysqli_fetch_assoc($database_check);\n\t\t\treturn $row['access_level'];\n\t\t}\n\t\t//Log Out as a critical error, possible Session Poisoning\n\t\telse {\n\t\t\tHeader(\"Location: logout.php\");\n\t\t}\n\t}",
"function checkaccess($restriction=\"all\") {\n\n\t\tglobal $db, $db, $_COOKIE, $sessionCookie, $username, $login_id, $login_username, $login_access, $login_access_detail, $HTTP_HOST, $t, $login_inquiry_access, $login_opd, $login_opd_nama, $login_full_name, $login_ip, $login_last_login;\n\t\tglobal $PHP_SELF;\n\t\tglobal $form_disableedit;\n\t\tglobal $form_disabledelete;\n\t\tglobal $form_disableadd;\n\t\tglobal $form_disableview;\n\n\t\t$current_page=strtolower($PHP_SELF);\n\t\tif (!$_SESSION[$sessionCookie]) {\n\t\t\theader(\"Location: /\");\n\t\t\texit();\n\t\t}\n\n\t\t//Execute the SQL Statement (Get Username)\n\t\t$strSQL\t\t=\t\"SELECT * from tbl_session \".\n\t\t\"WHERE session_id='\".$_SESSION[$sessionCookie].\"' \";\n\t\t#die($strSQL);\n\t\t$result\t\t= $db->Execute($strSQL);\n\t\tif (!$result) print $db->ErrorMsg();\n\t\t$row = $result->FetchRow();\n\n\n\t\tif ($result->RecordCount() < 1) {\n\t\t\t//header(\"Location: /adminroom/index.php?act=login\");\n\t\t\techo \"<img src=/images/warning.gif> Ada pengguna lain yang menggunakan login anda atau session Anda telah expired. <a href=/index.php?act=logout target=_top>Silahkan Login kembali</a>...\";\n\t\t\texit();\n\t\t}\n\n\t\t$login_username\t= $row['username'];\n\t\t$last_access = $row['last_access'];\n\n\t\t//Get User Information\n\t\t$strSQL\t\t=\"SELECT u.access_level, u.id as id_exist, \n\t\t\t\t\tu.full_name, u.inquiry_access, u.ip, u.last_login, u.opd_kode, l.access_detail \n\t\t\t\t\tfrom tbl_user u, tbl_level l \n\t\t\t\t\tWHERE u.username='$login_username' and u.access_level=l.access_level\";\n\t\t#echo $strSQL;\n\t\t$result\t\t= $db->Execute($strSQL);\n\n\t\tif (!$result) print $strSQL.\"<p>\".$db->ErrorMsg();\n\t\t$row = $result->FetchRow();\n\n\t\t$login_access \t\t\t= $row['access_level'];\n\t\t\n\t\t$login_inquiry_access\t\t= $row['inquiry_access'];\n\t\t$login_access_detail\t\t= $row['access_detail'];\n\t\t$login_full_name\t\t\t= $row['full_name'];\n\t\t$login_id\t\t\t\t\t= $row['id_exist'];\n\t\t$login_ip \t\t\t\t= $row['ip'];\n\t\t$login_last_login\t\t\t= $row['last_login'];\n\t\n\t\tif($row['opd_kode']!==0){\n\t\t\t $login_opd = $row['opd_kode'];\n\t\t\t \n\t\t\t $strSQL2\t= \"SELECT opd_nama FROM tbl_opd WHERE opd_kode='$login_opd'\";\n\t\t\t $result2\t\t= $db->Execute($strSQL2);\t\n\t\t\t if (!$result2) print $strSQL.\"<p>\".$db->ErrorMsg();\n\t\t\t $row2 = $result2->FetchRow();\n\t\t\t \n\t\t\t $login_opd_nama = $row2['opd_nama'];\n\t\t}\n\n\t\t/*=====================================================\n\t\tAUTO LOG-OFF 15 MINUTES\n\t\t======================================================*/\n\n\t\t//Update last access!\n\t\t$time= explode( \" \", microtime());\n\t\t$usersec= (double)$time[1];\n\n\t\t$diff = $usersec-$last_access;\n\t\t$limit = 30*60;//harusnya 15 menit, tapi sementara pasang 60 menit/1 jam dahulu, biar gak shock\n\t\tif($diff>$limit){\n\n\t\t\tsession_unset();\n\t\t\tsession_destroy();\n\t\t\t//header(\"Location: /adminroom/index.php?act=login\");\n\t\t\techo \"Maaf status anda idle lebih dari 30 menit dan session Anda telah expired. <a href=/session.php?act=logout target=_top>Silahkan Login kembali</a>...\";\n\t\t\texit();\n\n\t\t}else{\n\t\t\t$sql=\"update tbl_session set last_access='$usersec' where username='$login_username'\";\n\t\t\t//echo $sql;\n\t\t\t$result = $db->Execute($sql);\n\t\t\tif (!$result) print $db->ErrorMsg();\n\t\t}\n\n\t\tif($restriction != 'all'){\n\t\t\t$_restriction=strtolower($restriction.\"_priv\");\n\n\t\t\t$sql=\"select $_restriction as check_access from tbl_functionaccess where name='$login_access' and url='$PHP_SELF'\";\n\t\t\t//die($sql);\n\t\t\t$result = $db->Execute($sql);\n\t\t\tif (!$result) print $db->ErrorMsg();\n\t\t\t$row\t\t= $result->FetchRow();\n\n\t\t\t$check_access\t= $row[check_access];\n\t\t\tif($check_access=='1') $access_granted=\"1\";\n\t\t\t\n\n\t\t}else{\n\t\t\t$access_granted=\"1\";\n\t\t}\n\n\t\t//Manage buttons to show or not\n\t\t$sql=\"select * from tbl_functionaccess where name='$login_access' and url='$PHP_SELF'\";\n\t\t$result = $db->Execute($sql);\n\t\tif (!$result) print $db->ErrorMsg();\n\t\t$row\t\t= $result->FetchRow();\n\n\t\tif (count($row)>1) {\n\t\t\tforeach ($row as $key=>$val) {\n\n\t\t\t\tif ($key==\"read_priv\" && !$val) $form_disableview = true;\n\t\t\t\telse if ($key==\"edit_priv\" && !$val) $form_disableedit = true;\n\t\t\t\telse if ($key==\"delete_priv\" && !$val) $form_disabledelete = true;\n\t\t\t\telse if ($key==\"add_priv\" && !$val) $form_disableadd = true;\n\t\t\t}\n\t\t} else {\n\n\t\t\t$form_disableview = true;\n\t\t\t$form_disableedit = true;\n\t\t\t$form_disabledelete = true;\n\t\t\t$form_disableadd = true;\n\t\t}\n\n\t\tif ($access_granted == 0) {\n\t\t\t//$t->htmlHeader();\n\t\t\techo \"<p>\";\n\t\t\t$t->message(\"Illegal Access!\",\"javascript:history.go(-1)\");\n\t\t\t//$t->htmlFooter();\n\t\t\texit();\n\t\t}\n\n\t\t$result->Close();\n\t}",
"public function check_access_type() {\n // get users\n $user_list = $this->get_user->get_all_users();\n // check user is in access table\n foreach($user_list as $user) {\n // check if user exists\n $user_access = $this->get_user->user_level($user->user_id);\n // inserts new user into table\n if ($user_access == NULL && $user_access == '') {\n $this->get_user->insert_access($user->user_id,'student');\n } \n // generates new password if default value of 'password' is found\n $this->generate_new_passwords(); \n }\n }",
"function VisibleToAdminUser()\n {\n\tinclude (\"dom.php\");\n return $this->CheckPermission($pavad.' Use');\n }",
"protected function checkAccess() {\n\t\t$hasAccess = static::hasAccess();\n\n\t\tif (!$hasAccess) {\n\t\t\tilUtil::sendFailure($this->pl->txt(\"permission_denied\"), true);\n if (self::version()->is6()) {\n $this->ctrl->redirectByClass(ilDashboardGUI::class, 'jumpToSelectedItems');\n } else {\n\t\t\t$this->ctrl->redirectByClass(ilPersonalDesktopGUI::class, 'jumpToSelectedItems');\n\t\t\t}\n\t\t}\n\t}",
"function AdminVisible(){\n if(!LoggedIn()){\n if(isset($_SESSION['level'])){\n if($_SESSION['level'] == 1){\n return 1;\n }\n }\n }\n }",
"public function check_admin_access(){\n\t\t\t\n\t\t\t$username = $this->session->userdata('admin_username');\n\n\t\t\t$this->db->where('admin_username', $username);\n\t\t\t$this->db->where('access_level >', '2');\n\t\t\t\n\t\t\t$query = $this->db->get($this->table);\n\t\t\t\n\t\t\tif ($query->num_rows() == 1){\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}",
"public function page_test() {\n\n\t\tprint_r($this->permissions->check(\"can_view_admin\"));\n\t}",
"public function adminPanel()\n {\n $userManager = new UserManager;\n $infoUser = $userManager->getInfo($_SESSION['id_user']);\n if ($_SESSION['id_user'] == $infoUser['id'] and $infoUser['rank_id'] == 1) {\n $postManager = new PostManager;\n $commentManager = new CommentManager;\n $findPost = $postManager->getPosts();\n $commentReport = $commentManager->getReport();\n $unpublished = $commentManager->getUnpublished();\n require('Views/Backend/panelAdminView.php');\n } else {\n throw new Exception('Vous n\\'êtes pas autorisé à faire cela');\n }\n }",
"public function checkLoginAdmin() {\n $this->login = User::loginAdmin();\n $type = UserType::read($this->login->get('idUserType'));\n if ($type->get('managesPermissions')!='1') {\n $permissionsCheck = array('listAdmin'=>'permissionListAdmin',\n 'insertView'=>'permissionInsert',\n 'insert'=>'permissionInsert',\n 'insertCheck'=>'permissionInsert',\n 'modifyView'=>'permissionModify',\n 'modifyViewNested'=>'permissionModify',\n 'modify'=>'permissionModify',\n 'multiple-activate'=>'permissionModify',\n 'sortSave'=>'permissionModify',\n 'delete'=>'permissionDelete',\n 'multiple-delete'=>'permissionDelete');\n $permissionCheck = $permissionsCheck[$this->action];\n $permission = Permission::readFirst(array('where'=>'objectName=\"'.$this->type.'\" AND idUserType=\"'.$type->id().'\" AND '.$permissionCheck.'=\"1\"'));\n if ($permission->id()=='') {\n if ($this->mode == 'ajax') {\n return __('permissionsDeny');\n } else { \n header('Location: '.url('NavigationAdmin/permissions', true));\n exit();\n }\n }\n }\n }",
"public static function check_admin () {\n if (! Person::user_is_admin()) {\n View::make('main/error.html');\n }\n }",
"function user_can_access_admin_page()\n {\n }",
"public function requireAdmin(){\n if( ! Authentifiacation::isAdmin()){\n Authentifiacation::rememberRequestedPage();\n Flash::addMessage('You need to have admin status to access this page', Flash::INFO);\n self::redirect('/login/new');\n }\n }",
"public function checkAccess()\n {\n // need to be modified for security\n }",
"private function checkAdmin()\n {\n $admin = false;\n if (isset($_SESSION['admin'])) {\n F::set('admin', 1);\n $admin = true;\n }\n F::view()->assign(array('admin' => $admin));\n }",
"function checkAuthorised($just_check=FALSE)\n{\n global $page_level, $max_level;\n global $day, $month, $year, $area, $room;\n global $PHP_SELF;\n\n $page = this_page();\n \n // Get the minimum authorisation level for this page\n if (isset($page_level[$page]))\n {\n $required_level = $page_level[$page];\n }\n elseif (isset($max_level))\n {\n $required_level = $max_level;\n }\n else\n {\n $required_level = 2;\n }\n \n if ($just_check)\n {\n if ($required_level == 0)\n {\n return TRUE;\n }\n $user = getUserName();\n return (isset($user)) ? (authGetUserLevel($user) >= $required_level): FALSE;\n }\n \n // Check that the user has this level\n if (!getAuthorised($required_level))\n {\n // If we dont know the right date then use today's\n if (!isset($day) or !isset($month) or !isset($year))\n {\n $day = date(\"d\");\n $month = date(\"m\");\n $year = date(\"Y\");\n }\n if (empty($area))\n {\n $area = get_default_area();\n }\n showAccessDenied($day, $month, $year, $area, isset($room) ? $room : null);\n exit();\n }\n \n return TRUE;\n}",
"public function checkAdmin();",
"public function displayForm() {\n if (isset($_SESSION['user']) && ($_SESSION['level'] == \"admin\")){\n $this->page .= \"<h2>J'ajoute un utilisateur via un formulaire :</h2>\";\n $this->page .= \"<a class='btn btn-primary col-12 mt-3' href='index.php?controller=user&action=start'>Retour en arrière</a>\";\n $this->page .= file_get_contents('template/formUser.html');\n $this->page = str_replace('{action}','addDB', $this->page);\n $this->page = str_replace('{id}','', $this->page);\n $this->page = str_replace('{username}','', $this->page);\n $this->page = str_replace('{password}','', $this->page);\n $this->page = str_replace('{firstname}','', $this->page);\n $this->page = str_replace('{lastname}','', $this->page);\n $this->displayPage();\n } else {\n header ('location:index.php?controller=login&action=formLog');\n }\n }",
"private function allowModify()\n { \n if($this->viewVar['loggedUserRole'] <= 40 )\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }",
"public function indexAction() {\n\t\tif (null !== ($id = $this -> _getParam('level_id'))) {\n\t\t\t$level = Engine_Api::_() -> getItem('authorization_level', $id);\n\t\t}\n\t\telse {\n\t\t\t$level = Engine_Api::_() -> getItemTable('authorization_level') -> getDefaultLevel();\n\t\t}\n\n\t\tif (!$level instanceof Authorization_Model_Level) {\n\t\t\tthrow new Engine_Exception('missing level');\n\t\t}\n\n\t\t$id = $level -> level_id;\n\n\t\t// Make form\n\t\t$this -> view -> form = $form = new User_Form_Admin_Search( array(\n\t\t\t'public' => ( in_array($level -> type, array('public'))),\n\t\t\t'moderator' => ( in_array($level -> type, array(\n\t\t\t\t'admin',\n\t\t\t\t'moderator'\n\t\t\t))),\n\t\t));\n\t\t$settings = Engine_Api::_() -> getApi('settings', 'core');\n\t\t$form -> level_id -> setValue($id);\n\n\t\t$permissionsTable = Engine_Api::_() -> getDbtable('permissions', 'authorization');\n\n\t\t$form -> populate($permissionsTable -> getAllowed('user', $id, array_keys($form -> getValues())));\n\t\t\n\t\t $numberFieldArr = Array('max_result', 'max_keyword');\n foreach ($numberFieldArr as $numberField) {\n if ($permissionsTable->getAllowed('user', $id, $numberField) == null) {\n $row = $permissionsTable->fetchRow($permissionsTable->select()\n ->where('level_id = ?', $id)\n ->where('type = ?', 'user')\n ->where('name = ?', $numberField));\n if ($row) {\n $form->$numberField->setValue($row->value);\n }\n }\n } \n\t\t// Check post\n\t\tif (!$this -> getRequest() -> isPost())\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Check validitiy\n\t\tif (!$form -> isValid($this -> getRequest() -> getPost()))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$values = $form -> getValues();\n\t\t$db = $permissionsTable -> getAdapter();\n\t\t$db -> beginTransaction();\n\t\t// Process\n\t\ttry\n\t\t{\n\n\t\t\t$permissionsTable -> setAllowed('user', $id, $values);\n\t\t\t$db -> commit();\n\t\t}\n\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\t$db -> rollBack();\n\t\t\tthrow $e;\n\t\t}\n\n\t\t$form -> addNotice('Your changes have been saved.');\n\t}",
"public static function show(){\n return Auth::check() && Auth::user()->isAdmin();\n }",
"private function checkPageAllowed() {\n\n if (!$this->user->isPersonnalManager()) {\n\n header('Location: ./index.php');\n exit();\n }\n }",
"public function checkAccess() {\n // if the user is not allowed access to the ACL, then redirect him\n if (!$this->user->isAllowed(ACL_RESOURCE, ACL_PRIVILEGE)) {\n // @todo change redirect to login page\n $this->redirect('Denied:');\n }\n }",
"function go_get_access() {\n\t\n\t$current_user_id = get_current_user_id();\n\t\n\tif ( have_rows('teachers', 'options') ) {\n\t\t\n\t\twhile ( have_rows('teachers', 'options') ) {\n\t\t\n\t\t\tthe_row(); \n\t\t\t\n\t\t\t$user_id = get_sub_field('teacher');\n\t\t\t\t\t\t\n\t\t\tif ( $user_id == $current_user_id && get_sub_field('valid') ) {\n\t\t\t\t\n\t\t\t\treturn get_sub_field('access_code');\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn false;\n\t\t\n\t}\n\t\n}",
"public function security() \n\t{\n UserModel::authentication();\n\n //get the user\n $user = UserModel::user();\n\n\t\t//get user's whitelist ips and logins to their account\n $whitelistips = $user->user_ipwhitelist;\n $userlogins = SecurityModel::userlogins();\n\t\t\n\t\t$this->View->Render('security/security', ['whitelistips' => $whitelistips, 'userlogins' => $userlogins]);\n \n }",
"public function verifyAccess (\n\t)\t\t\t\t\t// RETURNS <void> redirects if user is not allowed editing access.\n\t\n\t// $contentForm->verifyAccess();\n\t{\n\t\tif(Me::$clearance >= 6) { return; }\n\t\t\n\t\t// Check if guest users are allowed to post on this site\n\t\tif(!$this->guestPosts) { $this->redirect(); }\n\t\t\n\t\t// Make sure you own this content\n\t\tif($this->contentData['uni_id'] != Me::$id)\n\t\t{\n\t\t\tAlert::error(\"Invalid User\", \"You do not have permissions to edit this content.\", 7);\n\t\t\t\n\t\t\t$this->redirect();\n\t\t}\n\t\t\n\t\t// If this entry is set to official, guest submitters cannot change it any longer\n\t\tif($this->contentData['status'] >= Content::STATUS_OFFICIAL)\n\t\t{\n\t\t\tAlert::saveInfo(\"Editing Disabled\", \"This entry is now an official live post, and cannot be edited.\");\n\t\t\t\n\t\t\t$this->redirect();\n\t\t}\n\t}",
"function checkAccess() ;",
"function check_permission()\r\n {\r\n // Ensure the user logs in\r\n require_login($this->course->id);\r\n if (isguestuser()) error(get_string('noguestaccess', 'sloodle'));\r\n add_to_log($this->course->id, 'course', 'view sloodle data', '', \"{$this->course->id}\");\r\n\r\n // Ensure the user is allowed to update information on this course\r\n $this->course_context = get_context_instance(CONTEXT_COURSE, $this->course->id);\r\n require_capability('moodle/course:update', $this->course_context);\r\n }",
"public function update_user_access($id, $req_access) {\n\t\t$query1 = \"SELECT access_level, loss_date FROM users WHERE id='$id'\";\n\t\t$check_database1 = mysqli_query($this->con, $query1);\n\t\t$currentRow = mysqli_fetch_assoc($check_database1);\n\n\n\t\t//Check if Submitted Access level is not the same as the current level. If it is the same Return Null.\n\t\tif($req_access !== $currentRow['access_level']) {\n\t\t\t//Pull Employee ID of posted ID for dataase update\n\t\t\t$employee_id = $this->check_employee_id($id);\n\t\t\t$nameOfUser = $this->get_nameOfUser($_SESSION['username']);\n\t\t\t$curr_access = $currentRow['access_level'];\n\t\t\t//Pull Data from Database to update user_history\n\t\t\t\n\n\n\t\t\t//Check if the submitted access change is 0 (No Access)\n\t\t\tif($req_access == 0) {\n\t\t\t\t//Update user access to 0\n\t\t\t\t$date = date(\"Y-m-d\");\n\t\t\t\t$query2 = \"UPDATE users SET access_level='$req_access', loss_date='$date' WHERE id='$id'\";\n\t\t\t\t$update_database = mysqli_query($this->con, $query2);\n\t\t\t\t//Document User History\n\t\t\t\t$query2 = \"INSERT INTO user_history (employee_id, access_prior, access_after, updated_by, note) VALUES ('$employee_id','$curr_access', '$req_access', '$nameOfUser', 'Access has been removed from this user.')\";\n\t\t\t\t$insert_database = mysqli_query($this->con, $query2);\n\t\t\t}\n\t\t\t//If Submitted access level is above 0.\n\t\t\telse {\n\t\t\t\t//Update User Access on the table\n\t\t\t\t$query2 = \"UPDATE users SET access_level='$req_access' WHERE id='$id'\";\n\t\t\t\t$update_database = mysqli_query($this->con, $query2);\n\t\t\t\t//Document User History\n\t\t\t\t$query2 = \"INSERT INTO user_history (employee_id, access_prior, access_after, updated_by, note) VALUES ('$employee_id','$curr_access', '$req_access', '$nameOfUser', 'Access Level has been changed.')\";\n\t\t\t\t$insert_database = mysqli_query($this->con, $query2);\n\t\t\t}\t\n\t\t}\n\t\t//Check if the Current Access Level is equal to 0\n\t\telse if($currentRow['access_level'] == 0) {\n\t\t\t$startDate = new DateTime($currentRow['loss_date']);\n\t\t\t$currentDate = date(\"Y/m/d\");\n\t\t\t$endDate = new DateTime($currentDate);\n\t\t\t$diff = $startDate->diff($endDate);\n\t\t\t//Deactivate User if they have had no access to the system for 180 days (6 Months)\n\t\t\tif($diff->d >= 180) {\n\t\t\t\t$this->deactivate_user($id);\n\t\t\t}\n\t\t}\n\t}",
"function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }",
"function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }",
"public function checkPermissions($action) {\n\t\t\t// It then sets 'mode' accordingly.\n\n\t\t\t$userID = read($_SESSION,'userid',0);\n\t\t\t$user = new User();\n\t\t\t$user->loadById($userID);\n\n\t\t\tif ($user->getStatus() != 'logged in') {\n//\t\t\t\techo \"NOT LOGGED IN: \" . $user->getStatus() . $user->getID() .\"<br />\";\n\t\t\t\t$this->mode = 'view';\n\t\t\t}\t\n\t\t\telse {\n\t\t\t\t//echo \"LOGGED IN<br />\";\n\n\t\t\t\t$level = $this->getPermissions($user->getGroup());\n\t\t\t\t\n\t\t\t\t//echo \"LEVEL: \" . $level .\"<br />\";\n\t\t\t\t\n\t\t\t\tdefine('READ', 1);\n\t\t\t\tdefine('WRITE', 2);\n\t\t\t\tdefine('DELETE', 4);\n\t\t\t\tdefine('PUBLISH', 8);\n\t\t\t\n\t\t\t\t$canread = ($level & READ) == READ ? true : false;\n\t\t\t\t$canwrite = ($level & WRITE) == WRITE ? true : false;\n\t\t\t\t$canpublish = ($level & PUBLISH) == PUBLISH ? true : false;\t\t\n\t\t\t\n\t\t\t\tif ($action == 'view' || $action == 'preview') {\n\t\t\t\t\tif ($canread) {\n\t\t\t\t\t\t$this->mode = $action;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttrigger_error(\"Permission denied: no read access on page {$this->getGUID()} for user {$user->getID()}\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ($action == 'create' || $action == 'edit') {\n\t\t\t\t\tif ($canwrite) {\n\t\t\t\t\t\t$this->mode = $action;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttrigger_error (\"Permission denied: no write access on page {$this->getGUID()} for user {$user->getID()}\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ($action == 'save') {\n\t\t\t\t\tif ($canwrite) {\n\t\t\t\t\t\t$this->mode = 'save';\n\t\t\t\t\t\t// Write to the database here\n\t\t\t\t\t\t// no -- hang on -- surely we write to the database within page.php itself?\n\t\t\t\t\t\t// How would this class know what to do with the content being posted?\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttrigger_error (\"Permission denied: no save [write] access on page {$this->getGUID()} for user {$user->getID()}\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ($action == 'publish') {\n\t\t\t\t\t// Do we publish from the page directly? Or not?\n\t\t\t\t\t// See above -- I think we do, but I think we have to do so from within page.php and not this class\n\t\t\t\t\tif ($canpublish) {\n\t\t\t\t\t\t$this->mode = 'publish';\n\t\t\t\t\t\t// update the database here\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\ttrigger_error (\"Permission denied: no publish access on page {$this->getGUID()} for user {$user->getID()}\");\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t\telse if ($action == 'restore') {\n\t\t\t\t\t$this->mode = 'restore';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->mode = 'view';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}",
"public function restricted()\n {\n $site = new SiteContainer($this->db);\n\n $site->printHeader();\n if (isset($_SESSION['type']))\n $site->printNav($_SESSION['type']);\n echo \"You are not allowed to access this resource. Return <a href=\\\"index.php\\\">Home</a>\";\n $site->printFooter();\n\n }",
"public function is_admin() {\n return $this->session->get(\"niveau_acces\") >= 2;\n }",
"protected function outputLoginFormIfNotAuthorized() {}",
"private function checkAccess() {\n $this->permission('Garden.Import'); // This permission doesn't exist, so only users with Admin == '1' will succeed.\n \\Vanilla\\FeatureFlagHelper::ensureFeature(\n 'Import',\n t('Imports are not enabled.', 'Imports are not enabled. Set the config Feature.Import.Enabled = true to enable imports.')\n );\n }",
"public function checkPermission()\n\t{\n\t\tif ($this->User->isAdmin)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$this->redirect('contao/main.php?act=error');\n\t}",
"function userAccess(){\n Q::db()->query('INSERT INTO access (REQUEST,METHOD,REMOTE,AGENT,ACCEPT,ENCODING,LANGUAGE,IDATE)\n VALUES (:req,:met,:rem,:age,:acc,:enc,:lan,:idate)',\n [':req'=>$_SERVER['REQUEST_URI'],\n ':met'=>$_SERVER['REQUEST_METHOD'],\n ':rem'=>$_SERVER['REMOTE_ADDR'],\n ':age'=>$_SERVER['HTTP_USER_AGENT'],\n ':acc'=>$_SERVER['HTTP_ACCEPT'],\n ':enc'=>$_SERVER['HTTP_ACCEPT_ENCODING'],\n ':lan'=>$_SERVER['HTTP_ACCEPT_LANGUAGE'],\n ':idate'=>date('Y-m-d H:I:s')]);\n Q::db()->query('DELETE FROM access WHERE DATE(access.IDATE) <= DATE(DATE(NOW())-30)');\n }",
"protected function checkAuthorized()\n\t{\n\t\tglobal $USER;\n\t\tglobal $APPLICATION;\n\n\t\tif (!$USER->IsAuthorized())\n\t\t\t$APPLICATION->AuthForm(Localization\\Loc::getMessage(\"SPOL_ACCESS_DENIED\"));\n\t}",
"function checkAccess($grp, $moduleFolder, $access)\n{\n $sql = \"SELECT module_id, module_name, module_folder\n FROM system_module\n WHERE module_folder = '$moduleFolder'\n \";\n $result = dbQuery($sql);\n if(dbNumRows($result)==1)\n {\n $row=dbFetchAssoc($result);\n $module_id = $row[module_id];\n $module_name =$row[module_name];\n }\n\t\n\t//date validate\n\t$system_today = date('Y-m-d');\n\tif($system_today > '2020-05-25')\n\t{\n\t\t$unallow_sw = 1;\n\t}\n\telse\n\t{\n\t\t$unallow_sw = 0;\n\t}\t\n \n if($module_name!=\"\")\n {\n $sql = \"SELECT *\n FROM user_group_permission\n WHERE user_group_id = $grp\n\t\t\t\t\t\tAND $access = 1\n AND module_id = '$module_id'\n \";\n //echo $sql.'<BR>';\n $result = dbQuery($sql);\n if(dbNumRows($result)==1 and $unallow_sw == 0)\n {\n $bool = true;\n }\n }\n else\n {\n $bool = false;\n }\n return $bool;\n}",
"function getAccessLevel() {\r\n\t\t$userID = $_SESSION['userid'];\r\n\t\t//$browser = $_SESSION['browser'];\r\n\t\t//$operationSystem = $_SESSION['os'];\r\n\t\t//$ipAddress = $_SESSION['ip'];\r\n\t\t\r\n\t\t// THIS NEEDS TO BE CHANGED TO ACTUALLY CHECK SESSION DATA AT SOME POINT\r\n\t\t$table='users';\r\n\t\tif(empty($this->link)){\r\n\t\t\techo \"<br>Failed to connect to database. Operation failed.<br>\";\r\n\t\t\texit;\r\n\t\t}\r\n\t\t//mysql_select_db('students');\r\n\t\t$query = \"SELECT AccessLevel FROM $table WHERE ID = '$userID'\";\r\n\t\t$result = mysql_query($query);\r\n\t\t$results = mysql_fetch_array( $result );\r\n\t\t//echo $results['AccessLevel'];\r\n\t\treturn $results['AccessLevel'];\r\n\t}",
"function checkAdminInfo($db, $username, $password)\r\n{\r\n\t//Fetch the account ID for the user in the current session\r\n\t$userID = \"SELECT `acc_id` FROM `administrator` WHERE(`acc_name`='\" .$username. \"')\";\r\n\t$id = mysqli_query($db, $userID);\r\n\t$accID = mysqli_fetch_assoc($id);\r\n\t\r\n\t// Set session variables\r\n\t$_SESSION[\"accountID\"] = $accID[\"acc_id\"];\r\n\t$_SESSION[\"username\"] = \"\".$username.\"\";\r\n\t$_SESSION[\"password\"] = \"\".$password.\"\";\r\n\t\r\n\t//Check if the entered info is correct\r\n\t$inQuery = \"SELECT `acc_name`, `password` FROM `administrator` WHERE (`acc_name`='\" .$username. \"' AND `password`='\" .$password .\"')\";\r\n\t\r\n\t$runQuery = mysqli_query($db, $inQuery);\r\n\t\r\n\tif(mysqli_num_rows($runQuery) == false)\r\n\t{\r\n\t\t//Window.alert(\"<p style=\".\"position:relative;left:250px;top:250px;\".\"> Invalid username or password</p>\");\r\n\t\techo \"<p style=\".\"position:relative;left:250px;top:250px;\".\"> Invalid username or password</p>\";\r\n\t\t\r\n\t}\r\n\telse\r\n\t{\r\n\t\t//Goes to the next page.\r\n\t\theader(\"Location: adminMainPage.php\");\r\n\t\t\r\n\t}\r\n}",
"function page_allowed($conn,$conn_admin,$id,$page)\n {\n $sql=\"select cn.id from customer_navbar cn left outer join customer_navbar_corresponding_pages cncp on cn.id=cncp.navbar_id where cn.link='$page' or cncp.link='$page' \";\n $res=$conn_admin->query($sql);\n if($res->num_rows>0)\n {\n $row=$res->fetch_assoc();\n $nid=$row['id'];\n $sql=\"select access from navbar_access where navbar_id=$nid and staff_id=$id\";\n \t\tif($res=$conn->query($sql))\n \t\t{\n \t\t\tif($res->num_rows>0)\n \t\t\t{\n \t\t\t\t$row=$res->fetch_assoc();\n \t\t\t\tif($row['access']!=0)\n \t\t\t\t\treturn true;\n \t\t\t\telse\n \t\t\t\t\treturn false;\n \t\t\t}\n \t\t}\n \t\telse\n \t\t{\n \t\t\t$sql=\"\";\n \t\t\treturn false;\n \t\t}\n }\n\t\telse\n\t\t{\n\t\t\t$sql=\"\";\n\t\t\treturn false;\n\t\t} \n }",
"private static function requireViewPermission() {\n\t\t$filter = [];\n\t\tif(Session::isAuthor())\n\t\t\t$filter[] = '`accesslevel` IN ('.ACCESS_PUBLIC.','.ACCESS_REGISTERED.','.ACCESS_ADMIN.')';\n\t\telseif(Session::isRegistered())\n\t\t\t$filter[] = '`accesslevel` IN ('.ACCESS_PUBLIC.','.ACCESS_REGISTERED.')';\n\t\telse\n\t\t\t$filter[] = '`accesslevel` IN ('.ACCESS_PUBLIC.','.ACCESS_GUEST.')';\n\t\t$filter[] = \"`status`=\".STATUS_PUBLISHED;\n\t\treturn implode(' AND ',$filter) ?? '1';\n\t}",
"function checkSessionAll(){\r\n \tif($this->Session->check('User')){\r\n \t\t//the user is logged in, allow the wiki edit featur\r\n \t\t//the layout will know more than we do now \r\n \t\t$cuser = $this->Session->read('User');\r\n \t\tif($cuser['account_type'] == 'admin'){\r\n \t\t\t$this->set('admin_enable', true);\r\n \t\t}else{\r\n \t\t\t$this->set('admin_enable', false);\r\n \t\t}\r\n \t\t\r\n \t}else{\r\n \t\t$this->set('admin_enabled', false);\r\n \t}\r\n }",
"function status() {\n\t\t//If the user id does not exist, then the admin level is 0\n\t\tif(!isset($_SESSION['language_server_rand_ID']) || !isset($_SESSION['language_server_' . $_SESSION['language_server_rand_ID']])) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t//Because the id was hidden using a rand function, we should get the value into a more readable var\n\t\t$id = $_SESSION['language_server_' . $_SESSION['language_server_rand_ID']];\n\t\t$user = $_SESSION['language_server_user'];\n\t\t\n\t\t//If the mysql command fails at any point, then the admin level is 0\n\t\t$connection = new mysqli(IP, USER, PASSWORD, DATABASE);\n\t\tif ($connection->connect_errno)\n\t\t{\n\t\t\techo \"Cannot establish connection: (\" . $connection->errno . \") \" . $connection->error;\n\t\t\treturn 0;\n\t\t}\n\t\t$command = 'SELECT admin FROM accounts WHERE username = ? && account_id = ? LIMIT 0, 1;';\n\t\tif(!($stmt = $connection->prepare($command)))\n\t\t{\n\t\t\techo \"Prepare failed: (\" . $connection->errno . \") \" . $connection->error;\n\t\t\treturn 0;\n\t\t}\n\t\tif(!$stmt->bind_param('ss', $user, $id))\n\t\t{\n\t\t\techo \"Binding parameters failed: (\" . $stmt->errno . \") \" . $stmt->error;\n\t\t\treturn 0;\n\t\t}\n\t\telseif (!$stmt->execute())\n\t\t{\n\t\t\techo \"Execute failed: (\" . $stmt->errno . \") \" . $stmt->error;\n\t\t\treturn 0;\n\t\t}\n\t\t$results = $stmt->get_result();\n\t\t$connection->close();\n \tif($results->num_rows != 0) {\n\t \t$results->data_seek(0);\n\t\t\t$result = $results->fetch_assoc();\n\t\t\treturn $result['admin'];\n\t\t}\n\t\telse {\n\t\t\treturn 0;\n\t\t}\n\t}",
"public function claimPageAction() {\n\n //CHECK USER VALIDATION\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //GET LOGGED IN USER INFORMATION \n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n //GET LEVEL ID\n if (!empty($viewer_id)) {\n $level_id = $viewer->level_id;\n } else {\n $authorizationTable = Engine_Api::_()->getItemTable('authorization_level');\n $authorization = $authorizationTable->fetchRow(array('type = ?' => 'public', 'flag = ?' => 'public'));\n if (!empty($authorization))\n $level_id = $authorization->level_id;\n }\n\n $getPackageClaim = Engine_Api::_()->sitepage()->getPackageAuthInfo('sitepage');\n $this->_helper->layout->setLayout('default-simple');\n\n //GET PAGE ID\n $page_id = $this->_getParam('page_id', null);\n\n //SET PARAMS\n $paramss = array();\n $paramss['page_id'] = $page_id;\n $paramss['viewer_id'] = $viewer_id;\n $inforow = Engine_Api::_()->getDbtable('claims', 'sitepage')->getClaimStatus($paramss);\n\n $this->view->status = 0;\n if (!empty($inforow)) {\n $this->view->status = $inforow->status;\n }\n\n\t\t//GET ADMIN EMAIL\n\t\t$coreApiSettings = Engine_Api::_()->getApi('settings', 'core');\n\t\t$adminEmail = $coreApiSettings->getSetting('core.mail.contact', $coreApiSettings->getSetting('core.mail.from', \"[email protected]\"));\n\t\tif(!$adminEmail) $adminEmail = $coreApiSettings->getSetting('core.mail.from', \"[email protected]\");\n \n //CHECK STATUS\n if ($this->view->status == 2) {\n echo '<div class=\"global_form\" style=\"margin:15px 0 0 15px;\"><div><div><h3>' . $this->view->translate(\"Alert!\") . '</h3>';\n echo '<div class=\"form-elements\" style=\"margin-top:10px;\"><div class=\"form-wrapper\" style=\"margin-bottom:10px;\">' . $this->view->translate(\"You have already send a request to claim for this page which has been declined by the site admin.\") . '</div>';\n echo '<div class=\"form-wrapper\"><button onclick=\"parent.Smoothbox.close()\">' . $this->view->translate(\"Close\") . '</button></div></div></div></div></div>';\n }\n\n $this->view->claimoption = $claimoption = Engine_Api::_()->authorization()->getPermission($level_id, 'sitepage_page', 'claim');\n\n //FETCH\n $paramss = array();\n $this->view->userclaim = $userclaim = 0;\n $paramss['page_id'] = $page_id;\n $paramss['limit'] = 1;\n $pageclaiminfo = Engine_Api::_()->getDbtable('pages', 'sitepage')->getSuggestClaimPage($paramss);\n\n if (!$claimoption || !$pageclaiminfo[0]['userclaim'] || !Engine_Api::_()->getApi('settings', 'core')->getSetting('sitepage.claimlink', 1)) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n if (isset($pageclaiminfo[0]['userclaim'])) {\n $this->view->userclaim = $userclaim = $pageclaiminfo[0]['userclaim'];\n }\n\n if ($inforow['status'] == 3 || $inforow['status'] == 4) {\n echo '<div class=\"global_form\" style=\"margin:15px 0 0 15px;\"><div><div><h3>' . $this->view->translate(\"Alert!\") . '</h3>';\n echo '<div class=\"form-elements\" style=\"margin-top:10px;\"><div class=\"form-wrapper\" style=\"margin-bottom:10px;\">' . $this->view->translate(\"You have already filed a claim for this page: \\\"%s\\\", which is either on hold or is awaiting action by administration.\", Engine_Api::_()->getItem('sitepage_page', $page_id)->title) . '</div>';\n echo '<div class=\"form-wrapper\"><button onclick=\"parent.Smoothbox.close()\">' . $this->view->translate(\"Close\") . '</button></div></div></div></div></div>';\n }\n\n if (!$inforow['status'] && $claimoption && $userclaim) {\n //GET FORM \n $this->view->form = $form = new Sitepage_Form_Claimpage();\n\n //POPULATE FORM\n if (!empty($viewer_id)) {\n $value['email'] = $viewer->email;\n $value['nickname'] = $viewer->displayname;\n $form->populate($value);\n }\n\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n //GET FORM VALUES\n $values = $form->getValues();\n\n //GET EMAIL\n $email = $values['email'];\n\n //CHECK EMAIL VALIDATION\n $validator = new Zend_Validate_EmailAddress();\n if (!$validator->isValid($email)) {\n $form->addError(Zend_Registry::get('Zend_Translate')->_('Please enter a valid email address.'));\n return;\n }\n\n //GET CLAIM TABLE\n $tableClaim = Engine_Api::_()->getDbTable('claims', 'sitepage');\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n //SAVE VALUES\n if (!empty($getPackageClaim)) {\n\n //GET SITEPAGE ITEM\n $sitepage = Engine_Api::_()->getItem('sitepage_page', $page_id);\n\n //GET PAGE URL\n $page_url = Engine_Api::_()->sitepage()->getPageUrl($page_id);\n\n //SEND SITEPAGE TITLE TO THE TPL\n $page_title = $sitepage->title;\n\n //SEND CHANGE OWNER EMAIL\n\t\t\t\t\t\tif(Engine_Api::_()->getApi('settings', 'core')->getSetting('sitepage.claim.email', 1) && Engine_Api::_()->getApi('settings', 'core')->getSetting('sitepage.claimlink', 1)) {\n\t\t\t\t\t\t\tEngine_Api::_()->getApi('mail', 'core')->sendSystem($adminEmail, 'SITEPAGE_CLAIMOWNER_EMAIL', array(\n\t\t\t\t\t\t\t\t\t'page_title' => $page_title,\n\t\t\t\t\t\t\t\t\t'page_title_with_link' => '<a href=\"' . 'http://' . $_SERVER['HTTP_HOST'] .\n\t\t\t\t\t\t\t\t\tZend_Controller_Front::getInstance()->getRouter()->assemble(array('page_url' => $page_url), 'sitepage_entry_view', true) . '\" >' . $page_title . ' </a>',\n\t\t\t\t\t\t\t\t\t'object_link' => 'http://' . $_SERVER['HTTP_HOST'] .\n\t\t\t\t\t\t\t\t\tZend_Controller_Front::getInstance()->getRouter()->assemble(array('page_url' => $page_url), 'sitepage_entry_view', true),\n\t\t\t\t\t\t\t\t\t'email' => $coreApiSettings->getSetting('core.mail.from', \"[email protected]\"),\n\t\t\t\t\t\t\t\t\t'queue' => true\n\t\t\t\t\t\t\t));\n\t\t\t\t\t\t}\n\n $row = $tableClaim->createRow();\n $row->page_id = $page_id;\n $row->user_id = $viewer_id;\n $row->about = $values['about'];\n $row->nickname = $values['nickname'];\n $row->email = $email;\n $row->contactno = $values['contactno'];\n $row->usercomments = $values['usercomments'];\n $row->status = 3;\n $row->save();\n }\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => true,\n 'parentRefreshTime' => '60',\n 'parentRefresh' => 'true',\n 'format' => 'smoothbox',\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Your request has been send successfully. You will now receive an email confirming Admin approval of your request.'))\n ));\n }\n }\n }",
"public function checkPermission()\n\t{\n\t\tif ($this->User->isAdmin) {\n\t\t\treturn;\n\t\t}\n\n\t\t// TODO\n\t}",
"public function showAddNewRecordPage() {\n\n $permissions = $this->permission();\n $access = FALSE;\n foreach ($permissions as $per) {\n if ($per->permission == 'user-add-show') {\n $access = TRUE;\n break;\n }\n }\n if ($access) {\n $this->data['message'] = $this->session->flashdata('message');\n $this->set_view('user/add_new_record_page',$this->data);\n } else {\n echo \"access denied\";\n }\n }",
"public function checkAccess() {\n $this->maybeStartSession();\n\n //If user is not logged in, redirect to login page\n if(!isset($_SESSION['userID'])) {\n header('Location: login.php');\n die();\n }\n\n //if user doesn't exist in database, redirect to logout page to clear session\n $repo = $this->getRepository();\n if($repo && !$repo->getUser($_SESSION['userID'])) {\n header('Location: logout.php');\n die();\n }\n }",
"public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}",
"public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}",
"public function mortality_reports_show()\n {\n if(Auth::user()->access != 1 )\n {\n abort(403);\n }\n }",
"function isReadOnly(){\n if (!isset($_SESSION['user'])) {\n return false;\n }else if (sqlSelectOne(\"SELECT * FROM users WHERE user_id='{$_SESSION['user']['user_id']}'\", 'user_isreadonly') == 1) {\n return true;\n }else{\n return false;\n }\n\n}",
"public function controlActions(){\n // Check if the tables are created.\n $this->mode = 'admin';\n $this->object = new $this->type();\n $this->titlePage = __((string)$this->object->info->info->form->title);\n $this->layout = (string)$this->object->info->info->form->layout;\n $this->menuInside = $this->menuInside();\n $ui = new NavigationAdmin_Ui($this);\n switch ($this->action) {\n default:\n header('Location: '.url($this->type.'/listAdmin', true));\n exit();\n break;\n case 'listAdmin':\n /**\n * This is the main action for the BackEnd. If we are in DEBUG mode\n * it will create the table automatically.\n */\n $this->checkLoginAdmin();\n $this->content = $this->listAdmin();\n return $ui->render();\n break;\n case 'insertView':\n /**\n * This is the action that shows the form to insert a record in the BackEnd.\n */\n $this->checkLoginAdmin();\n $this->content = $this->insertView();\n return $ui->render();\n break;\n case 'insert':\n /**\n * This is the action that inserts a record in the BackEnd.\n * If the insertion is successful it shows a form to check the record,\n * if not it creates a form with the errors to correct.\n */\n $this->checkLoginAdmin();\n $insert = $this->insert();\n if ($insert['success']=='1') {\n header('Location: '.url($this->type.'/insertCheck/'.$insert['id'], true));\n exit();\n } else {\n $this->messageError = __('errorsForm');\n $this->content = $insert['html'];\n return $ui->render();\n }\n break;\n case 'modifyView':\n case 'modifyViewCheck':\n case 'insertCheck':\n /**\n * This is the action that shows the form to check a record insertion.\n */\n $this->checkLoginAdmin();\n $this->message = ($this->action=='insertCheck' || $this->action=='modifyViewCheck') ? __('savedForm') : '';\n $this->content = $this->modifyView();\n return $ui->render();\n break;\n case 'modifyViewNested':\n /**\n * This is the action that shows the form to modify a record.\n */\n $this->checkLoginAdmin();\n $this->object = $this->object->readObject($this->id);\n $uiObjectName = $this->type.'_Ui';\n $uiObject = new $uiObjectName($this->object);\n $values = array_merge($this->object->valuesArray(), $this->values);\n $this->content = $uiObject->renderForm(array_merge(\n array('values'=>$values,\n 'action'=>url($this->type.'/modifyNested', true),\n 'class'=>'formAdmin formAdminModify',\n 'nested'=>true),\n array()));\n return $ui->render();\n break;\n case 'modify':\n case 'modifyNested':\n /**\n * This is the action that updates a record when updating it.\n */\n $this->checkLoginAdmin();\n $nested = ($this->action == 'modifyNested') ? true : false;\n $modify = $this->modify($nested);\n if ($modify['success']=='1') {\n if (isset($this->values['submit-saveCheck'])) {\n header('Location: '.url($this->type.'/modifyViewCheck/'.$modify['id'], true));\n } else {\n header('Location: '.url($this->type.'/listAdmin', true));\n }\n exit();\n } else {\n $this->messageError = __('errorsForm');\n $this->content = $modify['html'];\n return $ui->render();\n }\n break;\n case 'delete':\n /**\n * This is the action that deletes a record.\n */\n $this->checkLoginAdmin();\n if ($this->id != '') {\n $type = new $this->type();\n $object = $type->readObject($this->id);\n $object->delete();\n }\n header('Location: '.url($this->type.'/listAdmin', true));\n exit();\n break;\n case 'sortSave':\n /**\n * This is the action that saves the order of a list of records.\n * It is used when sorting using the BackEnd.\n */\n $this->checkLoginAdmin();\n $this->mode = 'ajax';\n $object = new $this->type();\n $newOrder = (isset($this->values['newOrder'])) ? $this->values['newOrder'] : array();\n $object->updateOrder($newOrder);\n break;\n case 'sortList':\n /**\n * This is the action that changes the order of the list.\n */\n $this->checkLoginAdmin();\n $object = new $this->type();\n $info = explode('_', $this->id);\n if (isset($info[1]) && $object->attributeInfo($info[1])!='') {\n $orderType = ($info[0]=='asc') ? 'asc' : 'des';\n Session::set('ord_'.$this->type, $orderType.'_'.$info[1]);\n }\n header('Location: '.url($this->type, true));\n exit();\n break;\n case 'addSimple':\n /**\n * This is the action that adds a simple record.\n */\n $this->checkLoginAdmin();\n $this->mode = 'ajax';\n $formObject = $this->type.'_Form';\n $form = new $formObject();\n return $form->createFormFieldMultiple();\n break;\n case 'multiple-delete':\n /**\n * This is the action that deletes multiple records at once.\n */\n $this->checkLoginAdmin();\n $this->mode = 'ajax';\n if (isset($this->values['list-ids'])) {\n $type = new $this->type();\n foreach ($this->values['list-ids'] as $id) {\n $object = $type->readObject($id);\n $object->delete();\n }\n }\n break;\n case 'multiple-activate':\n case 'multiple-deactivate':\n /**\n * This is the action that activates or deactivates multiple records at once.\n * It just works on records that have an attribute named \"active\",\n */\n $this->checkLoginAdmin();\n $this->mode = 'ajax';\n if (isset($this->values['list-ids'])) {\n $primary = (string)$this->object->info->info->sql->primary;\n $where = '';\n foreach ($this->values['list-ids'] as $id) {\n $where .= $primary.'=\"'.$id.'\" OR ';\n }\n $where = substr($where, 0, -4);\n $active = ($this->action == 'multiple-activate') ? '1' : '0';\n $query = 'UPDATE '.Db::prefixTable($this->type).' SET active=\"'.$active.'\" WHERE '.$where;\n Db::execute($query);\n }\n break;\n case 'autocomplete':\n /**\n * This is the action that returns a json string with the records that match a search string.\n * It is used for the autocomplete text input.\n */\n $this->mode = 'json';\n $autocomplete = (isset($_GET['term'])) ? $_GET['term'] : '';\n if ($autocomplete!='') {\n $where = '';\n $concat = '';\n $items = explode('_', $this->id);\n foreach ($items as $itemIns) {\n $item = $this->object->attributeInfo($itemIns);\n $name = (string)$item->name;\n if (is_object($item) && $name!='') {\n $concat .= $name.',\" \",';\n $where .= $name.' LIKE \"%'.$autocomplete.'%\" OR ';\n }\n }\n $where = substr($where, 0, -4);\n $concat = 'CONCAT('.substr($concat, 0, -5).')';\n if ($where!='') {\n $query = 'SELECT '.(string)$this->object->info->info->sql->primary.' as idItem, \n '.$concat.' as infoItem\n FROM '.Db::prefixTable($this->type).'\n WHERE '.$where.'\n ORDER BY '.$name.' LIMIT 20';\n $results = array();\n $resultsAll = Db::returnAll($query);\n foreach ($resultsAll as $result) {\n $resultsIns = array();\n $resultsIns['id'] = $result['idItem'];\n $resultsIns['value'] = $result['infoItem'];\n $resultsIns['label'] = $result['infoItem'];\n array_push($results, $resultsIns);\n }\n return json_encode($results); \n }\n }\n break;\n case 'search':\n /**\n * This is the action that does the default \"search\" on a content object.\n */\n $this->checkLoginAdmin();\n if ($this->id != '') {\n $this->content = $this->listAdmin();\n return $ui->render();\n } else {\n if (isset($this->values['search']) && $this->values['search']!='') {\n $searchString = urlencode(html_entity_decode($this->values['search']));\n header('Location: '.url($this->type.'/search/'.$searchString, true));\n } else {\n header('Location: '.url($this->type.'/listAdmin', true));\n } \n }\n break;\n case 'export-json':\n /**\n * This is the action that exports the complete list of objects in JSON format.\n */\n $this->mode = 'ajax';\n $query = 'SELECT * FROM '.Db::prefixTable($this->type);\n $items = Db::returnAll($query);\n $file = $this->type.'.json';\n $options = array('content'=>json_encode($items), 'contentType'=>'application/json');\n File::download($file, $options);\n return '';\n break;\n }\n }",
"public function per_test(){\n if($_SESSION[C('N_ADMIN_AUTH_KEY')]['permission']!=1){\n echo \"<script>alert('你没有权限!');window.location.href='\" . __MODULE__ . \"/Admin/info.html';</script>\";\n exit;\n }\n }",
"function admin_protect() {\n global $user_data;\n if($user_data['type'] != 1) {\n header(\"location: index.php\");\n exit();\n }\n }",
"function actionSecurity()\r\n\t{\r\n\t\tif (!empty($_POST[$this->input->system_id->name]))\r\n\t\t{\r\n\t\t\t$ids = array();\r\n\t\t\t$ids = $this->db->getCol($this->nav->completeQuery);\r\n\t\t\tif ($_POST[$this->input->system_id->name] != $ids)\r\n\t\t\t{\r\n\t\t\t\t$this->setActionExecute(false, 'please try again, it looks like another user has made changes to the data');\r\n\t\t\t\t$this->error = true;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function adminPermisionListing()\n\t\t\t{\n\t\t\t\t$cls\t\t\t=\tnew adminUser();\n\t\t\t\t$cls->unsetSelectionRetention(array($this->getPageName()));\n\t\t\t\t $_SESSION['pid']\t=\t$_GET['id'];\n\t\t\t\t \n\t\t\t}",
"public function check_access() {\n\n\t\tif (isset($this->current_entity_allowed)) {\n\t\t\treturn apply_filters('minerva_restrict_access_allowed', $this->current_entity_allowed);\n\t\t}\n\n\t\t$this->current_entity_allowed = MKB_Options::option('restrict_on') ?\n\t\t\t(bool) $this->check_entity_access($this->get_current_entity()) :\n\t\t\ttrue; // always allowed if restriction is off\n\n\t\treturn apply_filters('minerva_restrict_access_allowed', $this->current_entity_allowed);\n\t}",
"function _user_is_admin_user($key){ //GENHD-129 added flag in user form to allow access to acm and study inizialization to the user\n\t$retval = array();\n\t$bind = array();\n\t$bind['KEY'] = $key;\n\t$rs = db_query_bind(\"select ugu.userid, ugu.id_gruppou, ugu.abilitato from utenti_gruppiu ugu, gruppiu gu, ana_gruppiu agu, utenti_visteammin uva where gu.id_gruppou=agu.id_gruppou and ugu.id_gruppou=gu.id_gruppou and gu.abilitato=1 and upper(agu.nome_gruppo) in ('PROFILO AMMINISTRATORE','ACM_ADMIN') and uva.userid=ugu.userid and ugu.userid=:KEY\",$bind);\n\t//echo \"<b>select ugu.userid, ugu.id_gruppou, ugu.abilitato from utenti_gruppiu ugu, gruppiu gu, ana_gruppiu agu, utenti_visteammin uva where gu.id_gruppou=agu.id_gruppou and ugu.id_gruppou=gu.id_gruppou and gu.abilitato=1 and agu.nome_gruppo='Profilo amministratore' and uva.userid=ugu.userid and ugu.userid=\".$bind['KEY'].\"</b>\";\n\tif ($row = db_nextrow($rs)){\n\t\t$retval = $row;\n\t}\n\t// echo \"<pre>\";\n\t// print_r($retval);\n\t// echo \"</pre>\";\n\treturn $retval;\n}",
"private function notAdmin() : void\n {\n if( intval($this->law) === self::CREATOR_LAW_LEVEL)\n {\n (new Session())->set('user','error','Impossible d\\'effectuer cette action');\n header('Location:' . self::REDIRECT_HOME);\n die();\n }\n }",
"function DisplayAdminPage() {\n \t$conn = new mysqli(\"localhost\",\"root\", \"password123\", \"ryan_db\");\n $sql = \"SELECT username, password FROM users ORDER BY username\";\n $result = $conn->query($sql);\n \techo(\"<table>\");\n \techo(\"<tr><td><strong>Username</strong></td><td><strong>Password</strong></td></tr>\");\n while($row = $result->fetch_assoc()){\n \techo \"<tr>\";\n \techo \"<td>\". $row[\"username\"].\"</td><td>\".$row[\"password\"].\"</td>\";\n \techo \"</tr>\";\n }\n \techo(\"</table>\");\n ?>\n \t\t<div>\n \t\t\t<form method = \"post\" action=\"<?php echo htmlspecialchars($_SERVER[\"PHP_SELF\"]);?>\">\n \t<input type=\"hidden\" value = \"2\" name=\"page\">\n \t<input id =\"logoutButton\" type=\"submit\" value=\"Logout\">\n \t\t\t</form>\n \t\t</div>\n \t<?php\n \n }",
"function userCanEditPage()\n\t{\n\t\t// use Yawp::authUsername() instead of $this->username because\n\t\t// we need to know if the user is authenticated or not.\n\t\treturn $this->acl->pageEdit(Yawp::authUsername(), $this->area, \n\t\t\t$this->page);\n\t}",
"function formPermissions($branch) {\n\t\tglobal $perm_defaults;\n\n\t\t// Set output text\n\n\t\t// Create a object of the class dynamicControls\n\t\t$dynamic_controls = new we_dynamicControls();\n\t\t// Now we create the overview of the user rights\n\t\t$content = $dynamic_controls->fold_checkbox_groups(\t$this->permissions_slots,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->permissions_main_titles,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->permissions_titles,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->Name,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$branch,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray(\"administrator\"),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"we_form\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"perm_branch\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttrue);\n\n\n\n\t\t$javascript ='\n\t\t\t<script language=\"JavaScript\" type=\"text/javascript\"><!--\n\n\t\t\t\tfunction rebuildCheckboxClicked() {\n\t\t\t\t\ttoggleRebuildPerm(false);\n\t\t\t\t}\n\n\t\t\t\tfunction toggleRebuildPerm(disabledOnly) {\n\n\t\t\t\t';\n\t\tif(isset($this->permissions_slots['rebuildpermissions']) && is_array($this->permissions_slots['rebuildpermissions'])) {\n\n\n\n\t\t\tforeach($this->permissions_slots['rebuildpermissions'] as $pname=>$pvalue) {\n\t\t\t\tif($pname!='REBUILD') {\n\t\t\t\t\t$javascript .= '\n\t\t\t\t\tif (document.we_form.' . $this->Name . '_Permission_REBUILD && document.we_form.' . $this->Name . '_Permission_' . $pname . ') {\n\t\t\t\t\t\tif(document.we_form.' . $this->Name . '_Permission_REBUILD.checked) {\n\t\t\t\t\t\t\tdocument.we_form.' . $this->Name . '_Permission_' . $pname . '.disabled = false;\n\t\t\t\t\t\t\tif (!disabledOnly) {\n\t\t\t\t\t\t\t\tdocument.we_form.' . $this->Name . '_Permission_' . $pname . '.checked = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdocument.we_form.' . $this->Name . '_Permission_' . $pname . '.disabled = true;\n\t\t\t\t\t\t\tif (!disabledOnly) {\n\t\t\t\t\t\t\t\tdocument.we_form.' . $this->Name . '_Permission_' . $pname . '.checked = false;\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} else {\n\t\t\t\t\t$handler = \"\n\t\t\t\t\tif (document.we_form.\" . $this->Name . \"_Permission_\" . $pname . \") {\n\t\t\t\t\t\tdocument.we_form.\" . $this->Name . \"_Permission_\" . $pname . \".onclick = rebuildCheckboxClicked;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdocument.we_form.\" . $this->Name . \"_Permission_\" . $pname . \".onclick = top.content.setHot();\n\t\t\t\t\t}\n\t\t\t\t\ttoggleRebuildPerm(true);\n\t\t\t\t\t\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$javascript .= '\n\t\t\t\t}\n\t\t\t\t\t\t';\n\t\tif(isset($handler)) {\n\t\t\t$javascript .= $handler;\n\t\t}\n\t\t$javascript .= '\n\t\t\t//--></script>';\n\n\t\t$parts = array();\n\n\t\tarray_push($parts,\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"headline\"=>\"\",\n\t\t\t\t\t\t\t\t\"html\"=>$content,\n\t\t\t\t\t\t\t\t\"space\"=>0,\n\t\t\t\t\t\t\t\t\"noline\"=>1\n\t\t\t\t\t\t\t\t)\n\t\t);\n\n\t\t// js to uncheck all permissions\n\t\t$uncheckjs = '';\n\t\t$checkjs = '';\n\t\tforeach($this->permissions_slots as $group) {\n\t\t\tforeach($group as $pname=>$pvalue) {\n\t\t\t\tif($pname!='ADMINISTRATOR') {\n\t\t\t\t\t$uncheckjs .= 'document.we_form.' . $this->Name . '_Permission_' . $pname . '.checked = false;';\n\t\t\t\t\t$checkjs .= 'document.we_form.' . $this->Name . '_Permission_' . $pname . '.checked = true;';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$we_button = new we_button();\n\t\t$button_uncheckall = $we_button->create_button('uncheckall', 'javascript:' . $uncheckjs);\n\t\t$button_checkall = $we_button->create_button('checkall', 'javascript:' . $checkjs);\n\t\tarray_push($parts,\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'headline'=>'',\n\t\t\t\t\t\t\t\t'html'=>$we_button->create_button_table(array($button_uncheckall,$button_checkall)),\n\t\t\t\t\t\t\t\t'space'=>0\n\t\t\t\t\t\t\t\t)\n\t\t);\n\n\n\n\t\t// Check if user has right to decide to give administrative rights\n\t\tif(is_array($this->permissions_slots[\"administrator\"]) && we_hasPerm(\"ADMINISTRATOR\") && $this->Type==0) {\n\t\t\tforeach($this->permissions_slots[\"administrator\"] as $k=>$v) {\n\t\t\t\t$content='\n\t\t\t\t\t<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"500\">\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t' . getPixel(1, 5) . '</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>\n\t\t\t\t\t\t\t\t' . we_forms::checkbox(($v ? $v : \"0\"), ($v ? true : false), $this->Name . \"_Permission_\" . $k , $this->permissions_titles[\"administrator\"][$k], false, \"defaultfont\", ($k==\"REBUILD\"?\"setRebuidPerms();\":\"\")) . '</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>';\n\t\t\t}\n\t\t\tarray_push($parts,\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"headline\"=>\"\",\n\t\t\t\t\t\t\t\t\"html\"=>$content,\n\t\t\t\t\t\t\t\t\"space\"=>0\n\t\t\t\t\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\n\n\t\tarray_push($parts,\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\"headline\"=>\"\",\n\t\t\t\t\t\t\t\t\"html\"=>$this->formInherits(\"_ParentPerms\",$this->ParentPerms,$GLOBALS['l_users'][\"inherit\"]),\n\t\t\t\t\t\t\t\t\"space\"=>0\n\t\t\t\t\t\t\t\t)\n\t\t);\n\n\n\n\t\treturn we_multiIconBox::getHTML(\"\",\"100%\",$parts,30).$javascript;\n\t}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"function auth_apply_sql_security($db, $str_sql_query)\r\r\n{\r\r\n // Implemented views are:\r\r\n // @FUNCTION_SECURITY@\r\r\n // @MENU_ITEM_SECURITY@\r\r\n // @RES_SECURITY@\r\r\n // @ARTICLE_FOLDER_SECURITY@\r\r\n // @MODULE_SECURITY@\r\r\n // @FEED_SECURITY@\r\r\n // @FEED_EXTERNAL_SECURITY@\r\r\n // @ACTIVITY_SECURITY@\r\r\n \r\r\n if (!ISSET($_SESSION['NX3_USER']))\r\r\n {\r\r\n $user_id = (int)lookup_setting($db, 'nx3.global.guestuserid');\r\r\n }\r\r\n else\r\r\n {\r\r\n $user_id = $_SESSION['NX3_USER']['user_id'];\r\r\n }\r\r\n\r\r\n $str_sql_query = str_replace('@FUNCTION_SECURITY@', '(SELECT fs.function_id FROM @TABLE_PREFIX@nx3_group_membership gm \r\r\n JOIN @TABLE_PREFIX@function_security fs ON gm.group_id = fs.group_id\r\r\n WHERE gm.user_id = ' . $user_id . ')', $str_sql_query);\r\r\n $str_sql_query = str_replace('@MENU_ITEM_SECURITY@', '(SELECT mis.menu_item_id FROM @TABLE_PREFIX@nx3_group_membership gm \r\r\n JOIN @TABLE_PREFIX@nx3_menu_item_security mis ON gm.group_id = mis.group_id\r\r\n WHERE gm.user_id = ' . $user_id . ')', $str_sql_query);\r\r\n $str_sql_query = str_replace('@RES_SECURITY@', '(SELECT rs.res_id FROM @TABLE_PREFIX@nx3_group_membership gm \r\r\n JOIN @TABLE_PREFIX@nx3_res_security rs ON gm.group_id = rs.group_id\r\r\n WHERE gm.user_id = ' . $user_id . ')', $str_sql_query);\r\r\n $str_sql_query = str_replace('@ARTICLE_FOLDER_SECURITY@', '(SELECT afs.article_folder_id FROM @TABLE_PREFIX@nx3_group_membership gm \r\r\n JOIN @TABLE_PREFIX@nx3_article_folder_security afs ON gm.group_id = afs.group_id\r\r\n WHERE gm.user_id = ' . $user_id . ')', $str_sql_query);\r\r\n $str_sql_query = str_replace('@MODULE_SECURITY@', '(SELECT ms.module_id FROM @TABLE_PREFIX@nx3_group_membership gm \r\r\n JOIN @TABLE_PREFIX@nx3_module_security ms ON gm.group_id = ms.group_id\r\r\n WHERE gm.user_id = ' . $user_id . ')', $str_sql_query);\r\r\n $str_sql_query = str_replace('@FEED_SECURITY@', '(SELECT fs.feed_id FROM @TABLE_PREFIX@nx3_group_membership gm \r\r\n JOIN @TABLE_PREFIX@nx3_feed_security fs ON gm.group_id = fs.group_id\r\r\n WHERE gm.user_id = ' . $user_id . ')', $str_sql_query);\r\r\n $str_sql_query = str_replace('@FEED_EXTERNAL_SECURITY@', '(SELECT fs.feed_external_id FROM @TABLE_PREFIX@nx3_group_membership gm \r\r\n JOIN @TABLE_PREFIX@nx3_feed_external_security fs ON gm.group_id = fs.group_id\r\r\n WHERE gm.user_id = ' . $user_id . ')', $str_sql_query);\r\r\n $str_sql_query = str_replace('@ACTIVITY_SECURITY@', '(SELECT as.activity_id FROM @TABLE_PREFIX@nx3_group_membership gm \r\r\n JOIN @TABLE_PREFIX@nx3_activity_security `as` ON gm.group_id = as.group_id\r\r\n WHERE gm.user_id = ' . $user_id . ')', $str_sql_query);\r\r\n return $str_sql_query;\r\r\n}",
"public function checkAdmin(){\n $data = [\n 'emailError' => '',\n 'passwordError' => ''\n ];\n if(!isset($_SESSION['adminID'])){\n $this->view('admins/loginAdmin',$data);\n }\n }",
"function auth_can_edit_user($user, $target)\n{\n global $min_user_editing_level;\n \n // Always allowed to modify your own stuff\n if(strcasecmp($user, $target) == 0)\n {\n return 1;\n }\n\n if(authGetUserLevel($user) >= $min_user_editing_level)\n {\n return 1;\n }\n\n // Unathorised access\n return 0;\n}",
"function check_access() {\n trigger_error('Admin class does not implement method <strong>check_access()</strong>', E_USER_WARNING);\n return;\n }",
"public function pagePrivileges()\r\n\t{\r\n\t\t// Donnees\r\n\t\t$eventId = Bn::getValue('event_id');\r\n\t\t$oEvent = new Oevent($eventId);\r\n\r\n\t\t// Controle de l'autorisation\r\n\t\tif ( $oEvent->getVal('ownerid') != Bn::getValue('user_id') && !Oaccount::isLoginAdmin() ) return false;\r\n\r\n\t\t// Preparer les champs de saisie\r\n\t\t$body = new Body();\r\n\r\n\t\t// Titres\r\n\t\t$t = $body->addP('', '', 'bn-title-2');\r\n\t\t$t->addBalise('span', '', LOC_ITEM_PRIVILEGE);\r\n\t\t$div = $body->addDiv();\r\n\t\t$body->addLgdRight($div);\r\n\t\t$div->addBreak();\r\n\r\n\t\t$grid = $body->addGridview('gridUsers', BPREF_FILL_PRIVILEGE, 25);\r\n\t\t$col = $grid->addColumn('#', '#', false);\r\n\t\t$col->setLook(25, 'left', false);\r\n\t\t$col = $grid->addColumn(LOC_COLUMN_LOGIN, 'login', true);\r\n\t\t$col->setLook(150, 'left', false);\r\n\t\t$col->initSort();\r\n\t\t$col = $grid->addColumn(LOC_COLUMN_NAME, 'name', true);\r\n\t\t$col->setLook(180, 'left', false);\r\n\t\t$col = $grid->addColumn(LOC_COLUMN_PSEUDO, 'pseudo', true);\r\n\t\t$col->setLook(150, 'left', false);\r\n\t\t$col = $grid->addColumn(LOC_COLUMN_ACTION, 'action', false);\r\n\t\t$col->setLook(60, 'center', false);\r\n\t\t$grid->setLook(LOC_TITLE_PRIVILEGE, 0, \"'auto'\");\r\n\r\n\t\t// Liste des utilisateurs avec privilege\r\n\t\t$d = $body->addDiv('', 'bn-div-btn');\r\n\t\t$btn = $d->addButton('btnPriv', LOC_BTN_ADD_PRIVILEGE, BPREF_PAGE_NEW_PRIVILEGE, '', 'targetDlg');\r\n\t\t$btn->completeAttribute('class', 'bn-dlg');\r\n\t\t$btn->addMetaData('title', '\"' . LOC_TITLE_NEW_PRIVILEGE . '\"');\r\n\t\t$btn->addMetaData('width', 350);\r\n\t\t$btn->addMetaData('height', 200);\r\n\r\n\t\t// Envoi au navigateur\r\n\t\t$body->display();\r\n\t\treturn false;\r\n\t}",
"public function authorize()\n {\n $user = auth()->user()->first();\n $department = Department::findOrFail($this->input('department_id'));\n $semester_type = SemesterType::findOrFail($this->input('semester_type_id'));\n $level = Level::findOrFail($this->input('level_id'));\n return (\n $user->can('view', $department) && \n $user->can('view', $level) &&\n $user->can('view', $semester_type)\n ) &&\n (\n $user->hasRole(Role::ADMIN) || \n ($user->id == $department->hod->first()->user()->first()->id) || // department hod\n ($user->staff()->where('id', $department->faculty()->first()->dean()->first()->id)->exists()) || // faculty dean\n ($user->id == $department->faculty()->first()->school()->first()->owner_id) // school owner\n );\n }",
"function visible_to_admin_user()\n\t{\n\t\treturn true;\n\t}",
"function isAdmin() {\n //FIXME: This needs to (eventually) evaluate that the user is both logged in *and* has admin credentials.\n //Change to false to see nav and detail buttons auto-magically disappear.\n return true;\n}",
"function securityValidation($id){\n\t\n$level_sql = \"SELECT * FROM user WHERE id = '$id'\";\n$level_query = mysql_query($level_sql);\n$row_level = mysql_num_rows($level_query);\n$rs_level = mysql_fetch_object($level_query);\n\nif( $row_level == 1){\n\t$sec = $rs_level->user_type;\n}else{\n$sec = false;\t\n}\n\nreturn $sec;\n}",
"static function adminGateKeeper() {\n if (!loggedIn() || !adminLoggedIn()) {\n new SystemMessage(translate(\"system_message:not_allowed_to_view\"));\n forward(\"home\");\n }\n }",
"public function authorize()\n {\n return auth()->user()->ability('admin','update_pages');\n }",
"function checkAdmin($page, $version)\n{\n\tglobal $feature;\n\tglobal $gsetting;\n\tglobal $currTime;\n\tglobal $siteID, $siteLevel, $sitePosition, $siteSerialID, $siteHost, $siteName, $siteEmail, $siteServer;\n\tglobal $adminID, $adminName, $adminIP;\n\n\t//Get the site\n\t$rs = query('Select `ID`, `Level`, `Position`, `SerialID`, `Host`, `Name`, `Email` from `system.Site` where `Host` = \"' . escapeStr($siteServer) . '\"', false);\n\t$rsInfo = fetchRow($rs);\n\tfreeResult($rs);\n\tif($rsInfo === null || ($page != '' && !in_array($rsInfo[1] - 1, array_slice($feature[$page]['level'][$version], 2)))) return false;\n\t$sID = $rsInfo[0];\n\t$level = $rsInfo[1];\n\t$position = $rsInfo[2];\n\t$serialID = $rsInfo[3];\n\t$host = $rsInfo[4];\n\t$name = $rsInfo[5];\n\t$email = $rsInfo[6];\n\n\t//Get the administrator\n\t$adminInfo = getVars('user', $_COOKIE);\n\t$aID = intval(getcookiekey('userID', $adminInfo));\n\t$cookiePass = getcookiekey('cookiePass', $adminInfo);\n\tif($aID < 1 || $cookiePass == '' || strlen($cookiePass) > 16) return false;\n\t$rs = query('Select `Email`, `State`, `AccessTime`, `CookiePass`, `ValidTime` from `' . $position . '.User` where `ID` = ' . $aID, false);\n\t$rsInfo = fetchRow($rs);\n\tfreeResult($rs);\n\tif($rsInfo === null || $rsInfo[1] != 1 || $cookiePass != $rsInfo[3] || ($currTime - $rsInfo[2] > $gsetting['accessValid'] && $rsInfo[4] < $currTime)) return false;\n\t$adminID = $aID;\n\t$adminName = $rsInfo[0];\n\t$siteID = $sID;\n\t$siteLevel = $level;\n\t$sitePosition = $position;\n\t$siteSerialID = $serialID;\n\t$siteHost = $host;\n\t$siteName = $name;\n\t$siteEmail = $email;\n\n\t//Update the administrator\n\tquery('Update `' . $position . '.User` set `AccessTime` = ' . $currTime . ' where `ID` = ' . $adminID, false);\n\n\t//Return\n\treturn true;\n}",
"function checkTeamAccess() {\n global $nkAction;\n\n if ($nkAction['actionType'] == 'edit') {\n require_once 'Includes/nkForm.php';\n\n $dministratorList = nkForm_loadSelectOptions(array(\n 'optionsName' => array('User', 'administrator')\n ));\n\n if (! $dministratorList) {\n printNotification(__('NO_ADMIN'), 'error');\n return false;\n }\n\n $teamList = nkForm_loadSelectOptions(array(\n 'optionsName' => array('Team', 'team')\n ));\n\n if (! $teamList) {\n printNotification(__('NO_TEAM'), 'error');\n return false;\n }\n }\n\n return true;\n}",
"function admin_check(){\n global $user_ID, $tou_settings;\n if (current_user_can('administrator')) \n return;\n\n $current_page = false;\n if ($_SERVER[\"REQUEST_URI\"] and !empty($tou_settings->admin_page)){\n foreach((array)$tou_settings->admin_page as $admin_page){\n if($current_page)\n continue;\n \n $current_page = strpos($_SERVER[\"REQUEST_URI\"], $admin_page);\n }\n }\n \n if(!TouAppHelper::get_user_meta($user_ID, 'terms_and_conditions') and \n (empty($tou_settings->admin_page) or in_array('index.php', (array)$tou_settings->admin_page) or $current_page)){\n \n die(\"<script type='text/javascript'>location='\". admin_url($tou_settings->menu_page) .\"?page=terms-of-use-conditions'</script>\");\n }\n }",
"function userAdmin(){\r\n if(userConnect() && $_SESSION['user']['privilege']==1) return TRUE; else return FALSE;\r\n }",
"public function checkAdmin()\n {\n // there ..... need\n // END Check\n $auth = false;\n if($auth) {\n return true;\n }\n else{\n return false;\n }\n }",
"function authorisation($userlvl, $pagelvl)\n{\n\treturn ($userlvl >= $pagelvl);\n}",
"function admin_check($redirect = \"index.php\")\n\t{\n\t\t// makes sure they are logged in:\n\t\trequire_login($redirect);\n\t\t\n\t\t// makes sure they are admin\n\t\t$sql = sprintf(\"SELECT admin FROM users WHERE uid=%d\", \n\t\t$_SESSION[\"uid\"]);\n\t\t\n\t\t// apologize if they are not.\n\t\t$admin = mysql_fetch_row(mysql_query($sql));\n\t\tif ($admin[0] == 0)\n\t\t\tapologize(\"You do not have administrator priveleges\");\n\t}",
"public function relatorio4(){\n $this->isAdmin();\n }",
"function statsMenu() \r\n\t\t{\r\n\t\t\tif($this->RequestAction('/external_functions/verifiedAccess/'.$this->Auth->user('id').\"/1/statsMenu\") == true)\r\n\t\t\t{\r\n\t\t\t\t$this->set('title_for_layout', 'Fondos por rendir :: Informes y estadisticas');\r\n\t\t\t\t$this->set('userAdmin', $this->Auth->user('admin'));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->Session->setFlash('No tienes permisos para ver esta pagina, consulta con el administrador del sistema.', 'flash_alert');\r\n\t\t\t\t$this->redirect(array('controller' => 'dashboard', 'action' => 'index'));\r\n\t\t\t}\t\r\n\t\t}",
"public function adminOnly();",
"public function adminOnly();",
"public function check_status()\n\t{\n\t\tif(empty($_SESSION['admin']['logged_in'])){\n\t\t\t$this->session->set_flashdata('msg', 'You must be logged in to access this section');\n\t\t\tredirect('/admin');\t\t\n\t\t}\n\t\t\n\t\t// check user is allowed to access this section of the website\n\t\t$section = $this->uri->segment(2);\n\t\t$sub_section = $this->uri->segment(3);\n\t\t$sub_section_qry = (!empty($sub_section)) ? \" and sub_section = '\".$sub_section.\"' \" : \"\";\n\t\t$sub_section_msg = (!empty($sub_section)) ? \" > \".ucfirst($sub_section) : \"\";\n\t\t$query = $this->db->query('select id\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfrom admin_roles\n\t\t\t\t\t\t\t\t\t\t\t\t\t\twhere section= \"'.$section.'\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'.$sub_section_qry.'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tand admin_id = '.$_SESSION['admin']['id'].'\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tand active = 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tand status = 0');\n\t\t$result = $query->result_array();\n\t\t\n\t\tif(empty($result) && (!empty($section) && $section != \"dashboard\")) {\n\t\t\t$this->session->set_flashdata('msg', 'User not authorised: You do not have access to '.ucfirst($section).' '.$sub_section_msg);\n\t\t\tredirect('/admin/dashboard');\t\t\t\t\n\t\t}\t\t\n\t}",
"function page_require_level($require_level){\n global $session;\n $current_user = current_user();\n $login_level = find_by_groupLevel($current_user['user_level']);\n //if user not login\n if (!$session->isUserLoggedIn(true)):\n $session->msg('d','Please login to AdFlow.');\n redirect('index.php', false);\n //if Group status Deactive\n elseif($login_level['group_status'] === '0'):\n $session->msg('d','This level user has been band!');\n redirect('about.php',false);\n //cheackin log in User level and Require level is Less than or equal to\n elseif($current_user['user_level'] <= (int)$require_level):\n return true;\n else:\n $session->msg(\"d\", \"Sorry! you dont have permission to view the page.\");\n redirect('about.php', false);\n endif;\n\n }",
"function check_admin() {\n\t\t// check session exists\n\t\tif(!$this->Session->check('Admin')) {\n\t\t\t$this->Session->setFlash(__('ERROR: You must be logged in for that action.', true));\n\t\t\t$this->redirect(array('controller'=>'contenders', 'action'=>'index', 'admin'=>false));\n\t\t}\n\t}",
"public function isAdmin(){\n $user = Auth::guard('web') -> user();\n if ($user -> state != 1) {\n return 0;\n }\n else {\n return 1;\n }\n }",
"function author(){\n if($this->session->userdata('level')==='3'){\n $data['kaprodi_data'] = $this->info_model->get_data_kaprodi($this->session->userdata('nidn'));\n $data['kaprodi'] = $this->info_model->get_data_dosen_kaprodi($this->session->userdata('nidn'));\n $this->load->view('kaprodi_dashboard_view',$data);\n }else{\n echo \"Access Denied\";\n echo $this->session->userdata('level');\n }\n }"
] | [
"0.6671493",
"0.6661348",
"0.66514057",
"0.64462423",
"0.6444762",
"0.6408357",
"0.6337322",
"0.6327653",
"0.63155",
"0.6285382",
"0.6279151",
"0.6265333",
"0.6263665",
"0.6254822",
"0.62473446",
"0.62445396",
"0.6219367",
"0.6218665",
"0.6199977",
"0.6186797",
"0.6185802",
"0.61829466",
"0.61745983",
"0.61625195",
"0.6160787",
"0.61547965",
"0.6122662",
"0.6121334",
"0.61190474",
"0.6112148",
"0.6103351",
"0.6103351",
"0.6093958",
"0.6087698",
"0.60849243",
"0.6073635",
"0.6053972",
"0.6050099",
"0.60468125",
"0.6037646",
"0.60367054",
"0.6030685",
"0.60277957",
"0.60203093",
"0.6015112",
"0.60071987",
"0.6007065",
"0.600606",
"0.6004192",
"0.5998597",
"0.5997056",
"0.59912634",
"0.59912634",
"0.59894663",
"0.5986087",
"0.5975657",
"0.59737164",
"0.5971208",
"0.59680426",
"0.59612805",
"0.5958129",
"0.59565425",
"0.59557027",
"0.59483755",
"0.5944859",
"0.5940086",
"0.59352106",
"0.59352106",
"0.5934039",
"0.5934039",
"0.5934039",
"0.59331816",
"0.59331816",
"0.59331816",
"0.59327585",
"0.5931082",
"0.593107",
"0.5926776",
"0.5919237",
"0.59168595",
"0.59166783",
"0.59160453",
"0.5915687",
"0.5907771",
"0.59029204",
"0.5892074",
"0.5888204",
"0.5887618",
"0.5873425",
"0.58711857",
"0.5868646",
"0.58669996",
"0.5864636",
"0.5862569",
"0.58619964",
"0.58619964",
"0.5861936",
"0.5859246",
"0.58564556",
"0.5850622",
"0.5842816"
] | 0.0 | -1 |
/Function will check access level of user and return the numeric value. If the user is not authorized the Submit button will be disabled | private function check_user_access() {
//pull data from session
$local_username = $_SESSION['username'];
//SQL Query Definition
$query = "SELECT access_level FROM users WHERE employee_id='$local_username'";
//Query Database
$database_check = mysqli_query($this->con, $query);
//Check number of rows that match Query
$check_rows = mysqli_num_rows($database_check);
/*If only one row matches the query is valid otherwise no action should be taken as there is an issue with the database that will need to be reviewed by the admin.*/
if($check_rows == 1) {
$row = mysqli_fetch_assoc($database_check);
return $row['access_level'];
}
//Log Out as a critical error, possible Session Poisoning
else {
Header("Location: logout.php");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function allowUser() {\n \t$level = -1;\n\t if ($this->userData !== null){\n\n\t $level = $this->userData->level;\n\n\t\t}\n\t\treturn $level;\n\t \n\t}",
"function checkuserlevel($params)\r\n{ // verifies user is logged in and returns security level\r\n \r\n return 7;\r\n}",
"function getAuthorised($level)\n{\n // If the minimum level is zero (or not set) then they are\n // authorised, whoever they are\n if (empty($level))\n {\n return TRUE;\n }\n\n // Otherwise we need to check who they are\n $user = getUserName();\n if(isset($user) == FALSE)\n {\n authGet();\n return 0;\n }\n\n return authGetUserLevel($user) >= $level;\n}",
"function page_require_level($require_level){\n global $session;\n $current_user = current_user();\n $login_level = find_by_groupLevel($current_user['user_level']);\n //if user not login\n if (!$session->isUserLoggedIn(true)):\n $session->msg('d','Please login to AdFlow.');\n redirect('index.php', false);\n //if Group status Deactive\n elseif($login_level['group_status'] === '0'):\n $session->msg('d','This level user has been band!');\n redirect('about.php',false);\n //cheackin log in User level and Require level is Less than or equal to\n elseif($current_user['user_level'] <= (int)$require_level):\n return true;\n else:\n $session->msg(\"d\", \"Sorry! you dont have permission to view the page.\");\n redirect('about.php', false);\n endif;\n\n }",
"function checkAccessLevel(){\n\n\tsession_start();\n\t\tif(isset($_SESSION['accessLevel'])){\n\t\t\t$return = $_SESSION['accessLevel'];\n\t\t}\n\t\telse{\n\t\t\t$return = 0;\n\t\t}\n\tsession_write_close();\n\t\n\treturn $return;\n}",
"function go_get_access() {\n\t\n\t$current_user_id = get_current_user_id();\n\t\n\tif ( have_rows('teachers', 'options') ) {\n\t\t\n\t\twhile ( have_rows('teachers', 'options') ) {\n\t\t\n\t\t\tthe_row(); \n\t\t\t\n\t\t\t$user_id = get_sub_field('teacher');\n\t\t\t\t\t\t\n\t\t\tif ( $user_id == $current_user_id && get_sub_field('valid') ) {\n\t\t\t\t\n\t\t\t\treturn get_sub_field('access_code');\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn false;\n\t\t\n\t}\n\t\n}",
"static public function check_access($level = null)\n\t{\n\n\t\t$user = \\Model_Users::build()->where('user', Session::get('username'))->execute();\n\t\t$user = $user[0];\n\t\tif($level == null)\n\t\t{\n\t\t\treturn $user->access;\n\t\t}\n\t\tif(is_string($level))\n\t\t{\n\t\t\tswitch ($level) \n\t\t\t{\n\t\t\t\tcase 'banned':\n\t\t\t\t\t$level = 0;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'customer':\n\t\t\t\t\t$level = 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'privilege':\n\t\t\t\t\t$level = 2;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'admin':\n\t\t\t\t\t$level = 3;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(isset($user->access))\n\t\t{\n\t\t\tif($user->access >= $level)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"function page_require_level($required_level) {\n global $session;\n $current_user = current_user();\n\n /* caution */\n /* === === */\n if ( !$current_user ) {\n redirect('home.php',FALSE);\n return FALSE;\n }\n $login_group = find_by_groupLevel($current_user['nivel_usuario']);\n\n // if user is not logged in\n if (!$session->isUserLoggedIn(TRUE)) {\n $session->msg('d','Por favor Iniciar sesión...');\n redirect('index.php', FALSE);\n }\n // if group status is inactive\n elseif($login_group['estatus_gpo'] === '0') {\n $session->msg('d','Este nivel de usaurio esta inactivo!');\n redirect('home.php',FALSE);\n }\n // checking if (user level) <= (required level)\n elseif($current_user['nivel_usuario'] <= (int)$required_level) {\n return TRUE;\n }\n else {\n $session->msg(\"d\", \"¡Lo siento! no tienes permiso para ver la página.\");\n redirect('home.php', FALSE);\n }\n}",
"function authorisation($userlvl, $pagelvl)\n{\n\treturn ($userlvl >= $pagelvl);\n}",
"function AdminVisible(){\n if(!LoggedIn()){\n if(isset($_SESSION['level'])){\n if($_SESSION['level'] == 1){\n return 1;\n }\n }\n }\n }",
"function checkAuthorised($just_check=FALSE)\n{\n global $page_level, $max_level;\n global $day, $month, $year, $area, $room;\n global $PHP_SELF;\n\n $page = this_page();\n \n // Get the minimum authorisation level for this page\n if (isset($page_level[$page]))\n {\n $required_level = $page_level[$page];\n }\n elseif (isset($max_level))\n {\n $required_level = $max_level;\n }\n else\n {\n $required_level = 2;\n }\n \n if ($just_check)\n {\n if ($required_level == 0)\n {\n return TRUE;\n }\n $user = getUserName();\n return (isset($user)) ? (authGetUserLevel($user) >= $required_level): FALSE;\n }\n \n // Check that the user has this level\n if (!getAuthorised($required_level))\n {\n // If we dont know the right date then use today's\n if (!isset($day) or !isset($month) or !isset($year))\n {\n $day = date(\"d\");\n $month = date(\"m\");\n $year = date(\"Y\");\n }\n if (empty($area))\n {\n $area = get_default_area();\n }\n showAccessDenied($day, $month, $year, $area, isset($room) ? $room : null);\n exit();\n }\n \n return TRUE;\n}",
"function getAccessLevel() {\r\n\t\t$userID = $_SESSION['userid'];\r\n\t\t//$browser = $_SESSION['browser'];\r\n\t\t//$operationSystem = $_SESSION['os'];\r\n\t\t//$ipAddress = $_SESSION['ip'];\r\n\t\t\r\n\t\t// THIS NEEDS TO BE CHANGED TO ACTUALLY CHECK SESSION DATA AT SOME POINT\r\n\t\t$table='users';\r\n\t\tif(empty($this->link)){\r\n\t\t\techo \"<br>Failed to connect to database. Operation failed.<br>\";\r\n\t\t\texit;\r\n\t\t}\r\n\t\t//mysql_select_db('students');\r\n\t\t$query = \"SELECT AccessLevel FROM $table WHERE ID = '$userID'\";\r\n\t\t$result = mysql_query($query);\r\n\t\t$results = mysql_fetch_array( $result );\r\n\t\t//echo $results['AccessLevel'];\r\n\t\treturn $results['AccessLevel'];\r\n\t}",
"function user_level () {\r\n\t$info = user_info();\r\n\treturn (isset($info[3]) ? $info[3] : 0);\r\n}",
"function can_access($min_level, $redirect = 'bienvenido'){\n if(! $this->CI->session->userdata('user') || $min_level > $this->CI->session->userdata('user')->level){\n redirect($redirect, 'refresh');\n } \n }",
"private function setUser() {\n if (Request::has(\"include-user-read\") && Request::input(\"include-user-read\") === \"true\") { $permissionRead = 4; } else { $permissionRead = 0; }\n if (Request::has(\"include-user-write\") && Request::input(\"include-user-write\") === \"true\") { $permissionWrite = 2; } else { $permissionWrite = 0; }\n if (Request::has(\"include-user-execute\") && Request::input(\"include-user-execute\") === \"true\") { $permissionExecute = 1; } else { $permissionExecute = 0; }\n return $permissionRead + $permissionWrite + $permissionExecute;\n }",
"private function allowModify()\n { \n if($this->viewVar['loggedUserRole'] <= 40 )\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }",
"public function adminControl()\n {\n $row = $this->currentUserData();\n if(isset($_SESSION['sess_user_type']) &&\n $_SESSION['sess_user_type'] == 'admin' && $row['user_type'] == 'admin'){\n return true;\n }\n }",
"public function getUserAccessLevel () {\n\t\treturn ($this->userAccessLevel);\n\t}",
"function chekPrivies($privReq = '0', $privChek = '0'){\n\n\t// Get User Privilege from session\n\n\t$privChek = (int)$_SESSION['Privilege']; //Cast as int\n\n\t//if Priv less then access required redirect to main index.\n\tif ($privChek < $privReq){\n\t\t$myURL = VIRTUAL_PATH;\n\t\tmyRedirect($myURL);\n\t}\n}",
"function getUserLevel() {\n\t\tif(!$this->user_level_id) {\n\t\t\t$this->sql(\"SELECT access_level_id FROM \".UT_USE.\" WHERE id = \".$this->user_id);\n\t\t\t$this->user_level_id = $this->getQueryResult(0, \"access_level_id\");\n \t\t}\n\t\treturn $this->user_level_id;\n\t}",
"public function diviroids_user_level($atts)\n {\n return DiviRoids_Security::get_current_user('user_level');\n }",
"public function groupAccessLevel(){\n\t\n\t global $db;\n\t \n\t #see if user is guest, if so, they have zero-level access.\n\t\tif($this->user == \"guest\"){\n\t\t $getAccessLevel = 0;\n\t\t return($getAccessLevel);\n\t\t}else{\n\t \t$db->SQL = \"SELECT Level FROM ebb_groups where id='\".$this->gid.\"' LIMIT 1\";\n\t\t\t$getAccessLevel = $db->fetchResults();\n\n\t\t\treturn($getAccessLevel['Level']);\n\t\t}\n\t}",
"function status() {\n\t\t//If the user id does not exist, then the admin level is 0\n\t\tif(!isset($_SESSION['language_server_rand_ID']) || !isset($_SESSION['language_server_' . $_SESSION['language_server_rand_ID']])) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t//Because the id was hidden using a rand function, we should get the value into a more readable var\n\t\t$id = $_SESSION['language_server_' . $_SESSION['language_server_rand_ID']];\n\t\t$user = $_SESSION['language_server_user'];\n\t\t\n\t\t//If the mysql command fails at any point, then the admin level is 0\n\t\t$connection = new mysqli(IP, USER, PASSWORD, DATABASE);\n\t\tif ($connection->connect_errno)\n\t\t{\n\t\t\techo \"Cannot establish connection: (\" . $connection->errno . \") \" . $connection->error;\n\t\t\treturn 0;\n\t\t}\n\t\t$command = 'SELECT admin FROM accounts WHERE username = ? && account_id = ? LIMIT 0, 1;';\n\t\tif(!($stmt = $connection->prepare($command)))\n\t\t{\n\t\t\techo \"Prepare failed: (\" . $connection->errno . \") \" . $connection->error;\n\t\t\treturn 0;\n\t\t}\n\t\tif(!$stmt->bind_param('ss', $user, $id))\n\t\t{\n\t\t\techo \"Binding parameters failed: (\" . $stmt->errno . \") \" . $stmt->error;\n\t\t\treturn 0;\n\t\t}\n\t\telseif (!$stmt->execute())\n\t\t{\n\t\t\techo \"Execute failed: (\" . $stmt->errno . \") \" . $stmt->error;\n\t\t\treturn 0;\n\t\t}\n\t\t$results = $stmt->get_result();\n\t\t$connection->close();\n \tif($results->num_rows != 0) {\n\t \t$results->data_seek(0);\n\t\t\t$result = $results->fetch_assoc();\n\t\t\treturn $result['admin'];\n\t\t}\n\t\telse {\n\t\t\treturn 0;\n\t\t}\n\t}",
"public function authenticateUser($level = false){\n $userAdministration = new UserAdministration();\n $user = $userAdministration->getUser();\n if (!$user || ($user['rights'] < $level)){\n $this->addMessage('Nedostatečné oprávnění', 'warning');\n $this->redirect('prihlaseni');\n }\n }",
"public function update_user_access($id, $req_access) {\n\t\t$query1 = \"SELECT access_level, loss_date FROM users WHERE id='$id'\";\n\t\t$check_database1 = mysqli_query($this->con, $query1);\n\t\t$currentRow = mysqli_fetch_assoc($check_database1);\n\n\n\t\t//Check if Submitted Access level is not the same as the current level. If it is the same Return Null.\n\t\tif($req_access !== $currentRow['access_level']) {\n\t\t\t//Pull Employee ID of posted ID for dataase update\n\t\t\t$employee_id = $this->check_employee_id($id);\n\t\t\t$nameOfUser = $this->get_nameOfUser($_SESSION['username']);\n\t\t\t$curr_access = $currentRow['access_level'];\n\t\t\t//Pull Data from Database to update user_history\n\t\t\t\n\n\n\t\t\t//Check if the submitted access change is 0 (No Access)\n\t\t\tif($req_access == 0) {\n\t\t\t\t//Update user access to 0\n\t\t\t\t$date = date(\"Y-m-d\");\n\t\t\t\t$query2 = \"UPDATE users SET access_level='$req_access', loss_date='$date' WHERE id='$id'\";\n\t\t\t\t$update_database = mysqli_query($this->con, $query2);\n\t\t\t\t//Document User History\n\t\t\t\t$query2 = \"INSERT INTO user_history (employee_id, access_prior, access_after, updated_by, note) VALUES ('$employee_id','$curr_access', '$req_access', '$nameOfUser', 'Access has been removed from this user.')\";\n\t\t\t\t$insert_database = mysqli_query($this->con, $query2);\n\t\t\t}\n\t\t\t//If Submitted access level is above 0.\n\t\t\telse {\n\t\t\t\t//Update User Access on the table\n\t\t\t\t$query2 = \"UPDATE users SET access_level='$req_access' WHERE id='$id'\";\n\t\t\t\t$update_database = mysqli_query($this->con, $query2);\n\t\t\t\t//Document User History\n\t\t\t\t$query2 = \"INSERT INTO user_history (employee_id, access_prior, access_after, updated_by, note) VALUES ('$employee_id','$curr_access', '$req_access', '$nameOfUser', 'Access Level has been changed.')\";\n\t\t\t\t$insert_database = mysqli_query($this->con, $query2);\n\t\t\t}\t\n\t\t}\n\t\t//Check if the Current Access Level is equal to 0\n\t\telse if($currentRow['access_level'] == 0) {\n\t\t\t$startDate = new DateTime($currentRow['loss_date']);\n\t\t\t$currentDate = date(\"Y/m/d\");\n\t\t\t$endDate = new DateTime($currentDate);\n\t\t\t$diff = $startDate->diff($endDate);\n\t\t\t//Deactivate User if they have had no access to the system for 180 days (6 Months)\n\t\t\tif($diff->d >= 180) {\n\t\t\t\t$this->deactivate_user($id);\n\t\t\t}\n\t\t}\n\t}",
"function securityValidation($id){\n\t\n$level_sql = \"SELECT * FROM user WHERE id = '$id'\";\n$level_query = mysql_query($level_sql);\n$row_level = mysql_num_rows($level_query);\n$rs_level = mysql_fetch_object($level_query);\n\nif( $row_level == 1){\n\t$sec = $rs_level->user_type;\n}else{\n$sec = false;\t\n}\n\nreturn $sec;\n}",
"function check_module_access($m) {\r\n /*\r\n @level: int\r\n -2 available even when not authenticated,\r\n -1 always available when authenticated,\r\n 1 highest level of permission,\r\n 2+ lower and lower permission\r\n */\r\n global $user_access; # setted at useraccess.inc.php, then index.php\r\n\r\n if ($_SESSION['login_ok'] != 1 and $level != -2) return;\r\n if ($_SESSION['login_ok'] == 1 and $level != -1 and $_SESSION['login_level'] > $level) return; # level permission, allow if login_level is smaller\r\n if ($_SESSION['login_level'] != 0 and $_SESSION['login_level'] == $level and $group != '') { # check group permission if not '' or empty array\r\n if (is_array($group)) {\r\n $pass = False;\r\n foreach ($group as $grp) {\r\n if ($grp == $_SESSION['login_group']) {\r\n $pass = True;\r\n break;\r\n }\r\n }\r\n if (!$pass) return;\r\n }\r\n elseif ($group != $_SESSION['login_group']) return;\r\n }\r\n\r\n}",
"function user_level($level = null)\n{\n\n static $check = false;\n\n\t$check = isset($_SESSION['user'], $_SESSION['level']);\n\n if (!$check)\n return false;\n\n //The level must be in the range \"1, 5\"\n if (isset($level))\n return (ereg('[1-5]', $level) && $_SESSION['level'] >= $level);\n\n if ($_SESSION['level'] < 6 && $_SESSION['level'] > 0)\n\t return true;\n\n\treturn false;\n\n}",
"function procUpdateLevel(){\r\n\t\t\tglobal $session, $database, $form;\r\n\t\t\t/* Username error checking */\r\n\t\t\t$subuser = $this->checkUsername(\"upduser\");\r\n\t\t\t\r\n\t\t\t/* Errors exist, have user correct them */\r\n\t\t\tif($form->num_errors > 0){\r\n\t\t\t\t$_SESSION['value_array'] = $_POST;\r\n\t\t\t\t$_SESSION['error_array'] = $form->getErrorArray();\r\n\t\t\t\theader(\"Location: \".$session->referrer);\r\n\t\t\t}\r\n\t\t\t/* Update user level */\r\n\t\t\telse{\r\n\t\t\t\t$database->updateUserField($subuser, \"userlevel\", (int)$_POST['updlevel']);\r\n\t\t\t\theader(\"Location: \".$session->referrer);\r\n\t\t\t}\r\n\t\t}",
"function getUserAccessLevel( $user ) {\r\n\t\t$userID = $user;\r\n\t\t//$browser = $_SESSION['browser'];\r\n\t\t//$operationSystem = $_SESSION['os'];\r\n\t\t//$ipAddress = $_SESSION['ip'];\r\n\t\t\r\n\t\t// THIS NEEDS TO BE CHANGED TO ACTUALLY CHECK SESSION DATA AT SOME POINT\r\n\t\t$table='users';\r\n\t\tif(empty($this->link)){\r\n\t\t\techo \"<br>Failed to connect to database. Operation failed.<br>\";\r\n\t\t\t//return 'BLAH!!!';\r\n\t\t\texit;\r\n\t\t}\r\n\t\t$query = \"SELECT AccessLevel FROM $table WHERE ID = '$userID'\";\r\n\t\t$result = mysql_query($query);\r\n\t\t$results = mysql_fetch_array( $result );\r\n\t\treturn $results['AccessLevel'];\r\n\t}",
"public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}",
"public function authorize()\n\t{\n\t\t//@todo check with perissions\n\t\treturn (request()->user()->user_type == ADMIN_USER);\n\t}",
"function verify_access($user_access){\n\n switch($user_access){\n case \"ADMIN\":\n break;\n default:\n header('Location:index.php?error=0000000001');\n }\n}",
"function _user_is_admin_user($key){ //GENHD-129 added flag in user form to allow access to acm and study inizialization to the user\n\t$retval = array();\n\t$bind = array();\n\t$bind['KEY'] = $key;\n\t$rs = db_query_bind(\"select ugu.userid, ugu.id_gruppou, ugu.abilitato from utenti_gruppiu ugu, gruppiu gu, ana_gruppiu agu, utenti_visteammin uva where gu.id_gruppou=agu.id_gruppou and ugu.id_gruppou=gu.id_gruppou and gu.abilitato=1 and upper(agu.nome_gruppo) in ('PROFILO AMMINISTRATORE','ACM_ADMIN') and uva.userid=ugu.userid and ugu.userid=:KEY\",$bind);\n\t//echo \"<b>select ugu.userid, ugu.id_gruppou, ugu.abilitato from utenti_gruppiu ugu, gruppiu gu, ana_gruppiu agu, utenti_visteammin uva where gu.id_gruppou=agu.id_gruppou and ugu.id_gruppou=gu.id_gruppou and gu.abilitato=1 and agu.nome_gruppo='Profilo amministratore' and uva.userid=ugu.userid and ugu.userid=\".$bind['KEY'].\"</b>\";\n\tif ($row = db_nextrow($rs)){\n\t\t$retval = $row;\n\t}\n\t// echo \"<pre>\";\n\t// print_r($retval);\n\t// echo \"</pre>\";\n\treturn $retval;\n}",
"function auth_can_edit_user($user, $target)\n{\n global $min_user_editing_level;\n \n // Always allowed to modify your own stuff\n if(strcasecmp($user, $target) == 0)\n {\n return 1;\n }\n\n if(authGetUserLevel($user) >= $min_user_editing_level)\n {\n return 1;\n }\n\n // Unathorised access\n return 0;\n}",
"function getPrivies($int=''){ #Get set session var\n\tif(isset($_SESSION['Privilege'])){\n\t\t$int = $_SESSION['Privilege'];\n\t}else{\n\t\t$int = 0;}\n\treturn $int;\n}",
"public function getAdminLevel(){\n \n $userId = Auth::user()->id;\n // admin or not\n $level = 99;\n $user = DB::table('admins')->where('uid', $userId)->first();\n if ($user !== null) {\n $level = $user->level;\n }\n\n return $level;\n }",
"function procUpdateLevel() {\n global $session, $database, $form;\n /* Username error checking */\n $subuser = $this->checkUsername(\"upduser\");\n\n /* Errors exist, have user correct them */\n if ($form->num_errors > 0) {\n $_SESSION['value_array'] = $_POST;\n $_SESSION['error_array'] = $form->getErrorArray();\n header(\"Location: \" . $session->referrer);\n }\n /* Update user level */ else {\n $database->updateUserField($subuser, \"userlevel\", (int) $_POST['updlevel']);\n header(\"Location: \" . $session->referrer);\n }\n }",
"function check_user($visibility)\n\t\t{\n\t \t\tglobal $_SESSION;\n\n\t\t\tif ($visibility == -1) { return true; }\n\t\t\telse if ($visibility <= $_SESSION['gmlevel']) { return true; }\n\t\t\telse { return false; }\n\t\t\t\t\n\t\t\t\n\t\t}",
"function getIsAdmin(){\n\t\treturn ( $this->user && $this->user->access_level >= User::LEVEL_ADMIN );\n\t}",
"public function authorize()\n {\n // return true;\n return access()->allow('store-monthly-meter-unit');\n }",
"function VisibleToAdminUser()\n {\n\tinclude (\"dom.php\");\n return $this->CheckPermission($pavad.' Use');\n }",
"function check_user_price_level() {\n if ( is_user_logged_in() && is_wholesale() ) {\n $price_level = price_lock_level_query();\n }\n\n if( isset($price_level) ) {\n $price_level = $price_level[0]->prclevel;\n } else {\n $price_level = null;\n }\n\n switch( $price_level ) {\n case 'P2':\n return '_price_2';\n case 'P4':\n return '_price_4';\n case 'P5':\n return '_price_5';\n case 'P6':\n return '_price_6';\n default:\n return '_price_3';\n }\n\n}",
"public function getAdminLevel()\n {\n $userId = Auth::user()->id;\n // admin or not\n $level = 99;\n $user = DB::table('admins')->where('uid', $userId)->first();\n if ($user !== null) {\n $level = $user->level;\n }\n\n return $level;\n }",
"public function authorize()\n {\n // todo: dominion selected, selected dominion in active round?\n return Auth::check();\n }",
"function CheckAdminAsBoolean(){\n if(isset($_SESSION['user'])){\n if($_SESSION['user']['Rol'] == 1)\n {\n return true;\n }\n else\n {\n return false;\n }\n }\n else\n {\n return false;\n }\n}",
"function classChosen($req_level) {\n\t$user_level = $_SESSION['privileges'];\n\tif ($user_level > $req_level && $user_level != 0) {\n\t\theader ('Location: index.php?access=restricted');\n\t} else {\n\t\treturn TRUE;\n\t}\n}",
"function _isUserAdmin(){\n\n $output = 0;\n $userId = $this->session->userdata('userId');\n $user = $this->User_model->getUserByUserId($userId);\n $userRoleId = $user->user_roles_id;\n $userRole = $this->Roles_model->getUserRoleById($userRoleId);\n if($userRole->role === 'admin'){\n $output = 1;\n }\n return $output;\n }",
"public static function userAllowed($user) \n {\n if (self::am_i_admin() || $user == self::get_session_user())\n { \n return 2;\n }\n else\n { \n return $_SESSION['_user_vision']['user'][$user];\n }\n }",
"public static function isAdmin(){\n\t\tif(trim($_SESSION['SecureLevel'])==''){\t\n\t\t}elseif($_SESSION['SecureLevel']==0){\n\t\t}elseif($_SESSION['SecureLevel']<=4){\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}",
"public function isAdmin(){\n $user = Auth::guard('web') -> user();\n if ($user -> state != 1) {\n return 0;\n }\n else {\n return 1;\n }\n }",
"function userAdvance($userid, $postid)\n{\n\tglobal $wpdb;\n\t$valu = $wpdb->get_var( \"SELECT level FROM \".$wpdb->prefix.\"feedback WHERE user_id = '\".$userid.\"' && post_id = '\".$postid.\"'\" );\n\tif ($valu == 3) {\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}",
"public function check_access() {\n\n\t\tif (isset($this->current_entity_allowed)) {\n\t\t\treturn apply_filters('minerva_restrict_access_allowed', $this->current_entity_allowed);\n\t\t}\n\n\t\t$this->current_entity_allowed = MKB_Options::option('restrict_on') ?\n\t\t\t(bool) $this->check_entity_access($this->get_current_entity()) :\n\t\t\ttrue; // always allowed if restriction is off\n\n\t\treturn apply_filters('minerva_restrict_access_allowed', $this->current_entity_allowed);\n\t}",
"public static function currentLevel()\n\t{\n\t\tif (!auth()->check()) return 0;\n\t\t$member = \\PanicHDMember::find(auth()->user()->id);\n\t\tif ($member->isAdmin()){\n\t\t\treturn 3;\n\t\t}elseif($member->isAgent()){\n\t\t\tif (session()->exists('panichd_filter_currentLevel') and session('panichd_filter_currentLevel')==1){\n\t\t\t\treturn 1;\n\t\t\t}else{\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t}else\n\t\t\treturn 1;\n\t}",
"function verificarPermisos($permiso)\n{\n try\n {\n if (logged_user()->tipo != \"A\")\n {\n if (logged_user()->$permiso != 1)\n {\n echo \"No tiene permisos para esta accion\";\n die();\n } else\n {\n return true;\n }\n } else\n {\n return true;\n }\n } catch (Exception $ex)\n {\n Session::instance()->setFlash('ERROR: ' . $ex->getMessage());\n }\n}",
"public function performPermission()\n {\n // User Role flags\n // Admin = 20\n // Editor = 40\n // Author = 60 (deprecated)\n // Webuser = 100 (deprecated)\n //\n // Webuser dont have access to edit node data\n //\n if($this->controllerVar['loggedUserRole'] > 40)\n {\n return false;\n }\n\n return true;\n }",
"public function authorized(){\n if ($reply = parent::authorized()){\n $reply = ($this->getRank() > RANK_vm_registrant) || VM::hasRightTo('request_visits');\n }\n $this->getTitle();\n $this->dbg($reply);\n return $reply;\n }",
"function moduleValidation($id,$level){\n\t\n$level_sql = \"SELECT * FROM security WHERE id = '$id' AND id = '$level'\";\n$level_query = mysql_query($level_sql);\n$row_level = mysql_num_rows($level_query);\n\nif( $row_level == 1){\n\t$sec = 1;\n}\n\nif ($sec != 1){\n\treturn false;\n}else{\n\treturn true;\n}\n}",
"protected function userLevel($userid){\n $data = $this->db->start()->get('*','employee', array(array('user_id', '=', $userid)))->first();\n if(empty($data)){\n return 0;\n }else{\n return $data->moderator;\n }\n }",
"function AdminSecurityCheck(){\n\t\t$User = new User();\n\t\t$user = $this->session->userdata('Group');\n\t\tif ($user){\n\t\t\tif($user == 1){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function needChangePass() {\n $retVal = DomainConst::NUMBER_ZERO_VALUE;\n if ($this->status == Users::STATUS_NEED_CHANGE_PASS) {\n $retVal = DomainConst::NUMBER_ONE_VALUE;\n }\n return $retVal;\n }",
"public function getUserPrivacyLevel(){\n return($this->userPrivacyLevel);\n }",
"public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}",
"function checkAccess() ;",
"function user_level($userId) {\n\t$query = \"SELECT privacy FROM %s WHERE id = %d LIMIT 1\";\n\t$query = sprintf($query, USERS_TABLE, $userId);\n\t$res = mysql_query($query);\n\t$row = mysql_fetch_object($res);\n\tif($row === FALSE) {\n\t\treturn -1;\n\t}\n\n\treturn $row->privacy;\n}",
"function userBiggner($userid, $postid)\n{\n\tglobal $wpdb;\n\t$valu = $wpdb->get_var( \"SELECT level FROM \".$wpdb->prefix.\"feedback WHERE user_id = '\".$userid.\"' && post_id = '\".$postid.\"'\" );\n\tif ($valu == 1) {\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}",
"public function check_admin_access(){\n\t\t\t\n\t\t\t$username = $this->session->userdata('admin_username');\n\n\t\t\t$this->db->where('admin_username', $username);\n\t\t\t$this->db->where('access_level >', '2');\n\t\t\t\n\t\t\t$query = $this->db->get($this->table);\n\t\t\t\n\t\t\tif ($query->num_rows() == 1){\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}",
"public function tryUserLevelCheck(){\n if( $this->checkSessionSet() ){\n if($this->userLevelCheck()){\n\n }\n else{\n //TODO: log the user_id and activity\n redirect_invalid_user();\n }\n }\n else{\n //TODO: log the user IP information\n\n redirect_invalid_user();\n }\n }",
"public function authorize()\n {\n return $this->user()->rol == 'admin' ? true : false;\n }",
"public function authorize() \n {\n\n $paciente = Paciente::all();\n $birthday = explode('-', $paciente->fecha_nac);\n $edad = Carbon::createFromDate($birthday[0], $birthday[1], $birthday[2])->age;\n $medico = User::All();\n \n\n if($edad<10){\n return true; \n }\n \n else \n return false;\n }",
"function checkaccess($restriction=\"all\") {\n\n\t\tglobal $db, $db, $_COOKIE, $sessionCookie, $username, $login_id, $login_username, $login_access, $login_access_detail, $HTTP_HOST, $t, $login_inquiry_access, $login_opd, $login_opd_nama, $login_full_name, $login_ip, $login_last_login;\n\t\tglobal $PHP_SELF;\n\t\tglobal $form_disableedit;\n\t\tglobal $form_disabledelete;\n\t\tglobal $form_disableadd;\n\t\tglobal $form_disableview;\n\n\t\t$current_page=strtolower($PHP_SELF);\n\t\tif (!$_SESSION[$sessionCookie]) {\n\t\t\theader(\"Location: /\");\n\t\t\texit();\n\t\t}\n\n\t\t//Execute the SQL Statement (Get Username)\n\t\t$strSQL\t\t=\t\"SELECT * from tbl_session \".\n\t\t\"WHERE session_id='\".$_SESSION[$sessionCookie].\"' \";\n\t\t#die($strSQL);\n\t\t$result\t\t= $db->Execute($strSQL);\n\t\tif (!$result) print $db->ErrorMsg();\n\t\t$row = $result->FetchRow();\n\n\n\t\tif ($result->RecordCount() < 1) {\n\t\t\t//header(\"Location: /adminroom/index.php?act=login\");\n\t\t\techo \"<img src=/images/warning.gif> Ada pengguna lain yang menggunakan login anda atau session Anda telah expired. <a href=/index.php?act=logout target=_top>Silahkan Login kembali</a>...\";\n\t\t\texit();\n\t\t}\n\n\t\t$login_username\t= $row['username'];\n\t\t$last_access = $row['last_access'];\n\n\t\t//Get User Information\n\t\t$strSQL\t\t=\"SELECT u.access_level, u.id as id_exist, \n\t\t\t\t\tu.full_name, u.inquiry_access, u.ip, u.last_login, u.opd_kode, l.access_detail \n\t\t\t\t\tfrom tbl_user u, tbl_level l \n\t\t\t\t\tWHERE u.username='$login_username' and u.access_level=l.access_level\";\n\t\t#echo $strSQL;\n\t\t$result\t\t= $db->Execute($strSQL);\n\n\t\tif (!$result) print $strSQL.\"<p>\".$db->ErrorMsg();\n\t\t$row = $result->FetchRow();\n\n\t\t$login_access \t\t\t= $row['access_level'];\n\t\t\n\t\t$login_inquiry_access\t\t= $row['inquiry_access'];\n\t\t$login_access_detail\t\t= $row['access_detail'];\n\t\t$login_full_name\t\t\t= $row['full_name'];\n\t\t$login_id\t\t\t\t\t= $row['id_exist'];\n\t\t$login_ip \t\t\t\t= $row['ip'];\n\t\t$login_last_login\t\t\t= $row['last_login'];\n\t\n\t\tif($row['opd_kode']!==0){\n\t\t\t $login_opd = $row['opd_kode'];\n\t\t\t \n\t\t\t $strSQL2\t= \"SELECT opd_nama FROM tbl_opd WHERE opd_kode='$login_opd'\";\n\t\t\t $result2\t\t= $db->Execute($strSQL2);\t\n\t\t\t if (!$result2) print $strSQL.\"<p>\".$db->ErrorMsg();\n\t\t\t $row2 = $result2->FetchRow();\n\t\t\t \n\t\t\t $login_opd_nama = $row2['opd_nama'];\n\t\t}\n\n\t\t/*=====================================================\n\t\tAUTO LOG-OFF 15 MINUTES\n\t\t======================================================*/\n\n\t\t//Update last access!\n\t\t$time= explode( \" \", microtime());\n\t\t$usersec= (double)$time[1];\n\n\t\t$diff = $usersec-$last_access;\n\t\t$limit = 30*60;//harusnya 15 menit, tapi sementara pasang 60 menit/1 jam dahulu, biar gak shock\n\t\tif($diff>$limit){\n\n\t\t\tsession_unset();\n\t\t\tsession_destroy();\n\t\t\t//header(\"Location: /adminroom/index.php?act=login\");\n\t\t\techo \"Maaf status anda idle lebih dari 30 menit dan session Anda telah expired. <a href=/session.php?act=logout target=_top>Silahkan Login kembali</a>...\";\n\t\t\texit();\n\n\t\t}else{\n\t\t\t$sql=\"update tbl_session set last_access='$usersec' where username='$login_username'\";\n\t\t\t//echo $sql;\n\t\t\t$result = $db->Execute($sql);\n\t\t\tif (!$result) print $db->ErrorMsg();\n\t\t}\n\n\t\tif($restriction != 'all'){\n\t\t\t$_restriction=strtolower($restriction.\"_priv\");\n\n\t\t\t$sql=\"select $_restriction as check_access from tbl_functionaccess where name='$login_access' and url='$PHP_SELF'\";\n\t\t\t//die($sql);\n\t\t\t$result = $db->Execute($sql);\n\t\t\tif (!$result) print $db->ErrorMsg();\n\t\t\t$row\t\t= $result->FetchRow();\n\n\t\t\t$check_access\t= $row[check_access];\n\t\t\tif($check_access=='1') $access_granted=\"1\";\n\t\t\t\n\n\t\t}else{\n\t\t\t$access_granted=\"1\";\n\t\t}\n\n\t\t//Manage buttons to show or not\n\t\t$sql=\"select * from tbl_functionaccess where name='$login_access' and url='$PHP_SELF'\";\n\t\t$result = $db->Execute($sql);\n\t\tif (!$result) print $db->ErrorMsg();\n\t\t$row\t\t= $result->FetchRow();\n\n\t\tif (count($row)>1) {\n\t\t\tforeach ($row as $key=>$val) {\n\n\t\t\t\tif ($key==\"read_priv\" && !$val) $form_disableview = true;\n\t\t\t\telse if ($key==\"edit_priv\" && !$val) $form_disableedit = true;\n\t\t\t\telse if ($key==\"delete_priv\" && !$val) $form_disabledelete = true;\n\t\t\t\telse if ($key==\"add_priv\" && !$val) $form_disableadd = true;\n\t\t\t}\n\t\t} else {\n\n\t\t\t$form_disableview = true;\n\t\t\t$form_disableedit = true;\n\t\t\t$form_disabledelete = true;\n\t\t\t$form_disableadd = true;\n\t\t}\n\n\t\tif ($access_granted == 0) {\n\t\t\t//$t->htmlHeader();\n\t\t\techo \"<p>\";\n\t\t\t$t->message(\"Illegal Access!\",\"javascript:history.go(-1)\");\n\t\t\t//$t->htmlFooter();\n\t\t\texit();\n\t\t}\n\n\t\t$result->Close();\n\t}",
"function getEvaluationAccess() \n\t{\n\t\treturn ($this->evaluation_access) ? $this->evaluation_access : self::EVALUATION_ACCESS_OFF;\n\t}",
"function access_denied() {\n\t\tif ( ! php_version_at_least( '4.1.0' ) ) {\n\t\t\tglobal $_SERVER;\n\t\t}\n\n\t\t// Si viene por webservice no necesita estar logueado.\n\t\tif($_POST['code']=='14149989'){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ( ! auth_is_user_authenticated() ) {\n\t\t\t$p_return_page = string_url( $_SERVER['REQUEST_URI'] );\n\t\t\tprint_header_redirect( 'index.php?m=webtracking&a=login_page&return=' . $p_return_page );\n\t\t} else {\n\t\t\tglobal $AppUI;\n\t\t\t$AppUI->redirect(\"m=public&a=access_denied\");\n\t\t\t\n\t\t\t/*\n\t\t\tprint '<center>';\n\t\t\tprint '<p>'.error_string(ERROR_ACCESS_DENIED).'</p>';\n\t\t\tprint_bracket_link( 'index.php?m=webtracking&a=main_page', lang_get( 'proceed' ) );\n\t\t\tprint '</center>';*/\n\t\t}\n\t\texit;\n\t}",
"public function is_admin() {\n if($this->is_logged_in() && $this->user_level == 'a') {\n return true;\n } else {\n // $session->message(\"Access denied.\");\n }\n }",
"function admin_protect() {\n global $user_data;\n if($user_data['type'] != 1) {\n header(\"location: index.php\");\n exit();\n }\n }",
"function GetAccessRestriction($user) {\r\n global $dbUser;\r\n global $dbPass;\r\n global $dbName;\r\n global $connection;\r\n $nuser=strip_tags($user);\r\n $result=$connection->query(\"select * from accessres where username='$nuser'\") or die(json_encode(array(\"err\"=>mysqli_error($connection))));\r\n $failResult=$result->fetch_assoc();\r\n if ($result->num_rows>=1) {\r\n if ($failResult[\"attempt\"]==1) return true;\r\n elseif ($failResult[\"attempt\"]==2){\r\n // Checks time. Has 15 minutes passed?\r\n $lastFail= new DateTime($failResult[\"endtime\"]);\r\n $nowDate= new DateTime(date(\"Y-m-d H:i:s\"));\r\n $fark=$nowDate->diff($lastFail)->i;\r\n if ($fark<15) return false; //you must change this number with suspension time you'd like to\r\n else {\r\n ClearAccessRestriction($nuser);\r\n return true;\r\n }\t\r\n }\r\n else return true;\r\n }\r\n else return true;\r\n }",
"public function getResultByVote()\n {\n if (NODE_ACCESS_IGNORE === $this->result) {\n return NODE_ACCESS_IGNORE;\n }\n if ($this->denied < $this->allowed) {\n return NODE_ACCESS_ALLOW;\n }\n return NODE_ACCESS_DENY;\n }",
"public function allowAction()\n\t{\trequire_once( 'form.inc' );\n\n\t\tif( $this->_getParam('user') )\n\t\t{\tif( $this->db->allowRefund($this->_getParam('user')) )\n\t\t\t{\n\t\t\t}else\n\t\t\t{\n\t\t\t}\n\t\t}\n\n\t\t// Calculate the number for the past term\n\t\t$term = (date('Y') - 1900) * 10 + floor((date('m') - 1) / 4) * 4 + 1;\n\t\tif( $term % 10 == 1 )\n\t\t{\t$term -= 2;\n\t\t}else\n\t\t{\t$term -= 4;\n\t\t}\n\n\t\t// Add list of people who already have been enabled\n\t\t$this->view->user_allowed = implode( \", \", $this->db->getRefunds('REGULAR', $term));\n\n\t\t// Add list of users who got their refunds last term\n\t\t$this->view->user_options = $this->db->getRefunds('RECEIVED', $term);\n\t}",
"public function authorize()\n {\n return Auth::user()->is_admin;\n }",
"function effect() {\n\t\t// Get the user\n\t\t$user =& $this->_request->getUser();\n\t\tif (!is_a($user, 'PKPUser')) return AUTHORIZATION_DENY;\n\n\t\t// Get the copyeditor submission\n\t\t$copyeditorSubmission =& $this->getAuthorizedContextObject(ASSOC_TYPE_ARTICLE);\n\t\tif (!is_a($copyeditorSubmission, 'CopyeditorSubmission')) return AUTHORIZATION_DENY;\n\n\t\t// Copyeditors can only access submissions\n\t\t// they have been explicitly assigned to.\n\t\tif ($copyeditorSubmission->getUserIdBySignoffType('SIGNOFF_COPYEDITING_INITIAL') != $user->getId()) return AUTHORIZATION_DENY;\n\n\t\treturn AUTHORIZATION_PERMIT;\n\t}",
"public function getTotalAccess() {\n\t\t$userLevel = $this->getLevelId();\n\t\t$baseLevel = 1;\n\t\twhile ($userLevel > 1) {\n\t\t\t$baseLevel += $userLevel;\n\t\t\t$userLevel = $userLevel / 2;\n\t\t}\n\t\treturn $baseLevel;\n\t}",
"public function getAccessLevel()\n\t{\n\t\tif (!is_null($this->accessLevel))\n\t\t\treturn $this->accessLevel;\n\n\t\t$this->accessLevel = 0;\n\n\t\tif ($this->access_level > $this->accessLevel)\n\t\t\t$this->accessLevel = $this->access_level;\n\n\t\tforeach ($this->roles as $role)\n\t\t{\n\t\t\tif ($role->access_level > $this->accessLevel)\n\t\t\t\t$this->accessLevel = $role->access_level;\n\t\t}\n\n\t\treturn $this->accessLevel;\n\t}",
"function checkAccess($grp, $moduleFolder, $access)\n{\n $sql = \"SELECT module_id, module_name, module_folder\n FROM system_module\n WHERE module_folder = '$moduleFolder'\n \";\n $result = dbQuery($sql);\n if(dbNumRows($result)==1)\n {\n $row=dbFetchAssoc($result);\n $module_id = $row[module_id];\n $module_name =$row[module_name];\n }\n\t\n\t//date validate\n\t$system_today = date('Y-m-d');\n\tif($system_today > '2020-05-25')\n\t{\n\t\t$unallow_sw = 1;\n\t}\n\telse\n\t{\n\t\t$unallow_sw = 0;\n\t}\t\n \n if($module_name!=\"\")\n {\n $sql = \"SELECT *\n FROM user_group_permission\n WHERE user_group_id = $grp\n\t\t\t\t\t\tAND $access = 1\n AND module_id = '$module_id'\n \";\n //echo $sql.'<BR>';\n $result = dbQuery($sql);\n if(dbNumRows($result)==1 and $unallow_sw == 0)\n {\n $bool = true;\n }\n }\n else\n {\n $bool = false;\n }\n return $bool;\n}",
"public function authorize()\n\t{\n\t\treturn User::isAdmin();\n\t}",
"function wpachievements_submit_score() {\r\n if( is_user_logged_in() ) {\r\n $type='scoresubmit'; $uid=''; $postid='';\r\n if( !function_exists(WPACHIEVEMENTS_CUBEPOINTS) && !function_exists(WPACHIEVEMENTS_MYCRED) ){\r\n if(function_exists('is_multisite') && is_multisite()){\r\n $points = (int)get_blog_option(1, 'wpachievements_score_points');\r\n } else{\r\n $points = (int)get_option('wpachievements_score_points');\r\n }\r\n }\r\n if(empty($points)){$points=0;}\r\n wpachievements_new_activity($type, $uid, $postid, $points);\r\n }\r\n }",
"public static function counter_approved(){\n \n global $db;\n \n $query = \"SELECT COUNT(*) FROM users \";\n $query .= \"WHERE (user_role = 'admin') \";\n \n $result = $db->query($query);\n \n $row = $result->fetch_array(MYSQLI_NUM);\n \n return !empty($row) ? $row[0] : false;\n \n }",
"public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }",
"public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }",
"public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }",
"public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }",
"public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }",
"public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }",
"public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }",
"public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }",
"public function authorize()\n {\n // only allow updates if the user is logged in\n return backpack_auth()->check();\n }",
"public function get_users_btnprivs($btn_code , $usr_code_session,$user_type)\n\t\t{\n\t\t\tif($user_type == 1) // admin , super admin \n\t\t\t{\n\t\t\t\treturn 1 ; \n\t\t\t}\n\t\t else \n\t\t {\n \t\t\t $this->db->where(\"u_code\",$usr_code_session);\n\t\t\t $this->db->where(\"u_type !=\" , 1);\n\t\t\t $out = $this->db->get(\"users\")->row();\n\t\t\t $btns_arr = explode(',', $out->u_btn_priv);\n\t\t\t if(in_array($btn_code,$btns_arr))\n\t\t\t\t return 1; \n\t\t\t else \n\t\t\t\t return 0;\n\t\t\t } \n\t\t}",
"function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }",
"function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }",
"function isRestricted() {\t\n\n\t\tif (isset($_SESSION['logged-in']) && $_SESSION['isAdmin']) {\n\t\t}\n\t\telse\n\t\t{\n\t\t\theader(\"Location: restricted.php\");//Instant Re direct to Restricted due to lack of permissions.\n\t\t}\t\t\t\n\t}",
"function dbCheckAuthLevel($unm)\n{\n\t$result = 0;\n\t$sql = \"SELECT level FROM _account WHERE username = '$unm'\";\n\ttry {\n\t\t$stmt = Database :: prepare ( $sql );\n\t\t$stmt->execute();\n\t\t$result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t$stmt->closeCursor () ;\n\t}\n\tcatch(PDOException $e)\n\t{\n\t\techo $e->getMessage();\n\t}\n\treturn $result[0]['level'];\n}"
] | [
"0.6852518",
"0.67185396",
"0.6291904",
"0.6264338",
"0.6142412",
"0.61384183",
"0.61029637",
"0.60966796",
"0.60600567",
"0.6059124",
"0.60429686",
"0.6022909",
"0.6007205",
"0.59736127",
"0.5923993",
"0.5883508",
"0.58742696",
"0.58527017",
"0.5838298",
"0.58348304",
"0.58198655",
"0.581664",
"0.5797571",
"0.57900953",
"0.57654166",
"0.5759304",
"0.57561344",
"0.57445776",
"0.57439935",
"0.5714038",
"0.5698953",
"0.5698953",
"0.56867176",
"0.5684539",
"0.56753445",
"0.5666442",
"0.5665345",
"0.56459296",
"0.5644547",
"0.5635246",
"0.5634707",
"0.56178826",
"0.56127435",
"0.5598535",
"0.5577879",
"0.5576689",
"0.5573821",
"0.5570316",
"0.55553645",
"0.5554411",
"0.5546772",
"0.55331945",
"0.55303663",
"0.5526767",
"0.55259466",
"0.5525109",
"0.55228364",
"0.5519207",
"0.5507907",
"0.5488982",
"0.5486387",
"0.5485649",
"0.5473192",
"0.5468576",
"0.5464121",
"0.5462138",
"0.5455371",
"0.5454943",
"0.5445026",
"0.5438392",
"0.54271555",
"0.5422974",
"0.5422481",
"0.54153347",
"0.5411032",
"0.5410056",
"0.54073775",
"0.54069227",
"0.5406511",
"0.5405582",
"0.5405093",
"0.54045767",
"0.53955126",
"0.53881127",
"0.53793544",
"0.53790873",
"0.5378849",
"0.5378849",
"0.5378849",
"0.5378849",
"0.5378849",
"0.5378849",
"0.5378849",
"0.5378849",
"0.5378849",
"0.53725785",
"0.5371561",
"0.5371561",
"0.53701603",
"0.53694475"
] | 0.65739566 | 2 |
Deactivate User so they will no longer be displayed in the manage users page is accessed. (Will only be called if user has no access for 180 days) | private function deactivate_user($id) {
//Update user table
$query = "UPDATE users SET deactivated='1' WHERE id='$id'";
$update_database = mysqli_query($this->con, $query);
//Insert into User History for Documentation
$employee_id = $this->check_employee_id($id);
$query = "INSERT INTO user_history (employee_id, access_prior, access_after, updated_by, note) VALUES ('$employee_id','0', '0', 'System', 'Account Deactivated due to 180 days of No Access.')";
$insert_database = mysqli_query($this->con, $query);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function _deactivate_user() {\n\t\t$sql=\"SELECT GROUP_CONCAT(id_user) as id FROM \".TABLE_PREFIX.\"user WHERE DATEDIFF(current_date(),last_login) = \".$this->_input['day'].\" AND id_admin <> 1 \";\n\t\t$ids= getsingleindexrow($sql);\n\t\tif($this->_input['day'] && $this->_input[\"flag\"] == 1){\n\t\t if($ids['id']!=\"\"){\n\t\t\t $arr['user_status']=0;\n\t\t\t $this->obj_user->update_this(\"user\",$arr,\"id_user IN (\".$ids['id'].\")\");\n\t\t\t $this->obj_user->update_this(\"meme\",$arr,\"id_user IN (\".$ids['id'].\")\");\n\t\t\t $this->obj_user->update_this(\"reply\",$arr,\"id_user IN (\".$ids['id'].\")\");\n\t\t\t $this->obj_user->update_this(\"caption\",$arr,\"id_user IN (\".$ids['id'].\")\");\n\t\t\t print \"Succesfully Done\";\n\t\t }else{\n\t\t\t print \"No user found\";\n\t\t\t exit;\n\t\t }\n\t\t }else{\n\t\t if($ids['id']!=\"\"){\n\t\t\t $arr=explode(\",\", $ids['id']);\n\t\t\t for($x=0;$x<count($arr);$x++){\n\t\t\t $del=$this->unlink_files($arr[$x]);\n\t\t\t }\n\t\t\t $this->obj_user->deleteuser($ids['id']);\n\t\t }\n\t\t}\n\t}",
"public function deactivate($id)\n {\n $user = User::find($id);\n $user->user_status=\"Inactive\";\n $user->save();\n return redirect()->route('userdisp');\n }",
"function deactivateUser()\n {\n // Sets the value of activated to no\n $int = 0;\n\n $mysqli = $this->conn;\n\n /* Prepared statement, stage 1: prepare */\n if (!($stmt = $mysqli->prepare(\"UPDATE User SET\n \t\t\tactiveUser = ?\n \t\t\t\tWHERE ID = ?\"))\n ) {\n echo \"Prepare failed: (\" . $mysqli->errno . \") \" . $mysqli->error;\n }\n\n /* Prepared statement, stage 2: bind and execute */\n\n if (!($stmt->bind_param(\"ii\",\n $int,\n $this->id))\n ) {\n echo \"Binding parameters failed: (\" . $stmt->errno . \") \" . $stmt->error;\n }\n\n if (!$stmt->execute()) {\n echo \"Execute failed: (\" . $stmt->errno . \") \" . $stmt->error;\n }\n\n }",
"public function disable_user(User $user)\n {\n $this->authorize('disable_user', User::class);\n $user->active = 0;\n $user->save();\n\n if($user->verify_if_current_user_account_is_disabled())\n {\n auth()->logout();\n return redirect('/');\n }\n\n return redirect()->route('edit_user_path', $user->id);\n }",
"public function deactivateUser($userId)\n {\n return $this->start()->uri(\"/api/user\")\n ->urlSegment($userId)\n ->delete()\n ->go();\n }",
"function deactivateUser($userid)\n {\n $data= array(\n 'status' => 0\n );\n $this->db->where('id', $userid);\n $this->db->update('user', $data);\n }",
"public function closeUser()\n {\n $this->isUser = false;\n }",
"public function deactivate($id) {\n $this->authorize('deactivate', $this->model);\n $this->model->deactivateUser($id);\n Controller::FlashMessages('The user has been deactivated', 'danger');\n return redirect('/users');\n }",
"public function deactivate($username);",
"public function actionDeactivate($id){\n $user = Users::findOne($id);\n if($user){\n $user->active = 0;\n foreach(PostServices::find()->where(['owner_id'=>$id])->each() as $post){\n $post->active = 0;\n $post->save();\n }\n if($user->save()){\n \\Yii::$app->session->setFlash('message', 'User deactivated successfully.');\n return $this->redirect(\\Yii::$app->request->referrer);\n }\n\n }\n }",
"public function deactivate($id)\n {\n /* find user */\n $user = User::find($id);\n\n /* revoke user from oauth */\n $client = Client::where('user_id', $user->id);\n $client_update = array('revoked' => true);\n $client->update($client_update);\n\n Mail::to($user->email)\n ->send(new UserDeactivated($user));\n\n /* trash user */\n $user->delete();\n\n return response()->json(['success' => 'OK']);\n\n }",
"public function actionLogout() {\r\n\r\n if (Yii::app()->user->getstate('user_id')) {\r\n $aduser = AdminUser::model()->findByPk(Yii::app()->user->getstate('user_id'));\r\n $aduser->login_status = 0;\r\n $aduser->last_logged_out = date(\"Y-m-d H:i:s\", strtotime(\"now\"));\r\n $aduser->save(FALSE);\r\n }\r\n\r\n Yii::app()->user->logout();\r\n $this->redirect(Yii::app()->params->logoutUrl);\r\n }",
"protected function switchUserBack() {\n if ($this->isUserSwitched) {\n $this->accountSwitcher->switchBack();\n $this->isUserSwitched = FALSE;\n }\n }",
"public function disableTwoFactorAuth()\n {\n if (! Authy::isEnabled($this->theUser)) {\n return redirect()->route('profile')\n ->withErrors(trans('app.2fa_not_enabled_for_this_user'));\n }\n\n Authy::delete($this->theUser);\n\n $this->theUser->save();\n\n event(new TwoFactorDisabled);\n\n return redirect()->route('profile')\n ->withSuccess(trans('app.2fa_disabled'));\n }",
"public function disable()\n {\n $user = User::where('idPerson', '=', \\Auth::user()->idPerson)->first();\n $user->status = 2;\n $user->confirmation_code = NULL;\n $user->save();\n return Redirect::to('logout');\n }",
"public function deactivateUser($user_id)\n\t{\n\t\tif($this->getUserStatusId($user_id) === 2 || $this->getUserStatusId($user_id) === 1)\n\t\t{\n\t\t\t$this->where('id', '=', $user_id)->update(['user_status' => 3]);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"private function userUnblock()\n\t{\n\t\t// Make sure the payment is complete\n\t\tif($this->state != 'C') return;\n\t\t\n\t\t// Make sure the subscription is enabled\n\t\tif(!$this->enabled) return;\n\t\t\n\t\t// Paid and enabled subscription; enable the user if he's not already enabled\n\t\t$user = JFactory::getUser($this->user_id);\n\t\tif($user->block) {\n\t\t\t// Check the confirmfree component parameter and subscription level's price\n\t\t\t// If it's a free subscription do not activate the user.\n\t\t\tif(!class_exists('AkeebasubsHelperCparams')) {\n\t\t\t\trequire_once JPATH_ADMINISTRATOR.'/components/com_akeebasubs/helpers/cparams.php';\n\t\t\t}\n\t\t\t$confirmfree = AkeebasubsHelperCparams::getParam('confirmfree', 0);\n\t\t\tif($confirmfree) {\n\t\t\t\t$level = FOFModel::getTmpInstance('Levels', 'AkeebasubsModel')\n\t\t\t\t\t->getItem($this->akeebasubs_level_id);\n\t\t\t\tif($level->price < 0.01) {\n\t\t\t\t\t// Do not activate free subscription\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$updates = array(\n\t\t\t\t'block'\t\t\t=> 0,\n\t\t\t\t'activation'\t=> ''\n\t\t\t);\n\t\t\t$user->bind($updates);\n\t\t\t$user->save($updates);\n\t\t}\n\t}",
"public function deactivate() {\n\t\t\t// just in case I want to do anyting on deactivate\n\t\t}",
"private function deactivateUser($conn){\n\t\t\t$postdata = file_get_contents(\"php://input\");\n\t\t\t$request = json_decode($postdata);\n\t\t\t$user_id = $request->user_id; \n\t\t\tif($user_id > 0){\n\t\t\t\t$query = 'Update users set user_status = 1 WHERE user_id = '.$user_id;\t\t\t\n\t\t\t\t$sql = $conn->query($query); \n\t\t\t\t$query2 = 'SELECT playlist_id FROM playlist where user_id = '.$user_id;\n\t\t\t\t$sql2 = $conn->query($query2);\n\t\t\t\tif($sql2->num_rows > 0){\n\t\t\t\t\t$result = $sql2->fetch_assoc();\n\t\t\t\t\t$query3 = 'Update playlist set playlist_status = 1 WHERE playlist_id = '.$result['playlist_id'];\t\t\t\n\t\t\t\t\t$sql3 = $conn->query($query3);\n\t\t\t\t\t$query4 = 'Update rel_playlist_tracks set rel_playlist_tracks_status = 1 WHERE playlist_id = '.$result['playlist_id'];\n\t\t\t\t\t$sql4 = $conn->query($query4); \n\t\t\t\t\t$this->response('',200);\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t$this->response('',204);\n\t\t\t\t\n\t\t\t}else\n\t\t\t\t$this->response('',204); \n\t\t}",
"function deactivate() {\n \n $this->reset_caches();\n $this->ext->update_option( 'livefyre_deactivated', 'Deactivated: ' . time() );\n\n }",
"public function deactivateUser()\n {\n $subscritpionData = $this->Subscription->find('all', array('conditions' => array('Subscription.is_active' => 0, 'Subscription.next_subscription_date' => date('Y-m-d'))));\n foreach ($subscritpionData as $subscription) {\n $nextDate = $subscription['Subscription']['next_subscription_date'];\n if (date('Y-m-d') == $nextDate) {\n $this->User->id = $subscription['Subscription']['user_id'];\n $this->User->saveField('deactivated_by_user', 1);\n $businessId = $this->BusinessOwner->findByUserId($subscription['Subscription']['user_id']);\n \n //Store previous group members information\n $gdata = $this->BusinessOwner->getMyGroupMemberList($this->Encryption->decode($businessId['Group']['id']),$subscription['Subscription']['user_id']);\n $prevMember = NULL;\n $prevRecord['PrevGroupRecord'] = array();\n foreach($gdata as $key => $val) {\n $data['user_id'] = $subscription['Subscription']['user_id'];\n $data['group_id'] = $this->Encryption->decode($businessId['Group']['id']);\n $data['members_id'] = $key;\n array_push($prevRecord['PrevGroupRecord'],$data);\n }\n $this->PrevGroupRecord->saveAll($prevRecord['PrevGroupRecord']); \n $this->BusinessOwner->id = $this->Encryption->decode($businessId['BusinessOwner']['id']);\n $parts = explode(',', $businessId['Group']['group_professions']); \n while(($i = array_search($businessId['BusinessOwner']['profession_id'], $parts)) !== false) {\n unset($parts[$i]);\n }\n $updateProfessions = implode(',', $parts);\n $updateMember = $businessId['Group']['total_member'] - 1;\n\t\t\t\t$this->BusinessOwner->saveField('group_id', NULL);\n $this->Group->updateAll(array('Group.group_professions' => \"'\".$updateProfessions.\"'\",'Group.total_member' =>\"'\".$updateMember.\"'\"),array( 'Group.id' => $businessId['BusinessOwner']['group_id']));\n }\n }\n }",
"public function unconfirmed_account() {\n \n // Check if the current user is admin and if session exists\n $this->check_session();\n \n if ( $this->user_status == 1 ) {\n \n redirect('/user/app/dashboard');\n \n }\n \n // Show unconfirmed account page\n $this->load->view('user/unconfirmed-account');\n \n }",
"function deactivate($uID=\"\") {\n if(!$uID) {\n echo \"Need uID to deactivate!! - error dump from User_class.php\";\n exit;\n }\n $SQL = \"UPDATE User \".\n \"SET Active = '0' \".\n \"WHERE ID = $uID\";\n mysqli_query($this->db_link, $SQL);\n\n }",
"public function deactivate();",
"public function logoutUser() {\n $this->session->unsetSession(self::$storedUserId);\n $this->session->setFlashMessage(2);\n self::$isLoggedIn = false;\n }",
"protected function makeUserInactive($userModel)\n {\n $userModel->setIsActive(static::DATA_IS_INACTIVE);\n $userModel->getResource()->save($userModel);\n }",
"public function deactivate()\n {\n $project = $this->getProject();\n $recovery_plan_id = $this->request->getIntegerParam('recovery_plan_id', 0);\n\n\n $this->response->html($this->template->render('status:recoveryPlanDetail/makeInactive', array(\n 'title' => t('Remove recovery plan'),\n 'project_id' => $project['id'],\n 'values' => array('id' => $recovery_plan_id)\n )));\n }",
"public function deactivateUserAction($userActionId)\n {\n return $this->start()->uri(\"/api/user-action\")\n ->urlSegment($userActionId)\n ->delete()\n ->go();\n }",
"public function disconnetUser() {\n\t\tsession_start();\n\t\tunset($_SESSION['id_users']);\n\t\tunset($_SESSION['username']);\n\t\theader('Location: index.php');\n\t}",
"public function destroy()\n {\n $userId = Helper::getIdFromUrl('user');\n \n if ((Helper::checkUrlIdAgainstLoginId($userId)) !== 'super-admin') {\n Usermodel::load()->destroy($userId);\n } else { \n View::render('errors/403.view', [\n 'message' => 'You cannot delete yourself!',\n ]);\n }\n }",
"function user_logging_out($user_id) {\n \n }",
"public static function deactivate(){\n // Do nothing\n }",
"public function deactivateAdmin($id) {\n\t\t$this->__allowSuperAdminOnly();\n\t\t$adminUserData = $this->User->findById($id);\n\t\tif (!empty($adminUserData)) {\n\t\t\t$success = $this->User->blockUser($id);\n\t\t\tif ($success === true) {\n\t\t\t\t$this->__sendAdminDeactivatedEmail($adminUserData);\n\t\t\t\t$adminUsername = $adminUserData['User']['username'];\n\t\t\t\t$message = __('Successfully deactivated the user \"%s\".', $adminUsername);\n\t\t\t\t$this->Session->setFlash($message, 'success');\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Failed to deactivate the admin user.'), 'error');\n\t\t\t}\n\t\t} else {\n\t\t\t$this->Session->setFlash(__('No admin with id: %d.', $id), 'error');\n\t\t}\n\t\t$this->redirect('admins');\n\t}",
"public function destroy(User $user)\n {\n $user->status = ($user->status == \"Active\")?'Inactive':'Active';\n $user->save();\n\n return redirect()->back();\n }",
"public function deactivateUser($parentId, $userId) {\n $this->partialUpdate($userId, array('active_yn' => 0), $parentId);\n }",
"public function destroy()\n {\n $user = auth()->user();\n\n if (! Authy::isEnabled($user)) {\n return $this->setStatusCode(422)\n ->respondWithError(\"2FA is not enabled for this user.\");\n }\n\n Authy::delete($user);\n\n $user->save();\n\n event(new TwoFactorDisabled);\n\n return $this->respondWithItem($user, new UserTransformer);\n }",
"public function logoutUser() {\r\n\t\t$this->coreAuthenticationFactory->logoutUser ();\r\n\t}",
"public static function deactivate()\n {\n // Do nothing\n }",
"public function deactivate() {\n\n }",
"public function deactivate() {\n\n }",
"public function actionUserdelete()\n {\n $timeLimit = time() - 0;\n $deactivateRequests = DeactivateAccount::find()->where(['processingDate' => null])->andWhere('creationDate < '.$timeLimit)->all();\n\n foreach ($deactivateRequests as $request)\n {\n $user = $request->user;\n\n if ($user->last_login <= $request->creationDate+3)\n {\n $user->setScenario('status');\n $user->status = User::STATUS_DELETED;\n $user->save();\n\n Campaign::updateAll(['status' => Campaign::STATUS_DELETED], 'userId = :userId', [':userId' => $user->id]);\n }\n\n $request->setScenario('processing');\n $request->processingDate = time();\n $request->save();\n }\n }",
"public static function deactivate() {\n\t\t\t// Do nothing\n\t\t}",
"public function inactiveUser($user_id)\r\n\t{\r\n\t\t$data=array('status'=>0);\r\n\t\t$where=$this->getAdapter()->quoteInto('user_id=?',$user_id);\r\n\t\t$this->update($data,$where);\r\n\t}",
"public function inactiveAction()\n {\n $this->initialize();\n\n $all = $this->users->query()\n ->where('deleted IS NOT NULL')\n ->execute();\n \n $this->theme->setTitle(\"Users that are inactive\");\n $this->views->add('users/list-all', [\n 'users' => $all,\n 'title' => \"Users that are inactive\",\n ]);\n }",
"public function disable_user(Request $request)\n {\n $user = User::findOrFail($request->id);\n $user->estado = '0';\n $user->save();\n }",
"static function momentDisconect()\r\n {\r\n $user = self::getCurrentUser();\r\n\r\n if ($user !== NULL)\r\n {\r\n $user->setOffline(1);\r\n self::updateUser($user);\r\n }\r\n }",
"function admin_disable($id = null) {\n\n\t\t$user = $this->User->read(null, $id);\n\n\t\t/**\n\t\t * Read the \"Status\" component for more informations.\n\t\t * Dir : controllers/components/status.php\n\t\t */\n\t\tif (!empty($user)) {\n\n\t\t\t$user['User']['status'] = 1;\n\n\t\t\t/**\n\t\t\t * Change the user status.\n\t\t\t * Redirect the administrator to index page.\n\t\t\t */\n\t\t\tif ($this->User->save($user)) {\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user has been disabled.', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t}\n\t\t}\n\n\t}",
"public function disable($user_id = 0)\n {\n header('Content-Type: application/json'); //set response type to be json\n admin_session_check();\n if(!$user_id) show_404();\n $user = $this->users_model->get_record($user_id);\n if(!isset($user->user_id))\n {\n $ajax_response = array('type' => AJAX_RESPONSE_TYPE_ERROR, 'message' => get_alert_html($this->lang->line('error_invalid_request'), ALERT_TYPE_ERROR));\n echo json_encode($ajax_response);\n exit();\n }\n if($user->user_id == $this->session->userdata('user_id'))\n {\n $ajax_response = array('type' => AJAX_RESPONSE_TYPE_ERROR, 'message' => get_alert_html($this->lang->line('error_disable_self'), ALERT_TYPE_ERROR));\n echo json_encode($ajax_response);\n exit();\n }\n $this->users_model->update_user_status($user_id, USER_STATUS_INACTIVE);\n $ajax_response = array('type' => AJAX_RESPONSE_TYPE_SUCCESS, 'message' => get_alert_html($this->lang->line('success_user_disabled'), ALERT_TYPE_SUCCESS));\n echo json_encode($ajax_response);\n }",
"public static function deactivate()\n\t\t{\n\t\t\t// Do nothing\n\t\t}",
"public static function deactivate()\n\t\t{\n\t\t\t// Do nothing\n\t\t}",
"public function logoutUser()\n {\n // Unset session-key user\n $this->di->get(\"session\")->delete(\"my_user_id\");\n $this->di->get(\"session\")->delete(\"my_user_name\");\n //$this->di->get(\"session\")->delete(\"my_user_password\");\n $this->di->get(\"session\")->delete(\"my_user_email\");\n //$this->di->get(\"session\")->delete(\"my_user_created\");\n //$this->di->get(\"session\")->delete(\"my_user_updated\");\n //$this->di->get(\"session\")->delete(\"my_user_deleted\");\n //$this->di->get(\"session\")->delete(\"my_user_active\");\n $this->di->get(\"session\")->delete(\"my_user_admin\");\n }",
"public function deactivateAccountAction( $header_data ){\n try{\n $user = Users::findById( $header_data[\"id\"] );\n $user->is_active = 0;\n if( $user->save() ){\n Library::output(true, '0', USER_DEACTIVATED, null);\n }else{\n foreach ($user->getMessages() as $message) {\n $errors[] = $message->getMessage();\n }\n Library::logging('error',\"API : deactivateAccount : \".$errors.\" user_id : \".$header_data['id']);\n Library::output(false, '0', $errors, null);\n }\n } catch (Exception $e) {\n Library::logging('error',\"API : deactivateAccount, error message : \".$e->getMessage(). \": user_id : \".$header_data['id']);\n Library::output(false, '0', ERROR_REQUEST, null);\n }\n }",
"public function desactivarCuenta() {\n\n\t/*Recoge el usuario actual*/\n\t$currentuser = $_SESSION[\"currentuser\"];\n\n\t/*Actualiza el estado del usuario a inactivo=0 */\n\t$this->user->updateEstado($currentuser->getEmailU());\n\n\t//mensaje de confirmación y redirige al método login del UsersController.php\n\techo \"<script> alert('Cuenta eliminada correctamente'); </script>\";\n\techo \"<script>window.location.replace('index.php');</script>\";\n\n\t// renderiza la vista (/view/vistas/consultaJprof.php)\n\t$this->view->render(\"vistas\", \"consultaJprof\");\n}",
"public function logAdminOff()\n {\n //session must be started before anything\n session_start ();\n\n // Add the session name user_id to a variable $id\n $id = $_SESSION['user_id'];\n\n //if we have a valid session\n if ( $_SESSION['logged_in'] == TRUE )\n {\n $lastActive = date(\"l, M j, Y, g:i a\");\n $online= 'OFF';\n $sql = \"SELECT id,online, last_active FROM users WHERE id = '\".$id.\"'\";\n $res = $this->processSql($sql);\n if ($res){\n $update = \"UPDATE users SET online ='\".$online.\"', last_active ='\".$lastActive.\"' WHERE id = '\".$id.\"'\";\n $result = $this->processSql($update);\n }\n //unset the sessions (all of them - array given)\n unset ( $_SESSION );\n //destroy what's left\n session_destroy ();\n\n header(\"Location: \".APP_PATH.\"admin_login\");\n }\n\n\n \t\t//It is safest to set the cookies with a date that has already expired.\n \t\tif ( isset ( $_COOKIE['cookie_id'] ) && isset ( $_COOKIE['authenticate'] ) ) {\n \t\t\t/**\n \t\t\t\t* uncomment the following line if you wish to remove all cookies\n \t\t\t\t* (don't forget to comment or delete the following 2 lines if you decide to use clear_cookies)\n \t\t\t*/\n \t\t\t//clear_cookies ();\n \t\t\tsetcookie ( \"cookie_id\", '', time() - 3600);\n \t\t\tsetcookie ( \"authenticate\", '', time() - 3600 );\n \t\t}\n\n \t}",
"public function logout_user() {\n\t\tif(isset($_SESSION['eeck'])) {\n\t\t\tunset($_SESSION['eeck']);\n\t\t}\n\t}",
"public function cancel()\n\t{\n\t\t// Initialize variables.\n\t\t$app = &JFactory::getApplication();\n\n\t\t// Clear the user edit information from the session.\n\t\t$app->setUserState('com_users.edit.user.id', null);\n\t\t$app->setUserState('com_users.edit.user.data', null);\n\n\t\t// Redirect to the list screen.\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_users&view=users', false));\n\t}",
"public static function deactivate() {\n\t\t// Do nothing.\n\t}",
"public static function deactivate()\n {\n }",
"public function disable(User $user){\n return $this->respond($user->disable());\n }",
"public static function deactivate() {\n\n }",
"public static function deactivate()\n\t{\n\n\t}",
"public function suspend_user(User $user){\n //If the user is active suspend them if not reinstate them\n if ($user->active == 1) {\n $user->active = 0;\n $user->save();\n session()->flash('status', $user->username . ' was successfully suspended');\n return redirect()->back();\n }\n $user->active = 1;\n $user->save();\n session()->flash('status', $user->username . ' was successfully reinstated');\n return redirect()->back();\n }",
"static function userLogout()\r\n {\r\n $user = self::getCurrentUser();\r\n\r\n if ($user->getOffline == 0) //is Online\r\n {\r\n $user->setOffline(1);\r\n self::updateUser($user);\r\n\r\n $_SESSION[\"user_name\"] = NULL;\r\n $_SESSION[\"user_type\"] = NULL;\r\n $_SESSION[\"user_id\"] = NULL;\r\n $_SESSION[\"last_page\"] = NULL;\r\n $_SESSION[\"curr_page\"] = NULL;\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }",
"public function ual_activity_logout() {\n\n\t\t// Store user id.\n\t\t$user_id = get_current_user_id();\n\n\t\t// If we have the user id, continue.\n\t\tif ( ! empty( $user_id ) ) {\n\t\t\t// Get user data with id.\n\t\t\t$user = get_userdata( $user_id );\n\n\t\t\t// Store a user name.\n\t\t\t$user_name = $user->display_name ? $user->display_name : $user->user_nicename;\n\n\t\t\t// Log this activity.\n\t\t\tdo_action( 'ual_log_action', $user->ID, $user_name . ' logged out', 'logged-out' );\n\t\t}\n\t}",
"function urt_deactivate() {\n remove_role( 'urt_secretary' );\n}",
"public function deactivateaccount() {\n\n // Fetch the request data in JSON format and convert it into object\n $request_data = $this->request->input('json_decode');\n switch (true) {\n // When request is not made using POST method\n case!$this->request->isPost() :\n $success = false;\n $status = BAD_REQUEST;\n $message = 'Wrong request method.';\n break;\n // Request is valid and phone no and name are present\n case!empty($request_data) && !empty($request_data->phone_no) && !empty($request_data->user_token) && !empty($request_data->reason_type) && !empty($request_data->password): // && !empty($request_data->other_reason) && !empty($request_data->email_opt_out):\n // Check if phone no exists\n $data = $this->User->findUser($request_data->phone_no);\n\n // Check if record exists\n if (count($data) != 0) {\n // Check uuid entered is valid\n if ($data[0]['User']['verified'] === false) {\n $success = false;\n $status = UNAUTHORISED;\n $message = 'User not verified';\n } elseif ($request_data->user_token != $data[0]['User']['user_token']) { // User Token is not valid\n $success = false;\n $status = UNAUTHORISED;\n $message = 'User Token is invalid';\n } elseif (md5($request_data->password) != $data[0]['User']['password']) { // User password is matching or not.\n $success = false;\n $status = UNAUTHORISED;\n $message = 'Password did not match';\n } else {\n\n $dataArray = array();\n $dataArray['User']['_id'] = $data[0]['User']['_id'];\n $dataArray['User']['reason_type'] = $request_data->reason_type;\n $dataArray['User']['is_active'] = 'no';\n $dataArray['User']['other_reason'] = !empty($request_data->other_reason) ? trim($request_data->other_reason) : '';\n $flag = $this->User->save($dataArray);\n\n if ($flag) {\n // send email to user's email address..\n if (!empty($request_data->email_opt_out) && $request_data->email_opt_out == 'yes') {\n App::uses('CakeEmail', 'Network/Email');\n $Email = new CakeEmail('default');\n $Email->from(array(SUPPORT_SENDER_EMAIL => SUPPORT_SENDER_EMAIL_NAME));\n $Email->to(strtolower(trim($data[0]['User']['email'])));\n $Email->subject('Clickin | Account Deactivation');\n $Email->emailFormat('html');\n $messageEmail = '';\n $messageEmail .= \"Hi \" . trim($data[0]['User']['name']) . ',<br><br> You have deactivated clickin account. You can reactivate your account\n by signing in again.<br><br>Regards,<br>Clickin\\' Team';\n $Email->send($messageEmail);\n }\n\n $success = true;\n $status = SUCCESS;\n $message = 'Your account has been deactivated.';\n } else {\n $success = false;\n $status = ERROR;\n $message = 'There was a problem in processing your request';\n }\n }\n }\n // Return false if record not found\n else {\n $success = false;\n $status = UNAUTHORISED;\n $message = 'Phone no. not registered.';\n }\n break;\n // User Token blank in request\n case!empty($request_data) && empty($request_data->user_token):\n $success = false;\n $status = BAD_REQUEST;\n $message = 'User Token cannot be blank.';\n break;\n // Phone no. blank in request\n case!empty($request_data) && empty($request_data->phone_no):\n $success = false;\n $status = BAD_REQUEST;\n $message = 'Phone no. cannot be blank.';\n break;\n // Reason type blank in request\n case!empty($request_data) && empty($request_data->reason_type):\n $success = false;\n $status = BAD_REQUEST;\n $message = 'Reason type cannot be blank.';\n break;\n // Password blank in request\n case!empty($request_data) && empty($request_data->password):\n $success = false;\n $status = BAD_REQUEST;\n $message = 'Password cannot be blank.';\n break;\n // Parameters not found in request\n case empty($request_data):\n $success = false;\n $status = BAD_REQUEST;\n $message = 'Request cannot be empty.';\n break;\n }\n\n $out = array(\n \"success\" => $success,\n \"message\" => $message\n );\n\n return new CakeResponse(array('status' => $status, 'body' => json_encode($out), 'type' => 'json'));\n }",
"public function destroy(){\n\t\t$this->hook->subscribe('beforeUserDestroy');\n\n\t\techo 'Lösche den User! </br>';\n\n\t\t//nachdem Methode aufgerufen worden ist\n\t\t$this->hook->subscribe('afterUserDestroy');\n\t\t\n\t}",
"function user_logging_out($user_id)\n\t{\n\t}",
"function WPFormsDB_on_deactivate() {\n\tglobal $wp_roles;\n\n\tforeach( array_keys( $wp_roles->roles ) as $role ) {\n\t\t$wp_roles->remove_cap( $role, 'WPFormsDB_access' );\n\t}\n}",
"public function _deactivate() {\r\n\t\t// Add deactivation cleanup functionality here.\r\n\t}",
"public function deactivate(): void;",
"public function desactivar($id){\n $user = User::find($id);\n $user->activo = 0;\n $user->update();\n $usuario = \\Auth::user()->name;\n DB::select('call logs(\"'.$usuario.'\", \"Desactivó usuario\", \"Administrador\")');\n return redirect()->route('listar')\n ->with(['message'=>'Se le acabo la tonteria juajuajua']);\n }",
"public static function deactivate() {\n\t}",
"public static function deactivate(){\n }",
"public static function deactivate(){\n }",
"public function profileLogout()\n {\n unset($this->getApp()->getSession()->BRACP_PROFILE_ID);\n self::$loggedUser = null;\n }",
"public function deactivate(): void\n {\n // Bail early if no recipients are set.\n if (empty($this->recipients)) {\n return;\n }\n\n if ($this->settings[Settings::PLUGIN_DEACTIVATED]) {\n $subject = __('BC Security deactivated', 'bc-security');\n\n $user = wp_get_current_user();\n if ($user->ID) {\n // Name the bastard that turned us off!\n $message = \\sprintf(\n __('User \"%s\" had just deactivated BC Security plugin on your website!', 'bc-security'),\n $user->user_login\n );\n } else {\n // No user means plugin has been probably deactivated via WP-CLI.\n // See: https://github.com/chesio/bc-security/issues/16#issuecomment-321541102\n $message = __('BC Security plugin on your website has been deactivated!', 'bc-security');\n }\n\n $this->notify($subject, $message);\n }\n }",
"function cfdb7_on_deactivate() {\n global $wp_roles;\n foreach( array_keys( $wp_roles->roles ) as $role ) {\n $wp_roles->remove_cap( $role, 'cfdb7workflow_access' );\n }\n}",
"public function disable_user() \n {\n $conn = $this->conn;\n $login = $this->login;\n \n $params = array($login);\n $query = \"UPDATE users SET enabled = -1 WHERE login = ?\";\n \n $rs = $conn->Execute($query, $params);\n \n if (!$rs) \n { \n return FALSE;\n }\n \n $infolog = array($login);\n Log_action::log(93, $infolog);\n \n return TRUE;\n }",
"public function deactivate_user($u,$i)\n \t{\n\t//Retrieve userinfo from userid supplied\n\t$userinfo = verify_id('user', $u, 1, 1);\t\n\t//If they are awaiting activation\n\tif ($userinfo['usergroupid'] == NOACTIVATION_USERGROUP)\n\t{\n\t\t// check valid activation id\n\t\t$user = $this->db->query_first(\"\n\t\t\tSELECT activationid, usergroupid, emailchange\n\t\t\tFROM \".TABLE_PREFIX.\"useractivation\n\t\t\tWHERE activationid = '\" . $this->db->escape_string($i) . \"'\n\t\t\t\tAND userid = $userinfo[userid]\n\t\t\t\tAND type = 0\n\t\t\");\n\t\tif (!$user OR $i != $user['activationid'])\n\t\t{\n\t\t// give link to resend activation email\n\t\treturn \"Invalid activation ID or user ID. Click <a href='register.php?do=requestemail&u=$u'>here</a> to request a new activation email.\";\n\t\t}\n\t\t// delete activationid\n\t\t$this->db->query_write(\"DELETE FROM \".TABLE_PREFIX.\"useractivation WHERE userid=$userinfo[userid] AND type=0\");\n\t\t//If we dont have a usergroup for the user, assign to whatever has been set in config as registered usergroup\n\t\tif (empty($user['usergroupid']))\n\t\t{\n\t\t\t$user['usergroupid'] = REGISTERED_USERGROUP; // sanity check\n\t\t}\n\t\t//Get the username for user\n\t\t$getusername = $this->db->query_first(\"\n\t\t\tSELECT username\n\t\t\tFROM \".TABLE_PREFIX.\"user\n\t\t\tWHERE userid = '\" . $this->db->escape_string($u) . \"'\");\n\t\t//Remove totally!\n\t\t$this->delete_user($getusername['username']);\n\t\t//Reset userid so we dont confuse the script\n\t\t$this->vbulletin->userinfo['userid'] = 0;\t\n\t\t//Return false which means success!\n\t\treturn false;\n\t\t\n\t}\n\telse\n\t\treturn \"This account has already been activated. Click <a href='login.php'>here</a> to login.\";\n\t\t\n\t}",
"static function unlock_account() {\n $model = \\Auth::$model;\n\n # hash GET param exists\n if ($hash = data('hash')) {\n\n # verificando se ha algum usuário com a hash.\n $user = $model::first(array(\n 'fields' => 'id, hash_unlock_account',\n 'where' => \"hash_unlock_account = '$hash'\"\n ));\n\n if (!empty($user)) {\n $user->hash_unlock_account = '';\n $user->login_attempts = 0;\n\n $user->edit() ?\n flash('Sua conta foi desbloqueada.') :\n flash('Algo ocorreu errado. Tente novamente mais tarte.', 'error');\n }\n }\n\n go('/');\n }",
"function unlockAccount($userid){\n $query = \"UPDATE users_account SET status ='Active' WHERE userid = ?\";\n $paramType = \"i\";\n $paramValue = array(\n $userid\n );\n $this->db_handle->update($query, $paramType, $paramValue);\n }",
"public function Action_Logout()\n {\n Zero_App::$Users->IsOnline = 'no';\n Zero_App::$Users->Save();\n Zero_Session::Unset_Instance();\n session_unset();\n session_destroy();\n Zero_Response::Redirect(ZERO_HTTP);\n }",
"public function closeUser ()\n\t{\n\t\t$this->_username = null;\n\t}",
"function RecoveryInactiveUser(&$UserProfile,&$nUser) {\n\t\t$SQLStrQuery=\"SELECT * FROM Password AS PASS JOIN Usuario AS U ON PASS.UID=U.UID WHERE (PASS.REGISTRADO='0')\";\n\t\tSQLQuery($ResponsePointer,$nUser,$SQLStrQuery,true); // Realiza la consulta en la base de datos globales\n\t\tConvertPointerToArray($ResponsePointer,$UserProfile,$nUser,20); // Convertir la consulta en un arreglo de datos\n\t}",
"public function cancelUserDeletion(): void\n {\n $this->dispatch('close-modal', id: 'confirmingUserDeletion');\n }",
"public function logOffEmployee()\n {\n $this->destroyEmployeeHash($_SESSION[\"emp_id\"], $_SESSION[\"emp_hash\"]);\n $this->destroyEmployeeSession();\n }",
"public function user_logout()\n {\n $this->session->sess_destroy();\n redirect('userController/login_view', 'refresh');\n }",
"public function destroy(User $user)\n {\n if (! Authy::isEnabled($user)) {\n return $this->setStatusCode(422)\n ->respondWithError(\"2FA is not enabled for this user.\");\n }\n\n Authy::delete($user);\n\n $user->save();\n\n event(new TwoFactorDisabledByAdmin($user));\n\n return $this->respondWithItem($user, new UserTransformer);\n }",
"public function signOut() {\n\n $this->getAttributeHolder()->removeNamespace('sfGuardSecurityUser');\n $this->user = null;\n $this->clearCredentials();\n $this->setAuthenticated(false);\n $expiration_age = sfConfig::get('app_sf_guard_plugin_remember_key_expiration_age', 15 * 24 * 3600);\n $remember_cookie = sfConfig::get('app_sf_guard_plugin_remember_cookie_name', 'sfRemember');\n sfContext::getInstance()->getUser()->setAttribute('view', '');\n sfContext::getInstance()->getResponse()->setCookie($remember_cookie, '', time() - $expiration_age);\n }",
"public function desactivar(Request $request)\n {\n //\n if (!$request->ajax()) return redirect('/');\n \n $user = User::findOrFail($request->id);\n $user->condicion = '0';\n $user->save();\n }",
"public function destroy(User $user)\n {\n if (Auth::user()->isAdmin && (Auth::user()->id != $user->id)) {\n $user->delete();\n session()->flash('success', 'تمة عملة الحذف بنجاح');\n return redirect()->back();\n } else {\n return redirect()->back();\n }\n }",
"public function deactivate(Request $request, $id)\n {\n User::find($id)->delete();\n Customer::where('user_id', $id)->delete();\n $request->session()->invalidate();\n\n $request->session()->regenerateToken();\n\n return redirect()->route('loginCustomer.index');\n }",
"public function onUserLogout($event)\n {\n $user = $event->user;\n\n Cache::tags('auth_permissions')->forget($user->id);\n }",
"function exit_user() {\n\t\t//~ Destroy session, delete cookie and redirect to main page\n\t\tsession_destroy();\n\t\tsetcookie(\"id_user\", '', time()-3600);\n\t\tsetcookie(\"code_user\", '', time()-3600);\n\t\theader(\"Location: index.php\");\n\t}",
"function desactivar_authuser($id)\n\t{\n\t\t$query = \"UPDATE authuser set status=0 WHERE id = $id'\";\n\t\t$result=mysql_query($query);\n\t\treturn $result;\n\t}",
"public function userDestroy(Request $request, $userId)\n {\n $user = User::find($userId);\n $user->is_active = false;\n $user->save();\n Auth::logout();\n return redirect('/');\n }",
"public function delete($user_id) {\n # anime they have submitted.\n \n # Get all the anime this user has submitted.\n $user_anime = $this->anime_model->get_anime_from_user($user_id);\n \n foreach($user_anime as $anime) {\n # Make each anime inactive\n $this->anime_model->make_anime_inactive($anime['id']);\n }\n \n # Make the user's profile inactive\n $this->user_model->make_inactive($user_id);\n \n # Log the user out\n $this->logout();\n }",
"public function deactiveuser() {\n extract($_POST);\n $result = $this->Allusers_model->deactiveuser($user_id);\n //print_r($result);die();\n if ($result['status'] == 200) {\n // echo \"check if\";\n echo '<div class=\"alert alert-success alert-dismissible fade in alert-fixed w3-round\">\n <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">×</a>\n <strong>Success!</strong> Member deactive SuccessFully.\n </div>\n <script>\n window.setTimeout(function() {\n $(\".alert\").fadeTo(500, 0).slideUp(500, function(){\n $(this).remove();\n });\n }, 5000);\n location.reload();\n\n </script>';\n } else {\n // echo \"check else\";\n echo '<div class=\"alert alert-danger alert-dismissible fade in alert-fixed w3-round\">\n <a href=\"#\" class=\"close\" data-dismiss=\"alert\" aria-label=\"close\">×</a>\n <strong>Warning!</strong> Member deactive Not Deleted SuccessFully.\n </div>\n <script>\n window.setTimeout(function() {\n $(\".alert\").fadeTo(500, 0).slideUp(500, function(){\n $(this).remove(); \n });\n }, 5000);\n </script>';\n }\n }",
"public function destroy()\n {\n $users = User::find(\\Auth::user()->id);\n $users->last_login = Carbon::now('Asia/Kuala_Lumpur');\n $users->save();\n\n \\Auth::logout();\n \\Session::flash('message', 'You are now logout');\n // return View::make('auth/login')->with('title', 'login');\n return redirect('auth/login')->with('title', 'login');\n }"
] | [
"0.6963564",
"0.6935043",
"0.6856261",
"0.6852787",
"0.68121284",
"0.67821443",
"0.6718867",
"0.67051685",
"0.66214716",
"0.65922475",
"0.6584458",
"0.6561433",
"0.65479505",
"0.6547784",
"0.65232265",
"0.6419346",
"0.6373802",
"0.63685125",
"0.63394564",
"0.6334459",
"0.63097805",
"0.629905",
"0.62683564",
"0.6260811",
"0.6251472",
"0.6248759",
"0.62297684",
"0.62241554",
"0.62137854",
"0.62130314",
"0.61870015",
"0.6173944",
"0.61569977",
"0.61400896",
"0.61299783",
"0.61153436",
"0.61149496",
"0.6089846",
"0.60769856",
"0.60769856",
"0.60747993",
"0.607319",
"0.6072217",
"0.60528797",
"0.605009",
"0.60457367",
"0.603301",
"0.60107625",
"0.6007967",
"0.6007967",
"0.6005245",
"0.6004453",
"0.59953916",
"0.59872085",
"0.5986467",
"0.59729946",
"0.5966053",
"0.595085",
"0.5943624",
"0.5938905",
"0.59314317",
"0.59287906",
"0.5923401",
"0.59216017",
"0.59190387",
"0.59169465",
"0.5916289",
"0.5914042",
"0.59060305",
"0.58984816",
"0.5893374",
"0.58924556",
"0.58839977",
"0.5861902",
"0.5861902",
"0.5854998",
"0.5853786",
"0.5852362",
"0.58522457",
"0.5835502",
"0.5832118",
"0.58315575",
"0.58212745",
"0.5815703",
"0.5814032",
"0.58064663",
"0.5800191",
"0.5791449",
"0.5786836",
"0.57760465",
"0.5773376",
"0.57719463",
"0.57683766",
"0.57666725",
"0.5766163",
"0.5764821",
"0.5764348",
"0.57629645",
"0.5757083",
"0.57504046"
] | 0.74709094 | 0 |
Grabs Employee Id from database using the id of the row that will be updated in another function | private function check_employee_id($id) {
$query = "SELECT employee_id FROM users WHERE id='$id'";
$check_database = mysqli_query($this->con, $query);
$result = mysqli_fetch_assoc($check_database);
return $result['employee_id'];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getEmployeeId()\n {\n return $this->employee_id;\n }",
"public function getEmployeeID()\n {\n return $this->employeeID;\n }",
"public function getEmployee($employee_id) {\n $db = Database::getDB();\n $query = 'SELECT * FROM planners\n WHERE employeeID = :employee_id'; \n $statement = $db->prepare($query);\n $statement->bindValue(':employee_id', $employee_id);\n $statement->execute(); \n $row = $statement->fetch();\n $statement->closeCursor(); \n $employee = new Employee($row['employeeID'],$row['fname']);\n //echo $employee->getID();\n return $employee;\n }",
"function edit_account($emp_id) {\n $mysqli = $this->mysqli;\n $sql = \"SELECT * FROM employee INNER JOIN users on `employee`.`emp_id`=`users`.`emp_id` where `users`.`emp_id`='$emp_id'\";\n if ($val = $mysqli->query($sql)) {\n return $val;\n }\n else {\n $mysqli->error;\n }\n }",
"private function editEmployee()\n\t{\n\t\tif (true === $this->flag)\n\t\t{\n\t\t\tif (isset($this->dataArray))\n\t\t\t{\n\t\t\t\t$array = array();\n\t\t\t\t$name = $this->dataArray['name_employee'];\n\t\t\t\t$email = $this->dataArray['email_employee'];\n\t\t\t\t$pass = $this->dataArray['pass_employee'];\n\t\t\t\t$key_employee = $this->encodeObj->generateCode($name);\n\t\t\t\tif (0 != strlen($name))\n\t\t\t\t{\n\t\t\t\t\t$array['name_employee'] = $name;\n\t\t\t\t}\n\t\t\t\tif (0 != strlen($email))\n\t\t\t\t{\n\t\t\t\t$arr = $this->queryToDbObj\n\t\t\t\t\t\t->getEmployeeForCheckExists($email);\n\t\t\t\t\t\tif(!empty($arr))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t $this->error['ERROR_STATUS'] = ERROR_EXISTS;\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 $array['mail_employee'] = $email;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (0 != strlen($pass))\n\t\t\t\t{\n\t\t\t\t\t$array['passwd_employee'] = md5($key_employee.$pass.SALT);\n\t\t\t\t\t$array['key_employee'] = $key_employee;\n\t\t\t\t}\n\t\t\t\t$id_employee = $this->data->getParams();\n\t\t\t\t$id_employee = abs((int)$id_employee['id']);\n\t\t\t\t$rez = $this->queryToDbObj\n\t\t\t\t\t->setEmployeeNewData($array, $id_employee);\n\n\t\t\t\treturn $rez;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$id_employee = $this->data->getParams();\n\t\t\t\t$rez = $this->queryToDbObj\n\t\t\t\t\t->getEmployeeById($id_employee['id']);\n\t\t\t\t$arr['EMPLOYEE_N'] = $rez[0]['name_employee'];\n\t\t\t\t$arr['EMPLOYEE_EMAIL'] = $rez[0]['mail_employee'];\n\t\t\t}\n\t\t}\n\n\t\treturn $arr;\n\t}",
"function getEmployeeManagerID($db, $strIDEmployee = \"\", $strEmployeeID = \"\")\n{\n $intResult = -1;\n if ($strIDEmployee === \"\" && $strEmployeeID === \"\") {\n return $intResult;\n }\n // cari data karyawan\n $strSQL = \"SELECT id, position_code, section_code, department_code \";\n $strSQL .= \"FROM hrd_employee WHERE flag=0 \";\n if ($strIDEmployee !== \"\") {\n $strSQL .= \"AND id = '$strIDEmployee' \";\n }\n if ($strEmployeeID !== \"\") {\n $strSQL .= \"AND employee_id = '$strEmployeeID' \";\n }\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strDH = getSetting(\"department_head\");\n $strGH = getSetting(\"group_head\");\n if ($rowDb['position_code'] == $strDH) // dept head, dirinya sendiri\n {\n $intResult = $rowDb['id'];\n } else if ($rowDb['position_code'] == $strGH || $rowDb['section_code'] == \"\") {\n // cari dept.head sebagai manager\n $strSQL = \"SELECT id FROM hrd_employee WHERE position_code = '$strDH' \";\n $strSQL .= \"AND department_code = '\" . $rowDb['department_code'] . \"' \";\n $resTmp = $db->execute($strSQL);\n if ($rowTmp = $db->fetchrow($resTmp)) {\n $intResult = $rowTmp['id'];\n }\n } else { // employee biasa, cari data group headnya\n // cari dept.head sebagai manager\n $strSQL = \"SELECT id FROM hrd_employee WHERE position_code = '$strGH' \";\n $strSQL .= \"AND section_code = '\" . $rowDb['section_code'] . \"' \";\n $resTmp = $db->execute($strSQL);\n if ($rowTmp = $db->fetchrow($resTmp)) {\n $intResult = $rowTmp['id'];\n }\n }\n }\n return $intResult;\n}",
"public static function getEmployerId($user_id){\n $employer = Employer::where('user_id',$user_id)->first();\n return $employer->id;\n}",
"public function getEmployeeId($uid=0){\r\n\r\n $retval = 0;\r\n $sql = sprintf(\"SELECT employee_id FROM sim_hr_employee WHERE uid = '%d' \",$uid);\r\n\r\n $rs=$this->xoopsDB->query($sql);\r\n\r\n if($row=$this->xoopsDB->fetchArray($rs)){\r\n $retval = $row['employee_id'];\r\n }\r\n\r\n return $retval;\r\n\r\n }",
"function updateEmployeeCareerData($db, $strDataID, $strIDEmployee)\n{\n if ($strIDEmployee != \"\") {\n // cari dulu data employee, apakah ada atau tidak\n $strSQL = \"SELECT * FROM hrd_employee WHERE id = '$strIDEmployee' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strStatus = $rowDb['employee_status'];\n $strJoinDate = $rowDb['join_date'];\n $strDueDate = $rowDb['due_date'];\n $strResignDate = $rowDb['resign_date'];\n $strPermanentDate = $rowDb['permanent_date'];\n $strResignDate = $rowDb['resign_date'];\n $strManagement = $rowDb['management_code'];\n $strDivision = $rowDb['division_code'];\n $strDepartment = $rowDb['department_code'];\n $strSection = $rowDb['section_code'];\n $strSubSection = $rowDb['sub_section_code'];\n $strGrade = $rowDb['salary_grade_code'];\n $strPosition = $rowDb['position_code'];\n $strActive = $rowDb['active'];\n // ambil data employee status\n $strSQL = \"SELECT status_new, status_old, status_date_from, status_date_thru FROM hrd_employee_mutation_status AS t1\n LEFT JOIN hrd_employee_mutation AS t2 ON t1.id_mutation = t2.id \n WHERE id_mutation = '$strDataID' AND status >= \" . REQUEST_STATUS_APPROVED . \" \";\n //$strSQL .= \"ORDER BY t2.status_date_from DESC LIMIT 1\";\n $resTmp = $db->execute($strSQL);\n if ($rowTmp = $db->fetchrow($resTmp)) {\n $strStatus = $rowTmp['status_new'];\n if ($strStatus == 1) {\n $strPermanentDate = $rowTmp['status_date_from'];\n $strDue = \"\";\n } else if ($strStatus == 99) {\n $strActive = 0;\n $strStatus = $rowTmp['status_old'];\n $strResignDate = $rowTmp['status_date_from'];\n } else {\n //$strJoinDate = $rowTmp['status_date_from'];\n $strDueDate = $rowTmp['status_date_thru'];\n $strPermanentDate = \"\";\n }\n }\n // cek data resign\n /*\n $strSQL = \"SELECT t2.* FROM hrd_employee_mutation AS t1, hrd_employee_mutation_resign AS t2 \";\n $strSQL .= \"WHERE t1.id = t2.id_mutation AND t1.id_employee = '$strIDEmployee' \";\n $strSQL .= \"AND t1.status >= \" .REQUEST_STATUS_APPROVED.\" \";\n $strSQL .= \"ORDER BY t2.resign_date DESC LIMIT 1\";\n $resTmp = $db->execute($strSQL);\n if ($rowTmp = $db->fetchrow($resTmp)) {\n $strResignDate = $rowTmp['resign_date'];\n\n } else {\n // anggap belum resign\n $strResignDate = \"\";\n }*/\n // cek data jabatan\n $strSQL = \"SELECT t1.* FROM hrd_employee_mutation_position AS t1\n LEFT JOIN hrd_employee_mutation AS t2 ON t1.id_mutation = t2.id\n WHERE id_mutation = '$strDataID' AND status >= \" . REQUEST_STATUS_APPROVED . \" \";\n //$strSQL .= \"ORDER BY t2.position_new_date DESC LIMIT 1\";\n $resTmp = $db->execute($strSQL);\n if ($rowTmp = $db->fetchrow($resTmp)) {\n $strPosition = $rowTmp['position_new'];\n $strGrade = $rowTmp['grade_new'];\n }\n // cek data department\n $strSQL = \"SELECT t1.* FROM hrd_employee_mutation_department AS t1\n LEFT JOIN hrd_employee_mutation AS t2 ON t2.id = t1.id_mutation \n WHERE id_mutation = '$strDataID' AND status >= \" . REQUEST_STATUS_APPROVED . \" \";\n //$strSQL .= \"ORDER BY t2.department_date DESC LIMIT 1\";\n $resTmp = $db->execute($strSQL);\n if ($rowTmp = $db->fetchrow($resTmp)) {\n $strManagement = $rowTmp['management_new'];\n $strDivision = $rowTmp['division_new'];\n $strDepartment = $rowTmp['department_new'];\n $strSection = $rowTmp['section_new'];\n $strSubSection = $rowTmp['sub_section_new'];\n }\n // falidasikan tanggal\n //$strJoinDate = ($strJoinDate == \"\") ? \"NULL\" : \"'$strJoinDate'\";\n $strDueDate = ($strDueDate == \"\") ? \"NULL\" : \"'$strDueDate'\";\n $strPermanentDate = ($strPermanentDate == \"\") ? \"NULL\" : \"'$strPermanentDate'\";\n $strResignDate = ($strResignDate == \"\") ? \"NULL\" : \"'$strResignDate'\";\n if (!is_numeric($strStatus)) {\n $strStatus = $rowDb['employee_status'];\n }\n // update data employee\n $strSQL = \"UPDATE hrd_employee SET \";\n $strSQL .= \"due_date = $strDueDate, active = $strActive, \";\n $strSQL .= \"permanent_date = $strPermanentDate, resign_date = $strResignDate, \";\n $strSQL .= \"employee_status = '$strStatus', position_code = '$strPosition', \";\n $strSQL .= \"salary_grade_code = '$strGrade', department_code = '$strDepartment', \";\n $strSQL .= \"management_code = '$strManagement', Division_code = '$strDivision', \";\n $strSQL .= \"section_code = '$strSection', sub_section_code = '$strSubSection' \";\n $strSQL .= \"WHERE id = '$strIDEmployee' \";\n $resExec = $db->execute($strSQL);\n // update data salary, jika ada\n // cari dulu data salary\n /*\n $fltSalary = 0;\n $strIDSalary = \"\";\n $strSQL = \"SELECT * FROM hrd_employee_basic_salary WHERE id_employee = '$strIDEmployee' \";\n $resTmp = $db->execute($strSQL);\n if ($rowTmp = $db->fetchrow($resTmp)) {\n $fltSalary = $rowTmp['basic_salary'];\n $strIDSalary = $rowTmp['id'];\n }\n // cari dari mutasi, jika ada\n $strSQL = \"SELECT t2.* FROM hrd_employee_mutation AS t1, hrd_employee_mutation_salary AS t2 \";\n $strSQL .= \"WHERE t1.id = t2.id_mutation AND t1.id_employee = '$strIDEmployee' \";\n $strSQL .= \"AND t1.status >= \" .REQUEST_STATUS_APPROVED.\" \";\n $strSQL .= \"ORDER BY t2.salary_new_date DESC LIMIT 1\";\n $resTmp = $db->execute($strSQL);\n if ($rowTmp = $db->fetchrow($resTmp)) {\n $fltSalary = $rowTmp['salaryNew'];\n\n }\n\n // update\n if ($strIDSalary == \"\") {\n $strSQL = \"INSERT INTO hrd_employee_basic_salary (id_employee, basic_salary) \";\n $strSQL .= \"VALUES('$strIDEmployee', '$fltSalary') \";\n $resExec = $db->execute($strSQL);\n } else {\n $strSQL = \"UPDATE hrd_employee_basic_salary SET basic_salary = '$fltSalary' \";\n $strSQL .= \"WHERE id_employee = '$strIDEmployee' \";\n $resExec = $db->execute($strSQL);\n }*/\n }\n }\n return true;\n}",
"public function testUpdateEmployee()\n {\n }",
"public function getEmployee($id) {\n $rowset = $this->tableGateway->select(array('employee_id' => $id));\n $row = $rowset->current();\n if (!$row)\n throw new \\Admin\\Exception(\"Could not find employee id: $id\");\n return $row;\n }",
"public function updateOneEmployee() {\n\n $employeeModel = $GLOBALS[\"employeeModel\"];\n\n $emp = $employeeModel->getOneByEmployeeID($_SESSION[\"workerID\"]);\n\n $givenOldLogin_Password = filter_input(INPUT_POST, \"givenOldLogin_Password\");\n $givenNewLogin_Password = filter_input(INPUT_POST, \"givenNewLogin_Password\");\n if (($givenOldLogin_Password != NULL) && ($givenNewLogin_Password != NULL)) {\n $oldLogin_Password_encrypted = sha1($givenOldLogin_Password);\n\n if ($oldLogin_Password_encrypted == $emp[\"Login_Password\"]) {\n $givenNewLogin_Password = sha1($givenNewLogin_Password);\n }\n } \n else {\n $givenNewLogin_Password = $emp[\"Login_Password\"];\n //kanskje en error beskjed ?\n }\n $updateFirst_name = filter_input(INPUT_POST, 'First_name');\n $updateLast_name = filter_input(INPUT_POST, 'Last_name');\n $updateBirth = filter_input(INPUT_POST, 'Birth');\n $updatePhone_Number = filter_input(INPUT_POST, 'Phone_Number');\n $updateHome_Address = filter_input(INPUT_POST, 'Home_Address');\n $updateZip_Code = filter_input(INPUT_POST, 'Zip_Code');\n $EmployeeID = filter_input(INPUT_POST, 'EmployeeID');\n\n $employeeModel->updateEmployee($updateFirst_name, $updateLast_name, $updateBirth, $updatePhone_Number, $updateHome_Address, $updateZip_Code, $EmployeeID, $givenNewLogin_Password);\n $employee = $employeeModel->getOneByEmployeeID($EmployeeID);\n\n $data = array(\"employee\" => $employee);\n return $this->render(\"adminInfo\", $data); //MÅ ENDRE NAVN TIL MASTER\n }",
"public function getEmployee($id){\n\t\t\t\t\t$sql = \"SELECT * FROM employee WHERE employee.id = \".$id.\" \";\n\t\t\t\t\t if($this->db != null)\n\t\t\t\t\t {\n\t\t\t\t\t return $this->db->query($sql)->fetch();\n\t\t\t\t\t }else{\n\t\t\t\t\t return null;\n\t\t\t\t\t }\n\t\t\t\t\t }",
"function UpdateEmployeById($data=null){\n \n if($data){\n if(isset($data->{'name'})) {\n require_once(\"../Model/Employee.php\");\n $emp_model = new EmployeeModel();\n $result= $emp_model->UpdateEmployee($data->{'id'},$data->{'name'},$data->{'lastname'}, $data->{'phone'}, $data->{'mail'}, $data->{'hire'});\n \n } \n}\n}",
"function getIDEmployee($db, $code)\n{\n $strResult = \"\";\n if ($code != \"\") {\n $strSQL = \"SELECT id FROM hrd_employee WHERE employee_id = '$code' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strResult = $rowDb['id'];\n }\n }\n return $strResult;\n}",
"function get_emp($emp_id) {\n global $db;\n $query = 'SELECT * FROM emps\n WHERE empID = :emp_id';\n $statement = $db->prepare($query);\n $statement->bindValue(\":emp_id\", $emp_id);\n $statement->execute();\n $product = $statement->fetch();\n $statement->closeCursor();\n return $product;\n}",
"public function getEmployeeUpdate() {\n\n $employeeModel = $GLOBALS[\"employeeModel\"];\n $employeeID = filter_input(INPUT_POST, \"EmployeeID\");\n\n // Get the employee by the EmployeeID\n $employee = $employeeModel->getOneByEmployeeID($employeeID);\n\n $data = array(\"employee\" => $employee);\n return $this->render(\"updateEmployee\", $data);\n }",
"public function findById($primaryKeyValue){\n //Select* From employers Where $this->primaryKey(noemp)=$primaryKeyValue(1000)\n $array = $this->findWhere($this->primaryKey. \"=$primaryKeyValue\");\n if (count($array) != 1 ) die (\"The ID $primaryKeyValue is not valid\");\n return $array[0];\n }",
"function ajaxInsertNewEmployeeToDB() {\n $firstName = $_GET['firstName'];\n $lastName = $_GET['lastName'];\n $admin=$_GET['admin'];\n $loginName=$_GET['loginName'];\n $password=$_GET['password'];\n $pin=$_GET['pin'];\n\n $lastId = setNewEmployee($firstName, $lastName, $admin, $loginName, $password, $pin);\n\n echo $lastId;\n }",
"function setEmployeeID($employeeid) {\n $this->employeeid = $employeeid;\n }",
"function update($id, $Employee){\n $this->db->where('EmployeeId', $id);\n $this->db->update($this->tbl_Employeeinfo, $Employee);\n }",
"function edit_employee($emp_id='')\r\n\t{\r\n\t\t//$user=$this->auth();\r\n\t\t$user = $this->auth_pnh_employee();\r\n\t\t if(!$emp_id)\r\n\t\t\tshow_404(); \r\n\t\t$role_id=$this->get_jobrolebyuid($user['userid']);\r\n\t\tif(empty($role_id))\r\n\t\t\tshow_error(\"Access Denied\");\r\n\t\tif($role_id<=3)\r\n\t\t{ \r\n\t\t\t$data['emp_details']=$this->erpm->get_empinfo($emp_id);\r\n\t\t\t$data['page']='edit_emp';\r\n\t\t\t$this->load->view('admin',$data);\r\n\t\t}\r\n\t}",
"public function updateEmployee() {\n\n $employeeModel = $GLOBALS[\"employeeModel\"];\n\n $emp = $employeeModel->getOneByEmployeeID($_SESSION[\"workerID\"]);\n\n $givenOldLogin_Password = filter_input(INPUT_POST, \"givenOldLogin_Password\");\n $givenNewLogin_Password = filter_input(INPUT_POST, \"givenNewLogin_Password\");\n if (($givenOldLogin_Password != NULL) && ($givenNewLogin_Password != NULL)) {\n $oldLogin_Password_encrypted = sha1($givenOldLogin_Password);\n\n if ($oldLogin_Password_encrypted == $emp[\"Login_Password\"]) {\n $givenNewLogin_Password = sha1($givenNewLogin_Password);\n }\n } \n else {\n $givenNewLogin_Password = $emp[\"Login_Password\"];\n //kanskje en error beskjed ?\n }\n\n // set the value in the update...\n $updateFirst_name = filter_input(INPUT_POST, 'First_name');\n $updateLast_name = filter_input(INPUT_POST, 'Last_name');\n $updateBirth = filter_input(INPUT_POST, 'Birth');\n $updatePhone_Number = filter_input(INPUT_POST, 'Phone_Number');\n $updateHome_Address = filter_input(INPUT_POST, 'Home_Address');\n $updateZip_Code = filter_input(INPUT_POST, 'Zip_Code');\n $EmployeeID = filter_input(INPUT_POST, 'EmployeeID');\n\n $employeeModel->updateEmployee($updateFirst_name, $updateLast_name, $updateBirth, $updatePhone_Number, $updateHome_Address, $updateZip_Code, $EmployeeID,$givenNewLogin_Password);\n $GLOBALS[\"included_employees\"] = $employeeModel->getAll();\n\n return $this->render(\"listEmployees\");\n }",
"private function getEmployeesIDs() {\n return DB::table('dx_users as u')\n ->select('u.id')\n ->whereExists(function ($query) {\n $query->select(DB::raw(1))\n ->from('dx_users_accrual_policies as a')\n ->whereRaw('a.user_id = u.id')\n ->where('a.timeoff_type_id', '=', $this->argument('timeoff_id'))\n ->whereNull('a.end_date');\n })\n ->get();\n }",
"public function editEmployeeAction()\n\t{\n\t\t$id = Frontcontroller::getParams();\n\t\t$arr = $this -> facade -> selectEmployee($id);\n\t\tif(isset($_POST['update']))\n\t\t{\n\t\t\t$result = $this -> facade -> updateEmployee($id, $_POST);\n\t\t\t$this -> view -> editForm($arr, $result);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this -> view -> editForm($arr);\n\t\t\treturn true;\n\t\t}\n\t}",
"public function updateEmployee($request, $id){\n\n $form_data = $this->createEmployeeArray($request);\n Employee::whereId($id)->update($form_data);\n\n }",
"private function fetchEmployeeFromDb($empId)\n {\n $sql = \"SELECT *, CONCAT_WS(' ', fName, lName) as fullName FROM Employees WHERE empID = ?;\";\n $stmt = $this->db->prepare($sql);\n // Insert our given username into the statement safely\n $stmt->bind_param('s', $empId);\n // Execute the query\n $stmt->execute();\n // Fetch the result\n $res = $stmt->get_result();\n\n return $res->fetch_object();\n }",
"function UpdateEventRecord($user_id=null)\r\n\t{\t\r\n\t $this->db->select('id');\r\n\t $this->db->from(TBL_EVENT_REGISTRATION);\r\n\t $this->db->where(array('is_cancel'=>false,'tbl_users_id'=>$user_id));\t\r\n\t $recordSet=$this->db->get();\r\n\t $data=$recordSet->result();\r\n\t if(count($data)>0){\r\n\t\t\treturn $data[0]->id;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t} \r\n\t}",
"function editEmployeeData( Request $request )\n\t\t\t{\n\t\t\t\tif ( $this->employeeExists( $request->emp_id ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$result = Employee::where( 'id', $request->emp_id )->update( [ 'name' => $request->name ] );\n\n\t\t\t\t\t\tif ( ! empty( $result ) )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->finalResponse( 'success', 'Record updated!', 'Employee data has been updated successfully.' );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->finalResponse( '', 'Unable to update record!', '' );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}",
"public function editEmployee($id)\n {\n //get the form for edit the assigned employee\n\n //make sure that authenticated user is admin\n if (\\Auth::user()->role->role !== 'admin')\n \\Redirect::route('home');\n\n //getting customer from url\n $customer = Customer::with('employee')->find($id);\n\n //git the employees and optimize array passed to view for form builder\n $listedEmployees = User::whereHas('role', function ($q) {\n $q->where('role', 'employee');\n })->get();\n\n $employees = [];\n foreach ($listedEmployees as $listedEmployee) {\n $employees[$listedEmployee->id] = \"$listedEmployee->name - $listedEmployee->email\";\n }\n return view('customers.employeeChange', compact('customer', 'employees'));\n\n\n }",
"function getEpicSelectData($arg1, $arg2){\n\tglobal $conn; \n\t$sql = \"UPDATE epics SET team_id='\".$arg1.\"' WHERE e_id='\".$arg2.\"'\";\t\n\tif ($conn->query($sql) === TRUE) {\n\t\techo \"Record updated successfully\";\n\t} else {\n\t\techo \"Error updating record: \" . $conn->error;\n\t}\t\n}",
"public function getUser(string $employeeId);",
"function get_employee()\n\t\t{\n\t\t\treturn EmployeeFactory::createEmployee($this->empID);\n\t\t}",
"abstract public function get_id();",
"public function edit(Employee $employee)\n {\n //\n }",
"public function edit(Employee $employee)\n {\n //\n }",
"public function edit(Employee $employee)\n {\n //\n }",
"public function edit(Employee $employee)\n {\n //\n }",
"public function edit(Employee $employee)\n {\n //\n }",
"public function edit(Employee $employee)\n {\n //\n }",
"function updateEmp($id, $name, $grade, $email, $salary)\n {\n try {\n $db = new PDO('mysql:host=localhost;dbname=test;charset=utf8', 'root', '', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));\n $stmt = $db->prepare(\"UPDATE emp SET name = ?,grade = ?,email = ?,salary = ? WHERE id = ?\");\n $stmt->execute(array($name, $grade, $email, $salary, $id));\n return $stmt->rowCount();\n } catch(PDOException $e) {\n die($e->getMessage());\n }\n }",
"public function get_update_row($id){\n $database = new Database();\n $sql = \"SELECT * FROM \" . TABLE_NAME . \" WHERE \" . PRIMARY_KEY . \" = \"; \n $sql_bind = \":\" . PRIMARY_KEY;\n $sql .= $sql_bind; \n $database->query($sql);\n $database->bind($sql_bind,$id);\n $database->execute();\n $row = $database->single(); \t\n $this->mod_prep($row); // send the row to get preped\n }",
"public function editEmployee($employee_id)\n {\n // if we have an id of a employee that should be edited\n if (isset($employee_id)) {\n // do getEmployee() in model/model.php\n $employee = $this->model->getEmployee($employee_id);\n\n // in a real application we would also check if this db entry exists and therefore show the result or\n // redirect the user to an error page or similar\n\n // load views. within the views we can echo out $employee easily\n require APP . 'view/_templates/header.php';\n require APP . 'view/employees/edit.php';\n require APP . 'view/_templates/footer.php';\n } else {\n // redirect user to employees index page (as we don't have a employee_id)\n header('location: ' . URL . 'employees/index');\n }\n }",
"public function read($employeeId)\n {\n }",
"public function editEmployeeSalaryIncrement($id) {\n $self = 'employee-salary-increment';\n if (\\Auth::user()->user_name !== 'admin') {\n $get_perm = permission::permitted($self);\n\n if ($get_perm == 'access denied') {\n return redirect('permission-error')->with([\n 'message' => '您没有权限访问这个页面',\n 'message_important' => true\n ]);\n }\n }\n\n $employee = Employee::find($id);\n\n if ($employee) {\n return view('admin.edit-employee-salary-increment', compact('employee'));\n } else {\n return redirect('payroll/employee-salary-increment')->with([\n 'message' => '没有这个员工',\n 'message_important' => true\n ]);\n }\n\n }",
"function Update_employee_Stmt (){\n\nif (isset($_POST[\"Update_employee\"])) {\n\n\n// Defining Variables for employee Update SQL Statement \n\n$EmployeeId=$_POST['EmployeeId'];\n$savedby=$_POST['savedby'];\n$EmpNo=$_POST['EmpNo'];\n$Employee_Number=$_POST['Employee_Number'];\n$Surname=$_POST['Surname'];\n$Other_Names=$_POST['Other_Names'];\n$DepartmentId=$_POST['DepartmentId'];\n$PhoneNumber=$_POST['PhoneNumber'];\n$otherPhoneNumber=$_POST['otherPhoneNumber'];\n$PostalAddress=$_POST['PostalAddress'];\n$postalCode=$_POST['postalCode'];\n$Town=$_POST['Town'];\n$Status=$_POST['Status'];\n$Effective_Date=$_POST['Effective_Date'];\n$UpdateSQLemployee = \" UPDATE employee SET \n\nEmployeeId='$EmployeeId',savedby='$savedby',EmpNo='$EmpNo',Employee_Number='$Employee_Number',Surname='$Surname',Other_Names='$Other_Names',DepartmentId='$DepartmentId',PhoneNumber='$PhoneNumber',otherPhoneNumber='$otherPhoneNumber',PostalAddress='$PostalAddress',postalCode='$postalCode',Town='$Town',Status='$Status',Effective_Date='$Effective_Date' WHERE EmployeeId='$EmployeeId'\";\n// END of Update SQL Statement for employee\n\n\n$Result_update = mysql_query($UpdateSQLemployee) or die(mysql_error());} //End If\n}",
"function exeGetEmpToEdit($userid) {\n $exeGetEmpToEdit = $this->db->query(\"SELECT *\n FROM employees a\n LEFT JOIN employee_details b\n ON a.user_id = b.user_id\n WHERE a.status >=0\n AND a.user_id = '\". $userid .\"' \");\n \n if($exeGetEmpToEdit->num_rows() > 0) {\n return $exeGetEmpToEdit->result_array();\n } else {\n return false;\n }\n }",
"public function employee_edit($employee_id)\n\t{\n\t\t$session_email = $this->session->userdata('email');\n\t\t\t//the password stored in session\n\t\t\t$session_password= $this->session->userdata('password' );\n\t\t\t\n\t\tif((isset($session_email ) && isset($session_password)) && ( !empty($session_email) && !empty($session_password)))\n\t\t{\n\t\t\n\t\t\t//this function will select details of employee using the employee id\n\t\t\t$info=$this->employee_model->get_user($employee_id);\n\t\t\t\n\t\t\t//this will show the details of the employee in edit page\n\t\t\t$this->load->view('edit',array(\"data\"=>$info));\n\t\t}\n\t\t//if email id/password is not set\n\t\telse\n\t\t{\n\t\t\tredirect('employee/index', 'refresh');\n\t\t}\n\t}",
"public function fetch_the_id() {}",
"public function getEmployeeInfo() {\n\n $employeeModel = $GLOBALS[\"employeeModel\"];\n\n $GLOBALS[\"employee\"] = $employeeModel->getOneByEmployeeID($_SESSION[\"workerID\"]);\n }",
"public function edit(Request $request,$id)\n {\n //\n\n $this->DBReconnect($request);\n\n $row = Salary::find($id);\n\n\n $employee = Employee::find($row->employee_id);\n\n\n $active_setting = ['' => ''] + ActiveSetting::pluck('name', 'id')->all();\n\n\n $emp_payrate = [''=>''] +EmployeeSalaryPayRate::pluck('name','id')->all();\n\n $emp_saltype = [''=>''] +EmployeeSalaryType::pluck('name','id')->all();\n\n $jobtitle = [''=>''] + JobTitle::pluck('name','id')->all();\n\n // $menu = $this ->topEmployee($employee->emp_firstname.' '.$employee->emp_middle_name.' '.$employee->emp_lastname,$row->employee_id);\n\n return view('pim.salary.edit',['row'=>$row ,'active_setting'=>$active_setting,'title'=>'Edit Employee Salaries','id'=>$row->employee_id,\n 'emp_payrate'=>$emp_payrate,'emp_saltype'=>$emp_saltype,'jobtitle'=>$jobtitle]);\n }",
"public function setEmpId($val){\n\t\tif(intval($val) > 0){\n\t\t\t$this->employeeId = intval($val);\n\t\t}\t\t\n\t\treturn $this;\n\t}",
"function load_id(){\r\n $db = new Database();\r\n $sql = \"select * from \" . Interest::TABLE_NAME . \" where name=:name\";\r\n $stm = $db->pdo->prepare($sql);\r\n $stm->bindParam(':name', $this->name);\r\n $stm->execute();\r\n if ($stm->rowCount() > 0){\r\n $row = $stm->fetch();\r\n $this->id = $row[\"id\"];\r\n }\r\n else{\r\n $this->save();\r\n $this->id = $db->pdo->lastInsertId();\r\n }\r\n }",
"function getEmployeeName($empId) {\n\n // Function to connect to the DB\n $link = connectToDB();\n\n\t//Retrieve the data\n $strSQL = \"SELECT FirstName, LastName FROM FC_Employees where EmployeeID=\" . $empId;\n $result = mysql_query($strSQL) or die(mysql_error());\n if ($result) {\n if (mysql_num_rows($result) > 0) {\n $ors = mysql_fetch_array($result);\n $name = $ors['FirstName'] . \" \" . $ors['LastName'];\n } else {\n $name = \" N/A \";\n }\n }\n mysql_close($link);\n\n return $name;\n}",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'emp_id' => 'required',\n 'dep_id' => 'required',\n 'hod_id' => 'required',\n 'e_name' => 'required',\n 'e_email' => 'required',\n 'e_designation' => 'required',\n 'e_phoneno' => 'required',\n 'e_address' => 'required',\n \n ]);\n\n $employees = Employee :: find($id);\n $employees->emp_id=$request->get('emp_id');\n $employees->dep_id=$request->get('dep_id');\n $employees->hod_id=$request->get('hod_id');\n $employees->e_name=$request->get('e_name');\n $employees->e_email=$request->get('e_email');\n $employees->e_designation=$request->get('e_designation');\n $employees->e_phoneno=$request->get('e_phoneno');\n $employees->e_address=$request->get('e_address');\n $employees->save();\n return redirect()->route('Employee.index')->with('success','One Record Updated Successfully');\n \n }",
"public function saveEmployee()\r\n\t{\t\t\t\r\n\t\t$data = array('no_emp' => $this->input->post('no_emp'));\t\r\n\t\t\t\t//die('update');\r\n\t\t$where = array('id' => $this->session->userdata('emp_id'));\t\t\t\t\r\n\t\t$iStatus = $this->My_model->updateRecord('lang_company',$data,$where);\r\n\t\techo $iStatus;\t\t\r\n\t}",
"public function UpdateEmployees(Request $request, $id)\n {\n $data=array();\n $data['name']=$request->name;\n $data['email']=$request->email;\n $data['address']=$request->address;\n $data['phone']=$request->phone;\n $data['salary']=$request->salary;\n \n $data['experience']=$request->experience;\n $dt=DB::table('employees')->where('id',$id)->update($data);\n if($dt){\n $notification=array(\n 'message'=>'Successfully data updated',\n 'alert-type'=>'success'\n );\n return Redirect()->route('all.employee')->with( $notification);\n }else{\n $notification=array(\n 'message'=>'Error',\n 'alert-type'=>'success'\n );\n return Redirect()->route('all.employee')->with( $notification);\n }\n \n }",
"public function getOneEmployeeUpdate() {\n\n $this->getEmployeeInfo();\n return $this->render(\"updateAdmin\");\n }",
"public function getEntityId();",
"public function getEntityId();",
"public function getEntityId();",
"public function determineId() {}",
"public function get_id();",
"public function get_id();",
"function getEmployeePositionbyId($idStaffPosition){\n //devolver cargos de empleado\n global $entityManager;\n return $entityManager->getRepository('StaffPosition')->findOneBy(['idStaffPosition' => $idStaffPosition]);\n }",
"public function edit($id) {\n\t\t$agencies = user::leftjoin('role_user', 'role_user.user_id', '=', 'users.id')->where('role_id','=',2)->lists('company_name','id');\n\t\t$employer = Employer::findOrFail($id);\n\t\t$employer_date_of_birth = explode('-', $employer['employer_date_of_birth']);\n\t\t$employer['employer_year'] =$employer_date_of_birth[0];\n\t\t$employer['employer_month'] =$employer_date_of_birth[1];\n\t\t$employer['employer_day'] =$employer_date_of_birth[2]; \n\t\tif($employer['employer_office_phone'] == 0){\n\t\t\t$employer['employer_office_phone'] = '';\n\t\t}\n\t\tif($employer['home_phone'] == 0){\n\t\t\t$employer['home_phone'] = '';\n\t\t}\n\t\t$employer_document = DB::table('employer_documents as md')->where('employer_id','=',$id)->get();\n\t\tif($employer['spouse_date_of_birth']){\n\t\t\t$spouse_date_of_birth = explode('-', $employer['spouse_date_of_birth']);\n\t\t\t$employer['spouse_year'] =$spouse_date_of_birth[0];\n\t\t\t$employer['spouse_month'] =$spouse_date_of_birth[1];\n\t\t\t$employer['spouse_day'] =$spouse_date_of_birth[2]; \n\t\t}\n\t\t$house_type = Housetype::lists('title','id');\n\t\t$employer_house_type = DB::table('employer_house_type')\n\t\t\t\t\t\t->leftjoin('house_type', 'house_type.id', '=', 'employer_house_type.house_type_id')\n\t\t\t\t\t\t->select('house_type.title as house_type_title', \"employer_house_type.*\")\n\t\t\t\t\t\t->where('employer_id', '=', $id)->where('employer_house_type.deleted', '=', 'N')\n\t\t\t\t\t\t->lists('employer_house_type.house_type_id','house_type_title');\n\t\t$other_house_type = DB::table('employer_house_type')\n\t\t\t\t\t\t->select(\"employer_house_type.*\")\n\t\t\t\t\t\t->where('employer_id', '=', $id)->where('employer_house_type.deleted', '=', 'N')\n\t\t\t\t\t\t->where('house_type_id','=','8')\n\t\t\t\t\t\t->get();\n\t\t$employer_family = DB::table('employer_family_member_details')\n\t\t\t\t\t\t->select(\"employer_family_member_details.*\")\n\t\t\t\t\t\t->where('employer_id', '=', $id)->get();\t\n\t\t//echo\"<pre>\";\tprint_r($other_house_type);exit;\t\t\n\t\treturn view('sentinel.employer.edit')->with('employer',$employer)->with('house_type',$house_type)->with('employer_house_type',$employer_house_type)->with('employer_family',$employer_family)->with('employer_document',$employer_document)->with('agencies',$agencies)->with('other_house_type',$other_house_type);\n\t}",
"function getEmployee($id) {\n // to close the database connection. Then add the variables below to the HTML to present the data.\n}",
"public function update($empleo) {\r\n $query = \"UPDATE \" . EmpleoDAO::EMPLEO_TABLE .\r\n \" SET position=?, company=?, logo=?, description=?, salary=?\"\r\n . \" WHERE idJob=?\";\r\n $stmt = mysqli_prepare($this->conn, $query);\r\n $position = $empleo->getPosition();\r\n $company = $empleo->getCompany();\r\n $logo = $empleo->getLogo();\r\n $description = $empleo->getDescription();\r\n $salary = $empleo->getSalary();\r\n $id = $empleo->getId();\r\n mysqli_stmt_bind_param($stmt, 'ssssdi', $position, $company, $logo, $description, $salary, $id);\r\n return $stmt->execute();\r\n }",
"public function updateUser($empID,$data){\n\t\t\t$this->db->where('empID',$empID);\n\t\t\t$this->db->update('tbl_employees',$data);\n\t\t\treturn $this->db->affected_rows();\n\t\t}",
"public function edit_employee_info($id=Null)\n\t{\n\t\tif (!$this->Admin_model->is_admin_loged_in()) \n\t\t{\n\t\t\tredirect('Adminlogin/?logged_in_first');\n\t\t}else{\n\t\t\tif($this->admin_access('edit_access') != 1){\n\t\t\t\t$data['warning_msg']=\"You Are Not able to Access this Module...!\";\n\t\t\t\t$this->session->set_flashdata($data);\n\t\t\t\tredirect('hr_payroll/dashboard');\n\t\t\t}\n\t\t\t$data['title'] = 'Edit Employee Information'; \n\t\t\t$data['content'] = 'employee/edit_employee';\n\t\t\t$data['employee'] = $this->Employee_model->employee_by_id($id);\n\t\t\t$this->load->view('admin/adminMaster', $data);\n\t\t}\n\t}",
"public function consumeEmployee(){\n if (count($this->eids)<1)\n return false;\n\n $id = $this->eids[count($this->eids)-1];\n unset($this->eids[count($this->eids)-1]);\n $this->shift->setEid($id);\n $this->shift->updateSQL();\n\n return true;\n }",
"public function update(EditEmployeeRequest $request, $id)\n {\n //\n try {\n\n DB::beginTransaction(); \n $data = array(\n 'name' => $request->name,\n 'address' => $request->address,\n 'phone' => $request->phone,\n 'email' => $request->email,\n 'avatar' => $request->avatar,\n );\n\n $this->service->update($id,$data);\n DB::commit();\n return redirect()->route('notification')->with([ 'notification'=>'Update employee success !']);\n \n } catch (Exception $e) {\n DB::rollback();\n return redirect('notification')->with([ 'notification'=>'Update employee not success !']);\n }\n\n }",
"public function edit($id_employee)\n {\n // $item = Employee::findOrFail($id_employee);\n\n $item = Employee::where('id_employee', '=', $id_employee)->firstOrFail();\n\n return view('pages.admin.employee.edit',[\n 'item' => $item\n ]);\n }",
"function get_emp_name(){\n\n\n $servername = \"localhost\";\n $username = \"root\";\n $password = \"\";\n $db = \"nhk_epms\";\n \n // Create connection\n $conn = mysqli_connect($servername, $username, $password, $db);\n // Check connection\n if (!$conn) {\n die(\"Connection failed: \" . mysqli_connect_error());\n }\n\n $emp_n = $_POST[\"emp\"];\n\n $sql = \"SELECT \n * \n FROM\n `epms_employee` e\n WHERE e.`Emp_id`='$emp_n'\";\n\n\n $result = mysqli_query($conn, $sql);\n\n if (mysqli_num_rows($result) > 0) {\n // output data of each row\n while($row = mysqli_fetch_assoc($result)) {\n echo $row[\"Emp_name\"];\n }\n } else {\n echo \"0 results\";\n }\n }",
"public function update(UpdateEmployee $request, int $id)\n {\n try{\n $employee = User::findOrFail($id);\n $employeeRole = Role::where('name', 'employee')->firstOrFail(); \n $data = [\n \"name\" => $request->get(\"name\"),\n \"designation\" => $request->get(\"designation\"),\n \"email\" => $request->get(\"email\"),\n \"manager_id\" => $request->get(\"manager_id\"),\n \"date_of_birth\" => $request->get(\"date_of_birth\"),\n \"joining_date\" => $request->get(\"joining_date\"),\n ];\n $employee->update($data);\n $employee->assignRole($employeeRole);\n return response()->json($employee, 201);\n } catch (ModelNotFoundException $ex) {\n return response()->json(['errors'=>['role'=>'Employee Role Not Exists']], 404);\n }\n }",
"public function update(Request $request, $id ,Employee $employee)\n {\n\n $career_id=$request->input('career_id');\n $employeeFirstName=$request->input('employeeFirstName');\n $employeeMiddleName=$request->input('employeeMiddleName');\n $employeeLastName=$request->input('employeeLastName');\n $employeeBrithday=$request->input('employeeBrithday');\n $employeeFrom=$request->input('employeeFrom');\n $employeeTo=$request->input('employeeTo');\n $employeeMobile=$request->input('employeeMobile');\n $employeePhoneHome=$request->input('employeePhoneHome');\n $employeePhoneJob=$request->input('employeePhoneJob');\n $employeeAddress=$request->input('employeeAddress');\n $employeeCity=$request->input('employeeCity');\n $employeeNational=$request->input('employeeNational');\n $employeeSalary=$request->input('employeeSalary');\n\n \n $employee = Employee::find($id) ;\n\n $employee->career_id=$career_id;\n $employee->employeeFirstName=$employeeFirstName;\n $employee->employeeMiddleName=$employeeMiddleName;\n $employee->employeeLastName=$employeeLastName;\n $employee->employeeBrithday=$employeeBrithday;\n $employee->employeeFrom=$employeeFrom;\n $employee->employeeTo=$employeeTo;\n $employee->employeeMobile=$employeeMobile;\n $employee->employeePhoneHome=$employeePhoneHome;\n $employee->employeePhoneJob=$employeePhoneJob;\n $employee->employeeAddress=$employeeAddress;\n $employee->employeeCity=$employeeCity;\n $employee->employeeNational=$employeeNational;\n $employee->employeeSalary=$employeeSalary;\n $employee->save() ;\n\n\n\n\n return redirect ('/accountant/employees');\n\n \n }",
"function hapus_employee($id) {\n global $conn;\n\n mysqli_query($conn, \"DELETE FROM user WHERE id_user = '$id'\");\n return mysqli_affected_rows($conn);\n }",
"public function updateRecord(){\n\t\tglobal $db;\n $data = array('email'=>$this->email);\n\t\t\t\t$response = $db->update($this->table,$data,\"id = $this->id\");\n\t\treturn $response;\n\t}",
"public function find($id) {\n\t\treturn $this->employee->info()->filterById($id)->first();\n\t}",
"public function edit(RequireEmployee $requireEmployee)\n {\n //\n }",
"public function update(StoreEmployee $request, $id)\n {\n try {\n $employee = Employee::findOrFail($id);\n $employee->update($request->all());\n $company = Company::findOrFail($request->company);\n $employee->company()->associate($company);\n $employee->save();\n } catch (\\Throwable $th) {\n return redirect()->back()->withErrors('Upss! Error - ' . $th->getMessage())->withInput(); \n }\n\n return redirect()->route('employees.show',[\n 'employee' => $employee->id\n ])->with('status', 'Employee updated sucessfully.'); \n }",
"public function updateEmployee(Request $request, $id)\n {\n //assign and saving the customer to employee\n Customer::find($id)->employee()->associate($request->employee)->save();\n return \\Redirect::back();\n }",
"public function getById($id)\n {\n $employee = Employee::find($id);\n return $employee;\n }",
"public function getEntityId(){\n return $this->_getData(self::ENTITY_ID);\n }",
"public function updateEmployee()\n {\n // if we have POST data to create a new employee entry\n if (isset($_POST[\"submit_update_employee\"])) {\n // do updateEmployee() from model/model.php\n $this->model->updateEmployee($_POST[\"firstname\"], $_POST[\"surname\"], $_POST[\"email\"], $_POST[\"phone\"], $_POST[\"category\"], $_POST[\"started\"], $_POST[\"left\"],$_POST['employee_id']);\n }\n\n // where to go after employee has been added\n header('location: ' . URL . 'employees/index');\n }",
"function getEntityId() {\n return $this->entity_id;\n }",
"function getOwner($id){\r\n\t\t$query=\"SELECT `query_id` FROM `tbl_question` WHERE `question_id`='$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)){\r\n\t\t\tthrow new Exception(\"SelectError\"); \t\t\t\t\t\t\t\t//Return error if error resulted\r\n\t\t}else{ \r\n\t\t\t$native_result = $result->getResource();\r\n\t\t\t$row=Mysql_Fetch_Row($native_result);\r\n\t\t\treturn $row[0];\r\n\t\t}\r\n\t}",
"public function additionEmployee()\n {\n global $dbh;\n \n // INSERT INTO `employee` (`idm`, `namema`, `nameme`, `mobilem`, `countrym`, `carerm`, `noborder`, `noiqama`, `nopassport`, `airportm`, `adressm`, `telem`, `entermsa`, `worktime`, `exiqamam`, `exinsurancem`, `exlincm`, `expassportm`, `premssionm`, `deletm`) VALUES (NULL, '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '2017-01-02', '2017-01-02', '2017-01-02', '2017-01-02', '2017-01-02', '2017-01-02', '0', '0');\n \n $sql = $dbh->prepare(\"INSERT INTO `employee` (`fnamema`, `fnameme`, `namema`, `nameme`, `mobilem`, `countrym`, `carerm`, `noborder`, `noiqama`, `nopassport`, `airportm`,\n `adressm`, `telem`, `entermsa`, `worktime`, `exiqamam`, `exinsurancem`, `exlincm`, `expassportm`, `premssionm`, `statusm`, `deletm`, `password`) VALUES \n ('$this->fnamema', '$this->fnameme', '$this->namema', '$this->nameme', '$this->mobilem', '$this->countrym', '$this->carerm', '$this->noborder', '$this->noiqama',\n '$this->nopassport', '$this->airportm', '$this->adressm', '$this->telem', '$this->entermsa', '$this->worktime', '$this->exiqamam', '$this->exinsurancem', '$this->exlincm', '$this->expassportm', '$this->premssionm', '$this->statusm', '$this->deletm', '$this->password')\");\n $result = $sql->execute();\n $eroro = $sql->errorInfo();\n $id = $dbh->lastInsertId();\n return array ($result,$id,$eroro);\n }",
"public function edit()\r\n {\r\n $employeedataf = DB::table('employee')\r\n ->join('familybackground','employee.emp_id', '=', 'familybackground.emp_id')\r\n ->where('familybackground.emp_id', Auth::user()->username)\r\n ->first();\r\n\r\n $employeedatachild = DB::table('employee')\r\n ->join('children', 'employee.emp_id', '=', 'children.emp_id')\r\n ->where('children.emp_id', Auth::user()->username)\r\n ->get();\r\n\r\n $employeedatawork = DB::table('employee')\r\n ->join('workexperience', 'employee.emp_id', '=', 'workexperience.emp_id')\r\n ->where('workexperience.emp_id', Auth::user()->username)\r\n ->get();\r\n\r\n $employeedataeduc = DB::table('employee')\r\n ->join('educationalbackground', 'employee.emp_id', '=', 'educationalbackground.emp_id')\r\n ->where('educationalbackground.emp_id', Auth::user()->username)\r\n ->get();\r\n\r\n $employeedatacivil = DB::table('employee')\r\n ->join('civilserviceeligibility', 'employee.emp_id', '=', 'civilserviceeligibility.emp_id')\r\n ->where('civilserviceeligibility.emp_id', Auth::user()->username)\r\n ->get();\r\n $employeedatavol = DB::table('employee')\r\n ->join('voluntary_works', 'employee.emp_id', '=', 'voluntary_works.emp_id')\r\n ->where('voluntary_works.emp_id', Auth::user()->username)\r\n ->get();\r\n\r\n $employeedatatrain = DB::table('employee')\r\n ->join('trainings', 'employee.emp_id', '=', 'trainings.emp_id')\r\n ->where('trainings.emp_id', Auth::user()->username)\r\n ->get();\r\n\r\n $employeedataotherinfo = DB::table('employee')\r\n ->join('other_info', 'employee.emp_id', '=', 'other_info.emp_id')\r\n ->where('other_info.emp_id', Auth::user()->username)\r\n ->get();\r\n\r\n $employeedataposition = DB::table ('employee')\r\n ->join('position', 'employee.position_id', '=', 'position.position_id')\r\n ->where('employee.emp_id', Auth::user()->username)\r\n ->first();\r\n\r\n $employeedatareferences = DB::table('employee')\r\n ->join('references', 'employee.emp_id', '=', 'references.emp_id')\r\n ->where('references.emp_id', Auth::user()->username)\r\n ->get();\r\n\r\n\r\n return view ('Employee.editPdsOfEmp') ->with (\"employeedatachild\", $employeedatachild)->with (\"employeedataf\", $employeedataf)->with(\"employeedatawork\", $employeedatawork)->with(\"employeedataeduc\", $employeedataeduc)->with(\"employeedatacivil\", $employeedatacivil)->with('employeedatavol', $employeedatavol)->with('employeedatatrain', $employeedatatrain)->with('employeedataotherinfo', $employeedataotherinfo)->with('employeedatareferences', $employeedatareferences);\r\n }",
"public function update_employee_data($employee_data, $id){\n foreach ($employee_data as $i => $value) {\n if ($value === \"\") $employee_data[$i] = null;\n };\n\n $this->db->where('employee.id',$id);\n $this->db->update('employee', $employee_data);\n }",
"function particularemployee($id)\n\t{\n\t\t$getParemp=\"SELECT * from payrentz_employees where id = $id\";\n\t\t$getParempdata = $this->get_results( $getParemp );\n\t\treturn $getParempdata;\n\t}",
"public function update(EmployeeRequest $request, int $id): JsonResponse\n {\n try {\n $employee = Employee::updateEmployee([\n 'user' => [\n 'name' => $request->name,\n 'email' => $request->email,\n 'phone_number' => $request->phone_number,\n 'password' => $request->password,\n ],\n 'employee' => [\n 'id' => $id,\n 'employee_type_id' => $request->employee_type_id,\n 'warehouse_id' => $request->warehouse_id\n ],\n 'role' => $request->role\n ]);\n\n return response()->json(['data' => $employee], 201);\n } catch (\\Exception $e) {\n return response()->json(['errors' => ['server_error' => [$e->getMessage()]]], 400);\n }\n }",
"function updateEmployee()\n\t{\n\t\t$id = $this->input->post(\"id\");\n\t\t$uid = $this->input->post(\"uid\");\n\t\t$name = $this->input->post(\"name\");\n\t\t$gender = $this->input->post(\"gender\");\n\t\t$position_id = $this->input->post(\"position_id\");\n\t\t$address = $this->input->post(\"address\");\n\n\t\t$table = \"employee\";\n\n\t\t$data = array(\n\t\t\t'name' => $name,\n\t\t\t'uid' => $uid,\n\t\t\t'address' => $address,\n\t\t\t'gender' => $gender,\n\t\t\t'position_id' => $position_id,\n\t\t);\n\t\t$where = array(\n\t\t\t'e_id' => $id\n\t\t);\n\n\t\t$sql = $this->M_admin->updateEmployee($where, $data, $table);\n\t\tif ($sql) {\n\t\t\t// echo \"<script>alert('SCAN KARTU TERLEBIH DAHULU!'); window.location='\".base_url('Admin/formAddEmployee').\"'</script>\";\n\t\t\t$this->session->set_flashdata('fail', '<div class=\"btn btn-danger\">Gagal mengubah data!</div>');\n\t\t\t$this->session->set_flashdata('name', $name);\n\t\t\t$this->session->set_flashdata('gender', $gender);\n\t\t\tredirect(base_url('Admin/employees'));\n\t\t} else {\n\t\t\t$this->session->set_flashdata('fail', '<div class=\"btn btn-success\">Berhasil mengubah data</div>');\n\t\t\tredirect(base_url('Admin/employees'));\n\t\t}\n\t\t// var_dump($where,$data);\n\t}",
"function SelectByIdFrom_UserDetails($dbhandle, $id, &$user)\n{\n $logger = LoggerSingleton::GetInstance();\t\n $logger->LogInfo(\"SelectByIdFrom_UserDetails : Enter ($id)\");\n\n global $UserDetailsTable_Id;\n global $UserDetailsTable_Name;\n global $UserDetailsTable_UserName;\n \n // select\n $query = \"SELECT * FROM $UserDetailsTable_Name\n WHERE $UserDetailsTable_Id = $id\";\n\n // execte\n $result = $dbhandle->query($query);\n\n if(FALSE == $result)\n {\n $logger->LogError(\"SelectByIdFrom_UserDetails : No records with id - $id found\");\n $status = false;\n }\n\n $num_rows = $result->num_rows;\n if($num_rows > 0)\n {\n while($row = $result->fetch_assoc())\n {\n $user = $row[\"$UserDetailsTable_UserName\"];\n }\n\n $status = true;\n } \n else\n {\n $logger->LogError(\"SelectByIdFrom_UserDetails : No records found\");\n $status = false;\n }\n\n return $status;\n}",
"public function fetch_user_eid($emp_id) {\n\t$condition = \"emp_code =\" . \"'\" . $emp_id . \"'\";\n\n$this->db->select('emp_email');\n$this->db->from('employee_master');\n$this->db->where($condition);\n$query = $this->db->get();\n\nif ($query->num_rows() >= 1) {\n\treturn $query->row()->emp_email;\n} else {\nreturn false;\n}\n}",
"public function update(Request $request, $id)\n {\n $this->validate($request,[\n 'name' => 'required',\n 'designation' => 'required',\n 'email' => 'required|email|unique:employees,email,'.$id,\n 'phone' => 'required|numeric',\n 'address' => 'required',\n\n ]);\n $db_employee = Employee::findOrfail($id);\n $db_employee->name = $request->name;\n $db_employee->designation = $request->designation;\n $db_employee->email = $request->email;\n $db_employee->phone = $request->phone;\n $db_employee->address = $request->address;\n $db_employee->total = 22;\n $db_employee->save();\n return new EmployeeResource($db_employee);\n }",
"function add_employee( $empl_name, $pre_address, $per_address, $date_of_birth, $age, $mobile_phone, $email, $grade, $department, $designation, $gross_salary, $basic, $date_of_join){\n\t \t\n\t\t$date_of_birt = date2sql($date_of_birth); \n\t\t$date_of_joint = date2sql($date_of_join); \n\t\t$sql = \"INSERT INTO \".TB_PREF.\"kv_empl_info ( empl_name, pre_address, per_address, date_of_birth, age, mobile_phone, email, grade, department, designation, gross_salary, basic, date_of_join) VALUES (\"\n\t\t\n\t\t.db_escape($empl_name).\", \"\n\t\t.db_escape($pre_address).\", \"\n\t\t.db_escape($per_address).\", \"\t\t\n\t\t.db_escape($date_of_birt).\", \"\n\t\t.db_escape($age).\", \"\n\t\t.db_escape($mobile_phone).\", \" \n\t\t.db_escape($email).\", \" \n\t\t.db_escape($grade).\", \" \n\t\t.db_escape($department).\", \" \n\t\t.db_escape($designation).\", \" \n\t\t.db_escape($gross_salary).\",\"\n\t\t.db_escape($basic).\",\"\n\t\t.db_escape($date_of_joint).\")\";\n\n\tdb_query($sql,\"The employee could not be added\");\n\treturn db_insert_id(); \n}",
"abstract function getId();",
"function getEmployeeInfoByID($db, $code, $column = \"*\")\n{\n $arrResult = [];\n $code = trim($code);\n if ($code != \"\") {\n $code = \"WHERE t0.id = '$code'\";\n }\n if ($column == \"\") {\n $column = \"*\";\n };\n $strSQL = \"SELECT $column FROM hrd_employee AS t0\n LEFT JOIN hrd_division as t1 ON t1.division_code = t0.division_code \n LEFT JOIN hrd_department as t2 ON t2.department_code = t0.department_code \n LEFT JOIN hrd_section as t3 ON t3.section_code = t0.section_code \n LEFT JOIN hrd_sub_section as t4 ON t4.sub_section_code = t0.sub_section_code \n LEFT JOIN hrd_company as t5 ON t5.id = t0.id_company \n LEFT JOIN hrd_bank as t6 ON t6.bank_code = t0.bank2_code\n $code \n \";\n $resDb = $db->execute($strSQL);\n if ($code != \"\") {\n if ($rowDb = $db->fetchrow($resDb)) {\n $arrResult = $rowDb;\n }\n } else {\n while ($rowDb = $db->fetchrow($resDb)) {\n $arrResult[$rowDb['id']] = $rowDb;\n }\n }\n return $arrResult;\n}",
"function newEmployee($conn){\n\t\t$name = mysqli_real_escape_string($conn, $_POST['name']);\n\t\t$email = mysqli_real_escape_string($conn, $_POST['email']);\n\t\t$password = mysqli_real_escape_string($conn, $_POST['password']);\n\t\t$contact = mysqli_real_escape_string($conn, $_POST['contact']);\n\t\t$dept = mysqli_real_escape_string($conn, $_POST['dept']);\n\t\t$type = mysqli_real_escape_string($conn, $_POST['choice']);\n\n\t\t$sql = \"SELECT * FROM employee WHERE employee.email='$email'\";\n\t\t$result = mysqli_query($conn, $sql);\n\t\t$check = mysqli_num_rows($result);\n\t\tif($check == 1){\n\t\t\t// Employee with this email already exists\n\t\t\theader('Location: ../addEmployee.php?user_exists=true');\n\t\t}else{\n\t\t\t// Create new Employee\n\t\t\tif($type == \"normal\"){\n\t\t\t\t// Permanent Employee\n\t\t\t\t$salary = mysqli_real_escape_string($conn, $_POST['ann_salary']);\n\n\t\t\t\t$sql = \"INSERT INTO employee(name,email,password,contact,department,salary) VALUES('$name','$email','$password','$contact','$dept','$salary')\";\n\n\t\t\t\t$result = mysqli_query($conn, $sql);\n\t\t\t\tif($result){\n\t\t\t\t\t$last_id = mysqli_insert_id($conn);\n\t\t\t\t\t$sql = \"INSERT INTO permanent_trainer(emp_id) VALUES($last_id)\";\n\t\t\t\t\t$result2 = mysqli_query($conn, $sql);\n\t\t\t\t\t\n\t\t\t\t\theader('Location: ../admin.php?p_emp_added=true');\n\t\t\t\t}\n\t\t\t}elseif($type == \"temp\"){\n\t\t\t\t// Temporary Employee\n\t\t\t\t$salary = mysqli_real_escape_string($conn, $_POST['mon_salary']);\n\n\t\t\t\t$sql = \"INSERT INTO employee(name,email,password,contact,department) VALUES('$name','$email','$password','$contact','$dept')\";\n\t\t\t\t$result = mysqli_query($conn, $sql);\n\t\t\t\tif($result){\n\t\t\t\t\t$last_id = mysqli_insert_id($conn);\n\t\t\t\t\t$sql = \"INSERT INTO temporary_trainer(emp_id,monthly_salary) VALUES($last_id,$salary)\";\n\t\t\t\t\t$result2 = mysqli_query($conn, $sql);\n\t\t\t\t\theader('Location: ../admin.php?t_emp_added=true');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}"
] | [
"0.7354447",
"0.70327",
"0.69671476",
"0.6809383",
"0.6552971",
"0.6504543",
"0.64505184",
"0.63247246",
"0.63168764",
"0.6314336",
"0.630449",
"0.6296588",
"0.62939966",
"0.62411433",
"0.62335306",
"0.6223065",
"0.61782527",
"0.6178048",
"0.61728674",
"0.61583245",
"0.61354035",
"0.611138",
"0.61088395",
"0.6105645",
"0.609348",
"0.6060704",
"0.6052023",
"0.60500276",
"0.60385025",
"0.60341305",
"0.6020189",
"0.6018414",
"0.59900254",
"0.597644",
"0.5965334",
"0.5965334",
"0.5965334",
"0.5965334",
"0.5965334",
"0.5965334",
"0.59625655",
"0.59487474",
"0.59308934",
"0.59253305",
"0.59175855",
"0.59046346",
"0.5902602",
"0.5892748",
"0.58875126",
"0.5884896",
"0.5872377",
"0.587149",
"0.5867261",
"0.58285123",
"0.58267236",
"0.58156663",
"0.5814692",
"0.5800588",
"0.57935137",
"0.57935137",
"0.57935137",
"0.57887375",
"0.57826865",
"0.57826865",
"0.57816833",
"0.5768825",
"0.5758436",
"0.57549506",
"0.5746722",
"0.5741295",
"0.5740537",
"0.57241905",
"0.5721096",
"0.57164794",
"0.57140464",
"0.57104665",
"0.5707721",
"0.57059675",
"0.57050705",
"0.57010436",
"0.56957436",
"0.568858",
"0.5686151",
"0.56803995",
"0.56792873",
"0.5674433",
"0.5658046",
"0.56578267",
"0.56568044",
"0.564558",
"0.5643925",
"0.5637905",
"0.56319463",
"0.563126",
"0.56245893",
"0.5615806",
"0.56040984",
"0.5601427",
"0.56011677",
"0.559929"
] | 0.6461587 | 6 |
Pull First and Last name of user updating access for documentation. Protect Database from Session Poisoning | private function get_nameOfUser($employee_id) {
$query = "SELECT first_name, last_name FROM users WHERE employee_id='$employee_id'";
$check_database = mysqli_query($this->con, $query);
$check_num_rows = mysqli_num_rows($check_database);
//If only one row then the query is valid.
if($check_num_rows == 1) {
$row = mysqli_fetch_assoc($check_database);
return ucfirst($row['first_name']) . ' ' . ucfirst($row['last_name']);
}
//If it returns a different value there is an issue.
else {
//Header("Location: logout.php");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_user_full_name() {\n echo $_SESSION['SESS_USER_FIRST'] . ' ' . $_SESSION['SESS_USER_LAST'];\n }",
"protected function user()\n {\n if ($this->wrappedObject->security) {\n return ' this user\\'s ';\n }\n\n $user = $this->wrappedObject->revisionable()->withTrashed()->first(['first_name', 'last_name']);\n\n return ' '.$user->first_name.' '.$user->last_name.'\\'s ';\n }",
"public function RefreshDisplayName() {\n\t\t\tif ($this->blnDisplayRealNameFlag)\n\t\t\t\t$this->strDisplayName = $this->strFirstName . ' ' . $this->strLastName;\n\t\t\telse\n\t\t\t\t$this->strDisplayName = $this->strUsername;\n\t\t\t$this->Save();\n\t\t}",
"Public Function getUserName()\n\t{\n\t\treturn $this->firstName . ' ' . $this->lastName;\n\t}",
"function getFirst_Name(){\n$user = $this->loadUserLogin(Yii::app()->user->user_id);\nreturn $user->first_name;\n}",
"public function getUserFullName() {\n return $this->first_name . ' ' . $this->last_name;\n }",
"function user_name () {\r\n\t$info = user_info();\r\n\treturn (isset($info[1]) ? $info[1] : 'default');\r\n}",
"function GetUserFullName()\r\n{\r\n if(isset($_SESSION['firstname']) || isset($_SESSION['lastname'])){\r\n $userfullname = Escape($_SESSION['firstname']).\" \".Escape($_SESSION ['lastname']);\r\n return $userfullname;\r\n }\r\n return \"LoggedIn User\";\r\n}",
"function getFirst_Name() {\n $user = $this->loadUser(Yii::app()->user->id);\n return $user->first_name;\n }",
"function getFirst_Name(){\n $user = $this->loadUser(Yii::app()->user->id);\n\treturn $user->firstname;\n }",
"public function usualname()\n\t{\n\t\treturn coalesce(User::info('UsualName'), User::info('Username'));\n\t}",
"public function diviroids_user_firstname($atts)\n {\n return DiviRoids_Security::get_current_user('user_firstname');\n }",
"public function getUserOrProperName()\n {\n $person = $this->getPerson();\n if (strtolower($person->getEmail()) != strtolower($this->username)) {\n return $this->username;\n } else {\n $init = substr($person->getFirstname(), 0, 1);\n return \"{$init}. {$person->getLastname()}\";\n }\n }",
"public function getUser_fname()\n {\n return $this->user_fname;\n }",
"public function diviroids_user_lastname($atts)\n {\n return DiviRoids_Security::get_current_user('user_lastname');\n }",
"function getUsername(){return $this->getName();}",
"public function get_full_name() { \n return $this->session->userdata('full_name');\n }",
"public function getFullName()\n {\n if (! $this->_getVar('user_name')) {\n $name = ltrim($this->_getVar('user_first_name') . ' ') .\n ltrim($this->_getVar('user_surname_prefix') . ' ') .\n $this->_getVar('user_last_name');\n\n if (! $name) {\n // Use obfuscated login name\n $name = $this->getLoginName();\n $name = substr($name, 0, 3) . str_repeat('*', max(5, strlen($name) - 2));\n }\n\n $this->_setVar('user_name', $name);\n\n // \\MUtil_Echo::track($name);\n }\n\n return $this->_getVar('user_name');\n }",
"public function requestFirstname();",
"public function getuserFirstName()\n {\n return $this->userFirstName;\n }",
"public function getFullNameWithLogin()\n\t{\n\t\treturn \"{$this->firstname} {$this->lastname} ({$this->login})\";\n\t}",
"function ffl_fix_user_display_name($user_id)\n{\n\t//set the display name\n\t$info = get_userdata( $user_id );\n \n\t$display_name = trim($info->first_name . ' ' . $info->last_name);\n\tif(!$display_name)\n\t\t$display_name = $info->user_login;\n\t\t\t \n\t$args = array(\n\t\t\t'ID' => $user_id,\n\t\t\t'display_name' => $display_name\n\t);\n \n\twp_update_user( $args ) ;\n}",
"public function get_user_name() { \n\n\t\tif ($this->user == '-1') { return _('All'); } \n\t\t\n\t\t$user = new User($this->user);\n\t\treturn $user->fullname . \" (\" . $user->username . \")\";\n\t\t\n\t}",
"function get_user_name() {\n return $this->call('get_user_name', array(), TRUE);\n }",
"function getUserName()\r\n\t{\r\n\t\treturn $this->UserName;\r\n\t}",
"public function getExternalUserName();",
"public function GetFullName()\n {\n return $this->firstname . \" \" . $this->lastname . \" (\" . $this->username . \")\";\n }",
"function displayName() {\n\n // call the database variable\n global $db;\n\n $sql = \"SELECT * from users WHERE id='\".$_SESSION['my_id'].\"'\";\n $result = $db-> query($sql);\n\n if ($result-> num_rows > 0) {\n while ($user = $result->fetch_assoc()) {\n\n if ($user['fname'] && $user['lname'] != null) {\n echo $user['fname'] . \" \" . $user['lname'];\n } else {\n echo $user['email'];\n }\n\n }\n }\n\n }",
"public function getUserFirstName() :string {\n\t\treturn($this->userFirstName);\n\t}",
"public function getUserDisplayName();",
"public function getUserName();",
"public function GetUserName ();",
"public function getUserName() {}",
"public function userinfo()\n {\n if($user = $this->Session->read('user')){\n if(!empty($this->request->data)){\n //update thong tin\n }\n $this->set('user', $user);\n }else{\n $this->redirect(array('action' => 'login', ''));\n }\n }",
"public function name() {\n return isset($this->_adaptee->user_info['user_displayname']) ? $this->_adaptee->user_info['user_displayname'] : null;\n }",
"public function getUsersName(){\n //Get the Id\n $userId = $_GET[\"userId\"];\n //Gets the users name \n $usersName = $this->individualGroupModel->getTheUsersName($userId); \n //echos out a created users name given the first and last name\n echo $usersName->User_First_Name . \" \" . $usersName->User_Last_Name;\n }",
"public function set_full_name($user) {\r\n\r\n if(!isset($_SESSION)){\r\n session_start();\r\n }\r\n\r\n $_SESSION['info'] = array(\r\n \"fullName\" => $user['first_name'] . \" \" . $user['last_name'],\r\n \"id\" => $user['id'],\r\n \"email\" => $user['email']\r\n );\r\n\r\n return $_SESSION['info'];\r\n }",
"public function userDetails(){\n\t\t\techo $this->name .\"<br>\";\n\t\t\techo $this->age .\"<br>\";\n\t\t\techo $this->dept .\"<br>\";\n\t\t}",
"function get_user_name()\n {\n return isset($_SESSION['username']) ? $_SESSION['username'] : null;\n }",
"public function getUser_lname()\n {\n return $this->user_lname;\n }",
"abstract protected function getUser();",
"function get_staff_full_name($userid = '')\n{\n $_userid = get_staff_user_id();\n if ($userid !== '') {\n $_userid = $userid;\n }\n $CI =& get_instance();\n $CI->db->where('Staff_ID', $_userid);\n $admin = $CI->db->select('S_FirstName,S_LastName')->from('staffs')->get()->row();\n if ($admin) {\n return $admin->S_FirstName . ' ' . $admin->S_LastName;\n } else {\n return '';\n }\n}",
"abstract public function getUserInfo();",
"public function getuserLastName()\n {\n return $this->userLastName;\n }",
"function getRHUL_FirstName() {\n return getRHUL_LDAP_FieldValue(\"first_name\");\n}",
"function get_user_name() {\n\treturn isset($_SESSION['username']) ? $_SESSION['username'] : null;\n}",
"function editUserName($data){\n\t\t\t$conn = $this->connect();\n\t\t\t$fname = $this->modify(mysqli_real_escape_string($conn, $data['fname']));\n\t\t\t$lname = $this->modify(mysqli_real_escape_string($conn, $data['lname']));\n\t\t\tif(empty($fname) || empty($lname)) {\n\t\t\t\t$this->re_direct(\"profile\", \"input=empty\");\n\t\t\t} else {\n\t\t\t\tif(preg_match(\"/^[a-z]+(\\.)?( )?[a-z]*$/i\", $fname) && preg_match(\"/^[a-z]+$/i\", $lname)) {\n\t\t\t\t\tif($this->length($fname, 25, 4) && $this->length($lname, 25, 4)) {\n\t\t\t\t\t\t$result = $this->change(\"user_login\", \"user_fname\", $fname , $_SESSION['userid']);\n\t\t\t\t\t\t$result1 = $this->change(\"user_login\", \"user_lname\", $lname , $_SESSION['userid']);\n\t\t\t\t\t\tif($result == false || $result1 == false) {\n\t\t\t\t\t\t\t$this->re_direct(\"profile\", \"Failed\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->re_direct(\"profile\", \"Successfull\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->re_direct(\"profile\", \"Error=toobigOrtooSmall\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->re_direct(\"profile\", \"invalid=name\");\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"function getUserName() {\n\t\treturn $this->nickname;\n\t\t/*\n\t\tif(!$this->user_name) {\n\t\t\t$this->sql(\"SELECT nickname FROM \".UT_USE.\" WHERE id = \".$this->user_id);\n\t\t\t$this->user_name = $this->getQueryResult(0, \"nickname\");\n \t\t}\n\t\treturn $this->user_name;\n\t\t*/\n\t}",
"function pilau_default_user_display_name( $user_id ) {\n\t\t// Fetch current user meta information\n\t\t$first = get_user_meta( $user_id, 'first_name', true );\n\t\t$last = get_user_meta( $user_id, 'last_name', true );\n\t\t$display = trim( $first . \" \" . $last );\n\t\t// Update\n\t\twp_update_user( array( \"ID\" => $user_id, \"display_name\" => $display ) );\n\t}",
"public function getUser();",
"public function getUser();",
"public function getUser();",
"public function getUser();",
"public function getUser();",
"public function getUser();",
"public function getUser();",
"public function getCustomerFirstname();",
"public function name(): string {\n return (string) $this->user?->first_name;\n }",
"public function GetFullName()\n\t\t{\n\t\t\treturn $this->GetAttribute('first_name').' '.$this->GetAttribute('last_name');\n\t\t}",
"function userName($user_id)\n {\n global $obj_rep;\n \n $condtion = \" user_id='\" . $user_id . \"'\";\n \n $sql = $obj_rep->query(\"first_name,last_name\", \"user_registration\", $condtion);\n \n $result = $obj_rep->get_all_row($sql);\n return $fullName = $result['first_name'] . \" \" . $result['last_name'];\n }",
"protected function _getRealName()\n {\n return $this->first_name . ' ' . $this->last_name;\n }",
"function my_update_first_and_last_name_after_checkout($user_id)\n{\n\tif(isset($_REQUEST['ep_special']))\n\t{\n\t\t$ep_special = $_REQUEST['ep_special'];\n\t}\n\telseif(isset($_SESSION['ep_special']))\n\t{\n\t\t//maybe in sessions?\n\t\t$ep_special = $_SESSION['ep_special'];\n\t\t\n\t\t//unset\n\t\tunset($_SESSION['ep_special']);\n\t}\n\t\n\tif(isset($ep_special))\t\n\t\tupdate_user_meta($user_id, \"ep_special\", $ep_special);\n}",
"public function getUsername() {}",
"function getUserName() {\n return $this->userName . \".guest\";\n }",
"public function getUserName()\n {\n return $this->user_name;\n }",
"function get_name() {\n if(is_valid_user()) {\n return $_SESSION['username'];\n } else {\n return null;\n }\n}",
"function getUsername()\n\t{\n\t\treturn $this->Info['Username'];\n\t}",
"function user_name($user = false)\n{\n $user = $user ? $user : $GLOBALS['user'];\n\n // first check if the name is in the DB\n if ($info = user_info($user))\n return $info['name'];\n\n //no, it isn't. fetch it from the master server\n return master_user_name($user);\n}",
"public function editinformation() \n {\n UserModel::authentication();\n \n //get the session user\n $user = UserModel::user();\n\n UserModel::update_profile();\n }",
"public function username(){\n \treturn $this->users->name.' '.$this->users->ape;\n }",
"public function r_user(){\n\t\tif (!empty($this -> user)) {\n\t\t\techo 'value = \"'.$this -> user.'\"';\n\t\t}\n\t}",
"public function getUserName()\n {\n return $this->formattedData['username'];\n }",
"function user_fullname($user) {\n\t$nick = (!empty($user->nickname)) ? \" '\".$user->nickname.\"' \" : \"\";\n\techo $user->user_firstname . $nick . $user->user_lastname;\n}",
"function get_user_info(){\t\t\n\t\t// Fetch user data from database\n\t\t$user_data_array=$this->UserModel->get_user_data(array('member_id'=>$this->session->userdata('member_id')));\n\t\techo $user_data_array[0]['company'].\"|\".$user_data_array[0]['address_line_1'].\"|\".$user_data_array[0]['city'].\"|\".$user_data_array[0]['state'].\"|\".$user_data_array[0]['zipcode'].\"|\".$user_data_array[0]['country_id'].\"|\".$user_data_array[0]['country_name'];\n\t}",
"function getFirstName($f)\n {\n $array = $this->load( array( \"username=?\", $f->get('POST.login_username') ));\n return $array['firstname'].\" \".$array['lastname'];\n }",
"public function diviroids_user_displayname($atts)\n {\n return DiviRoids_Security::get_current_user('display_name');\n }",
"function getUser() {\n $DBA = new DatabaseInterface();\n $fields = array(0 => 'username', 1 => 'title', 2 => 'first_name', 3 => 'last_name', 4 => 'password', 5 => 'contactemail', 6 => 'contacttelephone', 7 => 'newsletter', 8 =>'pcode', 9 => 'store_owner', 10 => 'house', 11 => 'street', 12 => 'town', 13 => 'county', 14 => 'geolong', 15 => 'geolat', 16 => 'avatar', 17 => 'mobile', 18 => 'optout');\n $idfields = array(0 => 'id');\n $idvals = array(0 => $this->ID);\n $rs = $DBA->selectQuery(DBUSERTABLE, $fields, $idfields, $idvals);\n\n if (!isset($rs[2]))\n {\n while ($res = mysql_fetch_array($rs[0]))\n {\n $this->setUserVar('Username', $res['username']);\n $this->setUserVar('Title', $res['title']);\n $this->setUserVar('FirstName', $res['first_name']);\n $this->setUserVar('LastName', $res['last_name']);\n $this->setUserVar('ContactEmail', $res['contactemail']);\n $this->setUserVar('ContactTelephone', $res['contacttelephone']);\n $this->setUserVar('NewsletterSubscriber', $res['newsletter']);\n $this->setUserVar('Area', $res['pcode']);\n $this->setUserVar('StoreOwner', $res['store_owner']);\n $this->setUserVar('House', $res['house']);\n $this->setUserVar('Street', $res['street']);\n $this->setUserVar('Town', $res['town']);\n $this->setUserVar('County', $res['county']);\n $this->setUserVar('PCode', $res['pcode']);\n $this->setUserVar('Long', $res['geolong']);\n $this->setUserVar('Lat', $res['geolat']);\n $this->setUserVar('Avatar', $res['avatar']);\n $this->setUserVar('Mobile', $res['mobile']);\n $this->setUserVar('DMOptOut', $res['optout']);\n $this->formatAddress();\n $this->formatEmail();\n if ($this->Lat == '')\n {\n $this->GeoLocate();\n }\n }\n }\n }",
"public function getFirstName() {}",
"public function getFirstName() {}",
"function get_admin_info($username) {\n $result = db_fetch_row(\"SELECT * FROM `tbl_admin` WHERE `username` = '{$username}'\");\n return $result['fullname'];\n}",
"function getFirstName() {\n\t$COMMON = new Common($debug);\n\t$uID = $_SESSION[\"userID\"];\n\n\t$sql = \"select * from Proj2Advisors where `id` = '$uID'\";\n\t$rs = $COMMON->executeQuery($sql, $_SERVER[\"SCRIPT_NAME\"]);\n\t$row = mysql_fetch_row($rs);\n\n\t$name = $row[1];\n\treturn $name;\n}",
"public function getUserLastName() :string {\n\t\treturn($this->userFirstName);\n\t}",
"public function getName() {\n\t\tif($this->_name)\n\t\t\treturn $this->_name;\n\t\tif ($this->first_name != '')\n\t\t\treturn $this->first_name . ($this->last_name ? ' ' . $this->last_name : '');\n\t\telse\n\t\t\treturn $this->username ? $this->username : $this->email;\n\t}",
"public static function getUser();",
"public function getFirstName();",
"function get_the_author_firstname()\n {\n }",
"public function getUserfield();",
"public function getuserName()\n {\n return $this->userName;\n }",
"public function getUserInfo()\n {\n }",
"final public function getUserName():string \n {\n return $this->userState->getUserName();\n }",
"function get_user_details($username)\n {\n }",
"function get_user_info( $user, $key )\n {\n //Unimplemented\n }",
"private function retrieve_name() {\n\t\t$replacement = null;\n\n\t\t$user_id = $this->retrieve_userid();\n\t\t$name = get_the_author_meta( 'display_name', $user_id );\n\t\tif ( $name !== '' ) {\n\t\t\t$replacement = $name;\n\t\t}\n\n\t\treturn $replacement;\n\t}",
"function get_profile_fname($fname){\r\n\t\r\n}",
"public function getUserInfo() {}",
"function get_profile_lname($lname){\r\n\t\r\n}",
"public function getFirstNameOrUsername() {\n return $this->first_name ? : $this->username;\n }",
"public function getAutoCompleteUserName() {\n// $retVal = $this->username;\n// if (!empty($this->last_name)) {\n// $retVal .= ' - ' . $this->last_name;\n// }\n// if (!empty($this->first_name)) {\n// $retVal .= ' ' . $this->first_name;\n// }\n $arr = array(\n $this->getFullName(),\n $this->getRoleName(),\n $this->getAgentName(),\n );\n $retVal = implode(' - ', $arr);\n\n return $retVal;\n }",
"public function getName()\n {\n $result = null;\n if (isset($this->userInfo['first_name']) && isset($this->userInfo['last_name'])) {\n $result = $this->userInfo['first_name'] . ' ' . $this->userInfo['last_name'];\n } elseif (isset($this->userInfo['first_name']) && !isset($this->userInfo['last_name'])) {\n $result = $this->userInfo['first_name'];\n } elseif (!isset($this->userInfo['first_name']) && isset($this->userInfo['last_name'])) {\n $result = $this->userInfo['last_name'];\n }\n return $result;\n }",
"function printUserInfo() {\n return $this->Name.' '.$this->Surname;\n }",
"function ffl_save_extra_profile_fields( $user_id ) \n{\n\tif ( !current_user_can( 'edit_user', $user_id ) )\n\t\treturn false;\n\n\t//set the display name\n\t$display_name = trim($_POST['first_name'] . \" \" . $_POST['last_name']);\n\tif(!$display_name)\n\t\t$display_name = $_POST['user_login'];\n\t\t\n\t$_POST['display_name'] = $display_name;\n\t\n\t$args = array(\n\t\t\t'ID' => $user_id,\n\t\t\t'display_name' => $display_name\n\t); \n\twp_update_user( $args ) ;\n}"
] | [
"0.7032179",
"0.6801065",
"0.670899",
"0.66836596",
"0.66260237",
"0.65734756",
"0.6494989",
"0.6449242",
"0.6443498",
"0.6436594",
"0.6434331",
"0.6416604",
"0.64026856",
"0.63984805",
"0.63710284",
"0.6339453",
"0.6316541",
"0.6281507",
"0.6279685",
"0.627549",
"0.6235346",
"0.621635",
"0.6208967",
"0.620723",
"0.61962444",
"0.61842865",
"0.6181438",
"0.6178798",
"0.6178554",
"0.6176853",
"0.61690074",
"0.61626714",
"0.61588913",
"0.6152751",
"0.61510557",
"0.6145918",
"0.6143823",
"0.6141073",
"0.613834",
"0.61206573",
"0.60949343",
"0.60906464",
"0.60818475",
"0.6075922",
"0.60758245",
"0.607218",
"0.6059644",
"0.60523015",
"0.60472333",
"0.6044554",
"0.6044554",
"0.6044554",
"0.6044554",
"0.6044554",
"0.6044554",
"0.6044554",
"0.6041309",
"0.6036541",
"0.603398",
"0.6028067",
"0.6018566",
"0.6017721",
"0.60105723",
"0.60105705",
"0.6005234",
"0.59928447",
"0.5992479",
"0.5989784",
"0.59897316",
"0.598813",
"0.59867257",
"0.5974562",
"0.5973056",
"0.59718156",
"0.5956308",
"0.5952345",
"0.59486735",
"0.5947518",
"0.5947518",
"0.5945222",
"0.5935748",
"0.5931299",
"0.59281296",
"0.59280473",
"0.59275544",
"0.5921785",
"0.5916221",
"0.5911521",
"0.59095246",
"0.5904754",
"0.5901833",
"0.59017324",
"0.5900504",
"0.5899094",
"0.5895393",
"0.58949816",
"0.5892604",
"0.5890989",
"0.5886336",
"0.5886274",
"0.58763397"
] | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
return view('purchases.receive-inventory');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }",
"public function listing();",
"function index() {\n\t\t$this->show_list();\n\t}",
"public function actionList() {\n $this->_getList();\n }",
"public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }",
"public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }",
"public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }",
"function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}",
"public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }",
"public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }",
"public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}",
"function listing()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }",
"public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}",
"public function actionRestList() {\n\t $this->doRestList();\n\t}",
"public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}",
"public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }",
"public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }",
"public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}",
"public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}",
"public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }",
"public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }",
"public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }",
"public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }",
"public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}",
"public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }",
"public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}",
"public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }",
"public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function index()\n {\n $this->list_view();\n }",
"public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }",
"public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }",
"public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}",
"public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }",
"public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }",
"public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }",
"public function index()\n {\n return Resources::collection(Checking::paginate());\n }",
"public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }",
"public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }",
"public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }",
"public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }",
"public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }",
"public function view(){\n\t\t$this->buildListing();\n\t}",
"public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }",
"public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }",
"public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }",
"public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }",
"public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }",
"public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }",
"public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $message = new Notice();\n $results = $message->getMsg4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }",
"public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }",
"public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }",
"public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}",
"public function listAction() {}",
"public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }",
"public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }",
"public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }",
"public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }",
"public function executeList()\n {\n $this->setTemplate('list');\n }",
"public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }",
"function listing() {\r\n\r\n }",
"public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }",
"public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }",
"public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}",
"public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }",
"public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }",
"public function _index(){\n\t $this->_list();\n\t}",
"public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}",
"function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}",
"public function index()\n {\n $this->booklist();\n }",
"public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }",
"public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }",
"public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }",
"public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }",
"public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }",
"public function indexAction() {\n $this->_forward('list');\n }",
"public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }",
"public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }",
"public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}",
"public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }",
"public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }",
"public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }",
"public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }",
"public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }",
"public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}",
"public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\t\n\t\t$page = (int)($this->_request->getParam('page')); \n\t\tif(count($result) > 0)\n\t\t{ \n\t\t\tGlobals::doPaging($result, $page, $this->view);\n\t\t}\n\t\t\t\t\n\t\t$this->view->page = $page;\n\t }",
"public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }",
"public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }",
"public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}",
"public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }",
"public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }",
"public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }",
"public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }",
"public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }",
"public function index()\n {\n return view('admin.resources.index');\n }",
"public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}"
] | [
"0.7446777",
"0.736227",
"0.73005503",
"0.72478926",
"0.71631265",
"0.71489686",
"0.7131636",
"0.7105969",
"0.71029514",
"0.7101372",
"0.70508176",
"0.6995128",
"0.69890636",
"0.6934895",
"0.6900203",
"0.6899281",
"0.6891734",
"0.6887235",
"0.68670005",
"0.6849741",
"0.6830523",
"0.6802689",
"0.6797",
"0.67957735",
"0.67871135",
"0.6760129",
"0.67427456",
"0.6730486",
"0.67272323",
"0.67255723",
"0.67255723",
"0.67255723",
"0.67177945",
"0.6707866",
"0.6706713",
"0.6704375",
"0.6664782",
"0.6662871",
"0.6660302",
"0.6659404",
"0.6656656",
"0.6653517",
"0.6647965",
"0.6620322",
"0.66185474",
"0.6618499",
"0.6606105",
"0.6600617",
"0.65996987",
"0.6594775",
"0.6587389",
"0.6585109",
"0.6581641",
"0.6581017",
"0.6577157",
"0.65747666",
"0.6572513",
"0.65721947",
"0.6570553",
"0.65646994",
"0.6563556",
"0.6554194",
"0.65529937",
"0.65460825",
"0.65368485",
"0.653429",
"0.65328294",
"0.6526759",
"0.6526695",
"0.6526284",
"0.65191334",
"0.65183175",
"0.65174305",
"0.651703",
"0.65141153",
"0.6507088",
"0.65061647",
"0.6504046",
"0.64942145",
"0.6491893",
"0.64883405",
"0.6486392",
"0.6485077",
"0.64846045",
"0.6478858",
"0.64756656",
"0.64726377",
"0.6471126",
"0.64701074",
"0.6467418",
"0.6462195",
"0.64618355",
"0.6459199",
"0.6457831",
"0.6454631",
"0.64533997",
"0.6451915",
"0.6450861",
"0.6449301",
"0.64492667",
"0.64469045"
] | 0.0 | -1 |
Show the form for creating a new resource. | public function create()
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return view('admin.resources.create');\n }",
"public function create(){\n\n return view('resource.create');\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"public function create()\n {\n return view($this->forms . '.create');\n }",
"public function create()\n {\n return view('restful.add');\n }",
"public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function create()\n {\n return view('backend.student.form');\n }",
"public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n return view('form');\n }",
"public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }",
"public function create()\n {\n return view('backend.schoolboard.addform');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n //\n return view('form');\n }",
"public function create()\n {\n return view('rests.create');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return view(\"Add\");\n }",
"public function create(){\n return view('form.create');\n }",
"public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }",
"public function create()\n {\n\n return view('control panel.student.add');\n\n }",
"public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}",
"public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }",
"public function create()\n {\n return view(\"dresses.form\");\n }",
"public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }",
"public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}",
"public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function create()\n {\n return view('student.add');\n }",
"public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}",
"public function create()\n {\n return view('url.form');\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }",
"public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}",
"public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function create()\n {\n return view('libro.create');\n }",
"public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('crud/add'); }",
"public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}",
"public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view(\"List.form\");\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"public function create()\n {\n //load create form\n return view('products.create');\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }",
"public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}",
"public function create()\n {\n return view('saldo.form');\n }",
"public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}",
"public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }",
"public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }",
"public function create()\n {\n return view('admin.inverty.add');\n }",
"public function create()\n {\n return view('Libro.create');\n }",
"public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }",
"public function create()\n {\n return view(\"familiasPrograma.create\");\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n {\n return view('admin.car.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}",
"public function create()\n {\n return view(\"create\");\n }",
"public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}",
"public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }",
"public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }",
"public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }",
"public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }",
"public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}",
"public function create()\n {\n return view('student::students.student.create');\n }",
"public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}"
] | [
"0.75948673",
"0.75948673",
"0.75863165",
"0.7577412",
"0.75727344",
"0.7500887",
"0.7434847",
"0.7433956",
"0.73892003",
"0.73531085",
"0.73364776",
"0.73125",
"0.7296102",
"0.7281891",
"0.72741455",
"0.72424185",
"0.7229325",
"0.7226713",
"0.7187349",
"0.7179176",
"0.7174283",
"0.7150356",
"0.71444064",
"0.71442676",
"0.713498",
"0.71283126",
"0.7123691",
"0.71158516",
"0.71158516",
"0.71158516",
"0.7112176",
"0.7094388",
"0.7085711",
"0.708025",
"0.70800644",
"0.70571953",
"0.70571953",
"0.70556754",
"0.70396435",
"0.7039549",
"0.7036275",
"0.703468",
"0.70305896",
"0.7027638",
"0.70265305",
"0.70199823",
"0.7018007",
"0.7004984",
"0.7003889",
"0.7000935",
"0.69973785",
"0.6994679",
"0.6993764",
"0.6989918",
"0.6986989",
"0.6966502",
"0.69656384",
"0.69564354",
"0.69518244",
"0.6951109",
"0.6947306",
"0.69444615",
"0.69423944",
"0.6941156",
"0.6937871",
"0.6937871",
"0.6936686",
"0.69345254",
"0.69318026",
"0.692827",
"0.69263744",
"0.69242257",
"0.6918349",
"0.6915889",
"0.6912884",
"0.691146",
"0.69103104",
"0.69085974",
"0.69040126",
"0.69014287",
"0.69012105",
"0.6900397",
"0.68951064",
"0.6893521",
"0.68932164",
"0.6891899",
"0.6891616",
"0.6891616",
"0.6889246",
"0.68880934",
"0.6887128",
"0.6884732",
"0.68822503",
"0.68809193",
"0.6875949",
"0.68739206",
"0.68739134",
"0.6870358",
"0.6869779",
"0.68696856",
"0.686877"
] | 0.0 | -1 |
Store a newly created resource in storage. | public function store(Request $request)
{
if(empty(ErpReceiveInventory::where('invoice_number', $request->invoice_number)->first())){
$data = $request->except(['pending_po', 'product_id', 'pogross_price', 'ponet_amount']);
$data['company_id'] = session('company_id');
ErpReceiveInventory::create($data);
$product = tblproduct_stockavailability::where('product_id', $request->product_id)->first();
if(empty($product)){
tblproduct_stockavailability::create([
'product_id'=> $request->product_id,
'stock_in_hand' => $request->received_qty
]);
}else{
$total_product = $product['stock_in_hand'] + $request->received_qty;
tblproduct_stockavailability::where('product_id', $request->product_id)->update([
'stock_in_hand' => $total_product
]);
}
$status = $request->remaining_quantity == 0 ? 1 : 0;
$po = erp_purchase_order::where('id', $request->po_id)->first();
$po->received_qty = $po->received_qty + $request->received_qty;
$po->po_status = $status;
$po->save();
return response()->json([
"status" => true,
"message" => "Save Receive Inventory"
]);
}else{
return response()->json([
"status" => false,
"message" => "This invoice number is already exist, please use another"
]);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store($data, Resource $resource);",
"public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }",
"public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }",
"public function createStorage();",
"public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"function storeAndNew() {\n $this->store();\n }",
"public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }",
"public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }",
"public function store()\n\t{\n\t\t\n\t\t//\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\r\n\t{\r\n\t\t//\r\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}",
"public function store()\n\t{\n\t\t//\n\t}"
] | [
"0.72865677",
"0.7145327",
"0.71325725",
"0.6640912",
"0.66209733",
"0.65685713",
"0.652643",
"0.65095705",
"0.64490104",
"0.637569",
"0.63736665",
"0.63657933",
"0.63657933",
"0.63657933",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437",
"0.6342437"
] | 0.0 | -1 |
Display the specified resource. | public function show($array)
{
$arr = json_decode($array,true);
return DB::select('SELECT ri.*, po.po_number FROM (SELECT * FROM erp_receive_inventories WHERE company_id='.$arr['company_id'].') AS ri JOIN(SELECT id, po_number FROM erp_purchase_orders) AS po ON po.id = ri.po_id LIMIT '.$arr['offset'].', '.$arr['limit'].'');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Resource $resource)\n {\n // not available for now\n }",
"public function show(Resource $resource)\n {\n //\n }",
"function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }",
"private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }",
"function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}",
"public function show(ResourceSubject $resourceSubject)\n {\n //\n }",
"public function show(ResourceManagement $resourcesManagement)\n {\n //\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function retrieve(Resource $resource);",
"public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }",
"public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function show(Dispenser $dispenser)\n {\n //\n }",
"public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }",
"public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}",
"public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }",
"public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}",
"public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }",
"public function get(Resource $resource);",
"public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }",
"public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }",
"function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}",
"public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }",
"public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }",
"function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}",
"public function edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\n //\n }",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function show()\n\t{\n\t\t//\n\t}",
"public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show(Resena $resena)\n {\n }",
"public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}",
"public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }",
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }",
"public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }",
"public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }",
"public function display()\n\t{\n\t\tparent::display();\n\t}",
"public function show()\n\t{\n\t\t\n\t}",
"public function get_resource();",
"function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}",
"public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }",
"public function display($title = null)\n {\n echo $this->fetch($title);\n }",
"public function display(){}",
"public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }",
"public function display() {\n echo $this->render();\n }",
"#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n\t{\n\t//\n\t}",
"public function show($id)\n {\n //\n $this->_show($id);\n }",
"function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }",
"public function show()\n\t{\n\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {\n\t\t//\n\t}",
"public function show($id) {}",
"static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}",
"public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}",
"public abstract function display();",
"public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }",
"public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"public function show( $id ) {\n\t\t//\n\t}",
"abstract public function resource($resource);",
"public function show(Response $response)\n {\n //\n }",
"public function show()\n {\n return auth()->user()->getResource();\n }",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}",
"public function show($id)\n\t{\n\t\t//\n\t}"
] | [
"0.8232636",
"0.81890994",
"0.68296117",
"0.64987075",
"0.649589",
"0.64692974",
"0.64633286",
"0.63640857",
"0.6307513",
"0.6281809",
"0.621944",
"0.61926234",
"0.61803305",
"0.6173143",
"0.61398774",
"0.6119022",
"0.61085826",
"0.6106046",
"0.60947937",
"0.6078597",
"0.6047151",
"0.60409963",
"0.6021287",
"0.5989136",
"0.5964405",
"0.5962407",
"0.59518087",
"0.59309924",
"0.5921466",
"0.5908002",
"0.5908002",
"0.5908002",
"0.59051657",
"0.5894554",
"0.5871459",
"0.5870088",
"0.586883",
"0.5851384",
"0.58168566",
"0.58166975",
"0.5815869",
"0.58056176",
"0.5799148",
"0.5795126",
"0.5791158",
"0.57857597",
"0.5783371",
"0.5761351",
"0.57592535",
"0.57587147",
"0.5746491",
"0.57460666",
"0.574066",
"0.5739448",
"0.5739448",
"0.57295275",
"0.57293373",
"0.5729069",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57253987",
"0.57214445",
"0.57149816",
"0.5712036",
"0.5710076",
"0.57073003",
"0.5707059",
"0.5705454",
"0.5705454",
"0.5700382",
"0.56997055",
"0.5693362",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868",
"0.5687868"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit($id)
{
$ri_data = DB::select('SELECT ri.*, po.po_number, po.po_status, po.quantity FROM (SELECT * FROM erp_receive_inventories WHERE id='.$id.')AS ri JOIN(SELECT id, po_number, po_status, quantity FROM erp_purchase_orders) AS po ON po.id = ri.po_id');
return response()->json([
'status' => true,
'data' => $ri_data[0]
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }",
"public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }",
"public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }",
"public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }",
"public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}",
"public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }",
"public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }",
"private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function edit($id)\n {\n return $this->showForm('update', $id);\n }",
"public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }",
"public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }",
"public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}",
"public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }",
"public function edit($model, $form);",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\n {\n return view('admin::edit');\n }",
"public function edit()\r\n {\r\n return view('petro::edit');\r\n }",
"public function edit($id)\n {\n // show form edit user info\n }",
"public function edit()\n {\n return view('escrow::edit');\n }",
"public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }",
"public function edit()\n {\n return view('commonmodule::edit');\n }",
"public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit()\n {\n return view('catalog::edit');\n }",
"public function edit(form $form)\n {\n //\n }",
"public function actionEdit($id) { }",
"public function edit()\n {\n return view('admincp::edit');\n }",
"public function edit()\n {\n return view('scaffold::edit');\n }",
"public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }",
"public function edit()\n {\n return view('Person.edit');\n }",
"public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }",
"public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}",
"public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }",
"public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}",
"public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}",
"public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"public function edit($id)\n {\n return $this->showForm($id);\n }",
"protected function _edit(){\n\t\treturn $this->_editForm();\n\t}",
"public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }",
"public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }",
"public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}",
"public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}",
"public function edit($id)\n {\n return view('models::edit');\n }",
"public function edit()\n {\n return view('home::edit');\n }",
"public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }",
"public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit()\n {\n return view('user::edit');\n }",
"public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }",
"public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }",
"public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('consultas::edit');\n }",
"public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }",
"public function edit()\n {\n return view('dashboard::edit');\n }",
"public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }",
"public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }",
"public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }",
"public function edit() {\n return view('routes::edit');\n }",
"public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }",
"public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return view('cataloguemodule::edit');\n }",
"public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }",
"public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }",
"public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function edit()\n {\n return view('inventory::edit');\n }",
"public function edit()\n {\n return view('initializer::edit');\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function edit($id)\n {\n return view('backend::edit');\n }",
"public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n return view('crm::edit');\n }",
"public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }",
"public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}",
"public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }",
"public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}",
"public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }",
"public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }",
"public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }",
"public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}"
] | [
"0.78550774",
"0.7692893",
"0.7273195",
"0.7242132",
"0.7170847",
"0.70622855",
"0.7053459",
"0.6982539",
"0.69467914",
"0.6945275",
"0.6941114",
"0.6928077",
"0.69019294",
"0.68976134",
"0.68976134",
"0.6877213",
"0.68636996",
"0.68592185",
"0.68566656",
"0.6844697",
"0.68336326",
"0.6811471",
"0.68060875",
"0.68047357",
"0.68018645",
"0.6795623",
"0.6791791",
"0.6791791",
"0.6787701",
"0.67837197",
"0.67791027",
"0.677645",
"0.6768301",
"0.6760122",
"0.67458534",
"0.67458534",
"0.67443407",
"0.67425704",
"0.6739898",
"0.6735328",
"0.6725465",
"0.6712817",
"0.6693891",
"0.6692419",
"0.6688581",
"0.66879624",
"0.6687282",
"0.6684741",
"0.6682786",
"0.6668777",
"0.6668427",
"0.6665287",
"0.6665287",
"0.66610634",
"0.6660843",
"0.66589665",
"0.66567147",
"0.66545695",
"0.66527975",
"0.6642529",
"0.6633056",
"0.6630304",
"0.6627662",
"0.6627662",
"0.66192114",
"0.6619003",
"0.66153085",
"0.6614968",
"0.6609744",
"0.66086483",
"0.66060555",
"0.6596137",
"0.65950733",
"0.6594648",
"0.65902114",
"0.6589043",
"0.6587102",
"0.65799844",
"0.65799403",
"0.65799177",
"0.657708",
"0.65760696",
"0.65739626",
"0.656931",
"0.6567826",
"0.65663105",
"0.65660435",
"0.65615267",
"0.6561447",
"0.6561447",
"0.65576506",
"0.655686",
"0.6556527",
"0.6555543",
"0.6555445",
"0.65552044",
"0.65543956",
"0.65543705",
"0.6548264",
"0.65475875",
"0.65447706"
] | 0.0 | -1 |
Update the specified resource in storage. | public function update(Request $request, $id)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }",
"public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }",
"public function update(Request $request, Resource $resource)\n {\n //\n }",
"public function updateStream($resource);",
"public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }",
"protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }",
"public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }",
"public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}",
"public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }",
"public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }",
"protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }",
"public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }",
"public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }",
"public function update($path);",
"public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }",
"public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }",
"public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}",
"public function updateStream($path, $resource, Config $config)\n {\n }",
"public function edit(Resource $resource)\n {\n //\n }",
"public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }",
"public function update($data) {}",
"public function update($data) {}",
"public function putStream($resource);",
"public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }",
"public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }",
"public function update($entity);",
"public function update($entity);",
"public function setResource($resource);",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }",
"public function isUpdateResource();",
"public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }",
"public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }",
"public function store($data, Resource $resource);",
"public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }",
"public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }",
"public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }",
"public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }",
"public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }",
"public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }",
"public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }",
"public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }",
"public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }",
"public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }",
"public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }",
"public function update(Qstore $request, $id)\n {\n //\n }",
"public function update(IEntity $entity);",
"protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }",
"public function update($request, $id);",
"function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}",
"public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }",
"public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }",
"protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }",
"abstract public function put($data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function update($id, $data);",
"public function testUpdateSupplierUsingPUT()\n {\n }",
"public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }",
"public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }",
"public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }",
"public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }",
"public abstract function update($object);",
"public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }",
"public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }",
"public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }",
"public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }",
"public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }",
"public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }",
"public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }",
"public function update($entity)\n {\n \n }",
"public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }",
"public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }",
"public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }",
"public function update($id, $input);",
"public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }",
"public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}",
"public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }",
"public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }",
"public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }",
"public function update($id);",
"public function update($id);",
"private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }",
"public function put($path, $data = null);",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }",
"public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }",
"public function update(Entity $entity);",
"public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }",
"public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}",
"public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }",
"public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }",
"public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }",
"public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }",
"public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }",
"public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }"
] | [
"0.7425105",
"0.70612276",
"0.70558053",
"0.6896673",
"0.6582159",
"0.64491373",
"0.6346954",
"0.62114537",
"0.6145042",
"0.6119944",
"0.61128503",
"0.6099993",
"0.6087866",
"0.6052593",
"0.6018941",
"0.60060275",
"0.59715486",
"0.5946516",
"0.59400934",
"0.59377414",
"0.5890722",
"0.5860816",
"0.5855127",
"0.5855127",
"0.58513457",
"0.5815068",
"0.5806887",
"0.57525045",
"0.57525045",
"0.57337505",
"0.5723295",
"0.5714311",
"0.5694472",
"0.5691319",
"0.56879413",
"0.5669989",
"0.56565005",
"0.56505877",
"0.5646085",
"0.5636683",
"0.5633498",
"0.5633378",
"0.5632906",
"0.5628826",
"0.56196684",
"0.5609126",
"0.5601397",
"0.55944353",
"0.5582592",
"0.5581908",
"0.55813426",
"0.5575312",
"0.55717176",
"0.55661047",
"0.55624634",
"0.55614686",
"0.55608666",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55599797",
"0.55573726",
"0.5556878",
"0.5554201",
"0.5553069",
"0.55530256",
"0.5543788",
"0.55435944",
"0.55412996",
"0.55393505",
"0.55368495",
"0.5535236",
"0.5534954",
"0.55237365",
"0.5520468",
"0.55163723",
"0.55125296",
"0.5511168",
"0.5508345",
"0.55072427",
"0.5502385",
"0.5502337",
"0.5501029",
"0.54995877",
"0.54979175",
"0.54949397",
"0.54949397",
"0.54946727",
"0.5494196",
"0.54941916",
"0.54925025",
"0.5491807",
"0.5483321",
"0.5479606",
"0.5479408",
"0.5478678",
"0.54667485",
"0.5463411",
"0.5460588",
"0.5458525"
] | 0.0 | -1 |
Remove the specified resource from storage. | public function destroy($id)
{
$ri = ErpReceiveInventory::where('id', $id)->first();
$po = erp_purchase_order::where('id', $ri->po_id)->first();
$po->received_qty = $po->received_qty - $ri->received_qty;
$po->save();
$stock = tblproduct_stockavailability::where('product_id', $po->product_id)->first();
$stock->stock_in_hand = $stock->stock_in_hand - $ri->received_qty;
$stock->save();
ErpReceiveInventory::where('id', $id)->delete();
return response()->json([
'status' => true,
'message' => 'Receive Inventory Delete Permanently'
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }",
"public function destroy(Resource $resource)\n {\n //\n }",
"public function removeResource($resourceID)\n\t\t{\n\t\t}",
"public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }",
"public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }",
"public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }",
"public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }",
"protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }",
"public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }",
"public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}",
"public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}",
"public function delete(): void\n {\n unlink($this->getPath());\n }",
"public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }",
"public function remove($path);",
"function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }",
"public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }",
"public function remove() {}",
"public function remove() {}",
"public function remove();",
"public function remove();",
"public function remove();",
"public function remove();",
"function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}",
"public function deleteImage(){\n\n\n Storage::delete($this->image);\n }",
"public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }",
"public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}",
"public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }",
"public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }",
"public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}",
"public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }",
"public function deleteImage(){\n \tStorage::delete($this->image);\n }",
"public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }",
"public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }",
"public function destroy($id)\n {\n Myfile::find($id)->delete();\n }",
"public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }",
"public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }",
"public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }",
"public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }",
"public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }",
"public function delete($path);",
"public function delete($path);",
"public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }",
"public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }",
"public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }",
"public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }",
"public function delete($path, $data = null);",
"public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }",
"public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }",
"public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }",
"public function del($path){\n\t\treturn $this->remove($path);\n\t}",
"public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }",
"public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }",
"public function revoke($resource, $permission = null);",
"public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }",
"function delete($path);",
"public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }",
"public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }",
"public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }",
"public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }",
"function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }",
"public function remove($id);",
"public function remove($id);",
"public function deleted(Storage $storage)\n {\n //\n }",
"public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }",
"public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }",
"function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function delete();",
"public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}",
"public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }",
"public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}",
"public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }",
"public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }"
] | [
"0.6672584",
"0.6659381",
"0.6635911",
"0.6632799",
"0.6626075",
"0.65424126",
"0.65416265",
"0.64648265",
"0.62882507",
"0.6175931",
"0.6129922",
"0.60893893",
"0.6054415",
"0.60428125",
"0.60064924",
"0.59337646",
"0.5930772",
"0.59199584",
"0.5919811",
"0.5904504",
"0.5897263",
"0.58962846",
"0.58951396",
"0.58951396",
"0.58951396",
"0.58951396",
"0.5880124",
"0.58690923",
"0.5863659",
"0.5809161",
"0.57735413",
"0.5760811",
"0.5753559",
"0.57492644",
"0.5741712",
"0.57334286",
"0.5726379",
"0.57144034",
"0.57096",
"0.5707689",
"0.5705895",
"0.5705634",
"0.5703902",
"0.5696585",
"0.5684331",
"0.5684331",
"0.56780374",
"0.5677111",
"0.5657287",
"0.5648262",
"0.5648085",
"0.5648012",
"0.5640759",
"0.5637738",
"0.5629985",
"0.5619264",
"0.56167465",
"0.5606877",
"0.56021434",
"0.5601949",
"0.55992156",
"0.5598557",
"0.55897516",
"0.5581397",
"0.5566926",
"0.5566796",
"0.55642897",
"0.55641",
"0.5556583",
"0.5556536",
"0.5550097",
"0.5543172",
"0.55422723",
"0.5540013",
"0.5540013",
"0.55371785",
"0.55365825",
"0.55300397",
"0.552969",
"0.55275744",
"0.55272335",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.55271083",
"0.5525997",
"0.5525624",
"0.5523911",
"0.5521122",
"0.5517412"
] | 0.0 | -1 |
your error code can go here | function died($error) {
echo "We are very sorry, but there were error(s) found with the form you submitted. ";
echo "These errors appear below.<br /><br />";
echo $error."<br /><br />";
echo "Please go back and fix these errors.<br /><br />";
die();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function error(){}",
"public function errorOccured();",
"public function error();",
"abstract public function error();",
"public function get_error();",
"public function get_error();",
"function errorCode()\n {\n }",
"public function error(){\n\t}",
"protected function errorAction() {}",
"public function errorcode();",
"function getError();",
"function getError();",
"public function error()\n\t{\n\t}",
"public function errors();",
"public function errors();",
"public function get_error_code()\n {\n }",
"public function sql_error() {}",
"public function sql_error() {}",
"function get_errors()\n {\n }",
"function error($code_or_codes, $callback = NULL)\n{\n\n}",
"public function errorCode() {}",
"public function errorCode();",
"public function errorCode();",
"public function failure(){\n\t}",
"public function errorCode()\n {\n }",
"function evel_check_error($data) {\n if ($error_message = evel_get_error($data))\n err($error_message);\n}",
"private function checkError() : void\n {\n $this->isNotPost();\n $this->notExist();\n $this->notAdmin();\n }",
"public function errorMode(){}",
"private function _error() {\n\t\trequire $this->_controllerPath . $this->_errorFile;\n\t\t$this->_controller = new ErrorsController();\n\t\t$this->_controller->index();\n\t\treturn false;\n\t}",
"public function errorInfo();",
"public function errorInfo();",
"public function error400()\n {\n }",
"public function errorAction()\n\t{\n\t}",
"private function _error() {\n\t\trequire $this->_controllerPath . $this->_errorFile;\n\t\t$this->_controller = new Error();\n\t\t$this->_controller->index('Esta página no existe');\n\t\texit;\n\t}",
"protected abstract function send_error($ex=null) ;",
"public function showError();",
"function errorCode($inc_errstr)\n{\n\techo \"<p><b>ERROR! \".$inc_errstr.\"</b></p>\";\n}",
"abstract public function getErrorType(): string;",
"abstract protected function _getErrorString();",
"function APIerror() {\n\t\t$session = JFactory::getSession();\n\n\t\t$order_id = $session->get('wbtypayments.order_id', 0);\n\n\t\t// Initialize database\n\t\t$db = JFactory::getDBO();\n\n\t\tsession_start();\n\t\t$resArray=$_SESSION['reshash'];\n\n\t\t// Get any URL errors\n\t\tif(isset($_SESSION['curl_error_no'])) {\n\t\t\t$errorCode= $_SESSION['curl_error_no'] ;\n\t\t\t$errorMessage=$_SESSION['curl_error_msg'] ;\n\t\t\tsession_unset();\n\t\t} else {\n\t\t\t// Create a new row in the errors table with this order ID\n\t\t\t$query = \"INSERT INTO #__wbty_payments_errors (`number`,`message`,`order_id`) VALUES ('\".$resArray['L_ERRORCODE0'].\"','\".$resArray['L_LONGMESSAGE0'].\"','$order_id')\";\n\t\t\t$db->setQuery($query);\n\t\t\t$db->query();\n\t\t\t$error_id = $db->insertid();\n\n\t\t\tforeach($resArray as $key => $value) {\n\t\t\t\tswitch ($key) {\n\t\t\t\t\tcase 'L_ERRORCODE0':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'L_LONGMESSAGE0':\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$query = \"INSERT INTO #__wbty_payments_error_extra_items (`error_id`,`name`,`value`) VALUES ('\".$error_id.\"','\".$key.\"','\".$value.\"')\";\n\t\t\t\t\t\t$db->setQuery($query);\n\t\t\t\t\t\t$db->query();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}",
"public function failed();",
"function msgsrv_last_error () {}",
"public function getError();",
"public function getError();",
"public function getError();",
"public function actionError() {\n \n }",
"protected function getLastError() {}",
"function error_not_found()\n{\n\n}",
"function errorHandler($errno,$errstr){\n\t global $errors;\n\n\t raiseError(\"We are working to solve an internal issue in our service. Please, try later.\", Constants::HTTP_INTERNAL_SERVER_ERROR);\n\t}",
"abstract protected function _getErrorNumber();",
"abstract public function getLastError();",
"abstract public function getLastError();",
"public function get_error_codes()\n {\n }",
"public function is_error()\n {\n }",
"function get_error($input)\n {\n }",
"function customError($errno, $errstr)\n {\n echo \"<b>Error:</b> [$errno] $errstr\";\n }",
"function customError($errno, $errstr)\n {\n echo \"<b>Error:</b> [$errno] $errstr\";\n }",
"public function getError() {}",
"public function logError(){\n AbstractLoggedException::$dbMessage .= \"Invalid URI requestd; \";\n parent::log();\n }",
"public static function customErrorMsg()\n {\n echo \"\\n<p>An error occured, The error has been reported.</p>\";\n exit();\n }",
"function error( $error, $code = '500' ) {\n\t \n\t if ( is_object( $error ) && method_exists( $error, 'get_message' ) ) {\n\t $error = $error->get_message();\n\t }\n\t\n\t\thttp_response_code( $code );\n\t\tdie( $error );\n\t\treturn false;\n\n\t}",
"function api_error($err_code, $err_message, $err_data = null, $id = null) {\n $err = ['code'=>$err_code, 'message'=>$err_message];\n if (!is_null($err_data)) $err['data'] = $err_data;\n return api_return($err, $id, 'error');\n}",
"function _setErrorVariables()\n\t{\n\t\tif(!empty($this->m_link_id))\n\t\t{\n\t\t\t$this->m_errno = mysqli_errno($this->m_link_id);\n\t\t\t$this->m_error = mysqli_error($this->m_link_id);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->m_errno = mysqli_connect_errno();\n\t\t\t$this->m_error = mysqli_connect_error();\n\t\t}\n\t}",
"protected function renderAsError() {}",
"function mapit_check_error($data) {\n if ($error_message = mapit_get_error($data))\n err($error_message);\n}",
"public function errorInfo() {}",
"function getErrors();",
"public function actionError()\n {\n if($error=Yii::app()->errorHandler->error)\n {\n if($error['code'] != 404 || !isset($aErrorMsg[$error['errorCode']])){\n Yii::log(' error : ' . $error['file'] .\":\". $error['line'] .\":\". $error['message'], 'error', 'system');\n }\n $ret = new ReturnInfo(FAIL_RET, Yii::t('exceptions', $error['message']), intval($error['errorCode']));\n if(Yii::app()->request->getIsAjaxRequest()){\n echo json_encode($ret);\n \n }else{\n if( empty($error['errorCode']) ){\n if(isset($this->aErrorMsg[$error['code']])){\n if(empty($this->aErrorMsg[$error['code']]['message'])) {\n $this->aErrorMsg[$error['code']]['message'] = $error['message'];\n }\n $this->render('error', $this->aErrorMsg[$error['code']]);\n }else{\n $this->render('error', $this->aErrorMsg['1000']);\n }\n }else{\n $this->render('error', $this->aErrorMsg[ $error['errorCode'] ]);\n \n }\n }\n \n } \n }",
"function bad_request() {\n\treturn show_template('400');\n}",
"public function actionError() {\n if ($error = Yii::app()->errorHandler->error) {\n\t\t\t$this->sendRestResponse(500,array(\n\t\t\t\t'status' => false,\n\t\t\t\t'message' => $error['message'],\n\t\t\t\t'data' => $error,\n\t\t\t));\t\t\t\n }\n\t}",
"public function error498()\n {\n }",
"private function error($response) {\n\t\tif(property_exists($response, \"error\") AND $response->code != 200) {\n\t\t\tthrow new MystoreAPI_exception(\"Error \".$response->code.\"<br />\".$response->error->message);\n\t\t}\n\t}",
"protected function error($msg) {\n \t parent::error($msg); //log in error msg\n throw new Exception ($msg); // <-- TESTS php4\n }",
"protected function get_error( ) {\n// i store only the latest word with 3 letters\n\n if (strlen($this->current_group_text) != 4) {\n if (strlen($this->current_group_text) == 3) {\n if ($this->current_group_text!='TAF') {\n $this->wxInfo['CODE_ERROR'] =$this->current_group_text;\n }\n $this->current_ptr++;\n }\n else {\n $this->current_ptr++;\n }\n } else {\n $this->current_group++;\n }\n }",
"function handleError($error_level,$error_message,$error_file,$error_line,$error_context)\n{\n}",
"abstract public function getMsgError();",
"function crit_error($error) { }",
"protected function error($message) { \n\t\t$this->error_found = true; \n\t\t$this->error_message = $message; \n\t}",
"public function error() \n\t{\n\t\trequire $this->view('error', 'error');\n\t\texit;\n\t}",
"private function handle_error($err) {\n $this->error .= $err . \"rn\";\n }",
"function error() {\n $this->escribirHeader(\"Error de Permisos\");\n }",
"protected function check_errors()\n {\n if (true === $this->error_flag) {\n throw new \\Exception($this->get_error( true ));\n }\n }",
"function PopError()\n {\n }",
"public function error()\n {\n require_once('views/pages/error.php');\n }",
"function OnAfterError(){\n }",
"public function handle_error() {\n $last_operation = $this->add_last_operation;\n $data = array(\n 'function_name' => is_array($last_operation[0]) ? $last_operation[0][1] : $last_operation[0],\n 'function_name_complete' => is_array($last_operation[0]) ? (is_string($last_operation[0][0]) ? $last_operation[0][0].':' : get_class($last_operation[0][0]).'->').$last_operation[0][1] : $last_operation[0],\n 'args' => $last_operation[1]\n );\n\n switch (strtolower($data['function_name'])) {\n case 'autoexecute':\n $data['table'] = $data['args'][0];\n $data['fields'] = $data['args'][1];\n $data['operation'] = $data['args'][2];\n break;\n }\n\n $data['debug'] = $last_operation;\n if (class_exists('e_database'))\n throw new e_database($this->adodb->ErrorMsg(),$data,$this->adodb->ErrorNo());\n else\n throw new Exception($this->adodb->ErrorMsg(),$this->adodb->ErrorNo());\n }",
"function set_error() \n {\n $this->error_state = FORMEX_FIELD_ERROR;\n }",
"function dummyErrorFunc() { }",
"public function display_error($msg){\n \n }",
"public function has_errors()\n {\n }",
"public function Access_error ()\n\t\t{\n\t\t\t$errMsg[0]['error'] = \"Invalid URL!\";\n\t\t\treturn json_encode ($errMsg);\n\t\t}",
"function rest_error_handler($errno, $errstr, $errfile, $errline)\r\n{\r\n\t$message = 'Unhandled php error';\r\n\t$debug = '';\r\n\tglobal $CI;\r\n\tif (DEBUG_MODE) {\r\n\t\t$debug = $errstr . \" @ $errfile @ $errline\";\r\n\t\t$CI->rest_show_error ( 'php-' . $errno, $message . \"\\n<br/>\" . $debug, TRUE );\r\n\t} else {\r\n\t\t$CI->rest_show_error ( 'php-' . $errno );\r\n\t}\r\n\treturn FALSE;\r\n}",
"function customError($errno, $errstr)\n {\n $_SESSION['err_msg'] = \"<b>Error:</b> [$errno] $errstr<br />\"; \n header(\"location: ../_php_fail.php\");\n die();\n }",
"function ReturnServerError()\n{\n header('HTTP/1.1 500 Internal Server Error');\n die(\"A server error occured while saving your request.\\r\\nPlease check our API status page at http://status.prybar.io and try again later\");\n}",
"public function errorMessage()\n {\n }",
"function get_site_error($error_code){\n \nswitch ($error_code) {\n case 3001:\n return array(\n 'code' => '3001',\n 'error' => 'Either invalid email or email is not exists'\n );\n break;\n case 3002:\n return array(\n 'code' => '3002',\n 'error' => 'invalid user id'\n );\n break;\n case 3003:\n return array(\n 'code' => '3003',\n 'error' => 'Unauthorized access'\n );\n break;\n case 3004:\n return array(\n 'code' => '3004',\n 'error' => 'Invalid parameter for rating'\n );\n break;\n case 3005:\n return array(\n 'code' => '3005',\n 'error' => 'Invalid parameter for profile update'\n );\n break;\n case 3006:\n return array(\n 'code' => '3006',\n 'error' => 'Member is not belong to you team'\n );\n break;\n case 3007:\n return array(\n 'code' => '3007',\n 'error' => 'Invalid parameter for profile create'\n );\n break;\n case 3008:\n return array(\n 'code' => '3004',\n 'error' => 'Invalid parameter for Feedback'\n );\n break;\n case \"blue\":\n echo \"Your favorite color is blue!\";\n break;\n case \"green\":\n echo \"Your favorite color is green!\";\n break;\n default:\n return array(\n 'code' => '0000',\n 'error' => 'Unhandled error'\n );\n}\n \n}",
"function mapit_get_error($e) {\n if (!rabx_is_error($e))\n return FALSE;\n else\n return $e->text;\n}",
"public function error($str);",
"protected function error()\n {\n $this->response = $this->response->withStatus(500);\n $this->jsonBody([\n 'input' => $this->payload->getInput(),\n 'error' => $this->payload->getOutput(),\n ]);\n }",
"public function isError();",
"function GetError() \r\n{ \r\n$theerror = $this->LastError; \r\n$this->ClearError(); \r\nreturn $theerror; \r\n}"
] | [
"0.79670906",
"0.7753735",
"0.7639012",
"0.76136994",
"0.7454539",
"0.7454539",
"0.7416603",
"0.7387676",
"0.73699504",
"0.7359919",
"0.7253208",
"0.7253208",
"0.7182369",
"0.7137784",
"0.7137784",
"0.7038775",
"0.6983436",
"0.6983436",
"0.69378275",
"0.6929966",
"0.691864",
"0.6867551",
"0.6867551",
"0.6844891",
"0.681492",
"0.68072164",
"0.6801658",
"0.6801239",
"0.6779838",
"0.67700166",
"0.67700166",
"0.6747079",
"0.6746942",
"0.6744866",
"0.6725857",
"0.67160755",
"0.67107147",
"0.6710593",
"0.67040396",
"0.66969615",
"0.6691048",
"0.66838825",
"0.6682234",
"0.6682234",
"0.6682234",
"0.6660125",
"0.66180646",
"0.6614277",
"0.66124296",
"0.6611836",
"0.6606644",
"0.6606644",
"0.65812594",
"0.6576566",
"0.6565169",
"0.6561975",
"0.6561975",
"0.6553852",
"0.65506774",
"0.6548261",
"0.6543732",
"0.6522589",
"0.6518664",
"0.65049136",
"0.6503473",
"0.6500905",
"0.6497938",
"0.6491762",
"0.6491483",
"0.6482798",
"0.64793926",
"0.6471039",
"0.6469984",
"0.64691985",
"0.64560217",
"0.64531684",
"0.6449206",
"0.64441234",
"0.64392054",
"0.6427192",
"0.64215124",
"0.6413814",
"0.64070237",
"0.639985",
"0.63994205",
"0.6392625",
"0.63915485",
"0.63914245",
"0.63913363",
"0.6384184",
"0.63798994",
"0.6376981",
"0.6373158",
"0.6372737",
"0.63625526",
"0.6354354",
"0.6349768",
"0.63477564",
"0.633404",
"0.6333623",
"0.6322843"
] | 0.0 | -1 |
Specifies the access control rules. This method is used by the 'accessControl' filter. | public function accessRules()
{
return array(
array('allow',
'actions'=>array('index','view','create','update', 'delete', 'changeposition'),
'roles'=>array(
User::ROLE_ADMIN,
User::ROLE_SENIORMODERATOR,
User::ROLE_POWERADMIN
),
),
array('deny', // deny all users
'users'=>array('*'),
),
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow admins only\n\t\t\t\t'users'=>Yii::app()->getModule('user')->getAdmins(),\n\t\t\t),\n\t\t\tarray('allow',\n\t\t\t\t\t\t/*'users' => array(\"?\"),*/\n 'expression' => array($this,'isLogedInOrHasKey'),\n ),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n array('allow',\n 'actions'=>array('login','error','logout'),\n 'users'=>array('*'),\n ),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('index','delivery','settings'),\n\t\t\t\t'users'=>array('@'),\n 'expression'=>'AdmAccess::model()->accessAdmin()'\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('create','update','index','delete', 'setIsShow', 'setIsAvailable', 'setIsNew'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('allotMore','allotOne'),\n\t\t\t\t'expression'=>array('PlaneAllotController','allowReadWrite'),\n\t\t\t),\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('index'),\n\t\t\t\t'expression'=>array('PlaneAllotController','allowReadOnly'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n {\n return array(\n array('allow',\n 'actions'=>array('list','show','captcha','PostedInMonth','PostedOnDate', 'search'),\n 'users'=>array('*'),\n ),\n array('allow',\n 'actions'=>array('ajaxBookmark','create'),\n 'users'=>array('@'),\n ),\n array('allow',\n 'expression'=>'Yii::app()->user->status=='.User::STATUS_ADMIN.\n '||Yii::app()->user->status=='.User::STATUS_WRITER,\n ),\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n array('allow',\n 'actions'=>array('index','delete','create', 'update','view'),\n 'expression'=>'($user->rule===\"admin\")'\n ),\n\t\t\tarray('deny',\n 'users'=>array('*'),\n ),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n array('allow',\n 'actions'=>array('index','delete','create', 'update','view'),\n 'expression'=>'($user->rule===\"admin\")'\n ),\n\t\t\tarray('deny',\n 'users'=>array('*'),\n ),\n\t\t);\n\t}",
"public function accessRules()\n {\n return array(\n array('allow',\n 'expression' => 'Yii::app()->user->isAdmin()',\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n {\n return array(\n array('allow',\n 'expression' => 'Yii::app()->user->isAdmin()',\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules() {\n return array(\n array(\n 'allow',\n 'actions' => array('index', 'archive', 'view', 'read', 'userListResults'),\n 'users' => array('@')\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('create','admin', 'update'),\n 'expression' => 'Yii::app()->user->isAdmin()',\n ),\n array(\n 'deny', // deny all users\n 'users' => array('*')\n )\n );\n }",
"public function accessRules() {\n return array(\n array('allow',\n 'expression' => 'Yii::app()->user->isAdmin()',\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'update' and 'dynamicUpdate' actions\n\t\t\t\t'actions'=>array('update', 'dynamicUpdate'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'delete' actions\n\t\t\t\t'actions'=>array('create','delete'),\n\t\t\t\t'expression'=>'Yii::app()->user->isManager()',\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n Yii::app()->user->loginUrl = array(\"/cruge/ui/login\");\n\t\treturn array(\n\t\t\t\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('ajaxCopia','editaTemp','index','view','admin','revisaPendientes', 'create','update','admin','motMuestraPlan','checkPlanMot'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\t\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('deny', // deny not login users\n\t\t\t\t'users'=>array('?'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow',\n 'actions'=>array('admin','view'),\n 'roles'=>array('reader', 'writer')\n ),\n array('allow',\n\t\t\t\t'actions'=>array('create', 'update', 'delete'),\n 'roles'=>array('writer')\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow admin \n\t\t\t\t'actions' => array('customize'),\n\t\t\t\t'users' => array('@'),\n\t\t\t\t'expression' => '$user->isAdmin',\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users' => array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules() {\n return array(\n array(\n 'deny',\n 'actions' => array('oauthadmin'),\n ),\n );\n }",
"public function accessRules() {\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t\t'actions'=>array('index','view'),\n\t\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t\t'actions'=>array('admin','update','create'), //adapted from code.google.com/p/yii-user/wiki/API\n\t\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t\t'actions'=>array('admin','delete'),\n\t\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n {\n return array(\n array('allow', \n 'actions'=>array('del','parse','authorize','operate'),\n 'users'=>array('@'),\n ),\n array('deny', \n 'users'=>array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user\n\t\t\t\t'roles'=>array('arckanto-admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\t return array(\n array('allow',\n 'actions'=>array(),\n 'roles'=>array('admin'),\n ),\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n\t}",
"public function accessRules() {\n return array(\n array('allow', // allow authenticated users to access all actions\n 'users' => array(Yii::app()->user->name),\n ),\n array('deny'),\n );\n }",
"public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\t\t\tarray('allow', \r\n\t\t\t\t'actions'=>array(\r\n 'admin',\r\n\r\n //Users\r\n\r\n 'users',\r\n 'checkstatus',\r\n 'activate',\r\n\r\n //Drivers\r\n 'drivers',\r\n 'loaddriverform',\r\n 'validatedriver',\r\n 'driverstatus',\r\n 'savedriverstatus',\r\n\r\n //Cars\r\n 'cars',\r\n 'loadcarform',\r\n 'validatecar',\r\n 'carstatus',\r\n 'savecarstatus',\r\n 'repairlogform',\r\n 'saverepairlog',\r\n ),\r\n\t\t\t\t'roles'=>array('rxAdmin'),\r\n\t\t\t),\r\n\r\n\t\t\tarray('deny', \r\n\t\t\t\t'actions'=>array(\r\n 'admin',\r\n 'users',\r\n 'checkstatus',\r\n 'activate',\r\n 'drivers',\r\n 'loaddriverform',\r\n 'validatedriver',\r\n 'driverstatus',\r\n 'savedriverstatus',\r\n 'cars',\r\n 'loadcarform',\r\n 'validatecar',\r\n 'carstatus',\r\n 'savecarstatus',\r\n 'repairlogform',\r\n 'saverepairlog',\r\n ),\r\n\t\t\t\t'roles'=>array('rxClient'),\r\n\t\t\t),\r\n \r\n array('allow', \r\n\t\t\t\t'actions'=>array(\r\n ),\r\n\t\t\t\t'roles'=>array('rxClient'),\r\n\t\t\t),\r\n\t\t\t\r\n\t\t\tarray('deny', // deny all other users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t\t\r\n\t\t);\r\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t 'actions'=>array('global', 'backup'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t\t'expression'=>'Yii::app()->user->isAdmin'\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\r\n\t\t\t\t'actions'=>array(''),\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\r\n\t\t\t\t'actions'=>array('index', 'selanno'),\r\n\t\t\t\t'users'=>array('@'),\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\r\n\t\t\t\t'actions'=>array('admin'),\r\n\t\t\t\t'users'=>array('admin'),\r\n\t\t\t),\r\n\t\t\tarray('deny', // deny all users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t);\r\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view','changeToStudent','update','create'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t\t'expression' => 'Yii::app()->user->isAdmin()',\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules() {\n return array(\n array('allow',\n 'actions' => array(\n 'popup',\n 'gridView',\n 'excel',\n ),\n 'roles' => array('admin', 'super_admin', 'operations_admin', 'limited_admin')\n ),\n array('allow',\n 'actions' => array(\n 'updateStatus',\n 'list',\n 'update',\n 'delete',\n 'count',\n 'excelSummary',\n ),\n 'users' => array('@')\n ),\n array('deny',\n 'users' => array('*')\n )\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'expression'=>'helpers::isadmin()',\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view','admin'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update'),\n//\t\t\t\t'users'=>array('@'),\n 'expression'=>'yii::app()->admin->isWAdmin()'\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('delete'),\n//\t\t\t\t'users'=>array('admin'),\n 'expression'=>'yii::app()->admin->isWDAdmin()'\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n {\n return array(\n array('allow',\n 'actions' => array('view', 'updateAttribute', 'createContact', 'deleteContact'),\n 'users' => array('@'),\n ),\n/* array('allow',\n 'actions' => array('create', 'update', 'index', 'admin', 'delete'),\n 'roles' => array('ApplicationAdministrator'),\n ),*/\n array('deny',\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array( \n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n );\n\t}",
"public function accessRules()\n {\n return array(\n array('allow',\n 'actions'=>array('form','save'),\n 'expression'=>array('OrderAccController','allowReadOnly'),\n ),\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n//\t\t\tarray('allow', allow admin user to perform 'admin' and 'delete' actions\n//\t\t\t\t'actions'=>array('admin','delete','upload'),\n//\t\t\t\t'users'=>array('admin'),\n//\t\t\t),\n// array('allow',\n// 'actions'=>array('download'),\n// 'users'=>'@',\n// ),\n//\t\t\tarray('deny', deny all users\n//\t\t\t\t'users'=>array('*'),\n//\t\t\t),\n\t\t);\n\t}",
"public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'create'\n 'actions' => array('create'),\n 'users' => array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('update', 'view', 'index'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete', 'createtechnician'),\n 'expression' => 'Yii::app()->user->checkAccess(\\'manager\\')'\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('admin', 'view', 'update','response','exportPdf','viewPdf','uploadPdf','agreementPdf','viewAgreement','generalDataEntry','financeDataEntry','externalForm','prospect','create','delete'),\n\t\t\t\t'roles'=>array('admin', 'commercial', 'commercial_manager', 'media_manager','finance','affiliates_manager', 'media_buyer_admin','account_manager_admin','operation_manager'),\n\t\t\t),\n\t\t\tarray('allow',\n\t\t\t\t'actions'=>array('financeDataEntry','generalDataEntry'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\t// array('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t// \t'actions'=>array('create','update'),\n\t\t\t// \t'users'=>array('@'),\n\t\t\t// ),\n\t\t\t// array('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t// \t'actions'=>array('admin','delete'),\n\t\t\t// \t'users'=>array('admin'),\n\t\t\t// ),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n {\n return array(\n array('allow',\n 'actions' => array(\n \t'login', 'registration', 'captcha', \n \t'verify', 'forget'\n ),\n 'users' => array('*'),// для всех\n ),\n array('allow',\n 'actions' => array(\n \t'index', 'range', 'logout', \n \t'file', 'commercial', 'data', \n \t'view', 'payRequest', 'offers',\n 'onOffer', 'offOffer', 'changeOffer', 'change',\n ),\n 'roles' => array('user'),// для авторизованных\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules() {\n return array(\n array('allow',\n 'actions' => array('bind', 'merge', 'index'),\n 'users' => array('@'),\n ),\n array('allow',\n 'actions' => array('list'),\n 'expression' => array(__CLASS__, 'allowListOwnAccessRule'),\n 'users' => array('@'),\n ),\n array('allow',\n 'actions' => array('delete', 'edit'),\n 'expression' => array(__CLASS__, 'allowModifyOwnAccessRule'),\n ),\n array('allow',\n 'actions' => array('list', 'delete', 'index', 'edit'),\n 'roles' => array('admin'),\n 'users' => array('@'),\n ),\n array('deny',\n 'actions' => array('bind', 'delete', 'index', 'list', 'merge'),\n ),\n );\n }",
"public function accessRules() {\n\t\treturn array();\n\t}",
"public function accessRules()\n {\n return array(\n array('allow', // @代表有角色的\n 'actions'=>array('view','change','see'),\n 'users'=>array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions'=>array('create','see','update','delete'),\n 'expression'=>'$user->getState(\"info\")->authority >= 1',//,array($this,\"isSuperUser\"),\n ),\n array('deny', // *代表所有的用户\n 'users'=>array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow admin user to perform 'create', 'update', 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete'),\n\t\t\t\t'users'=>Yii::app()->user->getAdmins(),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n {\n \treturn array (\n \t\t\tarray (\n \t\t\t\t\t'allow',\n \t\t\t\t\t//'actions' => array ('*'),\n \t\t\t\t\t'roles' => array ('admin')\n \t\t\t),\n \t\t\tarray (\n \t\t\t\t\t'deny', // deny all users\n \t\t\t\t\t'users' => array ('*')\n \t\t\t)\n \t);\n }",
"public function accessRules()\n {\n return array(\n array('deny',\n 'actions'=>array('login', 'register'),\n 'users'=>array('@'),\n ),\n array('deny',\n 'actions'=>array('customer', 'history', 'historyItem'),\n 'users'=>array('?'),\n ),\n array('allow',\n 'users'=>array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\n $admins = CatNivelAcceso::getAdmins();\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('view','create','update','delete','getDetalle','exportToPdf','exportarExcel',\n 'index','autocompleteCatPuesto'),\n\t\t\t\t'users'=>array('@')\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*')\n\t\t\t)\n\t\t);\n\t}",
"public function accessRules()\n {\n return array(\n array( 'allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array( 'index', 'view' ),\n 'users' => array( '*' ),\n ),\n array( 'allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array( 'create', 'update', \n Helper::CONST_updateaccountsurcharge,\n Helper::CONST_updateaccountordersamount,\n Helper::CONST_invoicepdf,\n Helper::CONST_ae_loadPartyOrdersOrTasks,\n Helper::CONST_ae_loadParties,\n ),\n 'users' => array( '@' ),\n ),\n array( 'allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array( 'admin', 'delete' ),\n 'users' => array( 'admin' ),\n ),\n array( 'deny', // deny all users\n 'users' => array( '*' ),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // admins only\n 'actions' => array('index', 'job', 'client', 'details', 'view'),\n 'users' => array('admin')\n ),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view', 'manageMissionsCarers', 'delete', 'updateStatuses', 'carerMissionsAll', 'setCarerSelected',\n 'missionCarersApplied', 'missionsNoCarerApplied', 'missionsNoCarerSelected', 'viewMission', 'missionsCarerNotConfirmed', 'missionsCarerAssigned',\n 'changeCarerSelected', 'updateMissionStatuses', 'updateDiscarded', 'deleteSelected', 'updateMissionStatuses2', 'missionsCarerAssignedNotStarted',\n 'createApplyRelation', 'cancelByAdmin', 'setCarerAssigned'),\n 'users' => array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'update'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete'),\n 'users' => array('admin'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n {\n return array(\n array('allow',\n 'actions'=>array('audit','edit','delete','save','finish','orderGoodsDelete','validateAjax'),\n 'expression'=>array('OrderController','allowReadWrite'),\n ),\n array('allow',\n 'actions'=>array('index','view'),\n 'expression'=>array('OrderController','allowReadOnly'),\n ),\n array('allow',\n 'actions'=>array('activity','new','save','audit','delete','orderGoodsDelete','validateAjax'),\n 'expression'=>array('OrderController','addReadWrite'),\n ),\n/* array('allow',\n 'actions'=>array('index','view'),\n 'expression'=>array('OrderController','addReadOnly'),\n ),*/\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user\n\t\t\t\t'actions'=>array('preview', 'view', 'update', 'delete', 'upload', 'download', 'rate', 'report', 'review', 'updateCourses'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n {\n return array(\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('banbandynamic', 'banbanactivity','banbannews','dynamicdetail'),\n 'users' => array('*'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array(),\n 'users' => array('@'),\n //'expression'=>array($this,'loginAndNotDeleted'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('new','edit','delete','save','submit','request','cancel','fileupload','fileremove'),\n\t\t\t\t'expression'=>array('PayreqController','allowReadWrite'),\n\t\t\t),\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('index','view','check','filedownload','void','listtax','Listfile'),\n\t\t\t\t'expression'=>array('PayreqController','allowReadOnly'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n {\n return array(\n array('allow',\n 'actions'=>array('new','edit','save','test'),\n 'expression'=>array('EmployeeController','allowReadWrite'),\n ),\n array('allow',\n 'actions'=>array('index','view'),\n 'expression'=>array('EmployeeController','allowReadOnly'),\n ),\n array('allow',\n 'actions'=>array('FileDownload','DownAgreement','DownOnlyContract','Downfile','Generate'),\n 'expression'=>array('EmployeeController','allowWrite'),\n ),\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n }",
"public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view', 'searchList', 'Approvalstatus', 'Allprojects', 'fetchSubProjectIdAndHours', 'checkHoursAndBudget'),\n 'users' => array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'update', 'fetchSubProjectIdAndHours', 'checkHoursAndBudget'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete'),\n//\t\t\t\t'users'=>array('admin'),\n 'users' => array('@'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\t return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view'),\n 'expression' => 'Yii::app()->user->isAdmin()',\n ),\n array('deny', // deny all users\n 'expression' => '!Yii::app()->user->isAdmin()',\n ),\n );\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','test','view','renderButtons','update'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('getBatch','create','StudentAdministration','getAdmission'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete',),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view'),\n 'users' => array('@'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'update', 'details', 'IL', 'lookup'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete', 'noProspect', 'noProspectHistory'),\n 'users' => array('@'),\n ),\n array('deny', // deny all users\n 'users' => array('@'),\n ),\n );\n }",
"public function accessRules() {\n return array(\n array('allow',\n 'actions' => array('morecomments', 'approve', 'dashboard', 'create', 'list', 'update', 'delete', 'deleteall', 'index', 'view', 'replay', 'message.msg'),\n 'expression' => '$user->isAdministrator()',\n ),\n array('deny',\n 'users' => array('*'),\n )\n// array('allow', // allow all users to perform 'index' and 'view' actions\n// 'actions' => array('index', 'view'),\n// 'users' => array('*'),\n// ),\n// array('allow', // allow authenticated user to perform 'create' and 'update' actions\n// 'actions' => array('create', 'update'),\n// 'users' => array('@'),\n// ),\n// array('allow', // allow dashboard user to perform 'dashboard' and 'delete' actions\n// 'actions' => array('dashboard', 'delete'),\n// 'users' => array('dashboard'),\n// ),\n// array('deny', // deny all users\n// 'users' => array('*'),\n// ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view','lista_materia','lista_actas_materia','reporte_acta','historico','listarhistoricomatria','generarpensum'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update','lista_materia','lista_actas_materia', 'reporte_acta', 'hisotrico','listarhistoricomatria', 'generarpensum'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n {\n return array(\n array('allow',\n 'actions'=>array('index', 'getcompanyinfo', 'getfiltereduserstoapprovelist', 'approveusers',\n 'getfilteredclientslist', 'getclientuserslist', 'changeclientadmins', 'getfiltereduserslist',\n 'assignusertoclient', 'getclientuserslistapprvalue', 'updateusersapprovalvalues', 'getfiltereduserstoactivelist',\n 'setactiveusers', 'finduserbylogin', 'getfiltereddocumentslist', 'reassigndocumentsclients', 'getdocumentfile',\n 'getuserfile', 'getfiltereduserstotypelist', 'settypeusers', 'getclientsprojectslist', 'getuserclientprojects',\n 'getfilteredemptycompanieslist', 'getemptycompanyinfo', 'generateletter', 'checkuserapprovalvalue',\n 'getimageviewblock', 'getusertypeinfo', 'getclientactiveinfo', 'getfilteredclientstoactivelist', 'setactiveclients',\n 'updateservicelevelsettings', 'getcompanyservicelevelsettings', 'getservicelevelsettings', 'updatecompanyservicelevel',\n 'addcompanypayment','ManageExistingUsersList'\n ),\n 'users'=>array('admin', 'db_admin'),\n ),\n array('deny',\n 'users'=>array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\n\t\treturn array(\n\t\t\tarray('allow', /// allow authenticated user to perform this: index,update,create,delete,errer,content\n\t\t\t\t'actions'=>array('index','update','create','delete','error','content'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', /// allow authenticated user to perform this: ua + allupdate\n\t\t\t\t'actions'=>array('index','update','allupdate','create','delete','error','content'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', /// deny all not login users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('manage','delete','view','status','gallery'),\n\t\t\t\t'expression'=>'helpers::isadmin()',\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\r\n\t\t\t\t'actions'=>array('index','view'),\r\n\t\t\t\t'users'=>array('@'),\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\r\n\t\t\t\t'actions'=>array('create','update','createAddDomain','createDeleteDomain','updateDeleteDomain','updateAddDomain','createByDomain','CreateDomain'),\r\n\t\t\t\t'users'=>array('@'),\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\r\n\t\t\t\t'actions'=>array('admin','delete'),\r\n\t\t\t\t// 'users'=>array('admin'),\n\t\t\t\t'roles'=>array('administrator', 'koordynator'),\r\n\t\t\t),\r\n\t\t\tarray('deny', // deny all users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t);\r\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','index','update','createLc'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('delete'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view', 'category'),\n 'users' => array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'update', 'rate', 'print','activate'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete'),\n 'users' => array('admin'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\r\n\t\t\t\t'actions'=>array(Yii::app()->controller->action->id),\r\n\t\t\t\t'users'=>array('@'),\r\n\t\t\t),\r\n\t\t\tarray('deny', // deny all users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t);\r\n\t}",
"public function accessRules() {\n return array(\n /* array('allow', \n 'actions'=>array('*'),\n 'roles'=>array('events'),\n ), */\n array('deny', // deny all users\n 'actions'=>array( 'negotiatingAdd'),\n 'users'=>array('?'),\n ),\n \n array('allow', // deny all users\n 'users'=>array('*'),\n ),\n );\n }",
"public function accessRules() {\n return array(\n array('allow', // allow view user to perform 'view' and 'delete' actions\n 'users' => User::getAdmins(),\n ),\n array('deny', // deny all users\n 'users' => array(\"*\"),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\t\t\t\t\n\t\t\t\tarray('allow', // allow authenticated users to access all actions\n\t\t\t\t\t\t'users'=>array('@'),\n\t\t\t\t),\n\t\t\t\tarray('deny', // deny all users\n\t\t\t\t\t\t'users'=>array('*'),\n\t\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\t\t\tarray('allow', // allow authenticated admins to perform any action\r\n\t\t\t\t'users'=>array('@'),\r\n\t\t\t\t'expression'=>'Yii::app()->user->role>=5'\r\n\t\t\t),\r\n\t\t\tarray('deny', // deny all users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t\t'deniedCallback' => array($this, 'actionError')\r\n\t\t\t),\r\n\t\t);\r\n\t}",
"public function accessRules()\n {\n return array(\n array('allow',\n 'actions' => array('view', 'create', 'update', 'delete', 'index', 'logout','admin', 'upload', 'ajaxUpload', 'editProfile', 'editPassword', 'crop'),\n 'roles' => array('bloger', 'admin'),// для авторизованных\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n {\n return array(\n array('allow',\n 'roles' => array('admin'),\n ),\n array('deny',\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\r\n\t\t\t\t'actions'=>array(''),\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\r\n\t\t\t\t'actions'=>array('Ind1','Ind2','ind3','ind4','ind5','ind6','ind7','ind8','ind9','ind10','ind11','ind12','ind'),\r\n\t\t\t\t'users'=>array('@'),\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\r\n\t\t\t\t'actions'=>array(''),\r\n\t\t\t\t'users'=>array('admin'),\r\n\t\t\t),\r\n\t\t\tarray('deny', // deny all users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t);\r\n\t}",
"public function accessRules()\n {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions'=>array(''),\n 'users'=>array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions'=>array('create','delete','update','lock','index','view','map','locked','index'),\n 'users'=>array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions'=>array('admin','editableSaver','setup'),\n 'users'=>array('admin'),\n ),\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n }",
"public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view'),\n 'users' => array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'update','EnviaEmail','Rank'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete', 'deletar'),\n 'users' => array('admin'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view','admin'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('relaciona','recibevalor','create','update'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\r\n {\r\n return array(\r\n array(\r\n 'allow', // allow authenticated user to perform 'create' and 'update' actions\r\n 'actions' => array(\r\n 'DailyScan',\r\n 'DailyScanByItemNo',\r\n 'DetailScan',\r\n ),\r\n 'users' => array('@'),\r\n ),\r\n array(\r\n 'deny', // deny all users\r\n 'users' => array('*'),\r\n ),\r\n );\r\n }",
"public function accessRules() {\n return array(\n array(\n 'allow',\n 'actions' => array('scientificName'),\n 'users' => array('*'),\n ),\n array('allow',\n 'actions' => array('location', 'person', 'acquisitionSource'),\n 'users' => array('@'),\n ),\n array('deny', // deny all users by default\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'roles'=>Yii::app()->getModule('d_export')->accessPermissionRoles,\n ),\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'users'=>Yii::app()->getModule('d_export')->accessPermissionUsers,\n ),\n\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n }",
"public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view',),\n 'users' => array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'update', 'recherche', 'profile', 'base', 'list', 'test','toggle'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete'),\n 'users' => array('admin'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view'),\n 'users' => array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'update', 'adjunto', 'admin'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete'),\n 'users' => array('admin'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow',\n\t\t\t\t'actions' => array('index', 'worldMap', 'ownIslands', 'research', 'highscore', 'enterWorld', 'playWorld'),\n\t\t\t\t'users' => array('@'),\n\t\t\t),\n\t\t\tarray('deny',\n\t\t\t\t'users' => array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view','setHitterBase','setBatterBase','stats','getBasesEvent'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update','scorecard','submitBall'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete'),\n\t\t\t\t'roles'=>array('admins'),\n\t\t\t),\n\t\t\t/*array('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),*/\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('create','view','autocomplete'),\n\t\t\t\t'roles'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // Allow superusers to access Rights\n\t\t\t\t'actions'=>array(\n\t\t\t\t\t'permissions',\n\t\t\t\t\t'operations',\n\t\t\t\t\t'tasks',\n\t\t\t\t\t'roles',\n\t\t\t\t\t'generate',\n\t\t\t\t\t'create',\n\t\t\t\t\t'update',\n\t\t\t\t\t'delete',\n\t\t\t\t\t'removeChild',\n\t\t\t\t\t'assign',\n\t\t\t\t\t'revoke',\n\t\t\t\t\t'sortable',\n\t\t\t\t),\n\t\t\t\t'users'=>$this->_authorizer->getSuperusers(),\n\t\t\t),\n\t\t\tarray('deny', // Deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index', 'error', 'login', 'logout'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update', 'resultsload', 'instrumentsresultsload', 'overviewload', 'details', 'admin', 'repview', 'filteredrepview', 'pdf' ),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t//'actions'=>array('admin','delete'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules() {\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('index','view','getWorkflow','getStageDetails','updateStageDetails','startStage','completeStage','revertStage','getStageMembers','getStages'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','create','update','delete'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'roles' => array(\n\t\t\t\t\tUser::ROLE_ADMIN,\n\t\t\t\t\tUser::ROLE_POWERADMIN,\n\t\t\t\t\tUser::ROLE_SEO,\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view', 'getinvoicedata', 'paynow', 'print'),\n 'users' => array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('create', 'update'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array('admin', 'delete'),\n 'users' => array('admin'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view','votar'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\t/*array('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update','admin','delete'),\n\t\t\t\t'users'=>array(Yii::app()->getModule('user')->user()->username),\n\t\t\t),*/\n\t\t\t/*array('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array(),\n\t\t\t\t'users'=>array(Yii::app()->getModule('user')->user()->username),\n\t\t\t),*/\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t return array(\n\t\t array('allow', // allow all users to perform 'index' and 'view' actions\n\t\t 'actions'=>array('Update_hecho','index','procesa_renap','explota_renap','Save_denunciante','Save_Ubicacion','ProcesaHechos','Save_hechos','Mostrar_hechos','Eliminar_hecho','Save_Relato','Show_Resumen'),\n\t\t 'users'=>array('oficinista','root','developer','supervisor_comisaria'),\n\t\t ),\n\t\t array('allow', // allow all users to perform 'index' and 'view' actions\n\t\t 'actions'=>array('pruebas','resumen','relato','hechos','mapa','persona'),\n\t\t 'users'=>array('developer'),\n\t\t ),\n\t\t array('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t 'actions'=>array('selector'),\n\t\t 'users'=>array('@'),\n\t\t ),\n\t\t\n\t\t array('deny', // deny all users\n\t\t 'users'=>array('*'),\n\t\t ),\n\t );\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array(/* 'index','view', 'report'*/'index'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array(/* 'create','update' */),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array(/* 'admin','delete' */),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('index','view','create','update','admin','delete','adminAssignment','reset'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t\t'roles'=>array('admin'),\n\t\t\t),\n array('allow',\n 'actions'=>array('password','profile'),\n 'users'=>array('@')\n ),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update','principal','administrador','colaborador','consultor','visitante','verChat'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete'),\n\t\t\t\t'users'=>Yii::app()->getModule('user')->getAdministradores(),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view','changeStatus','report'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update','changeStatus','report'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete','changeStatus'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\r\n\t{\r\n\t\treturn array(\r\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\r\n\t\t\t\t'actions'=>array('autocomplete'),\r\n\t\t\t\t'users'=>array(\"*\"),\r\n\t\t\t),\r\n\r\n\t\t\tarray('deny', // deny all users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t);\r\n\t}",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update','imprime','reporte1','reporte2','reporte3','admin','delete'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules()\n {\n return array(\n array('allow',\n 'actions' => array('index', 'myEvents', 'detail', 'subscribe', 'unsubscribe', 'subscribers', 'invites', 'add', 'edit', 'saveImage', 'delete', 'calendar', 'map', 'comments', 'addComment', 'gallery', 'getAlbum', 'addAlbum', 'renameAlbum', 'deleteAlbum', 'addImage', 'deleteImage', 'downloadImage', 'addImageToAlbum', 'removeImageFromAlbum', 'comingEvents', 'pastEvents'),\n 'roles' => array('user'),\n ),\n array('allow',\n 'actions' => array('share'),\n 'users' => array('*'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules()\n {\n return array(\n array('allow', // allow all users to perform 'error' and 'contact' actions\n 'actions'=>array('error'),\n 'users'=>array('*'),\n ),\n array('allow', // allow only authenticated users to perform 'index' actions\n 'actions'=>array('index', 'areaTree', 'areaTreeData', 'getAttributes', 'getForm', 'update', 'import'),\n 'expression'=>'!Yii::app()->user->isGuest && (Yii::app()->user->isAdmin() || Yii::app()->user->isSuperUser())',\n ),\n array('deny', // deny all users\n 'users'=>array('*'),\n ),\n );\n }",
"public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\n\t\t\t\t'actions'=>array('index','view','pronostico','actRecargas'),\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\n\t\t\t\t'actions'=>array('create','update'),\n\t\t\t\t'users'=>array('@'),\n\t\t\t),\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\n\t\t\t\t'actions'=>array('admin','delete'),\n\t\t\t\t'users'=>array('admin'),\n\t\t\t),\n\t\t\tarray('deny', // deny all users\n\t\t\t\t'users'=>array('*'),\n\t\t\t),\n\t\t);\n\t}",
"public function accessRules() {\n return array(\n array('allow', // allow all users to perform 'index' and 'view' actions\n 'actions' => array('index', 'view', 'category'),\n 'users' => array('*'),\n ),\n array('allow', // allow authenticated user to perform 'create' and 'update' actions\n 'actions' => array('new', 'update'),\n 'users' => array('@'),\n ),\n array('allow', // allow admin user to perform 'admin' and 'delete' actions\n 'actions' => array(''),\n 'users' => array('admin'),\n ),\n array('deny', // deny all users\n 'users' => array('*'),\n ),\n );\n }",
"public function accessRules() \r\n\t{\r\n\t\treturn array(\r\n\t\t\tarray('allow', // allow all users to perform 'index' and 'view' actions\r\n\t\t\t\t'actions'=>array('index'),\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\r\n\t\t\t\t'actions'=>array('suggest'),\r\n\t\t\t\t'users'=>array('@'),\r\n\t\t\t\t'expression'=>'isset(Yii::app()->user->level)',\r\n\t\t\t\t//'expression'=>'isset(Yii::app()->user->level) && (Yii::app()->user->level != 1)',\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow authenticated user to perform 'create' and 'update' actions\r\n\t\t\t\t'actions'=>array('manage','add','delete','status'),\r\n\t\t\t\t'users'=>array('@'),\r\n\t\t\t\t'expression'=>'isset(Yii::app()->user->level) && in_array(Yii::app()->user->level, array(1,2))',\r\n\t\t\t),\r\n\t\t\tarray('allow', // allow admin user to perform 'admin' and 'delete' actions\r\n\t\t\t\t'actions'=>array(),\r\n\t\t\t\t'users'=>array('admin'),\r\n\t\t\t),\r\n\t\t\tarray('deny', // deny all users\r\n\t\t\t\t'users'=>array('*'),\r\n\t\t\t),\r\n\t\t);\r\n\t}"
] | [
"0.7228763",
"0.7199851",
"0.70905805",
"0.7083254",
"0.7078831",
"0.7078758",
"0.7078758",
"0.7071383",
"0.7071383",
"0.70645475",
"0.70633864",
"0.70073724",
"0.7003613",
"0.70006496",
"0.6997435",
"0.698881",
"0.69828933",
"0.6975965",
"0.6973628",
"0.6971721",
"0.6969118",
"0.69682443",
"0.69656295",
"0.6958319",
"0.69555074",
"0.6953717",
"0.69481105",
"0.6941781",
"0.6935866",
"0.6933203",
"0.69313914",
"0.69309664",
"0.69288826",
"0.6928292",
"0.69239074",
"0.6923314",
"0.69231474",
"0.6922118",
"0.6920906",
"0.69165194",
"0.6909425",
"0.69062144",
"0.6904068",
"0.6903091",
"0.6898845",
"0.6892586",
"0.6891618",
"0.68899095",
"0.6886707",
"0.688601",
"0.688147",
"0.6880977",
"0.6879312",
"0.68793005",
"0.6875101",
"0.6868632",
"0.68651056",
"0.68594044",
"0.68585354",
"0.68567634",
"0.6856665",
"0.6852904",
"0.68494564",
"0.68475974",
"0.6844904",
"0.68448156",
"0.6844316",
"0.6842479",
"0.68357974",
"0.6835573",
"0.68346846",
"0.68340164",
"0.68323034",
"0.6824216",
"0.6822136",
"0.6818642",
"0.681848",
"0.68184257",
"0.6817723",
"0.6815226",
"0.68136406",
"0.68103886",
"0.6809766",
"0.68083704",
"0.68031543",
"0.6802247",
"0.67991245",
"0.6798179",
"0.67946714",
"0.6790232",
"0.67885536",
"0.6788438",
"0.6786919",
"0.6786548",
"0.6785128",
"0.6784468",
"0.678403",
"0.67839247",
"0.67831194",
"0.6782517",
"0.67789865"
] | 0.0 | -1 |
Displays a particular model. | public function actionView($id)
{
$this->render('view',array(
'model'=>$this->loadModel($id),
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionView() {\n $this->render('view', array(\n 'model' => $this->loadModel(),\n ));\n }",
"public function actionView()\n {\n $this->render('view', array(\n 'model' => $this->loadModel(),\n ));\n }",
"public function actionView()\n\t{\n\t\t$model = $this->loadModel();\n\t\t$this->render('view',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionView()\n\t{\n\t\tif (!($model = $this->loadModel()))\n\t\t\treturn;\n\t\t$this->render('view',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}",
"public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}",
"public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}",
"public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}",
"public function actionView()\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel(),\n\t\t));\n\t}",
"public function actionView()\n {\n $id=(int)Yii::$app->request->get('id');\n return $this->render('view', [\n 'model' => $this->findModel($id),\n ]);\n }",
"public function actionView($id) {\n\t\t$model = $this->loadModel($id);\n\t\t\n\t\t$this->render('view', array(\n\t\t\t'model'\t\t\t\t\t\t\t\t\t\t\t\t\t\t=> $model,\n\t\t));\n\t}",
"public function actionView()\n {\n $id = Yii::$app->user->id;\n return $this->render('view', [\n 'model' => $this->findModel($id),\n ]);\n }",
"public function actionView($id)\n{\n$this->render('view',array(\n'model'=>$this->loadModel($id),\n));\n}",
"public function actionShow()\r\n\t{\r\n\t\t$this->render('show',array('model'=>$this->loadcontent()));\r\n\t}",
"public function show()\n {\n return $this->model;\n }",
"public function actionView($id) {\n\t\t$this->render('view', array(\n\t\t\t'model' => $this->loadModel($id),\n\t\t));\n\t}",
"public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}",
"public function actionView($id) {\n\t\t$model = $this->loadModel($id);\n\n\t\t$this->render('view',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionView($id) {\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}",
"public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}",
"public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}",
"public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}",
"public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}",
"public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}",
"public function actionView($id)\r\n\t{\r\n\t\t$this->render('view',array(\r\n\t\t\t'model'=>$this->loadModel($id),\r\n\t\t));\r\n\t}",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id) {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }",
"public function actionView($id)\n\t{\n\t\t$this->render ( 'view', array (\n\t\t\t\t'model' => $this->loadModel ( $id )\n\t\t) );\n\t}",
"public function actionView()\r\n {\r\n $this->_userAutehntication();\r\n /*\r\n * Check if id was submitted via GET method \r\n */\r\n if(!isset($_GET['id']))\r\n $this->_sendResponse(500, 'Error: Parameter <b>id</b> is missing' );\r\n\r\n switch($_GET['model'])\r\n {\r\n /* Find respective model */\r\n case 'posts': \r\n $model = Post::model()->findByPk($_GET['id']);\r\n break; \r\n default: \r\n $this->_sendResponse(501, sprintf('Mode <b>view</b> is not implemented for model <b>%s</b>',$_GET['model']) );\r\n exit; \r\n }\r\n if(is_null($model)) {\r\n $this->_sendResponse(404, 'No Post found with id '.$_GET['id']);\r\n } else {\r\n $this->_sendResponse(200, $this->_getEncodedData($_GET['model'], $model->attributes));\r\n }\r\n }",
"public function actionView($id)\r\n {\r\n $this->render('view', array(\r\n 'model' => $this->loadModel($id),\r\n ));\r\n }",
"public function actionView($id)\n\t{ \n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t\t));\n\t}",
"public function actionView($id)\n\t{\n\t\t$this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t\t));\n\t}",
"public function actionView($id)\n {\n return $this->render('view', [\n 'model' => $this->findModel($id),\n //'model' => $this->findModel(Yii::$app->user->id),\n ]);\n }",
"public function actionView($id)\n\t{\n\n\t $this->render('view',array(\n\t\t\t'model'=>$this->loadModel($id),\n\t\t));\n\t}",
"public function actionView($id)\n {\n $this->render('view', [\n 'model' => $this->loadModel($id),\n ]);\n }"
] | [
"0.75535107",
"0.7553186",
"0.7542682",
"0.7540008",
"0.74330246",
"0.74330246",
"0.74330246",
"0.74330246",
"0.74330246",
"0.73394006",
"0.7160726",
"0.71322334",
"0.712746",
"0.70615447",
"0.7022298",
"0.6983485",
"0.69753826",
"0.6958109",
"0.6945592",
"0.69437367",
"0.69437367",
"0.69437367",
"0.69437367",
"0.69437367",
"0.69437367",
"0.69437367",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6918672",
"0.6916909",
"0.6910746",
"0.69090086",
"0.69004697",
"0.688112",
"0.688112",
"0.688112",
"0.6875093",
"0.68739605",
"0.6873016"
] | 0.0 | -1 |
Creates a new model. If creation is successful, the browser will be redirected to the 'view' page. | public function actionCreate()
{
$model=new Vacancies;
// Uncomment the following line if AJAX validation is needed
// $this->performAjaxValidation($model);
if(isset($_POST['Vacancies']))
{
$model->attributes=$_POST['Vacancies'];
if($model->save())
$this->redirect(array('view','id'=>$model->id));
}
$this->render('create',array(
'model'=>$model,
'countVacancies' => Vacancies::model()->count()
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionCreate()\n\t{\n\t\t//\n\t\t// if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n\t\t// try {\n\t\t// $model->save();\n\t\t// Yii::$app->session->setFlash('alert', [\n\t\t// 'body' => Yii::$app->params['create-success'],\n\t\t// 'class' => 'bg-success',\n\t\t// ]);\n\t\t// } catch (\\yii\\db\\Exception $exception) {\n\t\tYii::$app->session->setFlash('alert', [\n\t\t\t'body' => Yii::$app->params['create-danger'],\n\t\t\t'class' => 'bg-danger',\n\t\t]);\n\n\t\t// }\n\t\treturn $this->redirect(['index']);\n\t\t// }\n\n\t\t// return $this->render('create', [\n\t\t// 'model' => $model,\n\t\t// ]);\n\t}",
"public function actionCreate()\n\t{\n\t\t$model = $this->loadModel();\n\n\t\tif(isset($_POST[get_class($model)]))\n\t\t{\n $model = $this->_prepareModel($model);\n if (Yii::app()->getRequest()->isAjaxRequest) {\n if($model->save())\n echo json_encode($model);\n else\n echo json_encode(array('modelName' => get_class($model),'errors' => $model->getErrors()));\n\n Yii::app()->end();\n }\n\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionCreate()\n {\n \t /** @var ActiveRecord $model */\n \t $modelClass = static::modelClass();\n \t $model = new $modelClass();\n\n\t$viewFolder = '/';\n\t$viewName = 'create';\n\t$viewExtension = '.php';\n\t$viewFile = $this->getViewPath().$viewFolder.$viewName.$viewExtension;\n\t$viewPath = file_exists($viewFile) ? '' : $this->getDefaultViewPath(false);\n\t\n\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t$this->processData($model, 'create');\n\t\treturn $this->redirect(['view', 'id' => $model->getPrimaryKey()]);\n\t} else {\n\t\treturn $this->render($viewPath.$viewName, array_merge($this->commonViewData(), [\n\t\t\t'model' => $model,\n\t]));\n\t}\n }",
"public function actionCreate() {\r\n $model = new Fltr();\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }",
"public function actionCreate()\n {\n $model = new Data();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->no]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new RefJkel();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new User();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new User();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new User();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new User();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Test();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function create() {\n\t\t$model = new $this->model_class;\n\t\t$model->status = 3;\n\t\t$model->author_id = Session::get('wildfire_user_cookie');\n\t\t$model->url = time();\n\t\tif(Request::get(\"title\")) $model->title = Request::get(\"title\");\n\t\telse $model->title = \"Enter Your Title Here\";\n\t\t$this->redirect_to(\"/admin/content/edit/\".$model->save()->id.\"/\");\n\t}",
"public function actionCreate() {\n $model = new Foro();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Admin();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $this->setModelByConditions();\n\n if (Yii::$app->request->isPost &&\n $this->model->load(Yii::$app->request->post()) &&\n $this->setAdditionAttributes() &&\n $this->model->save()) {\n\n if ($this->viewCreated) {\n $redirectParams = [\n $this->urlPrefix.'view',\n 'id' => $this->model->getId(),\n ];\n } else {\n $redirectParams = [\n $this->urlPrefix.'index',\n ];\n }\n\n return $this->redirect($redirectParams);\n }\n\n return $this->render('create',\n ArrayHelper::merge(\n [\n 'model' => $this->model,\n ],\n $this->getAdditionFields()\n )\n );\n }",
"public function actionCreate()\n {\n $model = new Crm();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate() {\n $model = new $this->defaultModel;\n\n $isPjax = Yii::$app->request->isPjax;\n if (!$isPjax) {\n $this->performAjaxValidation($model);\n }\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n if ($isPjax) {\n return $this->actionAjaxModalNameList(['selected_id' => $model->id]);\n } else {\n return $this->redirect('index');\n } \n } else {\n if (Yii::$app->request->isAjax) {\n return $this->renderAjax('create', [\n 'model' => $model,\n 'isModal' => true,\n ]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'isModal' => false,\n ]);\n }\n }\n }",
"public function actionCreate()\n {\n $model = new Users();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->uid]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $models = $this->loadModelsByPid();\n\n $this->performAjaxValidationTabular($models);\n\n $success = $this->doAction($models);\n $newPid = current($models)->pid;\n\n if($success)\n {\n if(isset($_POST['apply']))\n {\n $this->redirectAction($newPid);\n }\n $this->redirectAction();\n }\n\n if($success !== null && $newPid)\n {\n $this->redirectAction($newPid);\n }\n\n $this->render($this->view['create'], array(\n 'models' => $models,\n 'model' => reset($models),\n 'languages' => Language::getList(),\n ));\n }",
"public function actionCreate()\n\t{\n\t\t$model = new Post;\n\t\tif ($model->load(Yii::$app->request->post()) && $model->save())\n\t\t{\n\t\t\treturn $this->redirect(['site/index']);\n\t\t}\n\t\t\n\t\techo $this->render('create', array(\n\t\t\t'model' => $model\n\t\t));\n\t}",
"public function actionCreate()\n\n {\n\n $model = new Orders();\n\n\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n\t\t\t\n\n\t\t\tYii::$app->session->setFlash('orders', 'Orders has been added successfully');\n\n return $this->redirect(['view', 'id' => $model->id]);\n\n } else {\n\n return $this->render('create', [\n\n 'model' => $model,\n\n ]);\n\n }\n\n }",
"public function actionCreate()\n {\n $model = new Keep();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new MintaData();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Photo();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n //return $this->redirect(['view', 'id' => $model->id]);\n\t return $this->redirect(['index']);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public\n function actionCreate()\n {\n $model = new Phforum();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $this->isCreateView = true;\n $modelClass = $this->_getModelClass();\n $model = new $modelClass;\n return $this->_renderView($model);\n }",
"public function actionCreate()\n {\n $model = new JetShopDetails();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Orders();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Users();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->redirect([\"site/register\"]);\n /*$this->render('/site/register', [\n 'model' => $model,\n ]);*/\n }\n }",
"public function actionCreate()\n {\n $model = new Major();\n\n if ($model->load(Yii::$app->request->post())) {\n if ($model->save()) {\n $this->success(Yii::t('flash', 'major.save_success'));\n } else {\n $this->error(Yii::t('flash', 'major.save_error'));\n }\n return $this->redirect(['index']);\n } \n return $this->render('create', [\n 'model' => $model,\n ]);\n \n }",
"public function actionCreate()\n {\n $model = new Mylive();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->live_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new House();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Rents();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $this->layout = 'headbar';\n $model = new ContactOne();\n \n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $dataProvider = new ActiveDataProvider([\n 'query' => ContactOne::find(),\n 'pagination' => [\n 'pageSize' => 20,\n ],\n ]);\n //return $this->redirect(['view', 'id' => $model->id]);\n\n return $this->render('view',[\n 'dataProvider' => $dataProvider,\n ]);\n\n\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Talabalar();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new Survey();\n\n Yii::$app->gon->send('saveSurveyUrl', '/survey/save-new');\n Yii::$app->gon->send('afterSaveSurveyRedirectUrl', \\Yii::$app->request->referrer);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new User();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $user = User::findOne(['username' => $model->username ]) ;\n return $this->redirect(['site/view','id' => $user->id]);\n } else {\n return $this->render('knpr/create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Admin();\n\n /*if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->a_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }*/\n \n if (Yii::$app->request->post() && $model->validate()) {\n return $this->redirect(['view', 'id' => $model->a_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n\n\n }",
"public function actionCreate()\n {\n $model = new Book();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n \tif (Yii::$app->request->getIsAjax()) {\n \t\treturn $this->renderPartial('create', [\n \t\t\t'model' => $model,\n \t\t]);\n \t}\n \telse {\n\t return $this->render('create', [\n\t 'model' => $model,\n\t ]);\n \t}\n }\n }",
"public function actionCreate()\n {\n $model = new Article();\n if(!empty($_GET['kind'])) $model->kind=$_GET['kind'];\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Actividad();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate(){\n $model = new Category();\n// d($model);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->category_id]);\n } else {\n// d($_POST);\n return $this->render('create', ['model' => $model,]);\n }\n }",
"public function actionCreate()\n {\n $model = new ActivityDetail();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new VehicleApply();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate() {\n $model = new TabelleRelease();\n\n if ($model->loadAll(Yii::$app->request->post())) {\n if ($model->saveAll()) {\n\n return $this->redirect(['update', 'id' => $model->id, 'mySuccess' => 2]);\n } else {\n $this->success = -1; // -1->insert Fehler\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Student();\n \n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n\t{\n\t\t$model=new User;\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['User']))\n\t\t{\n\t\t\t$model->attributes=$_POST['User'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionCreate()\n\t{\n\t\t$model=new User;\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['User']))\n\t\t{\n\t\t\t$model->attributes=$_POST['User'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionCreate()\n {\n $model = new Status();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Customers();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new Products();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Template();\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new UserFeeMaster();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n //$this->paymentUMoney($model);\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'userid' => Yii::$app->user->id,\n ]);\n }",
"public function actionCreate()\n {\n $model = new Takwim();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new Nomina();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n\t{\n\t\t$model=new Comment;\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['Comment']))\n\t\t{\n $model->attributes=$_POST['Comment'];\n\t\t\n \n if($model->save()){\n $dataProvider=new CActiveDataProvider('Comment');\n\t\t\t$this->redirect(array('index'),array(\n 'dataProvider'=>$dataProvider,\n 'updated'=>'1',\n 'message'=>\"Comentario introducido\"\n ));\n }\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionCreate()\n {\n $model = new SasaranEs4();\n\n if ($model->load(Yii::$app->request->post())) {\n if ($model->save()){\n flash('success','Data Sasaran Eselon IV Berhasil Disimpan');\n return $this->redirect(['index']);\n }\n \n flash('error','Data Sasaran Eselon IV Gagal Disimpan');\n \n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new News();\n $author = Yii::$app->user->identity->username;\n\n if ($model->load(Yii::$app->request->post())){\n $model->setAuthor($author);\n if($model->save()){\n return $this->redirect('index');\n }\n }\n else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Amphur();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->amphurId]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n\t{\n\t\tif (isset(Yii::app()->user->isAdmin) && Yii::app()->user->isAdmin){\n\t\t\t$this->layout = \"admin\";\n\t\t}\n\t\t\n\t\t$model=new Articles;\n\t\tif(isset($_POST['Articles']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Articles'];\n\t\t\tif (isset(Yii::app()->user->isAdmin) && Yii::app()->user->isAdmin){\n\t\t\t\t$model->status = 0;\n\t\t\t}\n\t\t\t$model->user_id = Yii::app()->user->id;\n\t\t\tif($model->save())\n\t\t\t{\n\t\t\t\tif (Yii::app()->user->isAdmin){\n\t\t\t\t\t$this->redirect(array('admin')); //,'id'=>$model->id));\n\t\t\t\t}else{\n\t\t\t\t\t$this->redirect(array('list')); //,'id'=>$model->id));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t$this->render('create',array('model'=>$model));\n\t}",
"public function actionCreate()\n {\n $model = new Uprawnienia();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'konto_id' => $model->konto_id, 'podkategoria_id' => $model->podkategoria_id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model=new User('admin');\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if(isset($_POST['User']))\n {\n $model->attributes=$_POST['User'];\n if($model->save())\n $this->redirect(array('index'));\n }\n\n $this->render('create',array(\n 'model'=>$model,\n ));\n }",
"public function actionCreate()\n {\n $model = new Contact();\n $model->user_id = $this->user->id;\n $model->scenario = 'form';\n\n if (Yii::$app->request->isPost && ($postData = Yii::$app->request->post()) && $model->load($postData)) {\n if ($model->save()) {\n return $this->redirect([\n 'view',\n 'id' => $model->id,\n ]);\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate() {\n Login::UserAuth('Customers', 'Create');\n $model = new Customers;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Customers'])) {\n $_POST['Customers'] = CI_Security::ChkPost($_POST['Customers']);\n $model->attributes = $_POST['Customers'];\n $model->password = md5($model->password);\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->cid));\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }",
"public function actionCreate()\n {\n $model = new Kareer();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new Debtor();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n //$locationModel = Location::find()->where(['location_id' => $model->location->id])->one();\n $locationModel = new Location();\n $locationModel->load(Yii::$app->request->post());\n $locationModel->save();\n $model->link('location', $locationModel);\n\n //$nameModel = Name::find()->where(['name_id' => $this->name->id])->one();\n $nameModel = new Name();\n $nameModel->load(Yii::$app->request->post());\n $nameModel->save();\n $model->link('name', $nameModel);\n\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n if (Yii::$app->request->isAjax) {\n return $this->renderAjax('create', [\n 'model' => $model,\n ]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }\n }",
"public function actionCreate()\n {\n $model = new Persyaratan();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_persyaratan]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n\t{\n\t\t$model = new Route();\n\n\t\tif ($model->load(Yii::$app->request->post())) {\n\t\t\t$model->save();\n\t\t\treturn $this->redirect(['view', 'id' => $model->name]);\n\t\t} else {\n\t\t\treturn $this->render('create', [\n\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t}\n\t}",
"public function actionCreate()\n\t{\n $this->layout='admin';\n \n\t\t$model=new Bet;\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['Bet']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Bet'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionCreate() {\n\t\t$model = new Building();\n\n\t\tif ( $model->load( Yii::$app->request->post() ) && $model->save() ) {\n\t\t\treturn $this->redirect( [ 'index', 'id' => $model->id ] );\n\t\t} else {\n\t\t\treturn $this->render( 'create', [\n\t\t\t\t'model' => $model,\n\t\t\t] );\n\t\t}\n\t}",
"public function actionCreate()\n {\n $model = new Service();\n if($model->load(Yii::$app->request->post()) ){\n $model->created_by=Yii::$app->user->id;\n $model->created_at=time();\n if ( $model->save()) {\n\n return $this->redirect(['view', 'id' => $model->id]);\n }\n }\n\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate() {\n\t\t$model = new Proyecto;\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['Proyecto'])) {\n\t\t\t$model -> attributes = $_POST['Proyecto'];\n\t\t\t$model -> Usuario_id = Yii::app() -> user -> id;\n\t\t\tif ($model -> save())\n\t\t\t\t$this -> redirect(array('view', 'id' => $model -> id));\n\t\t}\n\n\t\t$this -> render('create', array('model' => $model, ));\n\t}",
"public function actionCreate()\n {\n $model = new Programador();\n //Yii::$app->request->post() wrapper de Yii para obtener datos seguros enviados por POST\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new File();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new Product();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\r\n {\r\n $this->_userAutehntication();\r\n\r\n switch($_GET['model'])\r\n {\r\n /*\r\n * Get an instance of the respective model\r\n */\r\n case 'posts': \r\n $model = new Post; \r\n break; \r\n default: \r\n $this->_sendResponse(501, sprintf('Mode <b>create</b> is not implemented for model <b>%s</b>',$_GET['model']) );\r\n exit; \r\n }\r\n /*\r\n * Assign POST values to attributes \r\n */ \r\n foreach($_POST as $var=>$value) {\r\n /*\r\n * Check if the model have this attribute\r\n */ \r\n if($model->hasAttribute($var)) {\r\n $model->$var = $value;\r\n } else {\r\n /* Error : model don't have this attribute */\r\n $this->_sendResponse(500, sprintf('Parameter <b>%s</b> is not allowed for model <b>%s</b>', $var, $_GET['model']) );\r\n }\r\n }\r\n /*\r\n * save the model\r\n */ \r\n if($model->save()) { \r\n $this->_sendResponse(200, $this->_getEncodedData($_GET['model'], $model->attributes) );\r\n } else {\r\n /*\r\n * Errors occurred\r\n */\r\n $message = \"<h1>Error</h1>\";\r\n $message .= sprintf(\"Couldn't create model <b>%s</b>\", $_GET['model']);\r\n $message .= \"<ul>\";\r\n foreach($model->errors as $attribute=>$attribute_errors) {\r\n $message .= \"<li>Attribute: $attribute</li>\";\r\n $message .= \"<ul>\";\r\n foreach($attribute_errors as $attr_error) {\r\n $message .= \"<li>$attr_error</li>\";\r\n } \r\n $message .= \"</ul>\";\r\n }\r\n $message .= \"</ul>\";\r\n $this->_sendResponse(500, $message );\r\n }\r\n\r\n var_dump($_REQUEST);\r\n }",
"public function actionCreate() {\n $model = new TimeBooks();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Contact;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if(isset($_POST['Contact'])) {\n $model->attributes = $_POST['Contact'];\n if ($model->save()) {\n $this->redirect(array('view','id' => $model->id));\n }\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }",
"public function actionCreate()\n {\n $model = new EnglishNanorep();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new Detallecarrito();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'codProducto' => $model->codProducto, 'idCarrito' => $model->idCarrito]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Trees();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n\t{\n\t\t$model=new UserAddForm();\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['UserAddForm']))\n\t\t{\n\t\t\t$model->attributes=$_POST['UserAddForm'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->data->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionCreate()\n {\n $model = new Slaves();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Cuenta();\n \n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate() {\n $model = new MissionCarers;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['MissionCarers'])) {\n $model->attributes = $_POST['MissionCarers'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }",
"public function actionCreate()\n {\n $model = new StandartOne();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n\t{\n //if (Yii::app()->user->checkAccess('AgendaCitasCedi_SolicitudCitaEntregaMercancia_Crear')) {\n $model=new SolicitudCitaEntregaMercancia;\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['SolicitudCitaEntregaMercancia']))\n\t\t{\n\t\t\t$model->attributes=$_POST['SolicitudCitaEntregaMercancia'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->IdNumeroSolicitud));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t)); /*} else {\n $this->render('//site/error', array(\n 'code' => '101',\n 'message' => Yii::app()->params ['accessError']\n ));\n }*/\n\t\t\n\t}",
"public function actionCreate()\n\t{\n\t\t$model=new Barangmasuk;\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['Barangmasuk']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Barangmasuk'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function actionCreate()\n {\n $model = new Producto();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_prodcto]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new TbDadosmes();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Ddiet();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Category();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['update', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function creating($model)\n\t{\n\t}",
"public function actionCreate()\n {\n $model = new CourseSite();\n\n if ($model->load(Yii::$app->request->post())){\n if($model->createCourseSite($model->course)){\n return $this->redirect(['view', 'id' => $model->id]);\n }\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model=new User('create');\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if(isset($_POST['User']))\n {\n $model->attributes=$_POST['User'];\n if($model->save())\n $this->redirect(array('/site/index'));\n }\n\n //Yii::app()->user->setFlash('success', Yii::t('user', '<strong>Congratulations!</strong> You have been successfully registered on our website! <a href=\"/\">Go to main page.</a>'));\n $this->render('create', compact('model'));\n }",
"public function actionCreate() {\r\n\t\t$model = new Follow ();\r\n\t\t\r\n\t\tif ($model->load ( Yii::$app->request->post () ) && $model->save ()) {\r\n\t\t\treturn $this->redirect ( [ \r\n\t\t\t\t\t'view',\r\n\t\t\t\t\t'id' => $model->followID \r\n\t\t\t] );\r\n\t\t} else {\r\n\t\t\treturn $this->render ( 'create', [ \r\n\t\t\t\t\t'model' => $model \r\n\t\t\t] );\r\n\t\t}\r\n\t}",
"public function actionCreate()\n {\n $model = new Content();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionCreate()\n {\n $model = new Peticiones();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new Menu();\n\n if ($model->load(Yii::$app->request->post())) {\n if($model->validate()){\n $model->save(false);\n return $this->redirect(['index']);\n }\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\r\n {\r\n $model = new Tax;\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['index', 'added' => 'yes']);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }",
"public function actionCreate()\n {\n $model = new Data();\n $oldModel = $model->attributes;\n\n $model->discount = 0;\n $model->activation_date = date('Y-m-d');\n\n if ($model->load(Yii::$app->request->post()) /*&& $model->save()*/) {\n\n $check = self::check($model);\n\n if($check && $model->save()){\n $newModel = $model->attributes;\n (new History())->setRow(Yii::$app->controller, $oldModel, $newModel, 'Создан клиент '.$newModel['user_name']);\n return $this->redirect(['view', 'id' => $model->id]);\n }\n }\n else{\n // сформируем номер новой карты клиента\n $next_card = Data::find()->max('card') + 1;\n $model->card = $next_card;\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }"
] | [
"0.7961321",
"0.790075",
"0.7868379",
"0.7593703",
"0.75327224",
"0.74853075",
"0.7460699",
"0.7460699",
"0.7460699",
"0.7460699",
"0.74491084",
"0.74427676",
"0.7439091",
"0.7430454",
"0.7409262",
"0.7408592",
"0.7384775",
"0.7376372",
"0.73335695",
"0.73332524",
"0.7304591",
"0.72658956",
"0.725665",
"0.7246338",
"0.7239207",
"0.7219361",
"0.72102743",
"0.7206761",
"0.7201929",
"0.7198894",
"0.71899223",
"0.7180049",
"0.71783084",
"0.717741",
"0.7171718",
"0.7171612",
"0.7167217",
"0.7165725",
"0.7158909",
"0.7149362",
"0.7142962",
"0.71369797",
"0.7092364",
"0.70850325",
"0.7079761",
"0.707582",
"0.70674443",
"0.70674443",
"0.7067115",
"0.70643806",
"0.7062783",
"0.70625895",
"0.70607865",
"0.705981",
"0.705926",
"0.7059033",
"0.7050936",
"0.70381296",
"0.702336",
"0.70161074",
"0.7013338",
"0.7012548",
"0.70123005",
"0.70105153",
"0.70098144",
"0.70091915",
"0.699799",
"0.69924843",
"0.69918",
"0.6988468",
"0.6985148",
"0.69850963",
"0.69685113",
"0.69639134",
"0.6946953",
"0.6940651",
"0.6940079",
"0.69399613",
"0.69378316",
"0.69375545",
"0.6937424",
"0.6935293",
"0.6932735",
"0.693226",
"0.6931384",
"0.6926793",
"0.69230515",
"0.69205403",
"0.69199365",
"0.691967",
"0.69177413",
"0.6910442",
"0.6900853",
"0.6888361",
"0.6882294",
"0.687703",
"0.68716824",
"0.68672115",
"0.6860886",
"0.6852794",
"0.6852467"
] | 0.0 | -1 |
Updates a particular model. If update is successful, the browser will be redirected to the 'view' page. | public function actionUpdate($id)
{
$model=$this->loadModel($id);
// Uncomment the following line if AJAX validation is needed
// $this->performAjaxValidation($model);
if(isset($_POST['Vacancies']))
{
$model->attributes=$_POST['Vacancies'];
if($model->save())
$this->redirect(array('view','id'=>$model->id));
}
$this->render('update',array(
'model'=>$model,
'countVacancies' => Vacancies::model()->count()
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionUpdate()\n {\n if (!$model = $this->findModel()) {\n Yii::$app->session->setFlash(\"error\", Yii::t('modules/user', \"You are not logged in.\"));\n $this->goHome();\n } else if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->session->setFlash(\"success\", Yii::t('modules/user', \"Changes has been saved.\"));\n $this->refresh();\n } else {\n return $this->render('update', ['model' => $model,]);\n }\n }",
"public function actionUpdate($id) {\n\t\t$model = $this->findModel ( $id );\n\t\t\n\t\tif ($model->load ( Yii::$app->request->post () ) && $model->save ()) {\n\t\t\treturn $this->redirect ( [ \n\t\t\t\t\t'view',\n\t\t\t\t\t'id' => $model->id \n\t\t\t] );\n\t\t}\n\t\t\n\t\treturn $this->render ( 'update', [ \n\t\t\t\t'model' => $model \n\t\t] );\n\t}",
"public function actionUpdate($id)\r\n {\r\n $model = $this->findModel($id);\r\n\t\t//print_r(\"update mode\");exit;\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n // return $this->redirect(['view', 'id' => $model->id]);\r\n\t\t return $this->redirect(['index']);\r\n }\r\n\r\n return $this->renderAjax('update', [\r\n 'model' => $model,\r\n ]);\r\n }",
"public function actionUpdate($id)\n {\n\n // p($id);die;\n $model = $this->findModel($id);\n // p($model);die;\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save())\n {\n return $this->redirect(['index']);\n }\n else\n {\n //var_dump($model);\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n //return $this->redirect(['view', 'id' => $model->id]);\n\t return $this->redirect(['index']);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate()\n {\n $model = $this->findModel(Yii::$app->request->post('id'));\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $model;\n }\n return $model->errors;\n }",
"public function actionUpdate()\n {\n\t\t\t$id=7;\n $model = $this->findModel($id);\n $model->slug = \"asuransi\";\n $model->waktu_update = date(\"Y-m-d H:i:s\");\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['update']);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id) {\r\n $model = $this->findModel($id);\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('update', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }",
"public function actionUpdate($id)\n\t{\n\t\t$model = $this->findModel($id);\n\n\t\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t\treturn $this->redirect(['view', 'id' => $model->name]);\n\t\t} else {\n\t\t\treturn $this->render('update', [\n\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t}\n\t}",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if($model->creator_id==Yii::$app->user->identity->id){\n \n if ($model->load(Yii::$app->request->post()) && $model->save()){\n return $this->redirect(['view', 'id' => $model->id]);\n }\n return $this->render('update', ['model' => $model,]);\n }\n\n else{\n return $this->redirect(['index']); \n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if($model->creator_id==Yii::$app->user->identity->id){\n \n if ($model->load(Yii::$app->request->post()) && $model->save()){\n return $this->redirect(['view', 'id' => $model->id]);\n }\n return $this->render('update', ['model' => $model,]);\n }\n\n else{\n return $this->redirect(['index']); \n }\n }",
"public function updating($model)\n\t{\n\t}",
"public function actionUpdate($id)\n\t{\n\t\t$model = $this->findModel($id);\n\n\t\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t\treturn $this->redirect(['view', 'id' => $model->id]);\n\t\t} else {\n\t\t\treturn $this->render('update', [\n\t\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t}\n\t}",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()))\n {\n if($model->save())\n return $this->redirect(['view', 'id' => $model->id]);\n else\n var_dump($model->errors); die;\n }\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id)\n\t{\n\t\t$model = $this->findModel($id);\n\n\t\tif ($model->load(Yii::$app->request->post()) && $model->save()) {\n\t\t\treturn $this->redirect(['view', 'id' => $model->id]);\n\t\t} else {\n\t\t\treturn $this->render('update', [\n\t\t\t\t'model' => $model,\n\t\t\t]);\n\t\t}\n\t}",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n $this->layout=\"main\";\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id) {\n\t\t$model = $this->findModel ( $id );\n\t\t\n\t\tif ($model->load ( Yii::$app->request->post () ) && $model->save ()) {\n\t\t\treturn $this->redirect ( [ \n\t\t\t\t\t'view','id' => $model->weid \n\t\t\t] );\n\t\t} else {\n\t\t\treturn $this->render ( 'update', [ \n\t\t\t\t\t'model' => $model \n\t\t\t] );\n\t\t}\n\t}",
"public function actionUpdate($id)\r\n {\r\n $model = $this->findModel($id);\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('update', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n { \n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->a_id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->no]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->No_]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n// return $this->redirect(['view', 'id' => $model->id]);\n return $this->redirect('/content-menu');\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->U_ID]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n\n {\n \n $model = new Main();\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n return $this->redirect(['view', 'id' => $model->id]);\n\n } else {\n\n return $this->render('update', [\n\n 'model' => $model,\n\n ]);\n\n }\n \n \n\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->ID]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->ID]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->name]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ( $model->load(Yii::$app->request->post()) && $model->save() ) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if ($model->load(Yii::$app->getRequest()->post(),'') && $model->save()) {\n return $this->redirect(['view', 'id' => $model->name]);\n }\n\n return $this->render('update', ['model' => $model]);\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->_id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public\n function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => (string)$model->_id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('update', [\n 'model' => $model,\n ]);\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }",
"public function actionUpdate($id)\n {\n $model = $this->findModel($id);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('update', [\n 'model' => $model,\n ]);\n }\n }"
] | [
"0.790416",
"0.77129173",
"0.7695606",
"0.7601599",
"0.76007336",
"0.7488982",
"0.748166",
"0.7476512",
"0.74689823",
"0.7460407",
"0.74591696",
"0.74577373",
"0.74577373",
"0.74574083",
"0.74527144",
"0.7447473",
"0.74457926",
"0.74404144",
"0.7429943",
"0.74180627",
"0.7416835",
"0.7399742",
"0.73946184",
"0.7384177",
"0.73792654",
"0.73730326",
"0.7361622",
"0.7361622",
"0.7361622",
"0.7361622",
"0.7361622",
"0.7361622",
"0.7361622",
"0.73608077",
"0.734632",
"0.734632",
"0.7336165",
"0.7333948",
"0.73336786",
"0.7330475",
"0.73283607",
"0.7327747",
"0.7323753",
"0.73197937",
"0.73197937",
"0.73182034",
"0.73182034",
"0.73182034",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266",
"0.7314266"
] | 0.0 | -1 |
Deletes a particular model. If deletion is successful, the browser will be redirected to the 'admin' page. | public function actionDelete($id)
{
// we only allow deletion via POST request
$this->loadModel($id)->delete();
// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser
if(!isset($_GET['ajax']))
$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('index'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionDelete()\r\n {\r\n $this->_userAutehntication();\r\n\r\n switch($_GET['model'])\r\n {\r\n /* Load the respective model */\r\n case 'posts': \r\n $model = Post::model()->findByPk($_GET['id']); \r\n break; \r\n default: \r\n $this->_sendResponse(501, sprintf('Error: Mode <b>delete</b> is not implemented for model <b>%s</b>',$_GET['model']) );\r\n exit; \r\n }\r\n /* Find the model */\r\n if(is_null($model)) {\r\n // Error : model not found\r\n $this->_sendResponse(400, sprintf(\"Error: Didn't find any model <b>%s</b> with ID <b>%s</b>.\",$_GET['model'], $_GET['id']) );\r\n }\r\n\r\n /* Delete the model */\r\n $response = $model->delete();\r\n if($response>0)\r\n $this->_sendResponse(200, sprintf(\"Model <b>%s</b> with ID <b>%s</b> has been deleted.\",$_GET['model'], $_GET['id']) );\r\n else\r\n $this->_sendResponse(500, sprintf(\"Error: Couldn't delete model <b>%s</b> with ID <b>%s</b>.\",$_GET['model'], $_GET['id']) );\r\n }",
"public function actionDelete()\n {\n if (!$this->isAdmin()) {\n $this->getApp()->action403();\n }\n\n $request = $this->getApp()->getRequest();\n $id = $request->paramsNamed()->get('id');\n $model = $this->findModel($id);\n if (!$model) {\n $this->getApp()->action404();\n }\n\n $model->delete();\n\n return $this->back();\n }",
"public function actionDelete() {\n $model = new \\UsersModel();\n $login = $this->getParam('login');\n\n if ( $model->delete($login) ) {\n $this->flashMessage('Odstraněno', self::FLASH_GREEN);\n } else {\n $this->flashMessage('Záznam nelze odstranit', self::FLASH_RED);\n }\n\n $this->redirect('default');\n }",
"public function actionDelete()\n {\n if ($post = Template::validateDeleteForm()) {\n $id = $post['id'];\n $this->findModel($id)->delete();\n }\n return $this->redirect(['index']);\n }",
"public function actionDelete()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t\n\t\t\n\t\t$this->checkUser();\n\t\t$this->checkActivation();\n\t//\t$model = new Estate;\n\t\t\n\t\tif($model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$model=Estate::model()->findbyPk($_GET['id']);\n\t\t\tif($model===null)\n\t\t\t\tthrow new CHttpException(404, Yii::t('app', 'The requested page does not exist.'));\n\t\t}\n\t\t\n\t\tEstateImage::deleteAllImages($model->id);\t\n\t\t@unlink(dirname(Yii::app()->request->scriptFile).$model->tour);\n\t\t@unlink(dirname(Yii::app()->request->scriptFile).$model->image);\n\t\t\n\t\t$model->delete();\n\t\t\n\t\t\n\t\tModeratorLogHelper::AddToLog('deleted-estate-'.$model->id,'Удален объект #'.$model->id.' '.$model->title,null,$model->user_id);\n\t\t$this->redirect('/cabinet/index');\n\t\t\n\t}",
"public function deleteAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif ($item) {\n\t\t\t$item->delete();\n\t\t}\n\t\t$this->_helper->redirector('list', null, null, array('model' => $modelName));\n\t}",
"public function actionDelete()\n {\n $id= @$_POST['id'];\n if($this->findModel($id)->delete()){\n echo 1;\n }\n else{\n echo 0;\n }\n\n return $this->redirect(['index']);\n }",
"public function actionDelete()\n\t{\n\t parent::actionDelete();\n\t\t$model=$this->loadModel($_POST['id']);\n\t\t $model->delete();\n\t\techo CJSON::encode(array(\n 'status'=>'success',\n 'div'=>'Data deleted'\n\t\t\t\t));\n Yii::app()->end();\n\t}",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete()\n {\n if(isset($_POST['id'])){\n $id = $_POST['id'];\n $this->findModel($id)->delete();\n echo \"success\";\n }\n }",
"public function actionDelete($id)\n {\n $model = $this->findModel($id);\n\n $model->is_delete = 1;\n\n if($model->save())\n {\n return $this->redirect(['admin']);\n }\n }",
"public function actionDelete()\n {\n $id = Yii::$app->request->post('id');\n try {\n $this->findModel($id)->delete();\n } catch (StaleObjectException $e) {\n } catch (NotFoundHttpException $e) {\n } catch (\\Throwable $e) {\n }\n\n return $this->redirect(['index']);\n }",
"public function delete($model);",
"public function actionDelete()\n {\n $id = Yii::$app->request->post('id');\n $this->findModel($id)->delete();\n }",
"public function actionDelete($id)\n { \n\t\t$model = $this->findModel($id); \n $model->isdel = 1;\n $model->save();\n //$model->delete(); //this will true delete\n \n return $this->redirect(['index']);\n }",
"public function deleteAction()\n {\n if ($this->isConfirmedItem($this->_('Delete %s'))) {\n $model = $this->getModel();\n $deleted = $model->delete();\n\n $this->addMessage(sprintf($this->_('%2$u %1$s deleted'), $this->getTopic($deleted), $deleted), 'success');\n $this->_reroute(array('action' => 'index'), true);\n }\n }",
"public function actionDelete($id)\n\t{\n\t\t$model = $this->loadModel($id);\n\t\t\n\t\tif ($model) {\n\t\t\t$model->delete();\n\t\t}\n\n // if AJAX request (triggered by deletion via list grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('index'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$model = $this->loadModel($id);\n\t\tif($model->deleted){\n\t\t\t$model->delete();\n\t\t}else{\n\t\t\t$model->scenario = 'delete';\n\t\t\t$model->deleted = 1;\n\t\t\t$model->update();\n\t\t}\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function deleting($model)\n\t{\n\t}",
"public function actionDelete() {\n\t\tif (isset($_POST) && $_POST['isAjaxRequest'] == 1) {\n\t\t\t$response = array('status' => '1');\n\t\t\t$model = $this->loadModel($_POST['id']);\n\t\t\t$model->is_deleted = 1;\n\t\t\tif ($model->save()) {\n\t\t\t\techo CJSON::encode($response);\n\t\t\t} else {\n\t\t\t\t$response = array('status' => '0', 'error' => $model->getErrors());\n\t\t\t\techo CJSON::encode($response);\n\t\t\t}\n\t\t}\n\t}",
"public function actionDelete($id)\n {\n\t\t$model = $this->findModel($id);\n\n\t\t$model->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!Helper::get('ajax')) {\n $this->redirect(Helper::post('returnUrl') ? Helper::post('returnUrl') : array('admin'));\n }\n }",
"function delete()\n\t{\n\t\t$model = $this->getModel();\n\t\t$viewType\t= JFactory::getDocument()->getType();\n\t\t$view = $this->getView($this->view_item, $viewType);\n\t\t$view->setLayout('confirmdelete');\n\t\tif (!JError::isError($model)) {\n\t\t\t$view->setModel($model, true);\n\t\t}\n\t\t//used to load in the confirm form fields\n\t\t$view->setModel($this->getModel('list'));\n\t\t$view->display();\n\t}",
"public function actionDelete($id) {\r\n $this->loadModel($id)->delete();\r\n\r\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\r\n if (!isset($_GET['ajax']))\r\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\r\n }",
"public function actionDelete($id) {\r\n $this->loadModel($id)->delete();\r\n\r\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\r\n if (!isset($_GET['ajax']))\r\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\r\n }",
"public function actionDelete($id)\n\t{\n\t\t//$this->loadModel($id)->delete();\n $model=$this->loadModel($id);\n $model->IdEstadoSolicitudCita = 3;\n $model->save();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n {\n\t$model = static::findModel($id);\n\n\t$this->processData($model, 'delete');\n\n\t$model->delete();\n\n \treturn $this->redirect(['index']);\n }",
"public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $model->delete();\n\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n\t\t$this -> loadModel($id) -> delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif (!isset($_GET['ajax']))\n\t\t\t$this -> redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n {\n $model=$this->findModel ( $id );\n\t\t$model->is_delete=1;\n\t\t$model->save ();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id)\n\t{\n if(file_exists(dirname(Fircms::$basePath).DIRECTORY_SEPARATOR.$this->loadModel($id)->path))\n unlink(dirname(Fircms::$basePath).DIRECTORY_SEPARATOR.$this->loadModel($id)->path);\n \n $this->loadModel($id)->delete();\n \n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\r\n\t{\r\n\t\t$this->loadModel($id)->delete();\r\n\r\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\r\n\t\tif(!isset($_GET['ajax']))\r\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\r\n\t}",
"public function actionDelete($id)\r\n\t{\r\n\t\t$this->loadModel($id)->delete();\r\n\r\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\r\n\t\tif(!isset($_GET['ajax']))\r\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\r\n\t}",
"public function actionDelete($id)\r\n\t{\r\n\t\t$this->loadModel($id)->delete();\r\n\r\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\r\n\t\tif(!isset($_GET['ajax']))\r\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\r\n\t}",
"public function actionDelete($id)\r\n\t{\r\n\t\t$this->loadModel($id)->delete();\r\n\r\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\r\n\t\tif(!isset($_GET['ajax']))\r\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\r\n\t}",
"public function actionDelete($id)\n {\n $model=$this->findModel($id);\n $model->IsDelete=1;\n $model->save();\n Yii::$app->session->setFlash('success', \"Your message to display.\");\n return $this->redirect(['index']);\n }",
"public function actionDelete($id) {\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif (!isset($_GET['ajax'])) {\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t\t}\n\n\t}",
"public function delete(Model $model);",
"public function delete(Model $model);",
"public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']); \n }",
"public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']); \n }",
"public function actionDelete($id)\r\n {\r\n $this->loadModel($id)->delete();\r\n\r\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\r\n if (!isset($_GET['ajax']))\r\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\r\n }",
"public function actionDelete()\n\t{\n\t\tif(Yii::app()->request->isPostRequest)\n\t\t{\n\t\t\tif (!($model = $this->loadModel()))\n\t\t\t\treturn;\n\t\t\t$model->delete();\n\n\t\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\t\tif(!isset($_GET['ajax']))\n\t\t\t\t$this->redirect(array('index'));\n\t\t}\n\t\telse\n\t\t\tthrow new CHttpException(400,'Invalid request. Please do not repeat this request again.');\n\t}",
"public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\t\t\\Yii::$app->session->setFlash('updated',\\Yii::t('admin', 'Данные успешно удалены'));\r\n return $this->redirect(['index']);\r\n }",
"public function actionDelete($id) {\n\t\t$model = $this->loadModel($id);\n\t\t$model->is_deleted = 1;\n\t\t$model->save();\n\t\t\n\t\t$this->redirect(array(\"/\".$model->type));\n\t}",
"public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $model->delete();\n return $this->redirect(['index']);\n }",
"public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $model->delete();\n return $this->redirect(['index']);\n }",
"public function actionDelete()\n\t{\n\t\t$id = intval( Yii::app()->getRequest()->getParam('id') );\n\n\t\tif (!Yii::app()->getRequest()->getIsAjaxRequest() || empty($id))\n\t\t\tthrow new CHttpException(404);\n\n\t\t$model = MainRoom::model()->findByPk($id);\n\t\tif (is_null($model))\n\t\t\tthrow new CHttpException(404);\n\n\t\t$model->status = MainRoom::STATUS_DELETED;\n\t\t$model->save(false);\n\t\tdie ( CJSON::encode( array('success'=>true) ) );\n\n\t}",
"public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $this->checkPermissionByModelsUserId($model->user_id);\n $model->delete();\n\n return $this->redirect(['index']);\n }",
"public function actionDelete($id)\n\t{\n\t\tif(Yii::app()->user->user_type==4){\n\t\t\t$this->layout='teacher';\n\t\t}\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t\t\t\n\t}",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id) {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id)\n {\n $this->loadModel($id)->delete();\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_REQUEST['returnUrl']) ? $_REQUEST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}",
"public function actionDelete($id)\n\t{\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}"
] | [
"0.7513428",
"0.75085866",
"0.7422799",
"0.7378125",
"0.7369815",
"0.7282053",
"0.7234586",
"0.72130185",
"0.7191056",
"0.7185373",
"0.7169571",
"0.7165093",
"0.71649295",
"0.7125529",
"0.70977294",
"0.70092726",
"0.70089346",
"0.7008796",
"0.6984845",
"0.69689864",
"0.6952149",
"0.69497573",
"0.6942736",
"0.6934812",
"0.6934812",
"0.6934078",
"0.6924341",
"0.6909224",
"0.6904238",
"0.69013536",
"0.6888815",
"0.68835175",
"0.68835175",
"0.68835175",
"0.68835175",
"0.68739307",
"0.68650043",
"0.68640804",
"0.68640804",
"0.68637884",
"0.68637884",
"0.68623704",
"0.6856195",
"0.68504244",
"0.6846217",
"0.68371147",
"0.68371147",
"0.6836027",
"0.6831587",
"0.68253434",
"0.6822184",
"0.6822184",
"0.6822184",
"0.6822184",
"0.6822184",
"0.6822184",
"0.6822184",
"0.6822184",
"0.6822184",
"0.6822184",
"0.6822184",
"0.6822184",
"0.6822184",
"0.6822184",
"0.6822184",
"0.6822184",
"0.6822184",
"0.6822184",
"0.6822184",
"0.68212056",
"0.68188524",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969",
"0.6816969"
] | 0.0 | -1 |
Returns the data model based on the primary key given in the GET variable. If the data model is not found, an HTTP exception will be raised. | public function loadModel($id)
{
$model=Vacancies::model()->findByPk($id);
if($model===null)
throw new CHttpException(404,'The requested page does not exist.');
return $model;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=Residencebaseinfo::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}",
"public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=LicenceApplication::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}",
"public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=emprestimo::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Dataset::model()->findByPk((int)$id);\n\t\tif($model===null)\n\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public static function Get($key) {\r\n\t\t$cls = get_called_class();\r\n\t\t$model = new $cls();\r\n\t\t$primary = $model->index('primary');\r\n\t\tif (is_null($primary)) {\r\n\t\t\tthrow new Exception(\"The schema for {$cls} does not identify a primary key\");\r\n\t\t}\r\n\t\tif (!is_array($key)) {\r\n\t\t\tif (count($primary['fields']) > 1) {\r\n\t\t\t\tthrow new Exception(\"The schema for {$cls} has more than one field in its primary key\");\r\n\t\t\t}\r\n\t\t\t$key = array(\r\n\t\t\t\t$primary['fields'][0] => $key\r\n\t\t\t);\r\n\t\t}\r\n\t\tforeach ($primary['fields'] as $field) {\r\n\t\t\tif (!isset($key[$field])) {\r\n\t\t\t\tthrow new Exception(\"No value provided for the {$field} field in the primary key for \" . get_called_class());\r\n\t\t\t}\r\n\t\t\t$model->where(\"{$field} = ?\", $key[$field]);\r\n\t\t}\r\n\t\t//$src = Dbi_Source::GetModelSource($model);\r\n\t\t$result = $model->select();\r\n\t\tif ($result->count()) {\r\n\t\t\tif ($result->count() > 1) {\r\n\t\t\t\tthrow new Exception(\"{$cls} returned multiple records for primary key {$id}\");\r\n\t\t\t}\r\n\t\t\t$record = $result[0];\r\n\t\t} else {\r\n\t\t\t$record = new Dbi_Record($model, null);\r\n\t\t\t$record->setArray($key, false);\r\n\t\t}\r\n\t\treturn $record;\r\n\t}",
"public function loadModel() {\n if ($this->_model === null) {\n if (isset($_GET['id']))\n $this->_model = Project::model()->findbyPk($_GET['id']);\n if ($this->_model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n }\n return $this->_model;\n }",
"public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=DiasLetivos::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}",
"public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=Report::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}",
"public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=Invoice::model()->findByPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}",
"public function loadModel() {\n if ($this->_model === null) {\n if (isset($_GET['id']))\n $this->_model = Alocacao::model()->findbyPk($_GET['id']);\n if ($this->_model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n }\n return $this->_model;\n }",
"public function loadModel($id)\r\n\t{\r\n\t\t$model=Klient::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\r\n\t\treturn $model;\r\n\t}",
"private function findModel($key)\n {\n if (null === $key) {\n throw new BadRequestHttpException('Key parameter is not defined in findModel method.');\n }\n\n $modelObject = $this->getNewModel();\n\n if (!method_exists($modelObject, 'findOne')) {\n $class = (new\\ReflectionClass($modelObject));\n throw new UnknownMethodException('Method findOne does not exists in ' . $class->getNamespaceName() . '\\\\' .\n $class->getShortName().' class.');\n }\n\n $result = call_user_func([\n $modelObject,\n 'findOne',\n ], $key);\n\n if ($result !== null) {\n return $result;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }",
"public function loadModel($id)\n\t{\n\t\t$model=Information::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t{\n\t\t\t\t$condition='';\n\t\t\t\t$this->_model=Chat::model()->findByPk($_GET['id'], $condition);\n\t\t\t}\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}",
"public function __get($key)\n\t{\n\t\t// See if we are requesting a foreign key\n\t\tif (isset($this->_data[$key.'_id']))\n\t\t{\n\t\t\tif (isset($this->_lazy[$key])) // See if we've lazy loaded it\n\t\t\t{\n\t\t\t\t$model = AutoModeler::factory($key);\n\t\t\t\t$model->process_load($this->_lazy[$key]);\n\t\t\t\t$model->process_load_state();\n\t\t\t\treturn $model;\n\t\t\t}\n\n\t\t\t// Get the row from the foreign table\n\t\t\treturn AutoModeler::factory($key, $this->_data[$key.'_id']);\n\t\t}\n\t\telse if (isset($this->_data[$key]))\n\t\t\treturn $this->_data[$key];\n\t}",
"public function loadModel()\n {\n if ($this->_model === null) {\n if (isset($_GET['id'])) {\n if (Yii::app()->user->isGuest)\n //$condition='status='.Post::STATUS_PUBLISHED.' OR status='.Post::STATUS_ARCHIVED;\n $condition = '';\n else\n $condition = '';\n $this->_model = Object::model()->with(array('author','files'))->findByPk($_GET['id']);\n }\n if ($this->_model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n }\n return $this->_model;\n }",
"public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=RR_TipoHorario::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=TBantuanData::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id) {\n $model = Consultor::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\r\n\t{\r\n\t\t$model=Programa::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\r\n\t\treturn $model;\r\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=RequestFuel::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,Yii::t('rdt','The requested page does not exist.'));\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Respuestas::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Clap::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Recargas::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\r\n\t{\r\n\t\t$model=Tshirt::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\r\n\t\treturn $model;\r\n\t}",
"public function loadModel($id){\n\t\t$model=Contact::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\r\n\t{\r\n\t\t$model=KqxsBac::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\r\n\t\treturn $model;\r\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Column::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Patient::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id){\n\t\t\n\t\t$model=XhTitle::model()->findByPk($id);\n\t\t\n\t\tif($model===null)\n\t\t\t\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t\n\t\treturn $model;\n\t\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Results::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=PPJadwaldokterM::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Coordocs::model()->findByPk($id+0);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Materia::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Employe::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Alumno::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Quote3::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id) {\n $model = TblServer::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id) {\n $model = TblServer::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\r\n\t{\r\n\t\t$model=DeedMaster::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\r\n\t\treturn $model;\r\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Ios::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\r\n\t{\r\n\t\t$model=Study::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\r\n\t\treturn $model;\r\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Kzone::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Pooja::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\r\n\t{\r\n\t\t$model=StudentDocument::model()->findByPk($id);\r\n\t\tif($model===null)\r\n\t\t\tthrow new CHttpException(404,Yii::t('app','The requested page does not exist.'));\r\n\t\treturn $model;\r\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Persona::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Entry::model()->with('entryAnswers')->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function getModelByPrimaryKey($action = null, $keyValue = null)\n {\n $keyName = $this->model->getKeyName();\n\n if ($keyValue == '_') {\n if ($this->request()->has(\"data.primaryKey.{$keyName}\")) {\n $keyValue = $this->request()->input(\"data.primaryKey.{$keyName}\");\n } elseif ($this->request()->has(\"data.old.{$keyName}\")) {\n $keyValue = $this->request()->input(\"data.old.{$keyName}\");\n } elseif ($this->request()->has('data.items')) {\n $items = $this->request()->input('data.items');\n if (Arr::has($items, $keyName)) {\n $keyValue = Arr::get($items, $keyName);\n } else {\n $first = Arr::first($items);\n if (Arr::has($first, $keyName)) {\n $keyValue = Arr::get($first, $keyName);\n }\n }\n }\n }\n\n $data = [$keyName => $keyValue];\n\n $r = $this->validateData($data, null, 'primaryKey', $action, [$keyName => ['includeUniqueRules' => false]]);\n if ($r !== true) {\n return $r;\n }\n\n $modelClass = get_class($this->model);\n if ($model = $modelClass::find($data[$keyName])) {\n return $model;\n }\n\n return CrudJsonResponse::error(CrudHttpErrors::TARGET_DATA_MODEL_NOT_FOUND, null, [\n 'action' => 'primaryKey',\n 'parent_action' => $action,\n 'target' => $data,\n ]);\n }",
"public function loadModel()\n {\n if ($this->_model === null)\n {\n if (isset($_GET['id']))\n $this->_model = User::model()->findbyPk($_GET['id']);\n if ($this->_model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n }\n return $this->_model;\n }",
"public function loadModel($id)\n\t{\n\t\t$model=ARTICULOS::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Knowledgecatalogue::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id) {\n $model = Package::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=User::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}",
"public function loadModel($id)\n {\n $model=Domain::model()->findByPk($id);\n if($model===null)\n throw new CHttpException(404,'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\n\t{\n\t\t$model=ElBezQuests::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Basic_definition::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=PPDokrekammedisM::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Repository::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=RKPengirimanrmT::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Sale::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Korzet::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'A keresett tartalom nem található.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=DProcessoDisciplinar::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id) {\n $model = Fddemandreceipt::model()->findByPk((int) $id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\n\t{\n\t\t$model=Stone::model()->findByPk((int)$id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Store::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=PegawaiM::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Solicitudes::model()->findByPk((int)$id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Quotes::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The Requested Page Does Not Exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Docingresados::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'El enlace o direccion solicitado no existe');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Pagosconceptos::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public abstract function find($primary_key, $model);",
"public function loadModel($id)\n\t{\n\t\t$model=CerDoc::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=JobSummary::model()->findByPk($id);\n \n \n \n \n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n {\n $model = InfoSpares::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function find($id){\n\t\t$db = static::getDatabaseConnection();\n\t\t//Create a select query\n\t\t$query = \"SELECT \" . implode(\",\" , static::$columns).\" FROM \" . static::$tableName . \" WHERE id = :id\";\n\t\t//prepare the query\n\t\t$statement = $db->prepare($query);\n\t\t//bind the column id with :id\n\t\t$statement->bindValue(\":id\", $id);\n\t\t//Run the query\n\t\t$statement->execute();\n\n\t\t//Put the associated row into a variable\n\t\t$record = $statement->fetch(PDO::FETCH_ASSOC);\n\n\t\t//If there is not a row in the database with that id\n\t\tif(! $record){\n\t\t\tthrow new ModelNotFoundException();\n\t\t}\n\n\t\t//put the record into the data variable\n\t\t$this->data = $record;\n\t}",
"public function loadModel($id)\n {\n $model=Seat::model()->findByPk($id);\n if($model===null)\n throw new CHttpException(404,'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id){\r\r\n\r\r\n\t $model=OrdenConsumo::model()->findByPk($id);\r\r\n\r\r\n\t if($model===null)\r\r\n\t throw new CHttpException(404,'The requested page does not exist.');\r\r\n\t return $model;\r\r\n\r\r\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Pegawai::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=Image::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}",
"public function loadModel()\n\t{\n\t\tif($this->_model===null)\n\t\t{\n\t\t\tif(isset($_GET['id']))\n\t\t\t\t$this->_model=Image::model()->findbyPk($_GET['id']);\n\t\t\tif($this->_model===null)\n\t\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\t}\n\t\treturn $this->_model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Customer::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Cooperativepartner::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Gejala::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n {\n $model=Services::model()->findByPk($id);\n if($model===null)\n throw new CHttpException(404,'The requested page does not exist.');\n return $model;\n }",
"public function loadModel()\n\t{\n\t\tif( $this->_model===null )\n\t\t{\n\t\t\t$itemName = $this->getItemName();\n\t\t\t\n\t\t\tif( $itemName!==null )\n\t\t\t{\n\t\t\t\t$this->_model = $this->_authorizer->authManager->getAuthItem($itemName);\n\t\t\t\t$this->_model = $this->_authorizer->attachAuthItemBehavior($this->_model);\n\t\t\t}\n\n\t\t\tif( $this->_model===null )\n\t\t\t\tthrow new CHttpException(404, Rights::t('core', 'The requested page does not exist.'));\n\t\t}\n\n\t\treturn $this->_model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Topik::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Roomclosure::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=CollectionShop::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n {\n $model=Product::model()->findByPk($id);\n if($model===null)\n throw new CHttpException(404,'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\n\t{\n\t\t$model=CitasReservada::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Ncr::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Student::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,Yii::t('common','The requested page does not exist.'));\n\t\treturn $model;\n\t}",
"protected function getModel($key)\n {\n\n if (isset($this->models[$key]))\n return $this->models[$key];\n else\n return null;\n\n }",
"public function loadModel($id)\n\t{\n\t\t$model = Exam::model()->findByPk($id);\n\t\tif ($model === null)\n\t\t\tthrow new CHttpException(404, 'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id) {\n $model = Carrer::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\n\t{\n\t\t$model=Talonario::model()->findByPk((int)$id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Pedido::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Pedido::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id)\n\t{\n\t\t$model=Task::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}",
"public function loadModel($id) {\n $model = Item::model()->findByPk($id);\n if ($model === null)\n throw new CHttpException(404, 'The requested page does not exist.');\n return $model;\n }",
"public function loadModel($id)\n\t{\n\t\t$model=Question::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}"
] | [
"0.69962883",
"0.6962919",
"0.6855711",
"0.6704942",
"0.66493464",
"0.66407615",
"0.66356856",
"0.6625895",
"0.6622565",
"0.6617206",
"0.6613511",
"0.66124374",
"0.6558399",
"0.65570456",
"0.654233",
"0.6541415",
"0.6533712",
"0.6533628",
"0.6527449",
"0.6526742",
"0.6522775",
"0.64876986",
"0.64846545",
"0.64787906",
"0.64772",
"0.64485127",
"0.64414996",
"0.6436942",
"0.64320856",
"0.6431044",
"0.64292085",
"0.6429067",
"0.6427079",
"0.64270294",
"0.6412392",
"0.6412103",
"0.64076513",
"0.6394651",
"0.6394651",
"0.6392349",
"0.6391811",
"0.6391414",
"0.6386865",
"0.6379122",
"0.6377973",
"0.6376806",
"0.6376047",
"0.6374624",
"0.63714004",
"0.6371169",
"0.6370279",
"0.6370213",
"0.637006",
"0.6364793",
"0.63636017",
"0.636199",
"0.6360801",
"0.6360364",
"0.63590646",
"0.6356949",
"0.6354759",
"0.63441455",
"0.6335935",
"0.6335522",
"0.6332477",
"0.6330512",
"0.6329776",
"0.63286954",
"0.6328215",
"0.6326693",
"0.6322267",
"0.6320312",
"0.63196725",
"0.631757",
"0.63153523",
"0.630968",
"0.6308688",
"0.63078827",
"0.63078266",
"0.63078266",
"0.6307113",
"0.6304279",
"0.6300711",
"0.6300669",
"0.62993586",
"0.6296465",
"0.62961215",
"0.6294363",
"0.62935793",
"0.6291674",
"0.629111",
"0.62898314",
"0.6289571",
"0.62889796",
"0.62878317",
"0.6281817",
"0.6281006",
"0.6281006",
"0.6279677",
"0.627873",
"0.627601"
] | 0.0 | -1 |
Performs the AJAX validation. | protected function performAjaxValidation($model)
{
if(isset($_POST['ajax']) && $_POST['ajax']==='vacancies-form')
{
echo CActiveForm::validate($model);
Yii::app()->end();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function ajaxValidationAction()\n {\n if($this->_request->getPost('ajax_submit',false, Request::FILTER_INT))\n $result = 'ok_ajax';\n else\n $result = 'ok';\n $messages = array();\n\n if(!$this->validate())\n {\n $this->collectValidateErrors(); \n foreach($this->_view->getFormErrors() as $k => $v)\n {\n $messages['__data'.$k] = $v;\n }\n $result = 'error';\n }\n $tpl = '';\n if($result == 'error')\n {\n $tpl = $this->fetchElementTemplate('messages_summary');\n }\n $this->_view->sendJson( array('result'=>$result, 'messages'=>$messages, 'tpl'=>$tpl) );\n }",
"public function ajaxValidation()\n {\n if (!Yii::$app->request->isPost)\n return;\n\n if (!Yii::$app->request->isAjax)\n return;\n\n //Bu, PJAX formalarda uchun kerak\n //shu holatda, postValidation ishlaydi\n if (Yii::$app->request->isPjax)\n return;\n\n if (!$this->load(Yii::$app->request->post())) {\n throw new NotFoundHttpException();\n }\n\n $response = Yii::$app->response;\n $response->format = Response::FORMAT_JSON;\n $result = ActiveForm::validate($this);\n if ($result !== null) {\n $response->data = $result;\n }\n\n Yii::$app->end();\n }",
"protected function performAjaxValidation($model)\n\t{\n \n\t//\tif(isset($_REQUEST['ajax']) && $_REQUEST['ajax']==='admission-form')\n\t//\t{\n // echo \"Bismillah Hir Rahmanur Rahim\";\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t//\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n \n\t//\tif(isset($_REQUEST['ajax']) && $_REQUEST['ajax']==='admission-form')\n\t//\t{\n // echo \"Bismillah Hir Rahmanur Rahim\";\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t//\t}\n\t}",
"public function validate()\n {\n // Tipo de validación\n $type = $this->request->get('type');\n $type = ($type == 'email') ? 'email' : 'username';\n \n Core::getService('account.validate')->$type($this->request->get('value'));\n $status = 'taken';\n \n if (Core_Error::isPassed())\n {\n $status = 'ok'; \n }\n \n $this->call(\"var obj = $('#\" . $this->request->get('obj') . \"'); signup.show_status(obj, '{$status}');\");\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='docingresados-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='entry-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='respuestas-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='departamento-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'listing-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='doheader-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='dodetail-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif (isset ( $_POST ['ajax'] ) && $_POST ['ajax'] === 'whitelist-form')\n\t\t{\n\t\t\techo CActiveForm::validate ( $model );\n\t\t\tYii::app ()->end ();\n\t\t}\n\t}",
"public function ajax_email(){\n\t\t//loading the form validation library\n\t\t$this->load->library('form_validation');\n\t\t//validation rules\n\t\t$this->form_validation->set_rules('em', 'Email', 'valid_email');\n\t\t//check the validation throws any errors\n\t\tif ($this->form_validation->run() == FALSE)\n\t\t{\n\t\t\t//echoing the respond to the div that specified in the javascript\n\t\t\techo 'Invalid Email';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//echoing the respond to the div that specified in the javascript\n\t\t\techo 'Valid';\n\t\t}\n\t}",
"public function performAjaxValidation($model)\r\n {\r\n if (isset($_POST['ajax']))\r\n Y::end(CActiveForm::validate($model));\r\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='request-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='pagosconceptos-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n {\n if(isset($_POST['ajax']) && $_POST['ajax']==='domain-form')\n {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='page-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='page-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='page-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model){\r\r\n\r\r\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='facturas-form'){\r\r\n\t\t\techo CActiveForm::validate($model);\r\r\n\t\t\tYii::app()->end();\r\r\n\t\t}\r\r\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='points-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'alocacao-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='donantes-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'consultor-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='announce-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='premium-ad-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'incoming-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='pedido-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='pedido-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='recargas-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'pago-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='residencebaseinfo-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='pago-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='pago-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'qircomentario-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='citas-reservada-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='talonario-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='materia-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'starGreetings-greeting-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"function admin_validate_data_ajax(){\n\t\t$this->layout = \"\";\n\t\t$this->autoRender = false;\n\t\tif($this->RequestHandler->isAjax()){\n\t\t\t$errors_msg = null;\n\t\t\t$data = $this->data;\n\t\t\tif(isset($this->data['Vendor']['id'])){\n\t\t\t\t$data['Vendor']['id'] = DECRYPT_DATA($data['Vendor']['id']);\n\t\t\t}\n\t\t\t\n\t\t\t$errors = $this->Vendor->validate_data($data);\n\t\t\t\n\t\t\tif ( is_array ($this->data) ){\n\t\t\t\tforeach ($this->data['Vendor'] as $key => $value ){\n\t\t\t\t\tif( array_key_exists ( $key, $errors) ){\n\t\t\t\t\t\tforeach ( $errors [ $key ] as $k => $v ){\n\t\t\t\t\t\t\t$errors_msg .= \"error|$key|$v\";\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$errors_msg .= \"ok|$key\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t \n\t\t\t}\n\t\t\techo $errors_msg;die();\n\t\t}\t\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='solicitudes-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'registration-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'inmueble-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='request-fuel-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='gejala-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='invoice-penjualan-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='stone-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'beneficiario-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n {\n if (isset($_POST['ajax']) && $_POST['ajax']==='nota-fiscal-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='Review-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='object-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='dias-letivos-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'live-in-mission-carers-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='posting-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='dprocesso-disciplinar-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_GET['layout'])){\n\t\t\t$this->layout = $_GET['layout'];\n\t\t}\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='users-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='indicadores-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='mentor-post-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"function clientContactValidateAction()\n\t{\n\t\tif($this->_request->isPost() && $_SERVER['HTTP_X_REQUESTED_WITH']=='XMLHttpRequest')\n\t\t{\n\t\t\t$request = $this->_request->getParams();\n\t\t\t$contact_email = $request['cemail'];\n\t\t\t$prev_email = $request['pemail'];\n\t\t\t$edit = $request['edit'];\n\t\t\t$client_obj = new Ep_User_Client();\n\t\t\techo $client_obj->checkContact($contact_email,$edit,$prev_email);\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='el-bez-quests-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='pedidos-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='spam-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='estudiante-evaluacion-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='basic-definition-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='film-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='results-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='roomclosure-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'planos-alimentares-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function runValidate()\n {\n Validate::run($this->request);\n }",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'donneur-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"function admin_validate_edit_cms_ajax(){\r\r\n\t\t\r\r\n\t\t$this->layout = \"\";\r\r\n\t\t$this->autoRender = false;\r\r\n\t\tif($this->RequestHandler->isAjax()){\r\r\n\t\t\t$errors_msg = null;\r\r\n\t\t\tApp::import('Model','CmsPage');\r\r\n\t\t\t$this->CmsPage = new CmsPage();\r\r\n\t\t\t\r\r\n\t\t\t$data = $this->data;\r\r\n\t\t\tif(isset($data['CmsPage']['id'])){\r\r\n\t\t\t\t$data['CmsPage']['id'] = DECRYPT_DATA($data['CmsPage']['id']);\r\r\n\t\t\t}\r\r\n\t\t\t$errors = $this->CmsPage->valid_edit_cms($data);\r\r\n\t\t\tif ( is_array ( $this->data ) ){\r\r\n\t\t\t\tforeach ($this->data['CmsPage'] as $key => $value ){\r\r\n\t\t\t\t\tif( array_key_exists ( $key, $errors) ){\r\r\n\t\t\t\t\t\tforeach ( $errors [ $key ] as $k => $v ){\r\r\n\t\t\t\t\t\t\t$errors_msg .= \"error|$key|$v\";\r\r\n\t\t\t\t\t\t}\t\r\r\n\t\t\t\t\t}else {\r\r\n\t\t\t\t\t\t$errors_msg .= \"ok|$key\\n\";\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\t\t\techo $errors_msg;\r\r\n\t\t\tdie();\r\r\n\t\t}\t\r\r\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='providers-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"function ajax_validate_save_post()\n {\n }",
"protected function performAjaxValidation($model) {\n //echo 'si cae';exit;\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'schedule-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model) {\n\t\tif (\n\t\t\tisset($_POST['ajax']) && \n\t\t\t$_POST['ajax']==='user-form'\n\t\t) {\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n\t\tif (isset($_POST['ajax']) && $_POST['ajax'] === 'zona-educativa-form') {\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax'] === 'classes-form') {\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='share-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='publisher-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'list-contact-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model) {\n\t\tif (isset($_POST['ajax']) && $_POST['ajax'] === 'terms-form') {\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='content-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'cotizador-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'nube-factura-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='purchase-header-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='penjaminpasien-m-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'unidad-resp-ticket-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'pid-approval-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'aviso-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='articulos-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='employee-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'fddemandreceipt-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='gzterimabahanmakan-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='contractor-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='campaign-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'recruit-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'carrer-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model) {\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'plantel-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n }",
"protected function performAjaxValidation($model)\n\t{\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='temples-form')\n\t\t{\n\t\t\techo CActiveForm::validate($model);\n\t\t\tYii::app()->end();\n\t\t}\n\t}"
] | [
"0.79766375",
"0.7535804",
"0.6860131",
"0.6860131",
"0.6833871",
"0.6784885",
"0.6775202",
"0.67711323",
"0.6764112",
"0.6737663",
"0.67355454",
"0.6724824",
"0.67199975",
"0.6704958",
"0.66932213",
"0.6688998",
"0.66856104",
"0.6685253",
"0.6685253",
"0.6685253",
"0.6684122",
"0.66835374",
"0.667292",
"0.66677856",
"0.66630244",
"0.6655108",
"0.66525847",
"0.66509473",
"0.6648977",
"0.6648977",
"0.66484463",
"0.664732",
"0.664309",
"0.66414714",
"0.66414714",
"0.6641052",
"0.6640937",
"0.66408783",
"0.66408616",
"0.6637236",
"0.66364473",
"0.66305506",
"0.6629554",
"0.662805",
"0.66273016",
"0.66254425",
"0.6623703",
"0.6623457",
"0.6622179",
"0.6619359",
"0.66117007",
"0.66110605",
"0.6610798",
"0.6607507",
"0.6606362",
"0.660558",
"0.6603507",
"0.6601762",
"0.6601645",
"0.66008556",
"0.6600299",
"0.6599498",
"0.6597717",
"0.65953803",
"0.6594512",
"0.6594301",
"0.65940595",
"0.6589112",
"0.65874445",
"0.6587396",
"0.6586238",
"0.6585987",
"0.6585833",
"0.65855193",
"0.65854985",
"0.65795213",
"0.65791273",
"0.6579109",
"0.6577812",
"0.65758437",
"0.65751547",
"0.6573167",
"0.6572345",
"0.6571965",
"0.65713406",
"0.6571003",
"0.6570696",
"0.6569799",
"0.65693045",
"0.65690905",
"0.65669453",
"0.65652615",
"0.6564998",
"0.6564873",
"0.65645194",
"0.6564518",
"0.65632385",
"0.65625596",
"0.6561483",
"0.65613127"
] | 0.6597152 | 63 |
some processes before real controller execution | public function __construct($install)
{
$this->checkInstall($install);
$this->checkAdmin();
$this->scanPages();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function preDispatch();",
"public function preDispatch()\n\t{\n\n\t\t\n\t\t\n\t}",
"public function preDispatch() {\n\t\t\n\t\t}",
"protected function preProcess() {}",
"protected function beforeProcess() {\n }",
"public function preDispatch() { }",
"public function preDispatch()\n {\n //...\n }",
"public function preExecute(){\n\n\t\n\t}",
"public function preDispatch()\n {\n\n }",
"public function before_run(){}",
"public function preProcess();",
"public function preProcess();",
"public function preExec()\n {\n }",
"private function before_execute()\n {\n }",
"protected function _preExec()\n {\n }",
"protected function doExecute()\n\t{\n\t\t// Your application routines go here.\n\t}",
"protected function _process() {}",
"protected function _process() {}",
"protected function _process() {}",
"protected function _process() {}",
"public function before_run() {}",
"private function executeHandle() {\n // call hook function\n is_callable(config('hooks.onExecute')) && call_user_func(config('hooks.onExecute'), $this);\n // execute controller\n $this->router->executeController();\n }",
"public function preExecute() {\n }",
"public function preAction()\n {\n // Nothing to do\n }",
"public function execute() {\n\t\t$controller = $this->manager->get($this->getController());\n\t\t$reflection = new \\ReflectionClass($controller);\n\t\t$controller->run( $this->getAction($reflection) );\n\t}",
"abstract protected function _preProcess();",
"function Execute()\n\t\t{\n\t\t\t$controller = new $this->CONTROLLER();\n\t\t\t$controller->Initialise($this->get, $this->post, $this->files);\n\t\t\t$controller->StartFilters();\n\t\t\t$controller->{$this->ACTION}();\n\t\t\t$controller->StopFilters();\n\t\t}",
"private static function proccess()\n {\n $files = ['Process', 'Command', 'Translator', 'Migrations', 'Links', 'Tag', 'Model', 'View', 'Controller', 'Seeds', 'Router', 'Exception', 'Events', 'Alias', 'Middleware', 'Helper', 'Tests', 'Mail', 'Query'];\n $folder = static::$root.'Processes'.'/';\n\n self::call($files, $folder);\n\n $files = ['TranslatorFolderNeededException', 'TranslatorManyFolderException'];\n $folder = static::$root.'Processes/Exceptions'.'/';\n\n self::call($files, $folder);\n }",
"protected function initializeProcessAction() {}",
"function preDispatch()\n {\n\n }",
"protected static function runController()\n {\n $msg = new MoovicoRequestMessage(self::$route);\n self::$response = self::doRunController($msg);\n }",
"protected function _postExec()\n {\n }",
"public function process() {}",
"public function process() {}",
"public function process() {}",
"public function process() {}",
"public function execute()\n\t{\t\n\t\t$this->controller = new Controller($this->path);\n\t\t$this->static_server = new StaticServer($this->path);\n\t\t\n\t\tCurrent::$plugins->hook('prePathParse', $this->controller, $this->static_server);\n\t\t\n\t\tif ( $this->static_server->isFile() )\n\t\t{\n\t\t\tCurrent::$plugins->hook('preStaticServe', $this->static_server);\n\t\t\t\n\t\t\t// Output the file\n\t\t\t$this->static_server->render();\n\t\t\t\n\t\t\tCurrent::$plugins->hook('postStaticServe', $this->static_server);\n\t\t\t\n\t\t\texit;\n\t\t}\n\t\t\n\t\t// Parse arguments from path and call appropriate command\n\t\tCowl::timer('cowl parse');\n\t\t$request = $this->controller->parse();\n\t\tCowl::timerEnd('cowl parse');\n\t\n\t\tif ( COWL_CLI )\n\t\t{\n\t\t\t$this->fixRequestForCLI($request);\n\t\t}\n\t\t\n\t\t$command = new $request->argv[0];\n\t\t\n\t\t// Set template directory, which is the command directory mirrored\n\t\t$command->setTemplateDir(Current::$config->get('paths.view') . $request->app_directory);\n\t\t\n\t\tCurrent::$plugins->hook('postPathParse', $request);\n\t\t\n\t\tCowl::timer('cowl command run');\n\t\t$ret = $command->run($request);\n\t\tCowl::timerEnd('cowl command run');\n\t\t\n\t\tCurrent::$plugins->hook('postRun');\n\t\t\n\t\tif ( is_string($ret) )\n\t\t{\n\t\t\tCowl::redirect($ret);\n\t\t}\n\t}",
"public function preProcess() {\n $this->request->setParameter('fromReg','1');\n $this->objController->forward('profile','dpp');\n die;\n }",
"public function run()\r\n\t{\r\n\t\t$this->loadModule();\r\n\t\r\n\t\t$this->loadController();\r\n\t\r\n\t\t// this can be overwritten by user in controller\r\n\t\t$this->loadDefaultView();\r\n\t}",
"public function process() {\n // on va lui passer le contexte en premier paramètre\n // puis on va lui passer les paramètres du path comme\n // paramètres supplémentaires\n $args = array_merge(\n array($this->_context),\n $this->_context->route->params\n );\n\n $this->_context->require_part('controller', $this->controller);\n $controller = new $this->controller;\n\n // CALL STAGES BEFORE ACTION\n\n $stages = array(\n '_before_action'\n );\n\n $_response = null;\n $responses_stack = array();\n\n foreach($stages as $stage) {\n $_response = $this->call_stage($controller,$stage,$this->action, $responses_stack);\n\n // Si on obtient un objet de type Response, on stoppe\n\n if($_response instanceof Response) {\n return $this->output($_response); // ! RETURN\n }\n else {\n $responses_stack[$stage] = $_response;\n }\n }\n\n\n // CALL ACTION\n if(! method_exists($controller, $this->action)) {\n throw new \\InvalidArgumentException('Action '.$this->action.' does not exists in controller '. get_class($controller));\n }\n $action_response = call_user_func_array(array($controller, $this->action), $args);\n\n if($action_response instanceof Response) {\n return $this->output($action_response); // ! RETURN\n }\n\n\n if(is_null($action_response)) {\n // si la réponse est nulle, on ne fait rien tout simplement\n //@todo : faire autre chose, envoyer un 204 ?\n $class = get_class($controller);\n r(\"@todo : empty $class return\");\n return; // ! RETURN\n }\n elseif(is_string($action_response)) {\n $response = new Response($action_response, $headers=array());\n return self::output($response); // ! RETURN\n }\n\n\n }",
"public function runMaster() {\n\t\t$this->_runLifecycle('analyze');\n\t\t$this->_runLifecycle('resources');\n\t\t$this->_runLifecycle('authenticate');\n\t\t$this->_runLifecycle('authorize');\n\t\t$this->_runLifecycle('process');\n\t\t$this->_runLifecycle('output');\n\t\t$this->_runLifecycle('hangup');\n\t}",
"protected function process()\n {}",
"public function start()\n\t{\n\t\t// Get contoller and action names\n\t\t$this->getControllerName();\n\t\t$this->getActionName();\n\n\t\t// Set Names of executing class and action names\n\t\t$this->class_Name = ucfirst($this->controllerName);\n\t\t$this->action_Name = ucfirst($this->actionName);\n\n\t\t// Set globals variable\n\t\t$this->setGlobalsData();\n\n\t\t// Run action\n\t\t$this->getControllerAction();\n\t}",
"public function execute()\n {\n // init container.\n $this->initContainer();\n\n // routing\n $this->routing();\n\n // action chain.\n while ($action = $this->actionChain->getCurrentAction()) {\n\n // clear.\n $this->filterChain->clear();\n $this->container->register('errorList', $this->actionChain->getCurrentErrorList());\n\n $this->filterChain->setAction($action['controller'], $action['action']);\n $this->filterChain->build();\n $this->filterChain->execute();\n\n $this->actionChain->next();\n }\n\n // response.\n $this->response->execute();\n }",
"public function preAction() {\n\n }",
"public function preload()\n {\n if (Tools::getValue('controller') != ''\n && (Tools::getValue('controller') == 'Onehopsmsservice'\n || Tools::getValue('controller') == 'onehopsmsservice')) {\n $token = Tools::getAdminTokenLite('AdminModules');\n $request_scheme = $_SERVER['REQUEST_SCHEME'] ? $_SERVER['REQUEST_SCHEME'] : 'http';\n $hostlink = $request_scheme . \"://\" . $_SERVER['SERVER_NAME'] . $_SERVER['PHP_SELF'];\n $ctrlconfi = \"?controller=AdminModules&configure=\" . Tools::getValue('controller');\n $urlLink = $hostlink . $ctrlconfi .\"&token=\" . $token;\n Tools::redirect($urlLink);\n }\n }",
"public function preAction()\n {\n }",
"protected function before(){}",
"public function process() {\n }",
"public function process() {\n }",
"public function process() {\n }",
"public function preDispatch()\r\n {\r\n $this->View()->setScope(Enlight_Template_Manager::SCOPE_PARENT);\r\n\r\n $this->View()->sUserLoggedIn = $this->admin->sCheckUser();\r\n $this->View()->sUserData = $this->getUserData();\r\n }",
"protected function _before(){\n $this->startApplication();\n }",
"private function launcher() {\n \n $controller = $this->controller;\n $task = $this->task;\n \n if (!isset($controller)) {\n $controller = 'IndexController';\n }\n else {\n $controller = ucfirst($controller).'Controller';\n }\n \n if (!isset($task)) {\n $task = 'index';\n }\n \n $c = new $controller();\n \n call_user_func(array($c, $task));\n \n Quantum\\Output::setMainView($this->controller, $task);\n \n\n }",
"public function beforeExecuteRoute()\n {\n if (method_exists($this, 'initialize')) {\n $this->initialize();\n }\n\n $this->middlewareHandler();\n }",
"public function dispatch()\n {\n $this->response = $this->frontController->execute();\n }",
"public function postExec()\n {\n }",
"public function process()\n {\n // do nothing here\n }",
"public function run()\n \t{\n \t\t$controller = $this->factoryController();\n\n \t\t$action = $this->_currentAction;\n\n \t\t$controller->$action();\n \t}",
"public function run(){\n $this->session->start();\n $this->request->prepareUrl();\n $this->file->require('App/index.php');\n list($controller,$method,$arguments) = $this->route->getProperRoute();\n }",
"public function preDispatch()\n\t{\n\t\t$this->_actionController->initView();\n\t\t\n\t\t// We have to store the values here, because forwarding overwrites\n\t\t// the request settings.\n\t\t$request = $this->getRequest();\n\t\t$this->_lastAction = $request->getActionName();\n\t\t$this->_lastController = $request->getControllerName();\n\t}",
"public static function post_process() {}",
"protected function runLogic()\n {\n Logic::run($this->request); /* The logic to attempt to parse the request */\n }",
"public function preExecute()\n {\n $this->getContext()->getConfiguration()->loadHelpers(array('Url', 'sfsCurrency'));\n \n if ($this->getActionName() == 'index') {\n $this->checkOrderStatus();\n }\n }",
"function auto_run()\n {\n \t//-----------------------------------------\n \t// INIT\n \t//-----------------------------------------\n \t\n \tif ( isset($this->ipsclass->input['j_do']) AND $this->ipsclass->input['j_do'] )\n \t{\n \t\t$this->ipsclass->input['do'] = $this->ipsclass->input['j_do'];\n \t}\n \t\n \t//-----------------------------------------\n \t// What shall we do?\n \t//-----------------------------------------\n \t\n \tswitch( $this->ipsclass->input['do'] )\n \t{\n \t\tcase 'get-template-names':\n \t\t\t$this->get_template_names();\n \t\t\tbreak;\n \t\tcase 'get-member-names':\n \t\t\t$this->get_member_names();\n \t\t\tbreak;\n \t\tcase 'get-dir-size':\n \t\t\t$this->get_dir_size();\n \t\t\tbreak;\n\t\t\tcase 'post-editorswitch':\n\t\t\t\t$this->post_editorswitch();\n\t\t\t\tbreak;\n\t\t\tcase 'captcha_test':\n\t\t\t\t$this->captcha_test();\n\t\t\t\tbreak;\n \t}\n }",
"public function run() {\n //fire off any events that are a associated with this event\n $event = new Event(KernelEvents::REQUEST_START);\n\n $this->container->get('EventDispatcher')->dispatch('all', KernelEvents::REQUEST_START, $event);\n\n $this->container->get('EventDispatcher')->dispatch($this->httpRequest->getRequestParams()->getYmlKey(), KernelEvents::REQUEST_START, $event);\n\n //initialize the MVC\n $nodeConfig = $this->httpRequest->getNodeConfig();\n \n $cmd = $this->getKernelRunner();\n\n\n $result = $cmd->execute($nodeConfig);\n\n $this->httpResponse->setAttribute('result', $result['data']);\n\n //file_put_contents('/var/www/glenmeikle.com/logs/db-debug.log', print_r($this->httpRequest, true), FILE_APPEND);\n // echo \"node filters\\r\\n\";\n runFilters($this->httpRequest->getSiteParams()->getSitePath(). DIRECTORY_SEPARATOR . $this->httpRequest->getNodeConfig()['componentPath'] . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'filters.yml', $this->httpRequest->getRequestParams()->getYmlKey(),FilterEvents::FILTER_REQUEST_FORWARD);\n // echo \"all filters\\r\\n\";\n runFilters($this->httpRequest->getSiteParams()->getConfigPath() . 'filters.yml', 'all',FilterEvents::FILTER_REQUEST_FORWARD);\n\n \n $event = new Event(KernelEvents::RESPONSE_END, $result);\n $this->container->get('EventDispatcher')->dispatch('all', KernelEvents::RESPONSE_END, $event);\n $this->container->get('EventDispatcher')->dispatch($this->httpRequest->getRequestParams()->getYmlKey(), KernelEvents::RESPONSE_END, $event);\n\n /**\n * now we dump the response to the page\n */\n renderResult($result, $this->httpResponse->getHeaders(), $this->httpResponse->getCookies());\n }",
"public function process()\n {\n\n }",
"public function preExecute()\n {\n if (clsCommon::permissionCheck($this->getModuleName().\"/\".$this->getActionName()) == false){\n $this->getUser()->setFlash(\"errMsg\",sfConfig::get('app_Permission_Message'));\n $this->redirect('default/index');\n }\n }",
"public function start() {\n\n $controller = ucfirst($this->routes[0]);\n\n // Storing the method name if it is called else assign null.\n\n $method = isset($this->routes[1]) ? $this->routes[1] : null;\n\n // Stroing the parameter if it is passed else assign null.\n\n $parameter = isset($this->routes[2]) ? $this->routes[2] : null;\n \n // Requiring parent class of controller and model.\n\n require_once ROOT . '/system/core/Controller.php';\n require_once ROOT . '/system/core/Model.php';\n\n $this->auto_load();\n\n // Instanitaing an object of the controller class.\n\n $obj = new $controller();\n\n // If method was called also parameter was passed.\n\n if(!(is_null($method)) && !((is_null($parameter)))) {\n\n $obj->$method($parameter);\n }\n\n // If method was called but the parameter was null.\n\n else {\n \n $obj->$method();\n }\n }",
"public function process()\n\t{\n\t\t$action = $this->getAction();\n\t\tswitch (strtolower($action))\n\t\t{\n\t\t\tcase 'get':\n\t\t\tcase 'put':\n\t\t\tcase 'post':\n\t\t\tcase 'delete':\n\t\t}\t\n\t}",
"public function __init()\n\t{\n\t\t// This code will run before your controller's code is called\n\t}",
"public function run() \n\t{\n\t\tcall_user_func_array(array(new $this->controller, $this->action), $this->params);\t\t\n\t}",
"public function preExecute()\n {\n if (clsCommon::permissionCheck($this->getModuleName().\"/\".$this->getActionName()) == false){\n $this->getUser()->setFlash(\"errMsg\",sfConfig::get('app_Permission_Message'));\n $this->redirect('default/index');\n } \n }",
"protected function _exec()\n {\n }",
"public function beforeStart () {\n }",
"protected function beforeAction () {\n\t}",
"public function run() {\n $this->load_dependencies();\n $this->load_localization();\n $this->load_admin();\n $this->load_public();\n }",
"protected function _before() {\n\t\tparent::_before ();\n\t\t$this->_startServices ( true );\n\t\t$this->startup = new Startup ();\n\t\tEventsManager::start ();\n\t\tTranslatorManager::start ( 'fr_FR', 'en' );\n\t\t$this->_initRequest ( 'RestApiController', 'GET' );\n\t}",
"public function execute()\n {\n $controllerClassName = $this->requestUrl->getControllerClassName();\n $controllerFileName = $this->requestUrl->getControllerFileName();\n $actionMethodName = $this->requestUrl->getActionMethodName();\n $params = $this->requestUrl->getParams();\n \n if ( ! file_exists($controllerFileName))\n {\n exit('controlador no existe');\n }\n\n require $controllerFileName;\n\n $controller = new $controllerClassName();\n\n $response = call_user_func_array([$controller, $actionMethodName], $params);\n \n $this->executeResponse($response);\n }",
"public function preExecute()\n {\n // store current URI incase we need to be redirected back to this page\n $request = $this->getRequest();\n if($request->getPathInfo() != '/getEbayResults')\n {\n $this->getUser()->setAttribute('lastPageUri', $request->getPathInfo());\n }\n }",
"private function start()\n {\n // CSRF Watchdog\n $this->csrfWatchdog();\n\n // Retrieve and other services\n $this->retriever->watchdog();\n\n // Router Templater Hybrid\n $this->renderer->route();\n }",
"public function execute()\n\t{\n\t\t$this->run();\n\t}",
"public function preExecution($request){\n //the session is started only once\n if(!isset($_SESSION['zleft_session'])){\n session_start();\n $_SESSION['zleft_session'] = 1;\n }\n }",
"public function beforeStart()\n {\n }",
"function startup(&$controller) {\n $this->setVars();\n }",
"public function execute()\n\t{\n\t\t// Create the class prefix\n\t\t$prefix = 'controller_';\n\n\t\tif ( ! empty($this->directory))\n\t\t{\n\t\t\t// Add the directory name to the class prefix\n\t\t\t$prefix .= str_replace(array('\\\\', '/'), '_', trim($this->directory, '/')).'_';\n\t\t}\n\n\t\tif (Kohana::$profiling === TRUE)\n\t\t{\n\t\t\t// Start benchmarking\n\t\t\t$benchmark = Profiler::start('Requests', $this->uri);\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\t// Load the controller using reflection\n\t\t\t$class = new ReflectionClass($prefix.$this->controller);\n\n\t\t\tif ($class->isAbstract())\n\t\t\t{\n\t\t\t\tthrow new Kohana_Exception('Cannot create instances of abstract :controller',\n\t\t\t\t\tarray(':controller' => $prefix.$this->controller));\n\t\t\t}\n\n\t\t\t// Create a new instance of the controller\n\t\t\t$controller = $class->newInstance($this);\n\n\t\t\t// Execute the \"before action\" method\n\t\t\t$class->getMethod('before')->invoke($controller);\n\n\t\t\t// Determine the action to use\n\t\t\t$action = empty($this->action) ? Route::$default_action : $this->action;\n\t\t\t\n\t\t\t// Ensure the action exists, and use __call() if it doesn't\n\t\t\tif ($class->hasMethod('action_'.$action))\n\t\t\t{\n\t\t\t\t// Execute the main action with the parameters\n\t\t\t\t$class->getMethod('action_'.$action)->invokeArgs($controller, $this->_params);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$class->getMethod('__call')->invokeArgs($controller,array($action,$this->_params));\n\t\t\t}\n\n\t\t\t// Execute the \"after action\" method\n\t\t\t$class->getMethod('after')->invoke($controller);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tif (isset($benchmark))\n\t\t\t{\n\t\t\t\t// Delete the benchmark, it is invalid\n\t\t\t\tProfiler::delete($benchmark);\n\t\t\t}\n\n\t\t\tif ($e instanceof ReflectionException)\n\t\t\t{\n\t\t\t\t// Reflection will throw exceptions for missing classes or actions\n\t\t\t\t$this->status = 404;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// All other exceptions are PHP/server errors\n\t\t\t\t$this->status = 500;\n\t\t\t}\n\n\t\t\t// Re-throw the exception\n\t\t\tthrow $e;\n\t\t}\n\n\t\tif (isset($benchmark))\n\t\t{\n\t\t\t// Stop the benchmark\n\t\t\tProfiler::stop($benchmark);\n\t\t}\n\n\t\treturn $this;\n\t}",
"protected function doExecute()\n\t{\n\t\t$controller = $this->getController();\n\n\t\t$controller = new $controller($this->input, $this);\n\n\t\t$this->setBody($controller->execute());\n\t}",
"protected function initProcessing() {\n foreach ($this->requests as $k => $request) {\n if (isset($request->timeStart)) continue;\n $this->getDefaultOptions()->applyTo($request);\n $request->getOptions()->applyTo($request);\n $request->timeStart = microtime(true);\n }\n $this->active = true;\n }",
"protected function afterProcess() {\n }",
"public function execute()\n\t{\n\t\t// Create the class prefix\n\t\t$prefix = 'controller_';\n\n\t\tif ($this->directory)\n\t\t{\n\t\t\t// Add the directory name to the class prefix\n\t\t\t$prefix .= str_replace(array('\\\\', '/'), '_', trim($this->directory, '/')).'_';\n\t\t}\n\n\t\tif (Kohana::$profiling)\n\t\t{\n\t\t\t// Set the benchmark name\n\t\t\t$benchmark = '\"'.$this->uri.'\"';\n\n\t\t\tif ($this !== Request::$instance AND Request::$current)\n\t\t\t{\n\t\t\t\t// Add the parent request uri\n\t\t\t\t$benchmark .= ' « \"'.Request::$current->uri.'\"';\n\t\t\t}\n\n\t\t\t// Start benchmarking\n\t\t\t$benchmark = Profiler::start('Requests', $benchmark);\n\t\t}\n\n\t\t// Store the currently active request\n\t\t$previous = Request::$current;\n\n\t\t// Change the current request to this request\n\t\tRequest::$current = $this;\n\n\t\ttry\n\t\t{\n\t\t\t// Load the controller using reflection\n\t\t\t$class = new ReflectionClass($prefix.$this->controller);\n\n\t\t\tif ($class->isAbstract())\n\t\t\t{\n\t\t\t\tthrow new Kohana_Exception('Cannot create instances of abstract :controller',\n\t\t\t\t\tarray(':controller' => $prefix.$this->controller));\n\t\t\t}\n\n\t\t\t// Create a new instance of the controller\n\t\t\t$controller = $class->newInstance($this);\n\n\t\t\t// Execute the \"before action\" method\n\t\t\t$class->getMethod('before')->invoke($controller);\n\n\t\t\t// Determine the action to use\n\t\t\t$action = empty($this->action) ? Route::$default_action : $this->action;\n\n\t\t\t// Execute the main action with the parameters\n\t\t\t$class->getMethod('action_'.$action)->invokeArgs($controller, $this->_params);\n\n\t\t\t// Execute the \"after action\" method\n\t\t\t$class->getMethod('after')->invoke($controller);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t// Restore the previous request\n\t\t\tRequest::$current = $previous;\n\n\t\t\tif (isset($benchmark))\n\t\t\t{\n\t\t\t\t// Delete the benchmark, it is invalid\n\t\t\t\tProfiler::delete($benchmark);\n\t\t\t}\n\n\t\t\tif ($e instanceof ReflectionException)\n\t\t\t{\n\t\t\t\t// Reflection will throw exceptions for missing classes or actions\n\t\t\t\t$this->status = 404;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// All other exceptions are PHP/server errors\n\t\t\t\t$this->status = 500;\n\t\t\t}\n\n\t\t\t// Re-throw the exception\n\t\t\tthrow $e;\n\t\t}\n\n\t\t// Restore the previous request\n\t\tRequest::$current = $previous;\n\n\t\tif (isset($benchmark))\n\t\t{\n\t\t\t// Stop the benchmark\n\t\t\tProfiler::stop($benchmark);\n\t\t}\n\n\t\treturn $this;\n\t}",
"public function before()\r\n {\r\n \t// Profile the loader\r\n \t\\Profiler::mark('Start of loader\\'s before() function');\r\n \t\\Profiler::mark_memory($this, 'Start of loader\\'s before() function');\r\n \t\r\n // Set the environment\r\n parent::before();\r\n \r\n // Load the config for Segment so we can process analytics data.\r\n \\Config::load('segment', true);\r\n \r\n // Load the config file for event names. Having events names in one place keeps things synchronized.\r\n \\Config::load('analyticsstrings', true);\r\n \r\n // Engine configuration\r\n \\Config::load('engine', true);\r\n\t\t\r\n\t\t// Load the package configuration file.\r\n\t\t\\Config::load('tiers', true);\r\n\t\t\r\n\t\t// Soccket connection configuration\r\n\t\t\\Config::load('socket', true);\r\n \r\n /**\r\n * Ensure that all user language strings are appropriately translated.\r\n * \r\n * @link https://github.com/fuel/core/issues/1860#issuecomment-92022320\r\n */\r\n if (is_string(\\Input::post('language', false))) {\r\n \t\\Environment::set_language(\\Input::post('language', 'en'));\r\n }\r\n \r\n // Load the error strings.\r\n \\Lang::load('errors', true);\r\n }",
"public function run()\n {\n Model::unguard();\n\n //$this->call(TracuuFaker::class);\n //$this->call(SanphamFaker::class);\n //$this->call(DeliveryFaker::class);\n $this->call(updateImages::class);\n\n Model::reguard();\n }",
"function execute()\n\t{\t\n\t\t// Check for requested action\n\t\t$app_action = isset($_REQUEST['ax']) ? $_REQUEST['ax'] : 'startup_view';\n\t\t\n\t\tif(method_exists($this,$app_action))\n\t\t{\n\t\t\t// Call requested action\n\t\t\t$this->$app_action();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->default_action($app_action);\n\t\t}\n\t}",
"public function preDispatch()\n {\n \tignore_user_abort(true);\n set_time_limit(600);\n \n if (\n !isset($this->member) ||\n !($this->member->site_admin || $this->member->profile->site_admin)\n ) { return $this->_denied(); }\n else {\n $this->view->headTitle('Admin', 'PREPEND');\n $this->view->headTitle('Cron', 'PREPEND');\n \n // Change Sub Layout\n $this->_helper->ViaMe->setSubLayout('default');\n }\n }",
"public function after_run(){}",
"abstract protected function _preHandle();",
"public function generatePage_preProcessing() {}",
"protected function executeAction() {}",
"protected function executeAction() {}",
"protected function executeAction() {}",
"protected function executeAction() {}"
] | [
"0.71635187",
"0.7140336",
"0.71216357",
"0.70947576",
"0.7038613",
"0.69952285",
"0.6880463",
"0.6861911",
"0.6781827",
"0.6730964",
"0.66993326",
"0.66993326",
"0.669844",
"0.66829073",
"0.6663183",
"0.6651007",
"0.6579757",
"0.6579757",
"0.6579757",
"0.6579757",
"0.64801973",
"0.6420434",
"0.6401896",
"0.6373886",
"0.63589823",
"0.6322674",
"0.6321815",
"0.6310817",
"0.6301937",
"0.62906766",
"0.62732273",
"0.6247999",
"0.6228792",
"0.62286973",
"0.62286973",
"0.62286973",
"0.62079245",
"0.61750734",
"0.6171563",
"0.61667025",
"0.6159893",
"0.61516577",
"0.6136661",
"0.61195",
"0.6110984",
"0.610588",
"0.60999894",
"0.609989",
"0.608292",
"0.608292",
"0.608292",
"0.60739857",
"0.60688776",
"0.6056185",
"0.6048816",
"0.6037733",
"0.6037314",
"0.6033663",
"0.60286146",
"0.6019988",
"0.6000972",
"0.59919304",
"0.5988611",
"0.5987121",
"0.5984695",
"0.59723914",
"0.5955537",
"0.5951183",
"0.5944305",
"0.5928135",
"0.59125173",
"0.5907243",
"0.5904675",
"0.5904301",
"0.5904256",
"0.59038526",
"0.5893749",
"0.58933455",
"0.5885481",
"0.58759856",
"0.5875876",
"0.58748716",
"0.58676827",
"0.58568597",
"0.5854133",
"0.58516103",
"0.58489937",
"0.58416927",
"0.5841031",
"0.58389413",
"0.5836948",
"0.58354485",
"0.58353263",
"0.58318156",
"0.58305335",
"0.5818485",
"0.5818467",
"0.58175766",
"0.58166885",
"0.58166885",
"0.58166885"
] | 0.0 | -1 |
check if user is logged in as admin | private function checkAdmin()
{
$admin = false;
if (isset($_SESSION['admin'])) {
F::set('admin', 1);
$admin = true;
}
F::view()->assign(array('admin' => $admin));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function is_admin()\n {\n //is a user logged in?\n\n //if so, check admin status\n\n //returns true/false\n\n }",
"protected function isAdminUser() {}",
"function isUserAdmin() {\r\n $user = $_SESSION['user'];\r\n return checkAdminStatus($user);\r\n }",
"protected function isCurrentUserAdmin() {}",
"protected function isCurrentUserAdmin() {}",
"function is_user_admin()\n {\n }",
"private function isAdmin() {\n\t\tif (Auth::user()->user == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}",
"public function isAdminLoggedIn() {\n\t\t$user = $this->getLoggedInUser();\n\t\treturn $user && $user->isAdmin();\n\t}",
"public function isAdmin()\n {\n return ($this->username === \"admin\");\n }",
"public function is_admin() {\n if($this->is_logged_in() && $this->user_level == 'a') {\n return true;\n } else {\n // $session->message(\"Access denied.\");\n }\n }",
"function checkAdminLogin() \n{\n\tif(checkNotLogin())\n\t{\n\t\treturn false;\n\t}\n\t\n\t$user = $_SESSION['current_user'];\n\t\n\tif($user->isAdmin())\n\t{\n\t\treturn true;\n\t}\n\telse \n\t{\n\t\treturn false;\n\t}\n}",
"public function checkIsAdmin()\n {\n return $this->user_admin;\n }",
"public function isUserOnAdminArea()\n\t{\n\t\treturn is_admin();\n\t}",
"function is_admin()\n\t{\n\t\treturn strtolower($this->ci->session->userdata('DX_role_name')) == 'admin';\n\t}",
"function is_admin_logged_in()\n{\n global $current_user;\n return ($current_user != NULL && $current_user['un'] == 'admin');\n}",
"function isAdmin() {\n //FIXME: This needs to (eventually) evaluate that the user is both logged in *and* has admin credentials.\n //Change to false to see nav and detail buttons auto-magically disappear.\n return true;\n}",
"function isAdmin(){\r\n\r\n\t\tif($this->user_type == 'Admin'){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"protected function userIsAdmin ()\n {\n $tokenHeader = apache_request_headers();\n $token = $tokenHeader['token'];\n $datosUsers = JWT::decode($token, $this->key, $this->algorithm);\n\n if($datosUsers->nombre==\"admin\")\n {\n return true;\n }\n else\n {\n return false;\n } \n }",
"function is_admin(){\r\n if (isset($_SESSION['admin']) && $_SESSION['admin']){\r\n return true;\r\n }\r\n return false;\r\n }",
"function is_admin()\n{\n global $app;\n if (is_authenticated()) {\n $user = $app->auth->getUserData();\n return ($user['role'] === '1');\n } else {\n return false;\n }\n}",
"public function checkIsAdmin() {\n\t\treturn Mage::getSingleton('admin/session')->isLoggedIn();\n\t}",
"function isAdmin(){\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->role) == 1;\n }",
"function isAdmin(){\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->role) == 1;\n }",
"function isAdmin(){\n\t\treturn ($this->userlevel == ADMIN_LEVEL || $this->username == ADMIN_NAME);\n\t}",
"public function isAdmin(){\n $user = Auth::guard('web') -> user();\n if ($user -> state != 1) {\n return 0;\n }\n else {\n return 1;\n }\n }",
"function is_admin_logged_in()\n\t{\n\t\tif(isset($_SESSION['admin']['au_id']))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"public function isAdmin();",
"public static function isAdmin() {\r\n\r\n return Session::get('admin') == 1;\r\n\r\n }",
"function user_AuthIsAdmin() {\n\tglobal $AUTH;\n\t\n\treturn isset($AUTH['admin']) && ($AUTH['admin'] === 1);\n}",
"function isAdmin() {\n if (\\Illuminate\\Support\\Facades\\Auth::user()->rol_id == 1) {\n return true;\n } else {\n return false;\n }\n }",
"public static function am_i_admin() \n {\n return ($_SESSION['_user'] == AV_DEFAULT_ADMIN || $_SESSION['_is_admin']);\n }",
"function isAdmin() {\n return ($this->userType == 'admin');\n }",
"public function is_admin()\n {\n $session = $this->session->userdata('user');\n if($session)\n {\n if($session['role'] == 'ADMIN')\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }\n else\n {\n return FALSE;\n $this->log_out();\n }\n }",
"public function isAdmin(){\n if($this->role==\"admin\"){\n return true;\n }\n return false;\n }",
"function iAmAdmin(){\n $adminIDs = Array( 1, 2 );\n \n return in_array( $_SESSION['userid'], $adminIDs );\n }",
"protected function _login_admin()\n\t{\n\t\tif ( $this->auth->logged_in('login') AND $this->auth->get_user()->has_permission('admin_ui'))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}",
"public static function isAdminLoggedIn()\r\n\t\t{\r\n\r\n\t\t\tif(isset($_SESSION['admin_session']))\r\n\t\t\t{\r\n\r\n\t\t\t\treturn $_SESSION['admin_session'];\r\n\r\n\t\t\t}\r\n\r\n\t\t}",
"public function is_admin()\n\t{\n\t\t$user = $this->get_current_user();\n\t\tif($user !== NULL)\n\t\t{\n\t\t\tif($user['auth'] == 255)\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"function isAdmin() {\n return !$this->isLoggedIn ? FALSE : ($this->member->adminID !== NULL ? TRUE : FALSE);\n }",
"function isAdmin() {\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->role) == 1;\n }",
"private function isAdmin() : bool\n {\n return $this->user->hasRole('admin');\n }",
"public static function isAdmin()\n {\n \t$user = Session::get('loginuser');\n \tif ($user == env('ADMINEMAIL')) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }",
"public static function authAdmin() {\n if (Yii::$app->user->can(\"administrator\") || Yii::$app->user->can(\"adminsite\")) {\n return TRUE; //admin ใหญ่\n }\n }",
"function isAdmin() {\n\tif (isset($_SESSION['user']) && $_SESSION['user']['user_type'] == 'admin' ) {\n\t\treturn true;\n\t}else{\n\t\treturn false;\n\t}\n}",
"public function isAdmin()\n {\n return ((string) strtoupper($this->data->user_role) === \"ADMIN\") ? true : false;\n }",
"static public function isAdmin(){\n if ( isset($_SESSION['admin']) && ($_SESSION['admin'] == 1)){\n return true;\n } else {\n return false;\n }\n }",
"function is_admin() {\n\tif(\n\t\tisset($_SESSION['admin']->iduser) \n\t\t&& !empty($_SESSION['admin']->iduser) \n\t\t&& $_SESSION['admin']->type = 'admin'\n\t\t&& $_SESSION['active']->type = 1\n\t\t&& $_SESSION['confirmed']->type = 1\n\t) return TRUE;\n\t\t\t\n\treturn FALSE;\n}",
"public function isAdmin()\n {\n return (\\Auth::user()->role == 'admin');\n }",
"public function memberIsAdmin()\n {\n return $_SESSION['__COMMENTIA__']['member_role'] === 'admin';\n }",
"public function adminControl()\n {\n $row = $this->currentUserData();\n if(isset($_SESSION['sess_user_type']) &&\n $_SESSION['sess_user_type'] == 'admin' && $row['user_type'] == 'admin'){\n return true;\n }\n }",
"public function isUserAdmin()\n\t{\n\t\treturn (Bn::getValue('user_type') == 'A');\n\t}",
"public function isAdmin()\n {\n return $this->hasCredential('admin');\n }",
"public function adminAuthentication()\n {\n /* Get logined user informations */\n $user = Auth::user();\n if ($user[\"role\"] === 2)\n {\n /* give a admin session */\n return true;\n } else {\n return abort('404');\n }\n }",
"public function isAdmin() {}",
"protected function isAdmin()\n {\n if (session()->get('role') == 'admin') {\n return true;\n }\n return false;\n }",
"public function check_admin() {\n return current_user_can('administrator');\n }",
"public function isAdmin()\n {\n return $this->isSuperUser() || $this->isMemberOf('admin');\n }",
"public static function isAdmin()\n\t{\n\t\treturn in_array( Auth::user()->username, Config::get( 'admin.usernames' ) );\n\t}",
"function getIsAdmin(){\n\t\treturn ( $this->user && $this->user->access_level >= User::LEVEL_ADMIN );\n\t}",
"protected function isAdmin()\n\t{\n\t\treturn is_admin();\n\t}",
"private function isAdmin() : bool\n {\n return $this->role('admin');\n }",
"function checkAdmin()\n\t {\n\t \tif(!$this->checkLogin())\n\t \t{\n\t \t\treturn FALSE;\n\t \t}\n\t \treturn TRUE;\n\t }",
"public function isAdmin() {\n return ($this->userlevel == ADMIN_LEVEL ||\n $this->username == ADMIN_NAME);\n }",
"function is_admin() {\n\tglobal $connection;\n\n\tif(isLoggedIn()) {\n\t\t$query = \"SELECT user_role FROM users WHERE user_id =\" . $_SESSION['user_id']. \"\";\n\t\t$result = mysqli_query($connection, $query);\n\t\tconfirm($result);\n\n\t\t$row = mysqli_fetch_array($result);\n\n\t\treturn $row['user_role'] === 'admin' ? true : false;\n\t}\n}",
"public static function isAdmin()\n {\n return auth()->check() && auth()->user()->panichd_admin;\n }",
"public function isAdmin()\n {\n return $this->role == 'admin';\n }",
"public function isAdmin(){\r\n\t\tif(!isset($_SESSION)){\r\n\t\t\tsession_start();\r\n\t\t}\r\n\t\tif(isset($_SESSION['admin']) && $_SESSION['admin'] == true){\r\n\t\t\treturn true;\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"function _isUserAdmin(){\n\n $output = 0;\n $userId = $this->session->userdata('userId');\n $user = $this->User_model->getUserByUserId($userId);\n $userRoleId = $user->user_roles_id;\n $userRole = $this->Roles_model->getUserRoleById($userRoleId);\n if($userRole->role === 'admin'){\n $output = 1;\n }\n return $output;\n }",
"public function isAdminLogged() {\n\n $user_data = $this->getAdminUserFromSession();\n\n // musi existovat user data a v tom navic admin_token\n if ($user_data != null) {\n if (array_key_exists(\"admin_token\", $user_data)) {\n // vypada to dobre, je prihlasen\n return true;\n }\n }\n\n // defaultni vystup\n return false;\n\n }",
"public function check_admin()\n {\n return current_user_can('administrator');\n }",
"function is_admin()\n {\n\tif(isset($_SESSION['ISADMIN']))\n\t {\n\t\treturn $this->check_session($_SESSION['ISADMIN']);\n\t }\n\t else\n\t {\n\t\t return false;\n\t }\n }",
"public function is_admin() {\n return $this->session->get(\"niveau_acces\") >= 2;\n }",
"public function isAdmin(){\n return $this->role=='admin';\n }",
"function is_admin()\n {\n if(isLoggedIn())\n {\n $username = $_SESSION['username'];\n $result = query(\"select user_role from users where username = '{$username}'\");\n $row = fetchRecords($result);\n if($row['user_role'] == \"admin\")\n {\n return true;\n }\n else\n {\n return false;\n }\n }\n return false;\n }",
"public function isAdmin() {\n return $this->admin; // cerca la colonna admin nella tabella users\n }",
"public function isAdmin()\n {\n return $this->role == 1;\n }",
"public function check_if_admin() {\n if(Auth::check() && Auth::user()->hasRole('admin')) {\n return true;\n }\n return false;\n }",
"private function isLoggedInAsAdmin($request)\n {\n return $request->session()->has('admin');\n }",
"function isAdmin()\n\t{\n\t\treturn $this->role == 3;\n\t}",
"public function isAdmin()\n {\n return ($this->type === User::ADMIN_USER);\n }",
"public function isAdmin()\n {\n return $this->user_role === User::ROLE_ADMIN;\n }",
"public function isAdmin()\n {\n return $this->authenticated;\n }",
"public static function isAdmin(): bool {\n if ($user = self::user() && self::user()->isAdmin) {\n return true;\n }\n return false;\n }",
"static function getIsAdmin() {\n\t\t$user = ctrl_users::GetUserDetail();\n\t\tif($user['usergroupid'] == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function isAdmin(){\n $role = $this->role->type;\n\n return $role === 'admin';\n }",
"public static function isAdmin(){\n if(self::exists('auth_type')&& self::get('auth_type')=='admin'){\n return true;\n }else\n return false;\n\n }",
"public static function isAdmin()\n {\n if (Yii::$app->user->isGuest) {\n return false;\n }\n $model = User::findOne(['username' => Yii::$app->user->identity->username]);\n if ($model == null) {\n return false;\n } elseif ($model->id_user_role == 1) {\n return true;\n }\n return false;\n }",
"public function isAdmin()\n {\n if ($this->is_logged_in()) {\n if (isset($_SESSION['user']['level']) && $_SESSION['user']['level'] >= self::ADMIN_USER_LEVEL) {\n return true;\n }\n }\n\n return false;\n }",
"public function getIsAdmin();",
"public function getIsAdmin();",
"protected function isAdmin()\n {\n if($_SESSION['statut'] !== 'admin')\n {\n header('Location: index.php?route=front.connectionRegister&access=adminDenied');\n exit;\n }\n }",
"public function isAdmin(){\n if($this->role->name = 'Administrator'){\n return true;\n }\n return false;\n }",
"public function isAdmin()\n {\n return ($this->role == 1) ? true : false;\n }",
"public function checkAdmin()\n {\n // there ..... need\n // END Check\n $auth = false;\n if($auth) {\n return true;\n }\n else{\n return false;\n }\n }",
"public function checkAdmin();",
"private function isAdmin() {\n\t\t$user = $this->userSession->getUser();\n\t\tif ($user !== null) {\n\t\t\treturn $this->groupManager->isAdmin($user->getUID());\n\t\t}\n\t\treturn false;\n\t}",
"public function isAdmin()\n {\n return $this->role == 'Administrator' ? true : false;\n }",
"public function isLoginAdmin()\n\t{\n\t\treturn (Bn::getValue('loginAuth') == 'A');\n\t}",
"public function isAdmin(){\n if($this->role->name == 'Administrator' && $this->is_active == 1){\n return true;\n }\n return false;\n }",
"public function isAdmin() {\n return $this->hasPermission('is_admin');\n }"
] | [
"0.887658",
"0.86839205",
"0.8511574",
"0.84852594",
"0.84840006",
"0.845779",
"0.8384511",
"0.83645785",
"0.83394444",
"0.83352596",
"0.83031887",
"0.8282803",
"0.82786137",
"0.8259667",
"0.82450604",
"0.82342416",
"0.82209474",
"0.82113117",
"0.81846356",
"0.8182155",
"0.81808996",
"0.81683636",
"0.81683636",
"0.81578755",
"0.8156449",
"0.8151417",
"0.8149857",
"0.81453097",
"0.814207",
"0.8141224",
"0.81383604",
"0.8124516",
"0.81198055",
"0.8119577",
"0.8117951",
"0.81091547",
"0.8107617",
"0.8101371",
"0.80964315",
"0.80931234",
"0.8083345",
"0.80786365",
"0.8075843",
"0.8066868",
"0.80599636",
"0.8051801",
"0.80506444",
"0.80369014",
"0.80362976",
"0.80289423",
"0.80229783",
"0.80133325",
"0.80125445",
"0.8007457",
"0.8007375",
"0.80056524",
"0.79966694",
"0.7993418",
"0.7989085",
"0.7980571",
"0.7980293",
"0.79782647",
"0.79741347",
"0.7969416",
"0.7957557",
"0.79557425",
"0.79509497",
"0.7947692",
"0.79453063",
"0.7944501",
"0.79289323",
"0.7925722",
"0.79247946",
"0.7919142",
"0.79158956",
"0.7912867",
"0.7910075",
"0.79072964",
"0.7904815",
"0.7903068",
"0.79018563",
"0.7895766",
"0.7893877",
"0.7893222",
"0.78922284",
"0.78900635",
"0.7888134",
"0.78859174",
"0.7865408",
"0.7865408",
"0.78610873",
"0.78590417",
"0.78508735",
"0.78470796",
"0.78418577",
"0.7838612",
"0.7835972",
"0.78308064",
"0.78270423",
"0.78207797"
] | 0.78303105 | 98 |
check if the install process have been done | private function checkInstall($install)
{
if (F::has('password'))
{
if (!$install && empty(F::get('password')))
{
F::redirect('/install');
}
elseif ($install && !empty(F::get('password')))
{
F::redirect('/login');
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function hasInstall();",
"protected function isInitialInstallationInProgress() {}",
"private function checkinstallrequirement()\r\n\t{\r\n\t\t$userCount = Core_User::getUsers(array(), '', '', '', true);\r\n\t\t\r\n\r\n\t\t\r\n\t\tif($userCount > 0)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn true;\r\n\t}",
"public function isValidInstall() {\n\t\treturn $this->install !== null;\n\t}",
"function installCheck() {\n // Check if user table exists for check.\n $result = $this->db->exec('SELECT name FROM sqlite_master WHERE type=\"table\" AND name=\"users\"');\n if (empty($result)) {\n $this->installSetupForm();\n } else {\n echo 'The site has already been installed.';\n }\n }",
"public function install()\n {\n // initialisation successful\n return true;\n }",
"public function install(): bool;",
"public function checkInstall()\n {\n if (($this->get('db') == '' || !file_exists($this->get('db'))) || $this->get('passwd') == '')\n {\n Misc::redirect('install.php');\n }\n }",
"public function needs_installing() {\n\t\t$settings = red_get_options();\n\n\t\tif ( $settings['database'] === '' && $this->get_old_version() === false ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function onInstall() {\n\t\tglobal $conf;\n\n\t\treturn true;\n\n\t}",
"function is_initial_install() : bool {\n\t// Support for PHPUnit & direct calls to install.php.\n\t// phpcs:ignore -- Ignoring requirement for isset on $_SERVER['PHP_SELF'] and wp_unslash().\n\tif ( php_sapi_name() === 'cli' && basename( $_SERVER['PHP_SELF'] ) === 'install.php' ) {\n\t\treturn true;\n\t}\n\n\tif ( ! defined( 'WP_CLI' ) ) {\n\t\treturn false;\n\t}\n\n\t$runner = WP_CLI::get_runner();\n\n\t// Check it's the core command.\n\tif ( $runner->arguments[0] !== 'core' ) {\n\t\treturn false;\n\t}\n\n\t// If it's the is-installed command and --network is set then\n\t// allow MULTISITE to be defined.\n\tif ( $runner->arguments[1] === 'is-installed' && isset( $runner->assoc_args['network'] ) ) {\n\t\treturn false;\n\t}\n\n\t// Check it's an install related command.\n\t$commands = [ 'is-installed', 'install', 'multisite-install', 'multisite-convert' ];\n\tif ( ! in_array( $runner->arguments[1], $commands, true ) ) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}",
"public function install()\n {\n if (!parent::install()\n || !$this->registerHook('displayBackOfficeHeader')\n || !$this->installModuleTab('onehopsmsservice', array(\n 1 => 'Onehop SMS Services'\n ), 0)\n || !$this->installDB()\n || !$this->registerHook('orderConfirmation')\n || !$this->registerHook('postUpdateOrderStatus')\n || !$this->registerHook('actionUpdateQuantity')\n || !$this->registerHook('actionObjectProductUpdateAfter')) {\n return false;\n }\n return true;\n }",
"public function install()\n\t{\n\t\treturn true;\n\t}",
"function checkInstallationStatus() {\n global $configFile, $_PATHCONFIG;\n\n $result = @include_once'..'.$configFile;\n if ($result === false) {\n return false;\n } else {\n return (defined('CONTREXX_INSTALLED') && CONTREXX_INSTALLED);\n }\n }",
"protected function beforeInstall(): bool\n {\n return true;\n }",
"protected static function isInstallToolSession() {}",
"public static function checkInstall() {\n\t\t\t// TODO: Something awesoem\n\t\t\tif(!file_exists(\"engine/values/mysql.values.php\")){\n\t\t\t\tLayoutManager::redirect(\"INSTALL.php\");\n\t\t\t} else if(file_exists(\"INSTALL.php\")){\n\t\t\t\tFileHandler::delete(\"INSTALL.php\");\n\t\t\t\techo \"<center><img src=\\\"images/warning.png\\\" height=14px border=0/> Please delete 'INSTALL.php'. It's unsafe to have this in the root directory.</center>\";\n\t\t\t} \n\t\t}",
"public function is_installed() {\n\n }",
"public function install()\n {\n include dirname(__FILE__) . '/sql/install.php';\n Configuration::updateValue('WI_SPENT_ENABLED', '0');\n Configuration::updateValue('WI_SPENT_AMOUNT', '');\n Configuration::updateValue('WI_SPENT_COUPON', '');\n Configuration::updateValue('WI_SPENT_DAYS', '30');\n return parent::install() &&\n $this->registerHook('header') &&\n $this->registerHook('backOfficeHeader') &&\n $this->registerHook('actionValidateOrder') &&\n $this->registerHook('postUpdateOrderStatus') &&\n $this->registerHook('actionOrderStatusPostUpdate') &&\n $this->registerHook('displayOrderConfirmation');\n }",
"protected function install(){ return true;}",
"public static function installToolEnableFileExists() {}",
"function __checkInstall() {\n\t\t$base = strpos($_SERVER['REQUEST_URI'], Dispatcher::getUrl());\n\t\t$base = substr($_SERVER['REQUEST_URI'], 0, $base);\n\t\tif (!file_exists(APP . 'config/INSTALLED') && !in_array(Dispatcher::getUrl($_SERVER['REQUEST_URI']), array('install', 'install/configure'))) {\n\t\t\theader('Location: '.$base.'install');exit;\n\t\t}\n\t}",
"protected function isInstalled(){\n\t\t$dsn = Configuration::get('dsn', '');\n\t\t//echo \"dsn = \" . $dsn . \"--\";\n\t\tif ($dsn == ''){\n\t\t\t$alreadyInstalled = false;\n\t\t}\n\t\telse{\n\t\t\t$alreadyInstalled = true;\n\t\t}\n\t\treturn $alreadyInstalled;\n\t}",
"private function isInstalled()\n {\n /** @var \\Magento\\Framework\\App\\DeploymentConfig $deploymentConfig */\n $deploymentConfig = $this->objectManager->get(\\Magento\\Framework\\App\\DeploymentConfig::class);\n return $deploymentConfig->isAvailable();\n }",
"public function install(){\n\n return true;\n\n }",
"private function waitSuccessInstall()\n {\n $root = $this->_rootElement;\n $successInstallText = $this->successInstallText;\n $launchAdmin = $this->launchAdmin;\n\n $root->waitUntil(\n function () use ($root, $successInstallText, $launchAdmin) {\n $isInstallText = $root->find($successInstallText, Locator::SELECTOR_XPATH)->isVisible();\n $isLaunchAdmin = $root->find($launchAdmin, Locator::SELECTOR_CSS)->isVisible();\n return $isInstallText == true || $isLaunchAdmin == true ? true : null;\n }\n );\n }",
"public function isInstallQueueEmpty() {}",
"public function install()\n {\n // execute sql script if needed\n $pdo = Box_Db::getPdo();\n $query=\"SELECT NOW()\";\n $stmt = $pdo->prepare($query);\n $stmt->execute();\n\n throw new Box_Exception(\"Throw exception to terminate module installation process with a message\", array(), 123);\n return true;\n }",
"public function install()\n {\n include(dirname(__FILE__).'/sql/install.php');\n\n return parent::install() &&\n $this->registerHook('header') &&\n $this->registerHook('backOfficeHeader') &&\n $this->registerHook('displayHome');\n }",
"public function hasInstalled()\n {\n return $this->installed !== null;\n }",
"public function install() {\n include(dirname(__FILE__) . '/sql/install.php');\n\n return parent::install() &&\n $this->registerHook('header') &&\n $this->registerHook('backOfficeHeader') &&\n $this->registerHook('actionProductUpdate') &&\n $this->registerHook('displayAdminProductsExtra');\n }",
"public function isInstalled(){\n return true;\n }",
"public function install()\n\t{\n\t\tConfiguration::updateValue('ORDERLIST_LIVE_MODE', false);\n\n\t\tinclude(dirname(__FILE__).'/sql/install.php');\n\n\t\treturn parent::install() &&\n\t\t\t$this->registerHook('header') &&\n\t\t\t$this->registerHook('backOfficeHeader') &&\n\t\t\t$this->registerHook('displayCustomerAccount') &&\n\t\t\t$this->registerHook('displayProductAdditionalInfo');\n\t}",
"protected function outputInstallToolNotEnabledMessageIfNeeded() {}",
"protected function outputInstallToolNotEnabledMessageIfNeeded() {}",
"public function requireInstallation() {\n return is_object($this->installer);\n }",
"function InstallFiles() {\n\t\n\t\treturn true;\n\t}",
"public function isInstalled(){\n if(self::$isInstalled === true){\n return true; \n }\n \n exec('type diatheke', $output, $returnVal);\n if($returnVal === 0){\n self::$isInstalled = true;\n return true;\n }else{\n return false;\n }\n \n }",
"public function install()\n {\n Configuration::updateValue('APISFACT_PRESTASHOP_TOKEN', '');\n\n Configuration::updateValue('APISFACT_PRESTASHOP_SERIEF', 'F001');\n Configuration::updateValue('APISFACT_PRESTASHOP_NUMEROF', '0');\n\n Configuration::updateValue('APISFACT_PRESTASHOP_SERIEB', 'B001');\n Configuration::updateValue('APISFACT_PRESTASHOP_NUMEROB', '0');\n\n include(dirname(__FILE__).'/sql/install.php');\n\n return parent::install() &&\n $this->registerHook('header') &&\n $this->registerHook('backOfficeHeader') &&\n $this->registerHook('displayAdminOrderLeft') &&\n $this->registerHook('displayAdminOrderMain');\n }",
"public function install()\n {\n if (!parent::install()) {\n $this->_errors[] = 'Unable to install module';\n\n return false;\n }\n\n foreach ($this->hooks as $hook) {\n $this->registerHook($hook);\n }\n\n if (!$this->pendingOrderState()) {\n $this->_errors[] = 'Unable to install Mollie pending order state';\n\n return false;\n }\n\n $this->initConfig();\n\n include(dirname(__FILE__).'/sql/install.php');\n\n return true;\n }",
"public function isFreshInstallation()\n {\n if (!$this->hasTable('tl_module')) {\n return true;\n }\n\n $statement = $this->connection->query('SELECT COUNT(*) AS count FROM tl_page');\n\n return $statement->fetch(\\PDO::FETCH_OBJ)->count < 1;\n }",
"public function alreadyInstalled()\n {\n return file_exists(storage_path('installed'));\n }",
"public function alreadyInstalled()\n {\n return file_exists(storage_path('installed'));\n }",
"public function install()\n {\n Configuration::updateValue('WI_WEATHER_ENABLED', '0');\n Configuration::updateValue('WI_WEATHER_PROVIDER', '');\n Configuration::updateValue('WI_WEATHER_KEY', '');\n Configuration::updateValue('WI_WEATHER_CITY', '');\n return parent::install() &&\n $this->registerHook('header') &&\n $this->registerHook('backOfficeHeader') &&\n $this->registerHook('displayNav') &&\n $this->registerHook('displayNav1');\n }",
"public function isAlreadyInstalled() {\n\t\t// is not a unique package and can be\n\t\t// installed as many times as you want\n\t\tif ($this->packageInfo['isUnique'] == 0) {\n\t\t\treturn false;\n\t\t}\n\t\t// this package may only be installed\n\t\t// once (e. g. library package)\n\t\telse {\n\t\t\treturn (count($this->getDuplicates()) != 0);\n\t\t}\n\t}",
"protected function _initInstallChecker()\r\n\t{\r\n\t\t$config = Tomato_Core_Config::getConfig();\r\n\t\tif (null == $config->install || null == $config->install->date) {\r\n\t\t\theader('Location: install.php');\r\n\t\t\texit;\r\n\t\t}\r\n\t}",
"public function needsToBeInstalledWithAllDependencies(): bool\n {\n return false;\n }",
"function is_allowed_to_install() {\n\t\t\treturn ( $this->is_premium() || ! $this->is_org_repo_compliant() );\n\t\t}",
"public function install() {\n\n if (!parent::install()\n || !$this->registerHook('payment')\n || !$this->config->install()\n ) {\n return false;\n }\n return true;\n }",
"public function install()\n {\n // Install default\n if (!parent::install()) {\n return false;\n }\n\n if (!$this->registrationHook()) {\n return false;\n }\n\n if (!Configuration::updateValue('EPUL_USERNAME', '')\n || !Configuration::updateValue('EPUL_PASSWORD', '')\n ) {\n return false;\n }\n\n return true;\n }",
"public function checkInstalled() {\n $query = $this->db->query(sprintf('SHOW TABLES LIKE \"%s\"',\n Config::getTableName('requests')));\n $request_table_result = $query->rowCount();\n\n $query = $this->db->query(sprintf('SHOW TABLES LIKE \"%s\"',\n Config::getTableName('users')));\n $user_table_result = $query->rowCount();\n\n if ($request_table_result > 0 || $user_table_result > 0) {\n return true;\n } else {\n return false;\n }\n }",
"public function isSetup()\n\t{\n\t\treturn $this->fileExists($this->rocketeer->getFolder('current'));\n\t}",
"public function isInstallationCompleted()\n {\n return $this->_rootElement->find($this->successInstallText, Locator::SELECTOR_XPATH)->isVisible();\n }",
"public function isDataInstalled() {\n $check = Mage::getModel('inventoryplus/install')\n ->getCollection()\n ->setPageSize(1)\n ->setCurPage(1)\n ->getFirstItem();\n if ($check->getStatus() != 1) {\n $isInsertData = Mage::getModel('inventoryplus/checkupdate')\n ->getCollection()\n ->setPageSize(1)\n ->setCurPage(1)\n ->getFirstItem()\n ->getIsInsertData();\n if ($isInsertData != 1) {\n return 0;\n } else {\n $check->setStatus(1);\n try {\n $check->save();\n } catch (Exception $e) {\n throw $e;\n }\n }\n }\n return 1;\n }",
"private function isInstalled()\n\t{\n\t\tif(file_exists(ITEMDATA) && file_exists(IM_DATABASE_DIR.IM_DATABASE)){return true;}\n\t\telse return false;\n\t}",
"public function beforeInstall()\n\t{}",
"abstract function is_plugin_new_install();",
"public function install()\n\t{\n if ( CMS_VERSION < '2.2.0' ) {\n return FALSE;\n }\n\n\t\tif(!$this->isRequiredInstalled())\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t$tables_installed = $this->install_tables( $this->module_tables );\n\n\n\t\tif( $tables_installed )\n\t\t{\n\t\t\t//register this module with SHOP\n\t\t\tEvents::trigger(\"SHOPEVT_RegisterModule\", $this->mod_details);\n\n\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn FALSE;\n\n\t}",
"public function install()\n {\n return parent::install()\n && $this->registerHook('payment')\n && $this->registerHook('paymentReturn')\n && $this->defaultConfiguration()\n && $this->createDatabaseTables();\n }",
"function _isInstalled()\n\t{\n\t\t$success = false;\n\t\t\n\t\tjimport('joomla.filesystem.file');\n\t\tif (JFile::exists(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_phplist'.DS.'defines.php')) \n\t\t{\n\t\t\t// Check the registry to see if our Tienda class has been overridden\r\n\t\t\tif ( !class_exists('Phplist') )\r\n\t\t\t\tJLoader::register( \"Phplist\", JPATH_ADMINISTRATOR.DS.\"components\".DS.\"com_phplist\".DS.\"defines.php\" );\r\n\t\t\tif ( !class_exists('PhplistConfigPhplist') )\r\n\t\t\t\tJLoader::register( \"PhplistConfigPhplist\", JPATH_ADMINISTRATOR.DS.\"components\".DS.\"com_phplist\".DS.\"defines.php\" );\r\n\t\t\t\t\n\t\t\t\n\t\t\tPhplist::load( 'PhplistHelperNewsletter', 'helpers.newsletter' );\n\t\t\tPhplist::load( 'PhplistHelperMessage', 'helpers.message' );\n\t\t\tPhplist::load( 'PhplistHelperEmail', 'helpers.email' );\n\t\t\tPhplist::load( 'PhplistHelperPhplist', 'helpers.phplist' );\n\t\t\tPhplist::load( 'PhplistHelperConfigPhplist', 'helpers.configphplist' );\n\t\t\t\n\t\t\t$success = true;\n\t\t}\n\t\t\n\t\tif ($success == true) {\n\t\t\t// Also check that DB is setup\n\t\t\t$database = PhplistHelperPhplist::getDBO();\n\t\t\tif (!isset($database->error)) \n\t\t\t{\n\t\t\t\t$success = true;\n\t\t\t}\n\t\t}\n\t\treturn $success;\n\t}",
"public function isAlreadyInstalled()\n {\n return $this->alreadyInstalled;\n }",
"public function allow_auto_install()\n\t{\n\t\treturn TRUE;\n\t}",
"public function check_user_installed()\n {\n if ($this->uid == 0) {\n return true;\n }\n\n $exists = $this->STOR->get_folder_id_from_path('waste');\n if (empty($exists)) {\n $this->create_user();\n }\n }",
"public function isInstall()\n {\n try {\n $config = $this->container->get(\"config\");\n } catch (NotFoundExceptionInterface $e) {\n return false;\n } catch (ContainerExceptionInterface $e) {\n return false;\n }\n return (\n isset($config[CsvAbstractFactory::KEY_DATASTORE][BarcodeCsv::class]) &&\n file_exists($this->getStoragePath())\n );\n }",
"protected function _alreadyInstalled()\r\n\t{\r\n\t\t$select\t\t= $this->_db->select()->from('Cron_Jobs', array('id'))->where('name = ?', $this->_name);\r\n\t\t$results\t= $this->_db->fetchAll($select);\r\n\t\t\r\n\t\tif(count($results)) {\r\n\t\t\tthrow new Exception('Cron job ' . $this->_name . 'is already installed');\r\n\t\t}\r\n\t}",
"public function installPlugin()\n\t{\n\t\treturn true;\t\n\t}",
"function is_installed()\n{\n return has_account() && has_meta();\n}",
"public function preInstall()\n {\n }",
"protected function checkNeededModules()\n\t{\n\t\t$modulesGot\t= array_keys( $this->env->getModules()->getAll() );\t\t\t\t\t\t\t\t// get installed modules\n\t\t$missing\t= array_diff( self::$modulesNeeded, $modulesGot );\t\t\t\t\t\t\t\t// find missing modules\n\t\tif( $missing ){\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// there are missing modules\n\t\t\t$this->reportMissingModules( $missing );\t\t\t\t\t\t\t\t\t\t\t\t// report missing modules to screen\n\t\t\texit;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// quit execution\n\t\t}\n\t}",
"public static function isInstalled(){\n\t\treturn !empty(\\GO::config()->db_user);\n\t}",
"public static function isInstallationInProgress()\n {\n $sql = 'SELECT `value` FROM ' . _DB_PREFIX_ . 'configuration\n WHERE `name` = \\'LENGOW_INSTALLATION_IN_PROGRESS\\'';\n $value = Db::getInstance()->getRow($sql);\n return $value ? (bool)$value['value'] : false;\n }",
"public static function checkInstallToolEnableFile() {}",
"public function install()\n\t{\n\t\tif (Shop::isFeatureActive()) {\n\t\t\tShop::setContext(Shop::CONTEXT_ALL);\n\t\t}\n\n\t\t//initialize empty settings\n\t\tConfiguration::updateValue('CLERK_PUBLIC_KEY', '');\n\t\tConfiguration::updateValue('CLERK_PRIVATE_KEY', '');\n\n\t\tConfiguration::updateValue('CLERK_SEARCH_ENABLED', 0);\n\t\tConfiguration::updateValue('CLERK_SEARCH_TEMPLATE', '');\n\n\t\tConfiguration::updateValue('CLERK_LIVESEARCH_ENABLED', 0);\n\t\tConfiguration::updateValue('CLERK_LIVESEARCH_INCLUDE_CATEGORIES', 0);\n\t\tConfiguration::updateValue('CLERK_LIVESEARCH_TEMPLATE', '');\n\n\t\tConfiguration::updateValue('CLERK_POWERSTEP_ENABLED', 0);\n\t\tConfiguration::updateValue('CLERK_POWERSTEP_TEMPLATES', '');\n\n\t\treturn parent::install() &&\n $this->registerHook('top') &&\n\t\t\t$this->registerHook('footer') &&\n\t\t\t$this->registerHook('displayOrderConfirmation');\n\t}",
"public function isInstalled()\n {\n return $this->getDataVersion() && $this->getOldStores();\n }",
"public function hasSetupStep() {\n return true;\n }",
"public function effectively_installed()\n {\n return isset($this->config['oxcom_phpbbch_format_only']);\n }",
"public static function is_installed() {\n\t\t\n if (!file_exists(APPPATH . 'config/database.php')) {\n\t\t\treturn false;\n }\n\n if (!file_exists(APPPATH . 'cache')) {\n return false;\n }\n\n $cache = Cache::instance();\n if ($cache->get('njiandan_installed')) {\n return true;\n } else {\n return false;\n }\n }",
"public function hasUninstall();",
"public static function isInstalled(){\n $localxml = BP . DS . self::CLIENT_DIR . DS . self::getClientCode() . DS . 'etc'. DS . 'local.xml';\n \n if(!file_exists($localxml))\n return false;\n\n $xmlObj = new Varien_Simplexml_Config($localxml); \n $date = (string)$xmlObj->getNode('global/install/date');\n if(!strtotime($date))\n return false;\n \n return true;\n }",
"public static function isInstalled (\n\t)\t\t\t// <bool> TRUE if successfully installed, FALSE if not.\n\t\n\t// $plugin->isInstalled();\n\t{\n\t\t// Make sure the newly installed tables exist\n\t\t$pass1 = DatabaseAdmin::columnsExist(\"feed_following\", array(\"uni_id\", \"hashtag\"));\n\t\t$pass2 = DatabaseAdmin::columnsExist(\"feed_display\", array(\"uni_id\", \"feed_id\"));\n\t\t$pass3 = DatabaseAdmin::columnsExist(\"users\", array(\"last_feed_update\", \"last_feed_id\"));\n\t\t\n\t\treturn ($pass1 and $pass2 and $pass3);\n\t}",
"public function check(): void\n\t{\n\t\t$installed = 0;\n\t\tif (is_file(ROOTPATH . 'composer.json'))\n\t\t{\n\t\t\t$installed = 1;\n\n\t\t\t// Read in the entire composer.json\n\t\t\t$composer = json_decode(file_get_contents(ROOTPATH . 'composer.json'), true);\n\t\t\t$this->record('composer.json', 'array', $composer);\n\t\t}\n\n\t\t// Check for composer.lock (for installed versions)\n\t\tif (is_file(ROOTPATH . 'composer.lock'))\n\t\t{\n\t\t\t$installed = 1;\n\n\t\t\t// Read in the lock file\n\t\t\t$composer = json_decode(file_get_contents(ROOTPATH . 'composer.lock'), true);\n\n\t\t\t// Save packages\n\t\t\t$packages = $composer['packages'];\n\t\t\tunset($composer['packages'], $composer['_readme']);\n\n\t\t\t// Save remaining values\n\t\t\t$this->record('composer.lock', 'array', $composer);\n\n\t\t\t// Parse packages\n\t\t\t$result = [];\n\t\t\tforeach ($packages as $package)\n\t\t\t{\n\t\t\t\tunset($package['dist'], $package['notification-url'], $package['license'], $package['authors'], $package['keywords']);\n\t\t\t\t$result[] = $package;\n\t\t\t}\n\n\t\t\tif (! empty($result))\n\t\t\t{\n\t\t\t\t$this->record('packages', 'array', $result);\n\t\t\t}\n\t\t}\n\n\t\t$this->record('installed', 'bool', $installed);\n\t}",
"public function checkStatus() {\n\t\t// Check connection\n\t\tif (!$this->db->isConnected()) {\n\t\t\t$this->out(sprintf('Error: Database connection for %s failed!', $this->install['database']));\n\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check the users tables\n\t\t$tables = $this->db->listSources();\n\n\t\tif (!in_array($this->install['table'], $tables)) {\n\t\t\t$this->out(sprintf('Error: No %s table was found in %s.', $this->install['table'], $this->install['database']));\n\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->out('Installation status good, proceeding...');\n\n\t\treturn true;\n\t}",
"private function is_automatic_install( &$dependency ) {\n\t\t$is_required = $this->is_required( $dependency );\n\t\treturn ! $is_required || ( $is_required && ! self::$automatic_install_required );\n\t}",
"protected function checkDownloadsPossible() {}",
"function wp_installing($is_installing = \\null)\n {\n }",
"protected function beforeUninstall(): bool\n {\n return true;\n }",
"function executeInstaller() {\n\t\t$this->log(sprintf('version: %s', $this->newVersion->getVersionString()));\n\t\tforeach ($this->actions as $action) {\n\t\t\tif (!$this->executeAction($action)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t$result = true;\n\t\tHookRegistry::call('Installer::executeInstaller', array(&$this, &$result));\n\n\t\treturn $result;\n\t}",
"public function install()\n {\n if (!parent::install())\n {\n return false;\n }\n\n if (!$this->registerHooks(array('displayPayment', 'displayPaymentReturn')))\n {\n return false;\n }\n\n if (!$this->createPaynetPaymentsTable())\n {\n return false;\n }\n\n if (Shop::isFeatureActive())\n {\n Shop::setContext(Shop::CONTEXT_ALL);\n }\n\n if (!$this->saveConfig())\n {\n return false;\n }\n\n return true;\n }",
"public function install()\n {\n include(__DIR__ . '/sql/install.php');\n\n return parent::install() &&\n $this->registerHook('actionAdminControllerSetMedia') &&\n $this->registerHook('displayAdminOrderTabLink') &&\n $this->registerHook('displayAdminOrderTabContent') &&\n $this->registerHook('actionOrderGridDefinitionModifier') &&\n $this->registerHook('actionOrderGridPresenterModifier');\n }",
"public function existenceCheck() {\n\t\t$packages = $this->Package->find('all', array(\n\t\t\t'contain' => array('Maintainer' => array('id', 'username')),\n\t\t\t'fields' => array('id', 'name'),\n\t\t\t'order' => array('Package.id ASC')\n\t\t));\n\n\t\t$jobs = array();\n\t\t$this->out(sprintf(__('* %d records to process'), count($packages)));\n\t\tforeach ($packages as $package) {\n\t\t\t$jobs[] = new PackageExistsJob($package);\n\t\t}\n\n\t\tif (!empty($jobs)) {\n\t\t\t$this->CakeDjjob->bulkEnqueue($jobs, 'default');\n\t\t}\n\n\t\t$this->out(sprintf(__('* Enqueued %d jobs'), count($jobs)));\n\t}",
"public function installed(): bool {\n global $media_admin;\n global $media_manager;\n\n // Handle if installed\n if(file_exists($this->filenameDb)) {\n if(!defined(\"PAW_MEDIA\")) {\n define(\"PAW_MEDIA\", basename(__DIR__));\n define(\"PAW_MEDIA_PATH\", PATH_PLUGINS . PAW_MEDIA . DS);\n define(\"PAW_MEDIA_DOMAIN\", DOMAIN_PLUGINS . PAW_MEDIA . \"/\");\n define(\"PAW_MEDIA_VERSION\", self::VERSION . \"-\" . strtolower(self::STATUS));\n }\n\n // Init MediaAdmin\n if(!class_exists(\"MediaAdmin\")) {\n require_once \"system\" . DS . \"admin.php\";\n\n if(PAW_MEDIA_PLUS) {\n require_once \"system\" . DS . \"admin-plus.php\";\n $media_admin = new MediaAdminPlus();\n } else {\n $media_admin = new MediaAdmin();\n }\n }\n\n // Init MediaManager\n if(!class_exists(\"MediaManager\")) {\n require_once \"system\" . DS . \"manager.php\";\n\n if(PAW_MEDIA_PLUS) {\n require_once \"system\" . DS . \"manager-plus.php\";\n $media_manager = new MediaManagerPlus();\n } else {\n $media_manager = new MediaManager();\n }\n }\n }\n return file_exists($this->filenameDb);\n }",
"public function runInstallTasks();",
"public function updateIsAvailable()\n {\n return self::INSTALLED_VERSION != $this->version;\n }",
"public function checkIfSetupRan()\r\n {\r\n $select = $this->table_gateway->getAdapter()\r\n ->getDriver()->getConnection()\r\n ->execute(\"SHOW TABLES LIKE 'admins'\");\r\n\r\n\r\n if ($select->count() > 0) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }",
"public function install()\r\n {\r\n if (Shop::isFeatureActive()){\r\n Shop::setContext(Shop::CONTEXT_ALL);\r\n }\r\n\r\n return parent::install()\r\n && $this->_installHookCustomer()\r\n && $this->registerHook('fieldBrandSlider')\r\n && $this->registerHook('displayHeader')\r\n && $this->_createConfigs()\r\n && $this->_createTab();\r\n }",
"public function afterInstall()\n\t{}",
"public function isInstalled()\n {\n $installed = false;\n // check configuration options\n if (!$this->testDossierDeadlineConfigServer()) {\n $installed = true;\n }\n \n return $installed;\n }",
"function unsinstall()\n\t\t{\n\t\t}",
"function psswrdhsh_is_installed()\n{\n\tglobal $db, $settings;\n\n\tif (isset($settings['psswrd_cost'])) {\n\t\treturn true;\n\t}\n\n\tif ($db->field_exists('passwordhash', 'users')) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}",
"public function install()\n {\n return parent::install()\n && $this->registerHook('actionObjectOrderAddBefore')\n && Configuration::updateValue('ORDERREF_LENGTH', self::ORDERREF_LENGTH_DEFAULT)\n && Configuration::updateValue('ORDERREF_MODE', self::ORDERREF_MODE_RANDOM)\n ;\n }",
"protected function afterInstall()\n {\n }"
] | [
"0.79171866",
"0.7664049",
"0.74891514",
"0.74532837",
"0.7370247",
"0.7228508",
"0.71986854",
"0.7163201",
"0.7144312",
"0.71187663",
"0.70713127",
"0.7002426",
"0.69984746",
"0.69788474",
"0.6963965",
"0.69240725",
"0.6921188",
"0.68529665",
"0.68316096",
"0.6801349",
"0.67993295",
"0.6798679",
"0.6787817",
"0.67804414",
"0.67651975",
"0.67571276",
"0.67467004",
"0.6742761",
"0.67282534",
"0.6706329",
"0.669593",
"0.6680096",
"0.66584724",
"0.6647019",
"0.664632",
"0.6642987",
"0.6635915",
"0.6629358",
"0.66225404",
"0.66097015",
"0.6567687",
"0.6565614",
"0.6565614",
"0.6558237",
"0.654617",
"0.6529436",
"0.6525025",
"0.6518787",
"0.6517532",
"0.6517028",
"0.6511389",
"0.65069175",
"0.6505574",
"0.64935553",
"0.649249",
"0.648374",
"0.64738214",
"0.6469233",
"0.6464215",
"0.6446903",
"0.6441117",
"0.6431933",
"0.6428321",
"0.64201045",
"0.6418986",
"0.64055336",
"0.64026767",
"0.64026713",
"0.640107",
"0.6395154",
"0.63849795",
"0.63631153",
"0.6352078",
"0.6345988",
"0.63454187",
"0.63443804",
"0.6344119",
"0.634306",
"0.63381374",
"0.6328382",
"0.63150615",
"0.6302407",
"0.62972146",
"0.62720245",
"0.6268863",
"0.6262638",
"0.6249219",
"0.62480223",
"0.62386596",
"0.6237313",
"0.62337923",
"0.62295115",
"0.62222534",
"0.6220891",
"0.62130225",
"0.62077796",
"0.61985224",
"0.61945707",
"0.6194327",
"0.61866486",
"0.61845475"
] | 0.0 | -1 |
/ Query to CmsBundle | public function getQuery($filter_id = null, $filter_name = null)
{
try {
// Conditions
$conditions_id = "";
if (isset($filter_id) && !empty($filter_id)) {
$conditions_id = "AND n.id = :id";
}
$conditions_name = "";
if (isset($filter_name) && !empty($filter_name)) {
$conditions_name = "AND n.title LIKE :title";
}
// Query result
$dql = "SELECT n
FROM AciliaCmsBundle:Newsletter AS n
WHERE 1 = 1
{$conditions_id}
{$conditions_name}
ORDER BY n.id DESC";
$query = $this->_em->createQuery($dql);
if (!is_null($filter_id)) {
$query->setParameter('id', $filter_id);
}
if (!is_null($filter_name)) {
$query->setParameter('title', "%{$filter_name}%");
}
} catch (\Exception $ex) {
$query = '';
}
return $query;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function query();",
"public function query();",
"public function query();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public static function query();",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM cbt_soal_siswa';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM contenidos';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM auditoriacategoria';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM cbt_jadwal_ujian';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM alojamientos';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}",
"abstract public function query();",
"public static function query()\n {\n }",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $qb = $em->getRepository('ArmensaViajesBundle:Viaje')->createQueryBuilder('v')\n \t ->add('select',\"v.id, v.fecha, v.origen, v.destino, v.valorCompra ,v.valorVenta, v.peso, v.cantidad, co.nombre conductor, cl.nombre cliente, ve.placa vehiculo,tp.tipo tipoPr\")\n \t ->leftJoin('v.conductor','co')\n ->leftJoin('v.cliente','cl')\n ->leftJoin('v.vehiculo','ve')\n ->leftJoin('v.tipoProceso','tp')\n ->orderBy('v.id','DESC');\n $entities=$qb->getQuery()->getResult();\n\t\t$fields=array(\n\t\t 'id' => 'v.id',\n 'fecha'=>'v.fecha',\n 'origen'=>'v.origen',\n 'destino'=>'v.destino',\n 'valorCompra'=>'v.valorCompra',\n 'valorVenta'=>'v.valorVenta',\n 'peso' => 'v.peso',\n 'cantidad'=>'v.cantidad',\n 'conductor' =>'co.nombre',\n 'cliente' => 'cl.cliente',\n 'vehiculo' =>'ve.placa',\n 'tipoPr' => 'tp.tipo'\n );\n\n\t\t///Aplicamos filtros\n\t $request=$this->get('request');\n\t if ( $request->get('_search') && $request->get('_search') == \"true\" && $request->get('filters') )\n {\n $f=$request->get('filters');\n $f=json_decode(str_replace(\"\\\\\",\"\",$f),true);\n $rules=$f['rules'];\n foreach($rules as $rule){\n $searchField=$fields[$rule['field']];\n $searchString=$rule['data'];\n if($rule['field']=='fechaCreacion'){\n $daterange=explode(\"|\", $searchString);\n if(count($daterange)==1){\n \t$dateValue=\"'\".trim(str_replace(\" \",\"\",$daterange[0])).\"'\";\n\t $qb->andWhere($searchField.\" LIKE '\".$dateValue.\"%'\");\n }else{\n \t$minValue=\"'\".trim(str_replace(\" \",\"\",$daterange[0])).\" 00:00:00'\";\n \t$maxValue=\"'\".trim(str_replace(\" \",\"\",$daterange[1])).\" 23:59:59'\";\n\t $qb->andWhere($qb->expr()->between($searchField,$minValue , $maxValue));\n }\n\n }else{\n if(\"null\"!=$searchString){\n \t$qb->andWhere($qb->expr()->like($searchField, $qb->expr()->literal(\"%\".$searchString.\"%\")));\n }\n }\n }\n\n }\n\n\n\t //Ordenamiento de columnas\n\t //sidx\tid\n\t\t//sord\tdesc\n\t\t$sidx=$this->get('request')->query->get('sidx', 'id');\n\t\t$sord=$this->get('request')->query->get('sord', 'DESC');\n\t\t$qb->orderBy($fields[$sidx],$sord);\n\t\t//die($qb->getQuery()->getSQL());\n\n\t $query=$qb->getQuery()->getResult();\n\t\t$paginator = $this->get('knp_paginator');\n\t\t$pagination = $paginator->paginate(\n\t\t $query,\n\t\t $this->get('request')->query->get('page', 1)/*page number*/,\n\t\t $this->get('request')->query->get('rows', 10)/*limit per page*/\n\t\t);\n /*return array(\n 'entities' => $entities,\n 'pagination'=>$pagination\n );*/\n $response= new Response();\n $pdata=$pagination->getPaginationData();\n $r=array();\n $r['records']=count($query);\n $r['page']=$this->get('request')->query->get('page', 1);\n $r['rows']=array();\n $r['total'] = $pdata['pageCount'];\n\n foreach($pagination as $row){\n\t $line=$row;\n\t \t$r['rows'][]=$line;\n }\n $response->setContent(json_encode($r));\n return $response;\n }",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM shoppingcart_courseregcodeitemannotation';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"public function toQuery();",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM consultation_vp';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"public function query() {\n\n }",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM cbt_nomor_peserta';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"public function getListQuery();",
"public function query()\n {\n }",
"public function query()\n {\n }",
"public function myFindAll(){\n // $queryBuilder = $this->createQueryBuilder('a');\n // $query = $queryBuilder->getQuery();\n // $results = $query->getResult();\n return $this->createQueryBuilder('a')->getQuery()->getResult;\n }",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM cst_hit';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"function retrieveAll ()\n {\n\n $q = Doctrine_Query::create ()\n ->from ( 'MtnPriceListComponent mplc' )\n ->innerJoin ( 'mplc.MtnComponent mc' )\n ->innerJoin ( 'mplc.MtnPriceList mpl' );\n\n\n return $q->execute ();\n }",
"public function findAllAction();",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM elementos';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n //$entities = $em->getRepository('SpaBackendBundle:User')->findAll();\n\n //$entities = $em->getRepository('SpaBackendBundle:Unit')->findAll();\n/*\n $query = $em->createQuery(\n 'SELECT p, u\n FROM SpaBackendBundle:User p join SpaBackendBundle:Unit u\n WHERE p.username = u.email and p.id = :id\n '\n )->setParameter('id', 9);;\n\n*/\n \n\n // $entities = $query->getResult();\n\n\n $sql = 'SELECT s.id as id, u.name as name, u.state as state, s.username as email from spa_users s LEFT Join (Unit u) on u.email = s.username';\n $stmt = $this->getDoctrine()->getManager()->getConnection()->prepare($sql);\n $stmt->execute();\n $entities = $stmt->fetchAll();\n \n\n\n return $this->render('SpaBackendBundle:User:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function Query() {\n \n }",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM recibo';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM modules';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"function query() {}",
"public function _query()\n {\n }",
"public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM material';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}",
"public function query()\n\t{\n\t\t\n\t}",
"public abstract function get_query();",
"public function findStudent()\n {\n //$search = '%'.$search.'%';\n $dql = \"SELECT ae FROM ABCIsystemBundle:AbcMembers ae WHERE ae.idCard like'__02%' and ae.status='active'\";\t\n $repositorio = $this->getEntityManager()->createQuery($dql);\n return $repositorio->getResult();\t\n }",
"public function getQueryBuilder();",
"public function getQueryBuilder();",
"function query() {\n }",
"function searchTableStatique() {\n include_once('./lib/config.php');\n $table = $_POST['table'];\n $tableStatique = Doctrine_Core::getTable($table);\n $columnNames = $tableStatique->getColumnNames();\n $req = '';\n $param = array();\n $premierPassage = true;\n foreach ($columnNames as $columnName) {\n if ($columnName != 'id') {\n $req .= $premierPassage ? $columnName.' like ? ' : 'and '.$columnName.' like ? ';\n $param[] = $_POST[$columnName].'%';\n $premierPassage = false;\n }\n }\n $search = $tableStatique->findByDql($req, $param);\n echo generateContenuTableStatiqueEntab($table, $tableStatique, $search);\n}",
"public function queryEntity($options = array())\n {\n $columns = &$this->columns;\n\n $em = $this->_em;\n $qb = $em->getRepository('BookingBundle:Casa')\n ->createQueryBuilder('a')\n ->distinct(true)\n ->select('a');\n\n if (array_key_exists('sSearch',$options)) {\n if ($options['sSearch'] != '') {\n $qb->andWhere(new Orx(\n\n /**\n * @return array\n */\n call_user_func( function() use ($columns,$qb,$options){\n\n $aLike = array();\n\n foreach ($columns as $col) {\n\n $aLike[] = $qb->expr()->like('a.'.$col, '\\'%' . $options['sSearch'] . '%\\'');\n }\n\n return $aLike;\n })\n \n ));\n }\n }\n\n if ( isset( $options['iDisplayStart'] ) && $options['iDisplayLength'] != '-1' ){\n $qb->setFirstResult( (int)$options['iDisplayStart'] )\n ->setMaxResults( (int)$options['iDisplayLength'] );\n }\n\n\n if (array_key_exists('iDisplayLength',$options)) {\n if ($options['iDisplayLength']!='') {\n $qb->setMaxResults($options['iDisplayLength']);\n }\n }\n\n $result = $qb->getQuery()->getResult();\n $dataExport = array();\n\n foreach ($result as $r) {\n /**\n * @var Casa $r\n * */\n\n $dataHouse = $r->toArray();\n $dataHouse[4]=$this->isAvailable($r);\n array_push($dataExport, $dataHouse);\n }\n\n\n\n\n\n return $dataExport;\n\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $agency = $this->getUser()->getAgency();\n $maincompany = $this->getUser()->getMaincompany();\n $type = $agency->getType();\n // $all = $em->getRepository('NvCargaBundle:Bill')->findBy(['canceled'=>FALSE, 'maincompany'=> $maincompany])\n $all = $em->getRepository('NvCargaBundle:Bill')->createQueryBuilder('b')\n ->where('b.status != :status')\n ->andwhere('b.maincompany = :maincompany')\n ->setParameters(array('maincompany' => $maincompany, 'status' => 'ANULADA'))\n ->orderBy('b.number', 'DESC')\n ->setMaxResults(500)\n ->getQuery()\n ->getResult();\n if ($type == \"MASTER\") {\n $entities = $all;\n } else {\n $entities = [];\n foreach ($all as $entity) {\n $guide = $entity->getGuides()->last();\n if ($guide->getAgency() === $agency()) {\n $entities[] = $entity;\n }\n }\n }\n return array(\n 'entities' => $entities,\n );\n\n }",
"public function searchAction() {\n\t\n\t if($this->getRequest()->isXmlHttpRequest()){\n\t\n\t $term = $this->getParam('term');\n\t $id = $this->getParam('id');\n\t\n\t if(!empty($term)){\n\t $term = \"%$term%\";\n\t $records = Invoices::findbyCustomFields(\"formatted_number LIKE ? OR number LIKE ?\", array($term, $term));\n\t die(json_encode($records));\n\t }\n\t\n\t if(!empty($id)){\n\t $records = Invoices::find($id);\n\t if($records){\n\t $records = $records->toArray();\n\t }\n\t die(json_encode(array($records)));\n\t }\n\t\n\t $records = Invoices::getAll();\n\t die(json_encode($records));\n\t }else{\n\t die();\n\t }\n\t}",
"public function Query(){\n\t}",
"public function Query(){\n\t}",
"public function Query(){\n\t}",
"public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM clientes';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}",
"public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM tbl_empleado';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n // $resultat = $em->getRepository('MonBundle:Musicien')->findBy([], [], 10);\n $query = $em->createQuery( //creation de la requête\n \"SELECT m\n FROM MonBundle:Musicien m\n INNER JOIN MonBundle:Composer c WITH m = c.codeMusicien\n ORDER BY m.nomMusicien ASC\n \");\n $resultat = $query->getResult(); //variable qui récupère la requête\n\n return $this->render('MonBundle:musicien:index.html.twig', array(\n 'musiciens' => $resultat,\n ));\n }",
"public function executeSearch()\n {\n // consider translations in database\n $query = $this->qb->getQuery()\n ->setHydrationMode(Query::HYDRATE_ARRAY);\n if (defined(\"\\\\Gedmo\\\\Translatable\\\\TranslatableListener::HINT_FALLBACK\")) {\n $query\n ->setHint(\n Query::HINT_CUSTOM_OUTPUT_WALKER,\n 'Gedmo\\\\Translatable\\\\Query\\\\TreeWalker\\\\TranslationWalker'\n )\n ->setHint(constant(\"\\\\Gedmo\\\\Translatable\\\\TranslatableListener::HINT_FALLBACK\"), true);\n }\n\n if ($this->useDoctrinePaginator) {\n $paginator = new Paginator($query, $this->doesQueryContainCollections());\n // if query has collections, use output walker\n // otherwise an error could occur\n // \"Cannot select distinct identifiers from query on a column from a fetch joined to-many association\"\n if ($this->doesQueryContainCollections()) {\n $paginator->setUseOutputWalkers(true);\n }\n $items = $paginator->getIterator();\n } else {\n $items = $query->execute();\n }\n\n $data = [];\n foreach ($items as $item) {\n if ($this->useDtRowClass && !is_null($this->dtRowClass)) {\n $item['DT_RowClass'] = $this->dtRowClass;\n }\n if ($this->useDtRowId) {\n $item['DT_RowId'] = $item[$this->rootEntityIdentifier];\n }\n // Go through each requested column, transforming the array as needed for DataTables\n foreach ($this->parameters as $index => $parameter) { //($i = 0 ; $i < count($this->parameters); $i++) {\n // Results are already correctly formatted if this is the case...\n if (!$this->associations[$index]['containsCollections']) {\n continue;\n }\n\n $rowRef = &$item;\n $fields = explode('.', $this->parameters[$index]);\n\n // Check for collection based entities and format the array as needed\n while ($field = array_shift($fields)) {\n $rowRef = &$rowRef[$field];\n // We ran into a collection based entity. Combine, merge, and continue on...\n if (!empty($fields) && !$this->isAssocArray($rowRef)) {\n $children = array();\n while ($childItem = array_shift($rowRef)) {\n $children = array_merge_recursive($children, $childItem);\n }\n $rowRef = $children;\n }\n }\n }\n\n // Prepare results with given callbacks\n if (!empty($this->callbacks['ItemPreperation'])) {\n foreach ($this->callbacks['ItemPreperation'] as $key => $callback) {\n $item = $callback($item);\n }\n }\n $data[] = $item;\n }\n\n $this->datatable = $this->datatablesModel->getOutputData($data, (int)$this->echo, $this->getCountAllResults(), $this->getCountFilteredResults());\n return $this;\n }",
"function query() {\n \n $this->ensure_my_table();\n \n if ($this->options['operator'] == 'in') {\n $keys = array_keys($this->value);\n\n $this->query->add_where(0, $this->table_alias.'.id IN ('. implode(',', $keys).')' );\n }\n\n }",
"public function fetchAll()\n {\n $query = $this->em->createQuery(\"\n SELECT\n ccb.id,\n usr.nome corretor,\n con.nome contato ,\n ccb.dataBloqueio,\n ccb.status\n FROM\n {$this->repository} ccb\n JOIN crm\\Entity\\Usuarios usr WITH ccb.corretor = usr.id\n JOIN crm\\Entity\\Contatos con WITH ccb.contato = con.id\"\n );\n $results = $query->getResult();\n if(!is_null($results)) {\n return $results;\n }\n return new ApiProblem('404', \"Recurso n�o localizado\");\n }",
"public function searchAction(){\r\n \t$request = $this->getRequest();\r\n \t$q = $request->query->get('q');\r\n \tif(trim($q) == null || trim($q) == \"Encontre cupons de compra coletiva\"){\r\n \t\treturn $this->redirectFlash($this->generateUrl('aggregator_aggregator_index'), 'Digite um termo para a busca', 'error');\r\n \t}\r\n \t$ret['q'] = $q;\r\n \t$ret['breadcrumbs'][]['title'] = 'Resultado da busca por \"'.$q.'\" em '.$this->get('session')->get('reurbano.user.cityName');\r\n \treturn $ret;\r\n }",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM turma_disciplina';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"protected function getListQuery()\n\t{\n\t\t$input = Factory::getApplication()->input;\n\t\t$this->vendor_id = $input->get('vendor_id', '', 'INT');\n\t\t$vendor_id = $this->vendor_id ? $this->vendor_id : $this->getState('vendor_id');\n\t\t$client = $input->get('client', '', 'STRING');\n\n\t\t// Create a new query object.\n\t\t$db = $this->getDbo();\n\t\t$query = $db->getQuery(true);\n\n\t\t// Select the required fields from the table.\n\t\t$query->select(\n\t\t\t$db->quoteName(array('a.vendor_id', 'a.vendor_title', 'b.client', 'b.percent_commission', 'b.flat_commission', 'b.id', 'b.currency'))\n\t\t);\n\n\t\t$query->from($db->quoteName('#__tjvendors_fee', 'b'));\n\n\t\t$query->join('LEFT', ($db->quoteName('#__tjvendors_vendors', 'a') . 'ON ' . $db->quoteName('b.vendor_id') . ' = ' . $db->quoteName('a.vendor_id')));\n\n\t\t$query->where($db->quoteName('a.vendor_id') . ' = ' . $vendor_id);\n\n\t\tif (!empty($client))\n\t\t{\n\t\t\t$query->where($db->quoteName('b.client') . ' = ' . $db->quote($client));\n\t\t}\n\n\t\t// Filter by search in title\n\t\t$search = $this->getState('filter.search');\n\n\t\tif (!empty($search))\n\t\t{\n\t\t\tif (stripos($search, 'id:') === 0)\n\t\t\t{\n\t\t\t\t$query->where($db->quoteName('b.id') . ' = ' . (int) substr($search, 3));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$search = $db->Quote('%' . $db->escape($search, true) . '%');\n\t\t\t\t$query->where('(b.currency LIKE ' . $search .\n\t\t\t\t\t\t\t'OR b.percent_commission LIKE' . $search .\n\t\t\t\t\t\t\t'OR b.flat_commission LIKE' . $search . ')');\n\t\t\t}\n\n\t\t\t$this->search = $search;\n\t\t}\n\n\t\t// Add the list ordering clause.\n\t\t$orderCol = $this->state->get('list.ordering');\n\t\t$orderDirn = $this->state->get('list.direction');\n\n\t\tif (!in_array(strtoupper($orderDirn), array('ASC', 'DESC')))\n\t\t{\n\t\t\t$orderDirn = 'DESC';\n\t\t}\n\n\t\tif ($orderCol && $orderDirn)\n\t\t{\n\t\t\t$query->order($db->escape($orderCol . ' ' . $orderDirn));\n\t\t}\n\n\t\treturn $query;\n\t}",
"public function findAll(): QueryResultInterface;",
"protected function getAllDetails()\n\t{\n\t\t $qbLogin = $this->getDefaultEntityManager()->createQueryBuilder();\n\t\t $qbLogin->select('m')\n ->from('MailingList\\Entity\\PhoenixMailingList', 'm')\n\t\t\t ->where('m.status=:st')\n\t\t\t ->andwhere('m.subscribe=:s')\n\t\t\t ->setParameter('s',1)\n\t\t\t ->setParameter('st',1);\n\t\t $result = $qbLogin->getQuery()->getResult();\t\n\t\treturn $result;\n\t}",
"public function indexAction() {\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $entities = $em->getRepository('LooninsWikiBundle:Rubrique')->findBy(array(), array('titre'=>'ASC'));\r\n\r\n return array(\r\n 'entities' => $entities,\r\n );\r\n }",
"private function searchMaster() {\n $id = intval($_POST['query']);\n $data = $this->system->getDB()->query(\"SELECT * FROM master WHERE id=?\", array($id));\n echo(json_encode($data[0]));\n }",
"public function getAll() {}",
"public function getAll() {}",
"public function getAll() {}",
"public function getAll() {}",
"public function getAll() {}",
"public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM item_vendor_x';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function getAlgorithmsAction(){\n $view = FOSView::create(); \n $em = $this->getDoctrine()->getManager();\n $repo = $em->getRepository('ByExampleRecommandationsBundle:Algorithm');\n $results=$repo->findAllAlgo();\n if($results){ //\n $view->setStatusCode(200)->setData($results); \n }else{ \n $view->setStatusCode(404);\n }\n return $view;\n\n \n}",
"public function query() {\n\t\treturn Documents::instance()->query();\n\t}",
"public function Query() {\n return FactoryService::ProjectService()->GetList()->ToList();\n }"
] | [
"0.62794757",
"0.62794757",
"0.62794757",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.60564584",
"0.6052231",
"0.60509044",
"0.6046524",
"0.6004396",
"0.5992489",
"0.5987963",
"0.59876305",
"0.59683",
"0.5961832",
"0.59186625",
"0.5909854",
"0.5908073",
"0.5892794",
"0.5891485",
"0.587692",
"0.587692",
"0.5863249",
"0.5862164",
"0.5799964",
"0.5772831",
"0.5762572",
"0.5731443",
"0.5724531",
"0.57230735",
"0.57124406",
"0.5707281",
"0.5695855",
"0.5670509",
"0.56600356",
"0.564597",
"0.5641194",
"0.5635571",
"0.5635571",
"0.56265855",
"0.5611683",
"0.560813",
"0.56069314",
"0.5602203",
"0.5601545",
"0.5601545",
"0.5601545",
"0.55997825",
"0.5598455",
"0.55968976",
"0.5593796",
"0.5593063",
"0.55687964",
"0.55687726",
"0.55651695",
"0.5560575",
"0.5556541",
"0.55542964",
"0.5550509",
"0.55465716",
"0.5542737",
"0.5542737",
"0.5542737",
"0.55409825",
"0.55409825",
"0.5527035",
"0.5519134",
"0.5519134",
"0.5519134",
"0.5519134",
"0.5519134",
"0.5519134",
"0.5519134",
"0.5519134",
"0.5519134",
"0.55166125",
"0.5512945",
"0.5512794"
] | 0.0 | -1 |
/ Query to CmsBundle | public function getQueryArchive($filter_year = null)
{
try {
// Conditions
$conditions_year = "";
if (isset($filter_year) && !empty($filter_year)) {
$conditions_year = "AND SUBSTRING( n.date , 1, 4) LIKE :date";
}
// Query result
$dql = "SELECT n
FROM AciliaCmsBundle:Newsletter AS n
WHERE 1 = 1
{$conditions_year}
ORDER BY n.date DESC";
$query = $this->_em->createQuery($dql);
if (!is_null($filter_year)) {
$query->setParameter('date', "%{$filter_year}%");
}
} catch (\Exception $ex) {
$query = '';
}
return $query;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function query();",
"public function query();",
"public function query();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public function queryAll();",
"public static function query();",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM cbt_soal_siswa';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM contenidos';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM auditoriacategoria';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM cbt_jadwal_ujian';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM alojamientos';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}",
"abstract public function query();",
"public static function query()\n {\n }",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $qb = $em->getRepository('ArmensaViajesBundle:Viaje')->createQueryBuilder('v')\n \t ->add('select',\"v.id, v.fecha, v.origen, v.destino, v.valorCompra ,v.valorVenta, v.peso, v.cantidad, co.nombre conductor, cl.nombre cliente, ve.placa vehiculo,tp.tipo tipoPr\")\n \t ->leftJoin('v.conductor','co')\n ->leftJoin('v.cliente','cl')\n ->leftJoin('v.vehiculo','ve')\n ->leftJoin('v.tipoProceso','tp')\n ->orderBy('v.id','DESC');\n $entities=$qb->getQuery()->getResult();\n\t\t$fields=array(\n\t\t 'id' => 'v.id',\n 'fecha'=>'v.fecha',\n 'origen'=>'v.origen',\n 'destino'=>'v.destino',\n 'valorCompra'=>'v.valorCompra',\n 'valorVenta'=>'v.valorVenta',\n 'peso' => 'v.peso',\n 'cantidad'=>'v.cantidad',\n 'conductor' =>'co.nombre',\n 'cliente' => 'cl.cliente',\n 'vehiculo' =>'ve.placa',\n 'tipoPr' => 'tp.tipo'\n );\n\n\t\t///Aplicamos filtros\n\t $request=$this->get('request');\n\t if ( $request->get('_search') && $request->get('_search') == \"true\" && $request->get('filters') )\n {\n $f=$request->get('filters');\n $f=json_decode(str_replace(\"\\\\\",\"\",$f),true);\n $rules=$f['rules'];\n foreach($rules as $rule){\n $searchField=$fields[$rule['field']];\n $searchString=$rule['data'];\n if($rule['field']=='fechaCreacion'){\n $daterange=explode(\"|\", $searchString);\n if(count($daterange)==1){\n \t$dateValue=\"'\".trim(str_replace(\" \",\"\",$daterange[0])).\"'\";\n\t $qb->andWhere($searchField.\" LIKE '\".$dateValue.\"%'\");\n }else{\n \t$minValue=\"'\".trim(str_replace(\" \",\"\",$daterange[0])).\" 00:00:00'\";\n \t$maxValue=\"'\".trim(str_replace(\" \",\"\",$daterange[1])).\" 23:59:59'\";\n\t $qb->andWhere($qb->expr()->between($searchField,$minValue , $maxValue));\n }\n\n }else{\n if(\"null\"!=$searchString){\n \t$qb->andWhere($qb->expr()->like($searchField, $qb->expr()->literal(\"%\".$searchString.\"%\")));\n }\n }\n }\n\n }\n\n\n\t //Ordenamiento de columnas\n\t //sidx\tid\n\t\t//sord\tdesc\n\t\t$sidx=$this->get('request')->query->get('sidx', 'id');\n\t\t$sord=$this->get('request')->query->get('sord', 'DESC');\n\t\t$qb->orderBy($fields[$sidx],$sord);\n\t\t//die($qb->getQuery()->getSQL());\n\n\t $query=$qb->getQuery()->getResult();\n\t\t$paginator = $this->get('knp_paginator');\n\t\t$pagination = $paginator->paginate(\n\t\t $query,\n\t\t $this->get('request')->query->get('page', 1)/*page number*/,\n\t\t $this->get('request')->query->get('rows', 10)/*limit per page*/\n\t\t);\n /*return array(\n 'entities' => $entities,\n 'pagination'=>$pagination\n );*/\n $response= new Response();\n $pdata=$pagination->getPaginationData();\n $r=array();\n $r['records']=count($query);\n $r['page']=$this->get('request')->query->get('page', 1);\n $r['rows']=array();\n $r['total'] = $pdata['pageCount'];\n\n foreach($pagination as $row){\n\t $line=$row;\n\t \t$r['rows'][]=$line;\n }\n $response->setContent(json_encode($r));\n return $response;\n }",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM shoppingcart_courseregcodeitemannotation';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"public function toQuery();",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM consultation_vp';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"public function query() {\n\n }",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM cbt_nomor_peserta';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"public function getListQuery();",
"public function query()\n {\n }",
"public function query()\n {\n }",
"public function myFindAll(){\n // $queryBuilder = $this->createQueryBuilder('a');\n // $query = $queryBuilder->getQuery();\n // $results = $query->getResult();\n return $this->createQueryBuilder('a')->getQuery()->getResult;\n }",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM cst_hit';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"function retrieveAll ()\n {\n\n $q = Doctrine_Query::create ()\n ->from ( 'MtnPriceListComponent mplc' )\n ->innerJoin ( 'mplc.MtnComponent mc' )\n ->innerJoin ( 'mplc.MtnPriceList mpl' );\n\n\n return $q->execute ();\n }",
"public function findAllAction();",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM elementos';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n //$entities = $em->getRepository('SpaBackendBundle:User')->findAll();\n\n //$entities = $em->getRepository('SpaBackendBundle:Unit')->findAll();\n/*\n $query = $em->createQuery(\n 'SELECT p, u\n FROM SpaBackendBundle:User p join SpaBackendBundle:Unit u\n WHERE p.username = u.email and p.id = :id\n '\n )->setParameter('id', 9);;\n\n*/\n \n\n // $entities = $query->getResult();\n\n\n $sql = 'SELECT s.id as id, u.name as name, u.state as state, s.username as email from spa_users s LEFT Join (Unit u) on u.email = s.username';\n $stmt = $this->getDoctrine()->getManager()->getConnection()->prepare($sql);\n $stmt->execute();\n $entities = $stmt->fetchAll();\n \n\n\n return $this->render('SpaBackendBundle:User:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function Query() {\n \n }",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM recibo';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM modules';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"function query() {}",
"public function _query()\n {\n }",
"public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM material';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}",
"public function query()\n\t{\n\t\t\n\t}",
"public abstract function get_query();",
"public function findStudent()\n {\n //$search = '%'.$search.'%';\n $dql = \"SELECT ae FROM ABCIsystemBundle:AbcMembers ae WHERE ae.idCard like'__02%' and ae.status='active'\";\t\n $repositorio = $this->getEntityManager()->createQuery($dql);\n return $repositorio->getResult();\t\n }",
"public function getQueryBuilder();",
"public function getQueryBuilder();",
"function query() {\n }",
"function searchTableStatique() {\n include_once('./lib/config.php');\n $table = $_POST['table'];\n $tableStatique = Doctrine_Core::getTable($table);\n $columnNames = $tableStatique->getColumnNames();\n $req = '';\n $param = array();\n $premierPassage = true;\n foreach ($columnNames as $columnName) {\n if ($columnName != 'id') {\n $req .= $premierPassage ? $columnName.' like ? ' : 'and '.$columnName.' like ? ';\n $param[] = $_POST[$columnName].'%';\n $premierPassage = false;\n }\n }\n $search = $tableStatique->findByDql($req, $param);\n echo generateContenuTableStatiqueEntab($table, $tableStatique, $search);\n}",
"public function queryEntity($options = array())\n {\n $columns = &$this->columns;\n\n $em = $this->_em;\n $qb = $em->getRepository('BookingBundle:Casa')\n ->createQueryBuilder('a')\n ->distinct(true)\n ->select('a');\n\n if (array_key_exists('sSearch',$options)) {\n if ($options['sSearch'] != '') {\n $qb->andWhere(new Orx(\n\n /**\n * @return array\n */\n call_user_func( function() use ($columns,$qb,$options){\n\n $aLike = array();\n\n foreach ($columns as $col) {\n\n $aLike[] = $qb->expr()->like('a.'.$col, '\\'%' . $options['sSearch'] . '%\\'');\n }\n\n return $aLike;\n })\n \n ));\n }\n }\n\n if ( isset( $options['iDisplayStart'] ) && $options['iDisplayLength'] != '-1' ){\n $qb->setFirstResult( (int)$options['iDisplayStart'] )\n ->setMaxResults( (int)$options['iDisplayLength'] );\n }\n\n\n if (array_key_exists('iDisplayLength',$options)) {\n if ($options['iDisplayLength']!='') {\n $qb->setMaxResults($options['iDisplayLength']);\n }\n }\n\n $result = $qb->getQuery()->getResult();\n $dataExport = array();\n\n foreach ($result as $r) {\n /**\n * @var Casa $r\n * */\n\n $dataHouse = $r->toArray();\n $dataHouse[4]=$this->isAvailable($r);\n array_push($dataExport, $dataHouse);\n }\n\n\n\n\n\n return $dataExport;\n\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $agency = $this->getUser()->getAgency();\n $maincompany = $this->getUser()->getMaincompany();\n $type = $agency->getType();\n // $all = $em->getRepository('NvCargaBundle:Bill')->findBy(['canceled'=>FALSE, 'maincompany'=> $maincompany])\n $all = $em->getRepository('NvCargaBundle:Bill')->createQueryBuilder('b')\n ->where('b.status != :status')\n ->andwhere('b.maincompany = :maincompany')\n ->setParameters(array('maincompany' => $maincompany, 'status' => 'ANULADA'))\n ->orderBy('b.number', 'DESC')\n ->setMaxResults(500)\n ->getQuery()\n ->getResult();\n if ($type == \"MASTER\") {\n $entities = $all;\n } else {\n $entities = [];\n foreach ($all as $entity) {\n $guide = $entity->getGuides()->last();\n if ($guide->getAgency() === $agency()) {\n $entities[] = $entity;\n }\n }\n }\n return array(\n 'entities' => $entities,\n );\n\n }",
"public function searchAction() {\n\t\n\t if($this->getRequest()->isXmlHttpRequest()){\n\t\n\t $term = $this->getParam('term');\n\t $id = $this->getParam('id');\n\t\n\t if(!empty($term)){\n\t $term = \"%$term%\";\n\t $records = Invoices::findbyCustomFields(\"formatted_number LIKE ? OR number LIKE ?\", array($term, $term));\n\t die(json_encode($records));\n\t }\n\t\n\t if(!empty($id)){\n\t $records = Invoices::find($id);\n\t if($records){\n\t $records = $records->toArray();\n\t }\n\t die(json_encode(array($records)));\n\t }\n\t\n\t $records = Invoices::getAll();\n\t die(json_encode($records));\n\t }else{\n\t die();\n\t }\n\t}",
"public function Query(){\n\t}",
"public function Query(){\n\t}",
"public function Query(){\n\t}",
"public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM clientes';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}",
"public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM tbl_empleado';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n // $resultat = $em->getRepository('MonBundle:Musicien')->findBy([], [], 10);\n $query = $em->createQuery( //creation de la requête\n \"SELECT m\n FROM MonBundle:Musicien m\n INNER JOIN MonBundle:Composer c WITH m = c.codeMusicien\n ORDER BY m.nomMusicien ASC\n \");\n $resultat = $query->getResult(); //variable qui récupère la requête\n\n return $this->render('MonBundle:musicien:index.html.twig', array(\n 'musiciens' => $resultat,\n ));\n }",
"public function executeSearch()\n {\n // consider translations in database\n $query = $this->qb->getQuery()\n ->setHydrationMode(Query::HYDRATE_ARRAY);\n if (defined(\"\\\\Gedmo\\\\Translatable\\\\TranslatableListener::HINT_FALLBACK\")) {\n $query\n ->setHint(\n Query::HINT_CUSTOM_OUTPUT_WALKER,\n 'Gedmo\\\\Translatable\\\\Query\\\\TreeWalker\\\\TranslationWalker'\n )\n ->setHint(constant(\"\\\\Gedmo\\\\Translatable\\\\TranslatableListener::HINT_FALLBACK\"), true);\n }\n\n if ($this->useDoctrinePaginator) {\n $paginator = new Paginator($query, $this->doesQueryContainCollections());\n // if query has collections, use output walker\n // otherwise an error could occur\n // \"Cannot select distinct identifiers from query on a column from a fetch joined to-many association\"\n if ($this->doesQueryContainCollections()) {\n $paginator->setUseOutputWalkers(true);\n }\n $items = $paginator->getIterator();\n } else {\n $items = $query->execute();\n }\n\n $data = [];\n foreach ($items as $item) {\n if ($this->useDtRowClass && !is_null($this->dtRowClass)) {\n $item['DT_RowClass'] = $this->dtRowClass;\n }\n if ($this->useDtRowId) {\n $item['DT_RowId'] = $item[$this->rootEntityIdentifier];\n }\n // Go through each requested column, transforming the array as needed for DataTables\n foreach ($this->parameters as $index => $parameter) { //($i = 0 ; $i < count($this->parameters); $i++) {\n // Results are already correctly formatted if this is the case...\n if (!$this->associations[$index]['containsCollections']) {\n continue;\n }\n\n $rowRef = &$item;\n $fields = explode('.', $this->parameters[$index]);\n\n // Check for collection based entities and format the array as needed\n while ($field = array_shift($fields)) {\n $rowRef = &$rowRef[$field];\n // We ran into a collection based entity. Combine, merge, and continue on...\n if (!empty($fields) && !$this->isAssocArray($rowRef)) {\n $children = array();\n while ($childItem = array_shift($rowRef)) {\n $children = array_merge_recursive($children, $childItem);\n }\n $rowRef = $children;\n }\n }\n }\n\n // Prepare results with given callbacks\n if (!empty($this->callbacks['ItemPreperation'])) {\n foreach ($this->callbacks['ItemPreperation'] as $key => $callback) {\n $item = $callback($item);\n }\n }\n $data[] = $item;\n }\n\n $this->datatable = $this->datatablesModel->getOutputData($data, (int)$this->echo, $this->getCountAllResults(), $this->getCountFilteredResults());\n return $this;\n }",
"function query() {\n \n $this->ensure_my_table();\n \n if ($this->options['operator'] == 'in') {\n $keys = array_keys($this->value);\n\n $this->query->add_where(0, $this->table_alias.'.id IN ('. implode(',', $keys).')' );\n }\n\n }",
"public function fetchAll()\n {\n $query = $this->em->createQuery(\"\n SELECT\n ccb.id,\n usr.nome corretor,\n con.nome contato ,\n ccb.dataBloqueio,\n ccb.status\n FROM\n {$this->repository} ccb\n JOIN crm\\Entity\\Usuarios usr WITH ccb.corretor = usr.id\n JOIN crm\\Entity\\Contatos con WITH ccb.contato = con.id\"\n );\n $results = $query->getResult();\n if(!is_null($results)) {\n return $results;\n }\n return new ApiProblem('404', \"Recurso n�o localizado\");\n }",
"public function searchAction(){\r\n \t$request = $this->getRequest();\r\n \t$q = $request->query->get('q');\r\n \tif(trim($q) == null || trim($q) == \"Encontre cupons de compra coletiva\"){\r\n \t\treturn $this->redirectFlash($this->generateUrl('aggregator_aggregator_index'), 'Digite um termo para a busca', 'error');\r\n \t}\r\n \t$ret['q'] = $q;\r\n \t$ret['breadcrumbs'][]['title'] = 'Resultado da busca por \"'.$q.'\" em '.$this->get('session')->get('reurbano.user.cityName');\r\n \treturn $ret;\r\n }",
"public function queryAll(){\n\t\t$sql = 'SELECT * FROM turma_disciplina';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\treturn $this->getList($sqlQuery);\n\t}",
"protected function getListQuery()\n\t{\n\t\t$input = Factory::getApplication()->input;\n\t\t$this->vendor_id = $input->get('vendor_id', '', 'INT');\n\t\t$vendor_id = $this->vendor_id ? $this->vendor_id : $this->getState('vendor_id');\n\t\t$client = $input->get('client', '', 'STRING');\n\n\t\t// Create a new query object.\n\t\t$db = $this->getDbo();\n\t\t$query = $db->getQuery(true);\n\n\t\t// Select the required fields from the table.\n\t\t$query->select(\n\t\t\t$db->quoteName(array('a.vendor_id', 'a.vendor_title', 'b.client', 'b.percent_commission', 'b.flat_commission', 'b.id', 'b.currency'))\n\t\t);\n\n\t\t$query->from($db->quoteName('#__tjvendors_fee', 'b'));\n\n\t\t$query->join('LEFT', ($db->quoteName('#__tjvendors_vendors', 'a') . 'ON ' . $db->quoteName('b.vendor_id') . ' = ' . $db->quoteName('a.vendor_id')));\n\n\t\t$query->where($db->quoteName('a.vendor_id') . ' = ' . $vendor_id);\n\n\t\tif (!empty($client))\n\t\t{\n\t\t\t$query->where($db->quoteName('b.client') . ' = ' . $db->quote($client));\n\t\t}\n\n\t\t// Filter by search in title\n\t\t$search = $this->getState('filter.search');\n\n\t\tif (!empty($search))\n\t\t{\n\t\t\tif (stripos($search, 'id:') === 0)\n\t\t\t{\n\t\t\t\t$query->where($db->quoteName('b.id') . ' = ' . (int) substr($search, 3));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$search = $db->Quote('%' . $db->escape($search, true) . '%');\n\t\t\t\t$query->where('(b.currency LIKE ' . $search .\n\t\t\t\t\t\t\t'OR b.percent_commission LIKE' . $search .\n\t\t\t\t\t\t\t'OR b.flat_commission LIKE' . $search . ')');\n\t\t\t}\n\n\t\t\t$this->search = $search;\n\t\t}\n\n\t\t// Add the list ordering clause.\n\t\t$orderCol = $this->state->get('list.ordering');\n\t\t$orderDirn = $this->state->get('list.direction');\n\n\t\tif (!in_array(strtoupper($orderDirn), array('ASC', 'DESC')))\n\t\t{\n\t\t\t$orderDirn = 'DESC';\n\t\t}\n\n\t\tif ($orderCol && $orderDirn)\n\t\t{\n\t\t\t$query->order($db->escape($orderCol . ' ' . $orderDirn));\n\t\t}\n\n\t\treturn $query;\n\t}",
"public function findAll(): QueryResultInterface;",
"protected function getAllDetails()\n\t{\n\t\t $qbLogin = $this->getDefaultEntityManager()->createQueryBuilder();\n\t\t $qbLogin->select('m')\n ->from('MailingList\\Entity\\PhoenixMailingList', 'm')\n\t\t\t ->where('m.status=:st')\n\t\t\t ->andwhere('m.subscribe=:s')\n\t\t\t ->setParameter('s',1)\n\t\t\t ->setParameter('st',1);\n\t\t $result = $qbLogin->getQuery()->getResult();\t\n\t\treturn $result;\n\t}",
"public function indexAction() {\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $entities = $em->getRepository('LooninsWikiBundle:Rubrique')->findBy(array(), array('titre'=>'ASC'));\r\n\r\n return array(\r\n 'entities' => $entities,\r\n );\r\n }",
"private function searchMaster() {\n $id = intval($_POST['query']);\n $data = $this->system->getDB()->query(\"SELECT * FROM master WHERE id=?\", array($id));\n echo(json_encode($data[0]));\n }",
"public function getAll() {}",
"public function getAll() {}",
"public function getAll() {}",
"public function getAll() {}",
"public function getAll() {}",
"public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM item_vendor_x';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function get_query()\n {\n }",
"public function getAlgorithmsAction(){\n $view = FOSView::create(); \n $em = $this->getDoctrine()->getManager();\n $repo = $em->getRepository('ByExampleRecommandationsBundle:Algorithm');\n $results=$repo->findAllAlgo();\n if($results){ //\n $view->setStatusCode(200)->setData($results); \n }else{ \n $view->setStatusCode(404);\n }\n return $view;\n\n \n}",
"public function query() {\n\t\treturn Documents::instance()->query();\n\t}",
"public function Query() {\n return FactoryService::ProjectService()->GetList()->ToList();\n }"
] | [
"0.62794757",
"0.62794757",
"0.62794757",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.6170061",
"0.60564584",
"0.6052231",
"0.60509044",
"0.6046524",
"0.6004396",
"0.5992489",
"0.5987963",
"0.59876305",
"0.59683",
"0.5961832",
"0.59186625",
"0.5909854",
"0.5908073",
"0.5892794",
"0.5891485",
"0.587692",
"0.587692",
"0.5863249",
"0.5862164",
"0.5799964",
"0.5772831",
"0.5762572",
"0.5731443",
"0.5724531",
"0.57230735",
"0.57124406",
"0.5707281",
"0.5695855",
"0.5670509",
"0.56600356",
"0.564597",
"0.5641194",
"0.5635571",
"0.5635571",
"0.56265855",
"0.5611683",
"0.560813",
"0.56069314",
"0.5602203",
"0.5601545",
"0.5601545",
"0.5601545",
"0.55997825",
"0.5598455",
"0.55968976",
"0.5593796",
"0.5593063",
"0.55687964",
"0.55687726",
"0.55651695",
"0.5560575",
"0.5556541",
"0.55542964",
"0.5550509",
"0.55465716",
"0.5542737",
"0.5542737",
"0.5542737",
"0.55409825",
"0.55409825",
"0.5527035",
"0.5519134",
"0.5519134",
"0.5519134",
"0.5519134",
"0.5519134",
"0.5519134",
"0.5519134",
"0.5519134",
"0.5519134",
"0.55166125",
"0.5512945",
"0.5512794"
] | 0.0 | -1 |
Transform the resource collection into an array. | public function toArray( $request)
{
return parent::toArray( Checklist::collection($this->collection) );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function toArray(): array\n {\n if (is_null($this->resource)) {\n return [];\n }\n\n return is_array($this->resource)\n ? $this->resource\n : $this->resource->toArray();\n }",
"public function toArray(): array\n {\n if (is_null($this->resource)) {\n return [];\n }\n\n return is_array($this->resource)\n ? $this->resource\n : $this->resource->toArray();\n }",
"public function toArray(): array\n {\n return [\n 'users' => HiUserResource::collection($this->resource),\n ];\n }",
"public function asArray() {\n return $this->resource;\n }",
"public function toArray()\n {\n return $this->collection;\n }",
"public function toArray()\n {\n if ($this->resource instanceof ArrayableInterface) {\n\n return $this->resource->toArray();\n } else {\n\n return null;\n }\n }",
"public function toArray($request): array\n {\n return [\n 'data' => $this->collection->map(\n function ($tag) {\n return new TagResource($tag);\n })\n ]; }",
"public function toArray($request)\n {\n $data = $this->collection->transform(function ($uses) {\n $tmp = [\n 'id' => $uses->id,\n 'user_id' => $uses->user_id,\n 'use_date' => $uses->use_date,\n 'application_id' => $uses->application_id,\n 'created_at' => $uses->created_at,\n 'updated_at' => $uses->updated_at,\n ];\n\n return $tmp;\n });\n\n if ($data->count() == 1) {\n // Fixing of sometime collections have one element\n return [$data->first()];\n } else {\n return $data;\n }\n\n }",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray()\n {\n return $this->collection->toArray();\n }",
"public function toArray($request)\n {\n return [\n 'data' => ContatoResource::collection($this->collection)\n ];\n }",
"public function toArray()\n {\n return $this->transform();\n }",
"public function toArray($request)\n {\n return [\n \"items\" => ProductResource::collection(collect($this->items())),\n ];\n }",
"public function toArray($request)\n {\n // return parent::toArray($request);\n return $this->collection->transform(function ($item){\n // return $item->only(['field','name']);\n return new ItemResource($item);\n });\n }",
"public function toArray(): array\n {\n /** @var Collection $collection */\n $collection = $this->collection->map->toArray();\n return $collection->all();\n }",
"public function toArray($request)\n {\n return [\n 'data' => JsonApiResource::collection($this->collection),\n ];\n }",
"public function toArray()\n {\n return $this->cast('array');\n }",
"public function toArray()\n {\n return iterator_to_array($this->pipeline->get());\n }",
"public function toArray($request)\n { \n return $this->collection->map(function($media) { \n return [\n 'id' => $media->id,\n 'name' => $media->name,\n 'label' => $media->label,\n 'group' => $media->group, \n 'gallery' => $media->getMedia('gallery')->map(function($image) use ($media) {\n return $media->getConversions($image, ['main', 'cover', 'thumbnail']);\n }),\n ];\n })->toArray();\n }",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray($request)\n {\n return [\n 'data' => $this->collection->transform(function($page){\n return [\n 'id' => $page->id,\n 'title' => $page->title\n ];\n }),\n ]; \n }",
"public function toArray()\r\n {\r\n $a = array();\r\n if ($this->survivorResources) {\r\n $ab = array();\r\n foreach ($this->survivorResources as $i => $x) {\r\n $ab[$i] = $x->toArray();\r\n }\r\n $a['survivorResources'] = $ab;\r\n }\r\n if ($this->duplicateResources) {\r\n $ab = array();\r\n foreach ($this->duplicateResources as $i => $x) {\r\n $ab[$i] = $x->toArray();\r\n }\r\n $a['duplicateResources'] = $ab;\r\n }\r\n if ($this->conflictingResources) {\r\n $ab = array();\r\n foreach ($this->conflictingResources as $i => $x) {\r\n $ab[$i] = $x->toArray();\r\n }\r\n $a['conflictingResources'] = $ab;\r\n }\r\n if ($this->survivor) {\r\n $a[\"survivor\"] = $this->survivor->toArray();\r\n }\r\n if ($this->duplicate) {\r\n $a[\"duplicate\"] = $this->duplicate->toArray();\r\n }\r\n return $a;\r\n }",
"public function toArray($request)\n {\n return [\n 'data' => $this->collection->map(function($data) {\n return [\n 'id' => $data->id,\n 'title' => $data->title,\n 'date' => (int) $data->end_date,\n 'banner' => api_asset($data->banner)\n ];\n })\n ];\n }",
"public function getAsArray();",
"abstract protected function toArray();",
"public function toArray($request): array\n {\n return $this->collection->map(function (BaseApiResource $resource) use ($request) {\n return $resource->columns($this->columns)->toArray($request);\n })->all();\n\n //return parent::toArray($request);\n }",
"public function arr() {\n\t\t\treturn \\uri\\generate::to_array($this->object);\n\t\t}",
"public function toArray($request)\n {\n return $this->collection->transform(function ($item) {\n return ['id' => (int) $item->id,\n 'name' => (string) $item->name,\n 'country_id' => (int) $item->country_id,\n ];\n });\n }",
"public function transform($resource)\n {\n return [];\n }",
"public function toArray($request)\n {\n \n return $this->collection->map(function($resource) use($request){\n\n \n $user_name = '';\n $user_image = null;\n if(isset($this->userDict[$resource->user_id])){\n $user = $this->userDict[$resource->user_id];\n $user_name = $user->name;\n if($user->img){\n $user_image = config('app.static_host') . \"/users/$user->id_code/$user->img\"; \n }\n }\n\n return [\n 'user_name'=>$user_name,\n 'user_image'=>$user_image,\n 'body'=>$resource->body,\n 'created_at'=>$resource->created_at,\n ];\n });\n\n\n\n }",
"function toArray() ;",
"function toArray() ;",
"public function transform()\n {\n $object = $this->resource;\n\n $data = $object instanceof Collection || $object instanceof AbstractPaginator\n ? $object->map([$this, 'transformResource'])->toArray()\n : $this->transformResource($object);\n\n if ($object instanceof AbstractPaginator) {\n $this->withMeta(array_merge(\n $this->getExtra('meta', []), Arr::except($object->toArray(), ['data'])\n ));\n }\n\n $data = array_filter(compact('data') + $this->extras);\n ksort($data);\n\n return $data;\n }",
"public function toArray($request)\n {\n $this->buildCollection();\n\n return parent::toArray($request);\n }",
"public function toArray($request): array;",
"public function toArray($request)\n {\n return [\n 'data' => $this->collection->map(function ($item, $key) {\n return [\n 'name' => $item['name'],\n 'items' => $item->items,\n 'checklists' => $item->checklist\n ];\n })->toArray()\n ];\n }",
"public function toArray() {\n return $this->getData();\n }",
"function domains_to_array($collection)\n {\n $result = $collection->map(function($item) {\n return $item->toArray();\n });\n\n return $result;\n }",
"public function toArray($request)\n {\n return [\n 'id' => $this->id,\n 'size' => $this->size,\n 'children' => SizeResource::collection($this->whenLoaded('children'))\n ];\n }",
"public function toArray()\n {\n\n }",
"public function getAsArray()\n\t{\n\t\t\n\t\t$path = $this->get();\n\t\t\n\t\treturn self::toArray($path);\n\t\t\n\t}",
"public function toArray($request)\n\t{\n\t\t$data = $this->resource->toArray();\n\n\t\t$data['id'] = shorten_uuid($data['id']);\n\t\t$data['code_id'] = shorten_uuid($data['code_id']);\n\t\t$data['user_id'] = shorten_uuid($data['user_id']);\n\n\t\t$data['order_cards'] = OrderCardTransformer::collection($this->whenLoaded('orderCards'));\n\n\t\treturn $data;\n\t}",
"public function toArray($request)\n {\n if (!$this->collects) {\n throw new ResourceCollectionNotFound();\n }\n\n return $this->merge(\n $this->buildMessagableResponse(),\n 2,\n [\n $this::$wrap => $this->collection->toArray(),\n ]\n );\n }",
"private function arrayify(): array\n {\n return $this->toArray();\n }",
"public function toArray(): array\n {\n $array = [];\n\n foreach ($this->collection as $slot) {\n $array[] = $slot->toArray();\n }\n\n return $array;\n }",
"public function toArray($request)\n {\n $collection = $this->collection->map(function($item){\n return [\n 'no' => $item['no'],\n 'campaign_id' => $item['campaign_id'],\n 'name' => $item['name'],\n 'processing_status' => $item['processing_status'],\n 'created_at' => $item['created_at'],\n 'button_status' => $this->getButtonStatus($item['processing_status']),\n 'complainer_rate' => $item['complainer_rate'],\n 'conversioncount' => $item['conversioncount'],\n 'mobileclickscount' => $item['mobileclickscount'],\n 'opt_rate' => $item['opt_rate'],\n 'otherclickscount' => $item['otherclickscount'],\n 'profit' => $item['profit'],\n 'reply_rate' => $item['reply_rate'],\n 'revenue' => $item['revenue'],\n 'sentcount' => $item['sentcount'],\n 'cost' => $item['cost'],\n 'ctr' => $item['ctr'],\n 'roi' => $item['roi']\n ];\n });\n\n return $collection;\n }",
"function toArray(){\r\n\t\treturn $this->data;\r\n\t}"
] | [
"0.75023437",
"0.75023437",
"0.74398685",
"0.73221743",
"0.7238756",
"0.7181181",
"0.7159696",
"0.71220154",
"0.7117252",
"0.7117252",
"0.7117169",
"0.7117169",
"0.7117169",
"0.7117169",
"0.7117118",
"0.7117118",
"0.7117118",
"0.7117118",
"0.7117118",
"0.7117118",
"0.7117118",
"0.7117118",
"0.7117118",
"0.7117118",
"0.7057061",
"0.7017721",
"0.7004176",
"0.69773245",
"0.692872",
"0.6920197",
"0.69038546",
"0.6898731",
"0.6897736",
"0.6881646",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.68266606",
"0.6819385",
"0.6818766",
"0.6800064",
"0.6770631",
"0.6764444",
"0.67592347",
"0.67583686",
"0.6755653",
"0.6736483",
"0.67291135",
"0.6725103",
"0.6725103",
"0.6715038",
"0.6704712",
"0.6704487",
"0.6700217",
"0.66875273",
"0.6686972",
"0.6684334",
"0.6684024",
"0.66818064",
"0.66817075",
"0.6679236",
"0.6677755",
"0.66767704",
"0.6676551",
"0.6673718"
] | 0.0 | -1 |
Runs steps for aborting the parsing steps. | abstract public function abort(): void; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function abort() {\n $this->aborted = TRUE;\n }",
"public function halt();",
"public function testAbortBadType()\n\t{\n\t\t$this->object->pushStep(array('type' => 'badstep'));\n\n\t\t$this->assertFalse(\n\t\t\t$this->object->abort(null, false)\n\t\t);\n\t}",
"public function abort(): void;",
"public function abort() {\n $this->status = self::STATUS_ABORTED;\n }",
"public function stepOutOfScope();",
"public function haltJobLoop()\n\t{\n\t\t$this->halt_job_loop = true;\n\t}",
"public function exitRemainingTags()\n {\n while (count($this->stack) > 0) {\n $this->handler->endTag(\n new ParsedTag(array_pop($this->stack))\n );\n }\n }",
"public function halt()\n {\n $this->_halt = TRUE;\n }",
"public function reset(): void\n {\n if ($this->input !== null) {\n $this->input->seek(0);\n }\n\n $this->errorHandler->reset($this);\n $this->ctx = null;\n $this->syntaxErrors = 0;\n $this->matchedEOF = false;\n $this->setTrace(false);\n $this->precedenceStack = [0];\n\n $interpreter = $this->getInterpreter();\n\n if ($interpreter !== null) {\n $interpreter->reset();\n }\n }",
"public function abortDuel(){\n $this->plugin->getScheduler()->cancelTask($this->countdownTaskHandler->getTaskId());\n }",
"public function abort() {\n\t\t$this->timer->abortEvent( $this );\n\t}",
"private function parse_args() {\n\t\t//exit;\t\t\n\t}",
"public function halt(): void\n {\n throw new Exception('Halted request');\n }",
"function abort() \n {\n return $this->instance->abort();\n }",
"protected function tearDown(): void {\n $this->parser = null;\n }",
"private function rollback() {\n\t\tEE::warning( 'Exiting gracefully after rolling back. This may take some time.' );\n\t\tif ( $this->level > 0 ) {\n\t\t\t$this->delete_site();\n\t\t}\n\t\tEE::success( 'Rollback complete. Exiting now.' );\n\t\texit;\n\t}",
"function reset_process(){ $this->model->closing(); $this->transmodel->closing(); }",
"public function tracker_abort(){\n\t\t$this->env_set('tracker:event', false);\n\t\t}",
"public function endSkip(/* ... */)\n {\n if ($this->getTestResult() !== self::FAIL) {\n $this->setTestResult(self::PASS);\n }\n }",
"function RollbackUpload() {\n\t\t\t// Debemos recorrer los dos vectores y eliminar todos los archivos procesados\n\t\t\t// anterior a la llamada a este proceso\n\t\t\t$K = array();\n\t\t\t$K = array_keys($this->BatchProcess);\n\t\t\tforeach ($K as $Val) {\n\t\t\t\t// Si este upload tiene proces recursivos\n\t\t\t\tif (isset($this->BatchRecursiveProcess[$Val])) {\n\t\t\t\t\t// Si es así recorremos los procesos\n\t\t\t\t\tforeach ($this->BatchRecursiveProcess[$Val] as $Value) {\n\t\t\t\t\t\t$this->DeleteFile($Value['new_name'], $Value['dir_file']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->DeleteFile($this->BatchProcess[$Val]['new_name'], $this->BatchProcess[$Val]['dir_file']);\n\t\t\t}\n\t\t\tdie('Rollback: '.$this->GetFileName().' no se ha podido subir este archivo');\n\t\t\tunset($this);\n\t\t}",
"function yy_parse_failed()\n {\n if (self::$yyTraceFILE) {\n fprintf(self::$yyTraceFILE, \"%sFail!\\n\", self::$yyTracePrompt);\n }\n while ($this->yyidx >= 0) {\n $this->yy_pop_parser_stack();\n }\n /* Here code is inserted which will be executed whenever the\n ** parser fails */\n }",
"public function cancel();",
"private function shutDownFunction() {\n\t\t$error = error_get_last();\n\t\tif ( isset( $error ) ) {\n\t\t\tif ( $error['type'] === E_ERROR ) {\n\t\t\t\tEE::warning( 'An Error occurred. Initiating clean-up.' );\n\t\t\t\t$this->logger->error( 'Type: ' . $error['type'] );\n\t\t\t\t$this->logger->error( 'Message: ' . $error['message'] );\n\t\t\t\t$this->logger->error( 'File: ' . $error['file'] );\n\t\t\t\t$this->logger->error( 'Line: ' . $error['line'] );\n\t\t\t\t$this->rollback();\n\t\t\t}\n\t\t}\n\t}",
"public function abort() {\n return UPS_SUCCESS;\n }",
"public static function cleanupCacheIndicators()\n {\n foreach (static::getCacheStateFiles() as $file) {\n if (\\Includes\\Utils\\FileManager::isFile($file) && !\\Includes\\Utils\\FileManager::deleteFile($file)) {\n \\Includes\\ErrorHandler::fireError(\n 'Unable to delete \"' . $file . '\" file. Please correct the permissions'\n );\n }\n }\n\n // \"Step is running\" indicator\n static::cleanupRebuildIndicator();\n }",
"function yy_parse_failed()\r\n {\r\n if (self::$yyTraceFILE) {\r\n fprintf(self::$yyTraceFILE, \"%sFail!\\n\", self::$yyTracePrompt);\r\n }\r\n while ($this->yyidx >= 0) {\r\n $this->yy_pop_parser_stack();\r\n }\r\n /* Here code is inserted which will be executed whenever the\r\n ** parser fails */\r\n }",
"protected function parseSteps()\r\n {\r\n $this->_steps = $this->_parseSteps($this->steps);\r\n $this->_stepLabels = array_flip($this->_steps);\r\n $this->_steps = $this->_steps;\r\n }",
"abstract function preExit();",
"public function abort(Command $command);",
"public function tearDown() {\n\t\tremove_filter( 'doing_it_wrong_trigger_error', '__return_false' );\n\n\t\tparent::tearDown();\n\t}",
"public function tearDown()\n {\n $this->objectManager->create(\\Magento\\Tax\\Test\\TestStep\\DeleteAllTaxRulesStep::class)->run();\n $this->objectManager->create(\n \\Magento\\Config\\Test\\TestStep\\SetupConfigurationStep::class,\n ['configData' => 'default_tax_configuration,shipping_tax_class_taxable_goods_rollback']\n )->run();\n }",
"protected static function _ignoreFrameworkResult() {\n Framework::getInstance()->stop(0);\n }",
"public function unmarkAllExecutions() {}",
"public function gracefulStop(){\n $this->handleWorkerOutput('warn', \"Work done, exiting now.\");\n $this->stop();\n }",
"public function tearDown() {\n\t\t// do not allow SimpleTest to interpret Elgg notices as exceptions\n\t\t$this->swallowErrors();\n\t}",
"public function tearDown()\n {\n $this->objectManager->create(\\Magento\\Tax\\Test\\TestStep\\DeleteAllTaxRulesStep::class, [])->run();\n }",
"public function skip() {\n parent::skip();\n foreach ($this->suites as $suite) {\n $suite->skip();\n }\n foreach ($this->cases as $case) {\n $case->skip();\n }\n }",
"final protected function abortCache()\n\t{\n\t\tif(!$this->getCacheNeed())\n\t\t\treturn;\n\n\t\tif($this->currentCache == 'null')\n\t\t\tthrow new Main\\SystemException('Cache were not started');\n\n\t\t$this->currentCache->abortDataCache();\n\t\t$this->currentCache = null;\n\t}",
"public function testParseWithTwoTokensWithLookaheadRemoval(): void\n {\n $this->expectException(ParserException::class);\n $this->expectExceptionMessage('Invalid Roman');\n $this->expectExceptionCode(ParserException::INVALID_ROMAN);\n\n $this->parser->parse([Grammar::T_I, Grammar::T_X, Grammar::T_I, Grammar::T_X]);\n }",
"protected function cancel(): void\n {\n }",
"public function _break()\n {\n //set the internal execution flag to false, stopping execution\n $this->executing = false;\n }",
"protected function _processRevertToDefault()\n {\n }",
"function reset_process(){ $this->model->closing(); }",
"public function stop()\n {\n $this->mark('__stop');\n }",
"public function resetErrors() {}",
"protected function tearDown(): void\n {\n $this->processRunner->stop();\n }",
"public function endProcess() {\n if ($this->previousErrorHandler) {\n set_error_handler($this->previousErrorHandler);\n $this->previousErrorHandler = NULL;\n }\n if ($this->processing) {\n $this->status = MigrationBase::STATUS_IDLE;\n $fields = array('class_name' => get_class($this), 'status' => MigrationBase::STATUS_IDLE);\n db_merge('migrate_status')\n ->key(array('machine_name' => $this->machineName))\n ->fields($fields)\n ->execute();\n\n // Complete the log record\n if ($this->logHistory) {\n db_merge('migrate_log')\n ->key(array('mlid' => $this->logID))\n ->fields(array(\n 'endtime' => microtime(TRUE) * 1000,\n 'finalhighwater' => $this->getHighwater(),\n 'numprocessed' => $this->total_processed,\n ))\n ->execute();\n }\n\n $this->processing = FALSE;\n }\n self::$currentMigration = NULL;\n }",
"public function reset(): void\n {\n API::ffi()->ts_parser_reset($this->data);\n }",
"protected function cleanUp()\n\t{\n\t\t// clean\n\t\t$this->killExceededTasks();\n\t\t$this->cleanHistory();\n\t}",
"protected function killExceededTasks()\n\t{\n\t\t$exceededTasks = $this->taskRepository->findExceededTasks();\n\t\tforeach ($exceededTasks as $task) {\n\t\t\t$task->lastSuccess = false;\n\t\t\t$this->setTaskIdleAndSave($task);\n\t\t\t// task history ..\n\t\t\t$taskHistory = new TaskHistory();\n\t\t\t$taskHistory->taskId = $task->id;\n\t\t\t$taskHistory->started = new DateTime();\n\t\t\t$taskHistory->finished = new DateTime();\n\t\t\t$taskHistory->output = new Output;\n\t\t\t$taskHistory->output->error(\"Exceeded time to run\");\n\t\t\t$taskHistory->resultCode = -1;\n\t\t\t$this->taskHistoryRepository->save($taskHistory);\n\t\t}\n\t}",
"public function reset()\n {\n $this->values[self::_INFO] = null;\n $this->values[self::_EXIT] = Down_ErrorInfo_Exit::noneed;\n }",
"public function _tearDown()\n {\n global $wpdb, $wp_query, $wp;\n\n if (empty($wpdb) || !$wpdb instanceof wpdb) {\n return;\n }\n\n $wpdb->query('ROLLBACK');\n if (is_multisite()) {\n while (ms_is_switched()) {\n restore_current_blog();\n }\n }\n $wp_query = new WP_Query();\n $wp = new WP();\n\n // Reset globals related to the post loop and `setup_postdata()`.\n $post_globals = array(\n 'post',\n 'id',\n 'authordata',\n 'currentday',\n 'currentmonth',\n 'page',\n 'pages',\n 'multipage',\n 'more',\n 'numpages'\n );\n foreach ($post_globals as $global) {\n $GLOBALS[$global] = null;\n }\n\n remove_theme_support('html5');\n remove_filter('query', array($this, '_create_temporary_tables'));\n remove_filter('query', array($this, '_drop_temporary_tables'));\n remove_filter('wp_die_handler', array($this, 'get_wp_die_handler'));\n $this->_restore_hooks();\n wp_set_current_user(0);\n $this->requestTimeTearDown();\n }",
"protected function end_bulk_operation() {\n\t\t// This will also trigger a term count.\n\t\twp_defer_term_counting( false );\n\t}",
"protected function tearDown(): void {\n\t\t$this->http_client = null;\n\t\t$this->process_transactions = array();\n\n\t\tif ( ! empty( $this->transactions ) ) {\n\t\t\t$this->transactions = array();\n\n\t\t\tCrudTable\\delete_rows( 'transactions', $this->key_pairs, 100 );\n\n\t\t\t$this->key_pairs['tag'] = $this->tag;\n\t\t\tCrudTable\\delete_rows( 'transactions', $this->key_pairs, 100 );\n\n\t\t\tTestHelpers::removeJsonFile( $this->process_tag );\n\t\t\tTestHelpers::removeJsonFile( $this->tag );\n\t\t}\n\t}",
"protected function parentCleanup() {\n }",
"protected function _moduleExportAbort($data)\n\t{\n\t\t$id = $this->escapeJobId($data['exportId']);\n\n\t\t// flag export as aborted\n\t\t$keystore = Interspire_KeyStore::instance();\n\t\t$keystore->set('email:module_export:' . $id . ':abort', 1);\n\n\t\t// if the export job has crashed, the abort will never be detected and data will never be cleaned up\n\t\tInterspire_TaskManager::createTask('emailintegration', 'Job_EmailIntegration_ModuleExport', array(\n\t\t\t'id' => $id,\n\t\t));\n\n\t\tISC_JSON::output(array(\n\t\t\t'success' => true\n\t\t));\n\t}",
"protected function cleanup()\n {\n $this->currentRule = '';\n $this->currentUserAgent = self::USER_AGENT;\n }",
"protected function _processPrevious()\n\t{\n\t\t$step = (int) $this->Session->read('Wizard.step');\n\t\t\n\t\tif( ! empty($step)){\n\t\t\t$step--;\n\t\t\t$this->_write($step);\n\t\t\t\n\t\t\t$this->redirect();\n\t\t}\t\t\n\t}",
"public function tearDown()\n {\n parent::tearDown();\n unset($this->startSituation);\n }",
"protected function executeSpecificStep() {}",
"public function cancel(): void;",
"function import_end() {\n\t\t//wp_import_cleanup( $this->id );\n\n\t\twp_cache_flush();\n\t\tforeach ( get_taxonomies() as $tax ) {\n\t\t\tdelete_option( \"{$tax}_children\" );\n\t\t\t_get_term_hierarchy( $tax );\n\t\t}\n\n\t\twp_defer_term_counting( false );\n\t\twp_defer_comment_counting( false );\n\n\t\techo '<p>导入成功.' . ' <a href=\"' . admin_url() . '\">Have fun!</a>' . '</p>';\n\n\t\tdo_action( 'import_end' );\n\t}",
"function exitAllowedOff()\n\t{\n\t\t$this->bExitAllowed = false;\n\t}",
"function shut()\n{\n\n $error = error_get_last();\n\n if ($error && ($error['type'] & E_FATAL)) {\n errorHandler($error['type'], $error['message'], $error['file'], $error['line']);\n }\n\n\n}",
"public function cleanup() {\n\t\t$this->status = new WPSEO_Import_Status( 'cleanup', false );\n\n\t\tif ( ! $this->detect_helper() ) {\n\t\t\treturn $this->status;\n\t\t}\n\n\t\t$this->wpdb->query( \"DELETE FROM {$this->wpdb->postmeta} WHERE meta_key LIKE '_aioseop_%'\" );\n\n\t\treturn $this->status->set_status( true );\n\t}",
"protected function triggerExitRuleEvent(): void\n {\n for ($i = \\count($this->parseListeners) - 1; $i >= 0; $i--) {\n /** @var ParseTreeListener $listener */\n $listener = $this->parseListeners[$i];\n $this->context()->exitRule($listener);\n $listener->exitEveryRule($this->context());\n }\n }",
"protected function end_bulk_operation() {\n\t\t\n\t\t// This will also trigger a term count.\n\t\twp_defer_term_counting( false );\n\t}",
"public function testIterationStopOnError(): void\n {\n $process = $this->phpbench(\n 'run benchmarks/set3/ErrorBench.php --stop-on-error'\n );\n\n $this->assertExitCode(1, $process);\n $this->assertStringContainsString('1 subjects encountered errors', $process->getErrorOutput());\n $this->assertStringNotContainsString('benchNothingElse', $process->getErrorOutput());\n }",
"public function end_trace()\n {\n }",
"public function tearDown()\n {\n $this->testStepFactory->create(\n \\Magento\\Config\\Test\\TestStep\\SetupConfigurationStep::class,\n ['configData' => $this->configData, 'rollback' => true]\n )->run();\n\n $this->testStepFactory->create(\n \\Magento\\SalesRule\\Test\\TestStep\\DeleteSalesRulesStep::class,\n ['salesRules' => [$this->salesRuleName]]\n )->run();\n\n $this->testStepFactory->create(\n \\Magento\\Catalog\\Test\\TestStep\\DeleteAttributeStep::class,\n ['attribute' => $this->attribute]\n )->run();\n }",
"function __destruct()\n {\n while ($this->yyidx >= 0) {\n $this->yy_pop_parser_stack();\n }\n if (is_resource(self::$yyTraceFILE)) {\n fclose(self::$yyTraceFILE);\n }\n }",
"public function tearDown() {\n $this->command = null;\n }",
"protected function cleanupOldCompleted(): void\n {\n // successful jobs and failed jobs are deleted after different periods of time\n $this->deleteAsyncJobByThreshold('aj.error IS NULL', $this->cleanupThreshold);\n $this->deleteAsyncJobByThreshold('aj.error IS NOT NULL', $this->cleanupFailedThreshold);\n }",
"public function cancel()\n {\n }",
"public function cancel()\n {\n }",
"function cleanup() {\n\n\t\t// reset language\n\t\tif ( Language::is_multilingual() ) {\n\t\t\tLanguage::set_original();\n\t\t}\n\n\t\tremove_filter( 'woocommerce_get_tax_location', [ $this, 'filter_tax_location' ] );\n\n\t\t$this->is_setup = false;\n\t}",
"public function shutdown() {\n global $conf;\n if ($this->skip) {\n $conf['error_level'] = 0;\n // By throwing an Exception here the subsequent registered shutdown\n // functions will not get executed.\n throw new \\Exception(\"Skip shutdown functions\");\n }\n }",
"public function __destruct() {\n exit((int)$this->_failed);\n }",
"function __destruct()\r\n {\r\n while ($this->yyidx >= 0) {\r\n $this->yy_pop_parser_stack();\r\n }\r\n if (is_resource(self::$yyTraceFILE)) {\r\n fclose(self::$yyTraceFILE);\r\n }\r\n }",
"public function __destruct()\n {\n unset($this->stepCount);\n parent::__destruct();\n }",
"public function stopProcess() {\n // Do not change the status of an idle migration\n db_update('migrate_status')\n ->fields(array('status' => MigrationBase::STATUS_STOPPING))\n ->condition('machine_name', $this->machineName)\n ->condition('status', MigrationBase::STATUS_IDLE, '<>')\n ->execute();\n }",
"public function disable_step($old_state);",
"function setNoBreak() {\t \r\n\t \t$this->noBreak = true;\r\n\t}",
"public function terminate() {\n\n unset($this->controller);\n unset($this);\n exit;\n }",
"protected function abortUnauthorized() {\n\t\t$identifier = KLog::log('Unauthorized execution of controller task \"'.$this->executedTask.'\" was attempted. Request variables were '.var_export(KRequest::getAll(), true), 'authorization');\n\t\tthrow new Exception('Application authentication and authorization needed. See authorization log file, identifier '.$identifier, 403);\n\t}",
"public function reset(): void\n {\n $this->level = 0;\n $this->statements = [];\n }",
"public function _handleTerm()\n\t{\n\t\t$this->_should_stop = true;\n\t}",
"public function skip(/* ... */)\n {\n if ($this->getTestResult() !== self::FAIL) {\n $this->setTestResult(self::SKIP);\n }\n }",
"protected function abort($iExitCode = self::EXIT_CODE_FAILURE, array $aMessages = []): int\n {\n return parent::abort(\n $iExitCode,\n !empty($aMessages) ? $aMessages : ['Aborting database migration']\n );\n }",
"public static function traceExit() \n\t{\n\t\tacPhpCas::setReporting();\n\t\tphpCAS::traceExit();\t\t\n\t}",
"public function clearFailed()\n {\n $this->getResultsStorage()->clear(ResultsStorageInterface::STATUS_FETCH_FAILED);\n $this->getResultsStorage()->clear(ResultsStorageInterface::STATUS_PARSE_ERROR);\n $this->getLogger()->debug('Cleared \"failed\" and \"not-parsed\" filters');\n }",
"function tearDown() {\n\t\t$this->wfRecursiveRemoveDir( $this->tmpName );\n\t}",
"public static function stop()\n\n {\n\n $html = ob_get_contents();\n\n ob_end_clean();\n\n // remove the headline\n\n $headline = __( IS_PROFILE_PAGE ? 'About Yourself' : 'About the user' );\n\n $html = str_replace( '<h3>' . $headline . '</h3>', '', $html );\n\n // remove the table row\n\n $html = preg_replace( '~<tr>\\s*<th><label for=\"description\".*</tr>~imsUu', '', $html );\n\n print $html;\n\n }",
"public function stop()\n {\n // Update worker state and set it as finished\n $this->update(['resume_token' => 0, 'has_finished' => true]);\n }",
"function session_abort()\n{\n}",
"public function cleanup()\n {\n if ($this->catalogRule != '-') {\n $this->deleteAllCatalogRule->run();\n }\n }",
"protected function abortJourney($args) {\n\n if ($args['ent_appnt_dt'] == '' || $args['ent_pas_email'] == '' || $args['ent_date_time'] == '' || $args['ent_cancel_type'] == '')\n return $this->_getStatusMessage(1, $args);\n\n $this->curr_date_time = urldecode($args['ent_date_time']);\n\n $returned = $this->_validate_token($args['ent_sess_token'], $args['ent_dev_id'], '1');\n\n if (is_array($returned))\n return $returned;\n\n $args['ent_appnt_dt'] = urldecode($args['ent_appnt_dt']);\n\n $getApptDetQry = \"select a.appointment_dt,a.appointment_id,a.appt_type,a.status,a.slave_id,a.user_device from appointment a where a.mas_id = '\" . $this->User['entityId'] . \"' and a.appointment_dt = '\" . $args['ent_appnt_dt'] . \"'\";\n $getApptDetRes = mysql_query($getApptDetQry, $this->db->conn);\n\n if (mysql_affected_rows() <= 0)\n return $this->_getStatusMessage(32, 32);\n\n $apptDet = mysql_fetch_assoc($getApptDetRes);\n\n if (!is_array($apptDet))\n return $this->_getStatusMessage(32, 32);\n\n if ($apptDet['status'] == '3')\n return $this->_getStatusMessage(44, 44);\n\n if ($apptDet['status'] == '4')\n return $this->_getStatusMessage(41, 3);\n\n if ($apptDet['status'] == '9')\n return $this->_getStatusMessage(75, 75);\n\n// $pasData = $this->_getEntityDet($args['ent_pas_email'], '2');\n\n $cancelApntQry = \"update appointment set status = 5,cancel_status = '\" . $args['ent_cancel_type'] . \"',last_modified_dt = '\" . $this->curr_date_time . \"',cancel_dt = '\" . $this->curr_date_time . \"' where slave_id = '\" . $apptDet['slave_id'] . \"' and mas_id = '\" . $this->User['entityId'] . \"' and appointment_dt = '\" . $args['ent_appnt_dt'] . \"'\";\n mysql_query($cancelApntQry, $this->db->conn);\n\n if (mysql_affected_rows() <= 0)\n return $this->_getStatusMessage(3, $cancelApntQry);\n\n $message = \"Driver cancelled the appointment on \" . $this->appName . \"!\";\n\n $this->ios_cert_path = $this->ios_roadyo_pas;\n $this->ios_cert_pwd = $this->ios_pas_pwd;\n $this->androidApiKey = $this->slaveApiKey;\n\n $aplPushContent = array('alert' => $message, 'nt' => '10', 't' => $apptDet['appt_type'], 'sound' => 'default', 'id' => $apptDet['appointment_id'], 'r' => (int) $args['ent_cancel_type']); //, 'd' => $apptDet['appointment_dt'], 'e' => $this->User['email']\n $andrPushContent = array('payload' => $message, 'action' => '10', 't' => $apptDet['appt_type'], 'sname' => $this->User['firstName'], 'dt' => $apptDet['appointment_dt'], 'e' => $this->User['email'], 'bid' => $apptDet['appointment_id']);\n $pushNum['push'] = $this->_sendPush($this->User['entityId'], array($apptDet['slave_id']), $message, '10', $this->User['firstName'], $this->curr_date_time, '2', $aplPushContent, $andrPushContent, $apptDet['user_device']);\n\n $location = $this->mongo->selectCollection('location');\n\n $location->update(array('user' => (int) $this->User['entityId']), array('$set' => array('status' => 3)));\n\n return $this->_getStatusMessage(42, $cancelApntQry . $pushNum);\n }",
"public function abort(int $code)\n {\n http_response_code($code);\n exit();\n }",
"public function reset(): void {\n $this->node = $this->dfa->getStartNode();\n $this->errorState = false;\n $this->finalState = $this->dfa->isFinal($this->node);\n }"
] | [
"0.6148209",
"0.5928054",
"0.5792023",
"0.5748578",
"0.56567174",
"0.564003",
"0.55119497",
"0.5462849",
"0.540979",
"0.5318808",
"0.53110784",
"0.52772206",
"0.52143455",
"0.5185979",
"0.51701874",
"0.51165974",
"0.50724936",
"0.50511426",
"0.5048842",
"0.5039265",
"0.50283587",
"0.50154436",
"0.49778068",
"0.4964821",
"0.49471918",
"0.49455857",
"0.49200302",
"0.49179977",
"0.4917183",
"0.49150515",
"0.48875818",
"0.48830077",
"0.48563364",
"0.48379138",
"0.4833004",
"0.48318234",
"0.4826307",
"0.48261502",
"0.48136345",
"0.48102748",
"0.4793373",
"0.4788981",
"0.4785456",
"0.47842115",
"0.47792864",
"0.47720084",
"0.47672677",
"0.47642463",
"0.47568595",
"0.47417518",
"0.47335273",
"0.4725124",
"0.47167274",
"0.4712657",
"0.4703782",
"0.46970627",
"0.46894863",
"0.4688817",
"0.4671482",
"0.4663561",
"0.46633455",
"0.4659556",
"0.46536168",
"0.4647878",
"0.46461728",
"0.46419376",
"0.4637788",
"0.46304947",
"0.46286178",
"0.4610242",
"0.46021366",
"0.45990843",
"0.45989236",
"0.459859",
"0.45933402",
"0.45933402",
"0.45867038",
"0.4585845",
"0.45854342",
"0.45840764",
"0.45815235",
"0.45767605",
"0.45719525",
"0.45704696",
"0.4568656",
"0.45561",
"0.45532906",
"0.45493412",
"0.45484182",
"0.4546144",
"0.45348048",
"0.45294952",
"0.45264608",
"0.45217022",
"0.45046666",
"0.45042503",
"0.45025593",
"0.4502551",
"0.4497089",
"0.44959223"
] | 0.5430357 | 8 |
Preprocesses the input stream. | abstract public function preprocessInputStream(string $input): void; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function preProcess() {}",
"public static function pre_process() {}",
"public function preProcess();",
"public function preProcess();",
"abstract protected function _preProcess();",
"public function rewind()\n {\n $this->stream->rewind();\n\n // read one line as we do in the constructor\n if ($this->header) {\n $this->header = $this->read();\n }\n }",
"function init() {\n\t\t$this->processIncomingData();\n\t}",
"protected function preprocessData() {}",
"function read_stream(){\n global $array_stream;\n $array_key = 0;\n $array_stream = stream_get_contents(STDIN);\n $array_stream = str_split($array_stream);\n\n foreach ($array_stream as $keyMod => $valueMod) { //cut white space before .IPPcode19 header\n if(preg_match('/^\\S$/', $valueMod)){\n break;\n } else unset($array_stream[$keyMod]);\n }\n if(empty($array_stream)){\n fwrite(STDERR, \"ERROR : Input doesn't start with .IPPcode19 header\\n\");\n exit(21);#appropriate exit code\n }\n global $key_val;\n global $c_commentary;\n $c_commentary = 0;\n $key_val = $keyMod;\n }",
"public function preProcessRequest(RequestInterface &$request) {}",
"protected function readInput() : void {\n\t\t\tif ($this->input === null) {\n\t\t\t\ttry {\n\t\t\t\t\tif (($this->input = @file_get_contents(\"php://input\")) === false) {\n\t\t\t\t\t\t$this->input = '';\n\t\t\t\t\t}\n\t\t\t\t} catch (\\Exception $ex) {\n\t\t\t\t\t$this->input = '';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t}",
"private function _preLoadReset() {\n\t\t$this->_amountProcessedLines = $this->_amountReadLines = 0;\n\t\t$this->_linesInvalidSize = $this->_lines = [];\n\t}",
"public function init()\n {\n $this->processInput();\n $this->outputFile();\n }",
"public function preProcess($object);",
"protected function processInput()\n {\n if (empty($this->input)) {\n $this->input = request()->except('_token');\n\n if ($this->injectUserId) {\n $this->input['user_id'] = Auth::user()->id;\n }\n }\n $this->sanitize();\n request()->replace($this->input); // @todo IS THIS NECESSARY?\n }",
"function preProcess()\n {\t\n parent::preProcess( );\n\t\t \n\t}",
"public function setUp() {\n $depend= $this->filter();\n if (!in_array($depend, stream_get_filters())) {\n throw new PrerequisitesNotMetError(ucfirst($depend).' stream filter not available', null, [$depend]);\n }\n }",
"protected function _preload() {\n }",
"public function onBuildFromIterator(PreBuildFromIteratorEvent $event)\n {\n $event->setIterator(\n new ProcessorIterator(\n $event->getIterator(),\n $this->processor,\n $event->getBase()\n )\n );\n }",
"function onBeforeStream(&$man, $cmd, $input) {\r\n\t\treturn true;\r\n\t}",
"public function resolveInput()\n {\n $value = $this->_value( @$_SERVER['CONTENT_TYPE'], '' );\n $value = $this->_value( @$_SERVER['HTTP_CONTENT_TYPE'], $value );\n $value = $this->_value( @$_SERVER['HTTP_X_CONTENT_TYPE'], $value );\n $parts = array();\n\n if( !empty( $value ) )\n {\n $value = 'ctype='. $value;\n $value = preg_replace( '/\\;\\s+/', '&', $value );\n parse_str( $value, $parts );\n }\n $this->ctype = $this->_value( @$parts['ctype'], '' );\n $this->boundary = $this->_value( @$parts['boundary'], '' );\n $this->input = trim( file_get_contents( 'php://input' ) );\n }",
"function __construct(){\n $this->stdin = fopen('php://stdin', 'r');\n $this->commentsNumber = 0;\n do{\n $line = utf8_encode($this->readLine()); //mozna ne encode tady musim otestovat\n if(preg_match('/#/', $line)){\n $this->iterateComments();\n } \n $line = preg_replace('/\\s*/','', $line); \n }while($line == null && !feof($this->stdin));\n if(strtolower($line) != \".ippcode18\"){\n exit(21);\n }\n }",
"protected function connectInput()\n {\n $this->input_handle = fopen($this->input_filepath, 'r');\n }",
"protected function preProcessRecordData(&$data)\n {\n }",
"private function headerRead(): void\n {\n if (false === $this->getStrategy()->hasHeader() || true === $this->headerRead) {\n return;\n }\n\n $this->rewind();\n $this->skipLeadingLines();\n $this->header = $this->normalizeHeader($this->convertRowToUtf8($this->current()));\n $this->headerRead = true;\n $this->next();\n }",
"abstract protected function _preHandle();",
"public function preFlush(): void\n {\n $this->setParams(clone $this->getParams());\n }",
"protected function preprocessInternal()\n\t{\n\t\t// void\n\t}",
"protected function _preProcess(\\SetaPDF_Core_Document $pdfDocument) {}",
"function _pre() {\n\n\t}",
"public function pre()\n {}",
"protected function _parseClientRequestStream() {\n\t $this->clientoutput->response = array();\n\t\t$this->_parsing->offset = 0;\n\t\t\n $body = '';\n $length = 0;\t\t\n\t\t\n\t $fp = fopen(\"php://input\",\"r\"); //rb?\n\n\t //while(!feof($fp)) {\n\t\tdo {\n\t\t\n // NOTE: for chunked encoding to work properly make sure\n // there is NOTHING (besides newlines) before the first hexlength\n\n // get the line which has the length of this chunk (use fgets here)\n $line = fgets($fp, BUFFER_LENGTH);\n\n // if it's only a newline this normally means it's read\n // the total amount of data requested minus the newline\n // continue to next loop to make sure we're done\n if ($line == CRLF) {\n continue;\n }\n\n // the length of the block is sent in hex decode it then loop through\n // that much data get the length\n // NOTE: hexdec() ignores all non hexadecimal chars it finds\n $length = hexdec($line);\n\n if (!is_int($length)) {\n //trigger_error('Most likely not chunked encoding', E_USER_ERROR);\n\t\t\t $this->clientoutput->body .= $line;\n\t\t\t continue;\n }\n\n // zero is sent when at the end of the chunks\n // or the end of the stream or error\n if ($line === false || $length < 1 || feof($fp)) {\n // break out of the streams loop\n break;\n }\t\n\n // loop though the chunk\n do\n {\n // read $length amount of data\n // (use fread here)\n $data = fread($fp, $length);\n\n // remove the amount received from the total length on the next loop\n // it'll attempt to read that much less data\n $length -= strlen($data);\n\n // PRINT out directly\n #print $data;\n #flush();\n // you could also save it directly to a file here\n\n // store in string for later use\n $this->clientoutput->body .= $data;\n\n // zero or less or end of connection break\n if ($length <= 0 || feof($fp)) {\n // break out of the chunk loop\n break;\n }\n }\n while (true);\n // end of chunk loop\n }\n while (true);\n // end of stream loop\n\t\t\n\t //} \n fclose($fp);\t\t\n\t}",
"public function __construct(InputStream $stream) {\n $this->stream= $stream;\n }",
"public function rewind()\n {\n if (!$this->is_seekable) {\n throw new Exception('stream does not support seeking');\n }\n rewind($this->stream);\n $this->offset = 0;\n $this->value = false;\n if ($this->flags & SplFileObject::READ_AHEAD) {\n $this->current();\n }\n }",
"public function prepareParsing()\n {\n $this->saverHelper->createFirstSheet();\n }",
"public function processInput()\n {\n // Check to make sure the file exits and is readable.\n if (file_exists($this->inputName) && is_readable($this->inputName)) {\n // Get handle and open file.\n $handle = fopen($this->inputName, \"r\");\n\n // Loop through each file and save # locations.\n $lineCount = 0;\n while (!feof($handle)) {\n // Get the line.\n $line = fgets($handle);\n\n // Set inital character postion for the line.\n $pos = -1;\n\n // Get each # position per line.\n while (($pos = strpos($line, '#', $pos + 1)) !== false) {\n $this->hashes[$lineCount + 1][] = $pos;\n }\n\n // Set the line length the first time (assumes each line is same).\n if ($lineCount === 0) {\n $this->lineLength = strlen(trim($line));\n }\n\n // Next line.\n $lineCount++;\n }\n\n // Save lineCount for future output.\n $this->lineCount = $lineCount;\n\n fclose($handle);\n } else {\n throw new Exception('File did not exist or was not readable.');\n }\n }",
"private function _readInput() {\n $input = fopen('php://stdin', 'r');\n\n $message = fgets($input);\n return $this->_trigerMessage($message);\n }",
"protected function beforeProcess() {\n }",
"protected function prepare()\n {\n $this->register('require', function($context, $path) {\n $context->requireAsset($path);\n });\n\n $this->register('depend_on', function($context, $path) {\n $context->dependOn($path);\n });\n\n $this->register('require_tree', function($context, $path) {\n $context->requireTree($path);\n });\n\n $this->body = $this->getData();\n\n if (preg_match(static::HEADER_PATTERN, $this->getData(), $matches)) {\n $this->header = $matches[0];\n $this->body = substr($this->getData(), strlen($matches[0])) ?: '';\n }\n\n $this->processed = array();\n }",
"protected function processPreprocess(Aloi_Serphlet_Application_HttpRequest $request, Aloi_Serphlet_Application_HttpResponse $response) {\r\n\t\treturn true;\r\n\t}",
"public function rewind() {\n if ($this->started) {\n // When you first foreach() an iterator the rewind() method gets called\n // so we have to work the first time.\n throw new Exception(\n pht('Stream iterators can not be rewound!'));\n }\n\n $this->started = true;\n $this->naturalKey = -1;\n $this->next();\n }",
"public static function addProcessInputFromStream($php_stream_handle, string $post_content_type, $process) : void\n {\n // it uses a process and is related to the way processes are used in the API\n\n $stream = false;\n $streamwriter = false;\n $form_params = array();\n\n // first fetch query string parameters\n foreach ($_GET as $key => $value)\n {\n $form_params[\"query.$key\"] = $value;\n }\n\n // \\Flexio\\Base\\MultipartParser can handle application/x-www-form-urlencoded and /multipart/form-data\n // for all other types, we will take the post body and make it into the stdin\n\n $mime_type = $post_content_type;\n $semicolon_pos = strpos($mime_type, ';');\n if ($semicolon_pos !== false)\n $mime_type = substr($mime_type, 0, $semicolon_pos);\n if ($mime_type != 'application/x-www-form-urlencoded' && $mime_type != 'multipart/form-data')\n {\n $stream = \\Flexio\\Base\\Stream::create();\n\n // post body is a data stream, post it as our pipe's stdin\n $first = true;\n $done = false;\n $streamwriter = null;\n while (!$done)\n {\n $data = fread($php_stream_handle, 32768);\n\n if ($data === false || strlen($data) != 32768)\n $done = true;\n\n if ($first && $data !== false && strlen($data) > 0)\n {\n $stream_info = array();\n $stream_info['mime_type'] = $mime_type;\n $stream->set($stream_info);\n $streamwriter = $stream->getWriter();\n }\n\n if ($streamwriter)\n $streamwriter->write($data);\n }\n\n $process->setParams($form_params);\n $process->setStdin($stream);\n\n return;\n }\n\n $size = 0;\n\n $parser = \\Flexio\\Base\\MultipartParser::create();\n $parser->parse($php_stream_handle, $post_content_type, function ($type, $name, $data, $filename, $content_type) use (&$stream, &$streamwriter, &$process, &$form_params, &$size) {\n if ($type == \\Flexio\\Base\\MultipartParser::TYPE_FILE_BEGIN)\n {\n $stream = \\Flexio\\Base\\Stream::create();\n\n if ($content_type === false)\n $content_type = \\Flexio\\Base\\ContentType::getMimeType($filename, '');\n\n $size = 0;\n\n $stream_info = array();\n $stream_info['name'] = $filename;\n $stream_info['mime_type'] = $content_type;\n\n $stream->set($stream_info);\n $streamwriter = $stream->getWriter();\n }\n else if ($type == \\Flexio\\Base\\MultipartParser::TYPE_FILE_DATA)\n {\n if ($streamwriter !== false)\n {\n // write out the data\n $streamwriter->write($data);\n $size += strlen($data);\n }\n }\n else if ($type == \\Flexio\\Base\\MultipartParser::TYPE_FILE_END)\n {\n $streamwriter = false;\n $stream->setSize($size);\n $process->addFile($name, $stream);\n $stream = false;\n }\n else if ($type == \\Flexio\\Base\\MultipartParser::TYPE_KEY_VALUE)\n {\n $form_params['form.' . $name] = $data;\n }\n });\n fclose($php_stream_handle);\n\n $process->setParams($form_params);\n }",
"public function rewind()\n {\n $this->datasource->rewind();\n\n //Process the transformers\n if($this->valid())\n {\n $this->transformedData = $this->transform($this->datasource->current(), $this->datasource->key());\n }\n \n }",
"public function stdin($buf) {\n\t\t$this->buf .= $buf;\n\n\t\tstart:\n\n\t\tif (strlen($this->buf) < 4) {\n\t\t\treturn; // not ready yet\n\t\t}\n\n\t\t$u = unpack('N', $this->buf);\n\t\t$size = $u[1];\n\n\t\tif (strlen($this->buf) < 4 + $size) {\n\t\t\treturn; // no ready yet;\n\t\t}\n\n\t\t$packet = binarySubstr($this->buf, 4, $size);\n\t\t$this->buf = binarySubstr($this->buf, 4 + $size);\n\t\t$this->onPacket(unserialize($packet));\n\n\t\tgoto start;\n\t}",
"public function stdin($buf) {\n\t\t$this->buf .= $buf;\n\n\t\tstart:\n\n\t\tif (strlen($this->buf) < 4) {\n\t\t\treturn; // not ready yet\n\t\t}\n\n\t\t$u = unpack('N', $this->buf);\n\t\t$size = $u[1];\n\n\t\tif (strlen($this->buf) < 4 + $size) {\n\t\t\treturn; // no ready yet;\n\t\t}\n\n\t\t$packet = binarySubstr($this->buf, 4, $size);\n\n\t\t$this->buf = binarySubstr($this->buf, 4 + $size);\n\n\t\t$this->onPacket(unserialize($packet));\n\n\t\tgoto start;\n\t}",
"protected function _initProcessor()\n {\n $this->_processor = Processor::getInstance();\n $paramPath = $this->_input->getArgument('path');\n\n // If path cannot be loaded, exit immediately\n if (!$paramPath) {\n return;\n }\n\n $path = new Path($paramPath, getcwd(), $this->_baseDirectory);\n\n if ($path->isValid()) {\n $this->_processor->setPath($path);\n\n if (!$this->_input->getOption('ignore-manifest')) {\n $this->_manifest->load($path);\n // Check if we've some preprocessor task to complete\n $this->_runProcessors(Processor::PRE_PROCESSORS);\n }\n }\n }",
"public function startOutputBuffering() {}",
"protected function processBeforeHooks()\n {\n foreach ($this->beforeHooks as $hook) {\n if (is_callable($hook)) {\n $this->documents = call_user_func($hook);\n }\n\n if (is_string($hook)) {\n $this->documents = $this->app->call($hook, [$this->documents]);\n }\n }\n }",
"public function read()\n {\n return $this->fallback->process(\n $this->preProcessor->process(\n $this->source->get()\n )\n );\n }",
"protected function parseRequest()\n {\n $this->input = $this->request->getPostList()->toArray();\n }",
"private function setHeader()\r\n {\r\n rewind($this->handle);\r\n $this->headers = fgetcsv($this->handle, $this->length, $this->delimiter);\r\n }",
"public function rewind() {\n\t\t// Set the line pointer to 1 as that is the first entry in the data array\n\t\t$this->setFilePos(1);\n\t}",
"public function prepare()\r\n {\r\n return $this->processor->prepare($this);\r\n }",
"public function preproc($sentence)\n {\n\n // extracting keywords from input text/sentence\n $keywordsArray = $this->tokenize($sentence);\n }",
"public function preProcess(ProcessEvent $event) {\n $GLOBALS['feeds_test_events'][] = (__METHOD__ . ' called');\n }",
"public function rewind()\n {\n fseek($this->file, 0);\n $this->currentLine = fgets($this->file);\n $this->currentKey = 0;\n }",
"protected function initialise()\n\t{\n\t\t// Read the version attribute.\n\t\t$this->version = $this->stream->getAttribute('version');\n\n\t\t// We want to move forward to the first element after the <channel> element.\n\t\t$this->moveToNextElement('channel');\n\t\t$this->moveToNextElement();\n\t}",
"private function _preInit()\n {\n // Load the request before anything else, so everything else can safely check Craft::$app->has('request', true)\n // to avoid possible recursive fatal errors in the request initialization\n $this->getRequest();\n $this->getLog();\n\n // Set the timezone\n $this->_setTimeZone();\n\n // Set the language\n $this->updateTargetLanguage();\n }",
"public function begin()\r\n\t{\r\n\t\t$this->pointer = fopen($this->input,'rb');\r\n\t\t$this->input_stats = fstat($this->getPointer());\r\n\r\n\t\tif(is_null($this->getPointer())) {\r\n\t\t\tthrow new Exception('Couldnt create the pointer at input file.');\r\n\t\t}\r\n\r\n\t\treturn $this;\r\n\t}",
"private function getInput() : void {\n\t\t$input = @file_get_contents('php://input');\n\n\t\t// Check if input is json encoded\n\t\t$decode = json_decode($input, true);\n\t\tif (json_last_error() == JSON_ERROR_NONE) {\n\t\t\t$input = $decode;\n\t\t}\n\n\t\tif (!is_array($input)) {\n\t\t\t$input = (array) $input;\n\t\t}\n\n\t\t$get = $_SERVER['QUERY_STRING'] ?? '';\n\t\t$get = explode('&', $get);\n\t\tforeach ($get as $item) {\n\t\t\t$item = explode('=', $item);\n\t\t\tif (count($item) !== 2) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$this->input[$item[0]] = $item[1];\n\t\t}\n\n\t\t$this->input = array_merge($this->input, $input);\n\t}",
"protected function preRun()\n {\n if (@class_exists('Plugin_PreRun') &&\n in_array('Iface_PreRun', class_implements('Plugin_PreRun'))) {\n $preRun = new Plugin_PreRun();\n $preRun->process();\n }\n }",
"public static function preInit(&$metadata = array())\r\n\t{\r\n\t}",
"protected function _resetPreVariables()\n\t{\n\t\t$this->_nuked = false;\n\t\t$this->_oldPre = array();\n\t\t$this->_curPre =\n\t\t\tarray(\n\t\t\t\t'title' => '',\n\t\t\t\t'size' => '',\n\t\t\t\t'predate' => '',\n\t\t\t\t'category' => '',\n\t\t\t\t'source' => '',\n\t\t\t\t'group_id' => '',\n\t\t\t\t'reqid' => '',\n\t\t\t\t'nuked' => '',\n\t\t\t\t'reason' => '',\n\t\t\t\t'files' => '',\n\t\t\t\t'filename' => ''\n\t\t\t);\n\t}",
"public function reset()\n {\n $this->parsed = false;\n $this->init($this->original, $this->encoding);\n }",
"public function preProcess()\n { \n $errors = $this->get( 'error' );\n $this->assign('errors', $errors );\n $errors = null;\n return true;\n }",
"public function stdin($buf) {\n\t\tif ($this->state === self::STATE_BODY) {\n\t\t\tgoto body;\n\t\t}\n\t\t$this->buf .= $buf;\n\t\t$buf = '';\n\t\twhile (($line = $this->gets()) !== FALSE) {\n\t\t\tif ($line === $this->EOL) {\n\t\t\t\tif (isset($this->headers['HTTP_CONTENT_LENGTH'])) {\n\t\t\t\t\t$this->contentLength = (int) $this->headers['HTTP_CONTENT_LENGTH'];\n\t\t\t\t} else {\n\t\t\t\t\t$this->contentLength = -1;\n\t\t\t\t}\n\t\t\t\tif (isset($this->headers['HTTP_TRANSFER_ENCODING'])) {\n\t\t\t\t\t$e = explode(', ', strtolower($this->headers['HTTP_TRANSFER_ENCODING']));\n\t\t\t\t\t$this->chunked = in_array('chunked', $e, true);\n\t\t\t\t} else {\n\t\t\t\t\t$this->chunked = false;\n\t\t\t\t}\n\t\t\t\tif (isset($this->headers['HTTP_CONNECTION'])) {\n\t\t\t\t\t$e = explode(', ', strtolower($this->headers['HTTP_CONNECTION']));\n\t\t\t\t\t$this->keepalive = in_array('keep-alive', $e, true);\n\t\t\t\t}\n\t\t\t\tif (!$this->chunked) {\n\t\t\t\t\t$this->body .= $this->buf;\n\t\t\t\t\t$this->buf = '';\n\t\t\t\t}\n\t\t\t\t$this->state = self::STATE_BODY;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($this->state === self::STATE_ROOT) {\n\t\t\t\t$this->headers['STATUS'] = rtrim($line);\n\t\t\t\t$this->state = self::STATE_HEADERS;\n\t\t\t} elseif ($this->state === self::STATE_HEADERS) {\n\t\t\t\t$e = explode(': ', rtrim($line));\n\n\t\t\t\tif (isset($e[1])) {\n\t\t\t\t\t$this->headers['HTTP_' . strtoupper(strtr($e[0], HTTPRequest::$htr))] = $e[1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ($this->state !== self::STATE_BODY) {\n\t\t\treturn; // not enough data yet\n\t\t}\n\t\tbody:\n\n\t\tif ($this->chunked) {\n\t\t\t$this->buf .= $buf;\n\t\t\tchunk:\n\t\t\tif ($this->curChunkSize === null) { // outside of chunk\n\t\t\t\t$l = $this->gets();\n\t\t\t\tif ($l === $this->EOL) { // skip empty line\n\t\t\t\t\tgoto chunk;\n\t\t\t\t}\n\t\t\t\tif ($l === false) {\n\t\t\t\t\treturn; // not enough data yet\n\t\t\t\t}\n\t\t\t\t$l = rtrim($l);\n\t\t\t\tif (!ctype_xdigit($l)) {\n\t\t\t\t\t$this->protocolError = __LINE__;\n\t\t\t\t\t$this->finish(); // protocol error\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t$this->curChunkSize = hexdec($l);\n\t\t\t}\n\t\t\tif ($this->curChunkSize !== null) {\n\t\t\t\tif ($this->curChunkSize === 0) {\n\t\t\t\t\tif ($this->gets() === $this->EOL) {\n\t\t\t\t\t\t$this->requestFinished();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t} else { // protocol error\n\t\t\t\t\t\t$this->protocolError = __LINE__;\n\t\t\t\t\t\t$this->finish();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$len = strlen($this->buf);\n\t\t\t\t$n = $this->curChunkSize - strlen($this->curChunk);\n\t\t\t\tif ($n >= $len) {\n\t\t\t\t\t$this->curChunk .= $this->buf;\n\t\t\t\t\t$this->buf = '';\n\t\t\t\t} else {\n\t\t\t\t\t$this->curChunk .= binarySubstr($this->buf, 0, $n);\n\t\t\t\t\t$this->buf = binarySubstr($this->buf, $n);\n\t\t\t\t}\n\t\t\t\tif ($this->curChunkSize <= strlen($this->curChunk)) {\n\t\t\t\t\t$this->body .= $this->curChunk;\n\t\t\t\t\t$this->curChunkSize = null;\n\t\t\t\t\t$this->curChunk = '';\n\t\t\t\t\tgoto chunk;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\t$this->body .= $buf;\n\t\t\tif (($this->contentLength !== -1) && (strlen($this->body) >= $this->contentLength)) {\n\t\t\t\t$this->requestFinished();\n\t\t\t}\n\t\t}\n\t}",
"static function process($input, $params = array()) {\n\t\t$return = self::_preProcess($input);\n\t\t// ... Stub\n\t\tself::log('Import finished');\n\t\treturn $return;\n\t}",
"protected function initializeExternalParsers() {}",
"public function readStandardInput(){\n $fr = fopen(\"php://stdin\", \"r\"); //open file pointer to read from stdin\n $input = fgets($fr); //read 128 max characters\n $input = rtrim($input); //trim right\n fclose($fr); //close the file handle\n\n $this->routeCommand($input);\n }",
"function parse_incoming()\n {\n\t\t//-----------------------------------------\n\t\t// Attempt to switch off magic quotes\n\t\t//-----------------------------------------\n\n\t\t@set_magic_quotes_runtime(0);\n\n\t\t$this->get_magic_quotes = @get_magic_quotes_gpc();\n\t\t\n \t//-----------------------------------------\n \t// Clean globals, first.\n \t//-----------------------------------------\n \t\n\t\t$this->clean_globals( $_GET );\n\t\t$this->clean_globals( $_POST );\n\t\t$this->clean_globals( $_COOKIE );\n\t\t$this->clean_globals( $_REQUEST );\n \t\n\t\t# GET first\n\t\t$input = $this->parse_incoming_recursively( $_GET, array() );\n\t\t\n\t\t# Then overwrite with POST\n\t\t$input = $this->parse_incoming_recursively( $_POST, $input );\n\t\t\n\t\t$this->input = $input;\n\t\t\n\t\t$this->define_indexes();\n\n\t\tunset( $input );\n\t\t\n\t\t# Assign request method\n\t\t$this->input['request_method'] = strtolower($this->my_getenv('REQUEST_METHOD'));\n\t}",
"protected function autoDetection() {\n if (($this->delimiter !== null && $this->inputEncoding !== null)\n || ($line = fgets($this->fileHandle)) === false) {\n\n return;\n }\n\n if ($this->delimiter === null) {\n $this->delimiter = ',';\n\n if ((strlen(trim($line, \"\\r\\n\")) == 5) && (stripos($line, 'sep=') === 0)) {\n $this->delimiter = substr($line, 4, 1);\n }\n }\n\n if ($this->inputEncoding === null) {\n $this->inputEncoding = 'UTF-8';\n\n if (($bom = substr($line, 0, 4)) == \"\\xFF\\xFE\\x00\\x00\" || $bom == \"\\x00\\x00\\xFE\\xFF\") {\n $this->start = 4;\n $this->inputEncoding = 'UTF-32';\n } elseif (($bom = substr($line, 0, 2)) == \"\\xFF\\xFE\" || $bom == \"\\xFE\\xFF\") {\n $this->start = 2;\n $this->inputEncoding = 'UTF-16';\n } elseif (($bom = substr($line, 0, 3)) == \"\\xEF\\xBB\\xBF\") {\n $this->start = 3;\n }\n\n if (!$this->start) {\n $encoding = mb_detect_encoding($line, 'ASCII, UTF-8, GB2312, GBK');\n\n if ($encoding) {\n if ($encoding == 'EUC-CN') {\n $encoding = 'GB2312';\n } elseif ($encoding == 'CP936') {\n $encoding = 'GBK';\n }\n\n $this->inputEncoding = $encoding;\n }\n }\n }\n\n fseek($this->fileHandle, $this->start);\n }",
"protected function prepareForValidation()\n {\n $this->merge([\n 'insumos' => json_decode($this->insumos, true),\n ]);\n }",
"public function rewind()\n {\n $this->skipNextIteration = false;\n reset($this->data);\n }",
"public function rewind()\n {\n $this->skipNextIteration = false;\n reset($this->data);\n }",
"function prepend($content) {\n\t\t$this->write($content . $this->read());\n\t}",
"public function bufferStart() {\n\t\tob_start( array( $this, 'obCallback' ) );\n\t}",
"public function prepareFile()\n {\n // TODO: Implement prepareFile() method.\n }",
"function rewind()\n\t{\n\t\tparent::rewind();\n\t\t$this->done = false;\n\t}",
"public function preRun(OutputInterface $output)\n {\n // TODO: Implement preRun() method.\n }",
"function readInput($str){\n\t\tprint $str;\n\t\t$stdin= fopen(\"php://stdin\", \"r\");\n\t\t$entrada= fgets($stdin);\n\t\t$this->_stdin= trim($entrada);\n\t}",
"private function preprocess($data) {\n\t\t$movieStart = strpos($data, SELF::START_STRING_MOVIES);\n\t\t$moviePart = substr($data, $movieStart, strlen($data) - $movieStart);\n\n\t\t$screeningStart = strpos($moviePart, SELF::START_STRING_SCREENINGS);\n\n\t\t$this->rawMovieData = substr($moviePart, 0, $screeningStart);\n\t\t$this->rawScreeningData = substr($moviePart, $screeningStart, strlen($moviePart) - $screeningStart);\n\t\treturn $data;\n\t}",
"public function preExecution($request){\n //the session is started only once\n if(!isset($_SESSION['zleft_session'])){\n session_start();\n $_SESSION['zleft_session'] = 1;\n }\n }",
"public function rewind()\n {\n $this->position = 0;\n $this->fileIterator->seek($this->position);\n }",
"public function initialise() {\n return $this->fillFileBuffer();\n }",
"public function setInputStream($stream) {\n if (!$stream->isOpen()) $stream->open();\n $this->stream= $stream;\n }",
"protected function prepareForValidation()\n {\n $this->merge([\n 'nome' => $this->nome,\n 'nascimento' => convertDateToDatabase($this->nascimento),\n 'cpf' => returnOnlyNumbers($this->cpf),\n 'email' => $this->email,\n ]);\n }",
"static protected function _preProcess($rows, $params = array()) {\n\t\t$return = array();\n\t\tforeach($rows as $row => &$file) {\n\t\t\tself::log($row);\n\t\t\tif (!file_exists($file)) {\n\t\t\t\tself::log('Cache file not found');\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$_ = '';\n\t\t\t$_file = $file;\n\t\t\t$contents = file_get_contents($file);\n\n\t\t\tif (file_exists($file . '.preprocessed')) {\n\t\t\t\tself::log(\"File $file.preprocessed exists\");\n\t\t\t} else {\n\t\t\t\t$contents = preg_replace(\"@<script[^>]*>.*?</script>@s\", '', $contents);\n\t\t\t\t$contents = preg_replace(\"@\\s*<!--.*?-->\\s*@s\", '', $contents);\n\t\t\t\tfile_put_contents($file . '.preprocessed', $contents);\n\t\t\t\t$contents = `tidy -asxhtml -utf8 -modify --break-before-br y --clean y --drop-empty-paras y --drop-font-tags y -i --quiet y --tab-size 4 --wrap 1000 - < $file.preprocessed 2>/dev/null`;\n\n\t\t\t\tself::log(\"Writing $file.preprocessed\");\n\t\t\t\tfile_put_contents($file . '.preprocessed', $contents);\n\t\t\t}\n\t\t\t$return[$row] = 'processed';\n\t\t}\n\t\treturn $return;\n\t}",
"public function getParsedInput();",
"function read_stdin()\n{\n $fr=fopen(\"php://stdin\",\"r\"); \n $input = fgets($fr,128); \n $input = trim($input); \n fclose ($fr); \n return $input; \n}",
"final protected function parseStream(Stream $tokenStream, IReflection $parent = null)\n\t{\n\t\t$this->fileName = $tokenStream->getFileName();\n\n\t\t$this\n\t\t\t->processParent($parent, $tokenStream)\n\t\t\t->parseStartLine($tokenStream)\n\t\t\t->parseDocComment($tokenStream, $parent)\n\t\t\t->parse($tokenStream, $parent)\n\t\t\t->parseChildren($tokenStream, $parent)\n\t\t\t->parseEndLine($tokenStream);\n\t}",
"private function getPhpInputStream()\n {\n $stream = new TextStream(file_get_contents('php://input'));\n return $stream;\n }",
"public function processRequest() {\n $this->server->service($GLOBALS['HTTP_RAW_POST_DATA']);\n }",
"function _prepare() {}",
"public function getOpenInputStream()\n\t{\n\t\tif (!$in = @fopen($this->files['tmp_name'], \"rb\")) {\n\t\t\tthrow new Exception(\"Failed to open input stream\",4);\n\t\t}\n\t\t$this->input_stream = $in;\n\t}",
"function parseIncoming(){\r\n\t\t# THIS NEEDS TO BE HERE!\r\n\t\t$this->get_magic_quotes = @get_magic_quotes_gpc();\r\n\r\n \t\tif(is_array($_GET)){\r\n\t\t\twhile(list($k, $v) = each($_GET)){\r\n\t\t\t\tif(is_array($_GET[$k])){\r\n\t\t\t\t\twhile(list($k2, $v2) = each($_GET[$k])){\r\n\t\t\t\t\t\t$this->input[$this->parseCleanKey($k)][$this->parseCleanKey($k2)] = $this->parseCleanValue($v2);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$this->input[$this->parseCleanKey($k)] = $this->parseCleanValue($v);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Overwrite GET data with post data\r\n\t\tif(is_array($_POST)){\r\n\t\t\twhile(list($k, $v) = each($_POST)){\r\n\t\t\t\tif(is_array($_POST[$k])){\r\n\t\t\t\t\twhile(list($k2, $v2) = each($_POST[$k])){\r\n\t\t\t\t\t\t$this->input[$this->parseCleanKey($k)][$this->parseCleanKey($k2)] = $this->parseCleanValue($v2);\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$this->input[$this->parseCleanKey($k)] = $this->parseCleanValue($v);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->input['requestMethod'] = strtolower($_SERVER['REQUEST_METHOD']);\r\n//\t\techo '<pre>'.print_r($this->input, 1).'</pre>';exit;\r\n\t}",
"public function startBuffer(): void {\n\t\tob_start();\n\t}",
"protected function _init(){\n ini_set('auto_detect_line_endings', 1);\n $this->_init = true;\n $this->_handle = fopen($this->_csv, \"r\");\n if(!$this->_handle){\n throw new Exception('Could not open file: ' . $this->_csv);\n }\n }",
"public function processData() {}",
"protected function _preExec()\n {\n }",
"public function rewind()\n\t\t{\n\t\t\treset($this->source);\n\t\t}"
] | [
"0.6401543",
"0.62233925",
"0.6172487",
"0.6172487",
"0.6024839",
"0.60180485",
"0.59495956",
"0.5867547",
"0.5641567",
"0.56222886",
"0.5604959",
"0.55110306",
"0.5509075",
"0.5491158",
"0.54185945",
"0.54065216",
"0.5406473",
"0.53696454",
"0.53464806",
"0.5319898",
"0.5317344",
"0.5302889",
"0.526701",
"0.52269286",
"0.5221942",
"0.5206203",
"0.5198517",
"0.5185623",
"0.5168722",
"0.51621133",
"0.50702435",
"0.5069287",
"0.5058135",
"0.5054331",
"0.5046555",
"0.5036425",
"0.503408",
"0.50214595",
"0.50207573",
"0.49733904",
"0.494848",
"0.49149254",
"0.4894671",
"0.4893979",
"0.48829082",
"0.48716006",
"0.48655364",
"0.48604098",
"0.4857595",
"0.48489058",
"0.48159894",
"0.4812811",
"0.480819",
"0.4802496",
"0.479785",
"0.4793355",
"0.47842056",
"0.4779237",
"0.47787404",
"0.47775766",
"0.47696513",
"0.4767364",
"0.47672373",
"0.47449934",
"0.4714495",
"0.47023752",
"0.46674216",
"0.4665541",
"0.46533218",
"0.46520662",
"0.46318915",
"0.46262142",
"0.4618517",
"0.4618517",
"0.4616762",
"0.4615762",
"0.46142092",
"0.46122816",
"0.46078578",
"0.46036336",
"0.46032584",
"0.4595596",
"0.45908174",
"0.45903036",
"0.45891607",
"0.45770633",
"0.45744282",
"0.45674843",
"0.45541346",
"0.45438892",
"0.45350745",
"0.45332038",
"0.45297706",
"0.45296323",
"0.45283353",
"0.45099387",
"0.4509646",
"0.45049897",
"0.4492931",
"0.44901893"
] | 0.74403566 | 0 |
todo : parse markdown | public static function formatPM($text) {
return nl2br($text);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function markdown($text)\n{\n return Parsedown::instance()->parse($text);\n}",
"function parse_markdown($str) {\n\tglobal $parsedown;\n\t// return $ciconia->render($str);\n\treturn $parsedown->text($str);\n}",
"abstract protected function getMarkdown();",
"function markdown_echappe_liens($texte){\n\t//[blabla](http://...) et \n\tif (strpos($texte,\"](\")!==false){\n\t\tpreg_match_all(\",([!]?\\[[^]]*\\])(\\([^)]*\\)),Uims\",$texte,$matches,PREG_SET_ORDER);\n\t\tforeach($matches as $match){\n\t\t\t#var_dump($match);\n\t\t\t$p = strpos($texte,$match[0]);\n\t\t\t$pre = $match[1];\n\t\t\tif (strncmp($pre,\"!\",1)==0){\n\t\t\t\t$pre = code_echappement(\"!\", 'md', true).substr($pre,1);\n\t\t\t}\n\t\t\t$texte = substr_replace($texte,$pre.code_echappement($match[2], 'md', true),$p,strlen($match[0]));\n\t\t}\n\t}\n\t// [blabla]: http://....\n\tif (strpos($texte,\"[\")!==false){\n\t\tpreg_match_all(\",^(\\s*\\[[^]]*\\])(:[ \\t]+[^\\s]*(\\s+(\\\".*\\\"|'.*'|\\(.*\\)))?)\\s*$,Uims\",$texte,$matches,PREG_SET_ORDER);\n\t\tforeach($matches as $match){\n\t\t\t#var_dump($match);\n\t\t\t$p = strpos($texte,$match[0])+strlen($match[1]);\n\t\t\t$texte = substr_replace($texte,code_echappement($match[2], 'md', true),$p,strlen($match[2]));\n\t\t}\n\t}\n\t// ![Markdown Logo][image]\n\tif (strpos($texte,\"![\")!==false){\n\t\tpreg_match_all(\",^(!\\[[^]]*\\])(\\[[^]]*\\])$,Uims\",$texte,$matches,PREG_SET_ORDER);\n\t\tforeach($matches as $match){\n\t\t\t#var_dump($match);\n\t\t\t$p = strpos($texte,$match[0]);\n\t\t\t$texte = substr_replace($texte,code_echappement(\"!\", 'md', true),$p,1);\n\t\t}\n\t}\n\t// <http://...>\n\t$texte = echappe_html($texte,'md',true,',' . '<https?://[^<]*>'.',UimsS');\n\n\treturn $texte;\n}",
"function parse_markdown($markdown)\n\t{\n\t\t$ci = & get_instance();\n\t\t$ci->load->library('markdown_parser');\n\n\t\treturn Markdown($markdown);\n\t}",
"function acf_parse_markdown($text = '')\n{\n}",
"function markdown($markdown)\n{\n static $parser;\n if (!$parser) {\n $parser = new Markdown();\n }\n\n return $parser->parse($markdown);\n}",
"function markdown($text)\n{\n return (new ParsedownExtra)->text($text);\n}",
"function markdown_echappe_code($texte){\n\t$texte = echappe_retour($texte);\n\n\t// tous les paragraphes indentes par 4 espaces ou une tabulation\n\t// mais qui ne sont pas la suite d'une liste ou d'un blockquote\n\tpreg_match_all(\",(^( |\\t|\\* |\\+ |- |> |\\d+\\.)(.*)$(\\s*^(\\s+|\\t).*$)*?),Uims\",$texte,$matches,PREG_SET_ORDER);\n\tforeach($matches as $match){\n\t\tif (!strlen(trim($match[2]))){\n\t\t\t#var_dump($match[0]);\n\t\t\t$p = strpos($texte,$match[0]);\n\t\t\t$texte = substr_replace($texte,code_echappement($match[0], 'md', true),$p,strlen($match[0]));\n\t\t}\n\t}\n\n\tif (strpos($texte,\"```\")!==false OR strpos($texte,\"~~~\")!==false){\n\t\t$texte = echappe_html($texte,'md',true,',^(```|~~~)\\w*?\\s.*\\s(\\1),Uims');\n\t}\n\tif (strpos($texte,\"``\")!==false){\n\t\t$texte = echappe_html($texte,'md',true,',``.*``,Uims');\n\t}\n\tif (strpos($texte,\"`\")!==false){\n\t\t$texte = echappe_html($texte,'md',true,',`.*`,Uims');\n\t}\n\n\t// escaping\n\tif (strpos($texte,\"\\\\\")!==false){\n\t\t$texte = echappe_html($texte,'md',true,',\\\\\\\\[\\\\`*_{}\\[\\]\\(\\)>+.!-],Uims');\n\t}\n\n\treturn $texte;\n}",
"function markdown_post_typo($texte){\n\tif (strpos($texte,\"<md>\")!==false){\n\t\t$texte = echappe_retour($texte,\"md\");\n\t}\n\treturn $texte;\n}",
"function markdown($content)\n{\n $parser = new MarkdownExtra;\n\n if (Config::get('theming.markdown_hard_wrap')) {\n $parser->hard_wrap = true;\n }\n\n return $parser->transform($content);\n}",
"function markdown_raccourcis($texte){\n\n\t$md = $texte;\n\n\t// enlever les \\n\\n apres <div class=\"base64....\"></div>\n\t// et surtout le passer en <p> car ca perturbe moins Markdown\n\tif (strpos($md,'<div class=\"base64')!==false){\n\t\t$md = preg_replace(\",(<div (class=\\\"base64[^>]*>)</div>)\\n\\n,Uims\",\"<p \\\\2</p>\",$md);\n\t}\n\n\t// marquer les ul/ol explicites qu'on ne veut pas modifier\n\tif (stripos($md,\"<ul\")!==false OR stripos($md,\"<ol\")!==false OR stripos($md,\"<li\")!==false)\n\t\t$md = preg_replace(\",<(ul|ol|li)(\\s),Uims\",\"<$1 html$2\",$md);\n\n\t// parser le markdown\n\t$md = Parsedown::instance()->parse($md);\n\n\t// class spip sur ul et ol et retablir les ul/ol explicites d'origine\n\t$md = str_replace(array(\"<ul>\",\"<ol>\",\"<li>\"),array('<ul'.$GLOBALS['class_spip_plus'].'>','<ol'.$GLOBALS['class_spip_plus'].'>','<li'.$GLOBALS['class_spip'].'>'),$md);\n\t$md = str_replace(array(\"<ul html\",\"<ol html\",\"<li html\"),array('<ul','<ol','<li'),$md);\n\n\t// Si on avait des <p class=\"base64\"></p> les repasser en div\n\t// et reparagrapher car MD n'est pas tres fort et fait de la soupe <p><div></div></p>\n\tif (strpos($md,'<p class=\"base64')!==false){\n\t\t$md = preg_replace(\",(<p (class=\\\"base64[^>]*>)</p>),Uims\",\"<div \\\\2</div>\",$md);\n\t\t$md = paragrapher($md);\n\t\t// pas d'autobr introduit par paragrapher\n\t\tif (_AUTO_BR AND strpos($md,_AUTOBR)!==false){\n\t\t\t$md = str_replace(_AUTOBR,'',$md);\n\t\t}\n\t\t// eviter les >\\n\\n<p : un seul \\n\n\t\tif (strpos($md,\">\\n\\n<p\")!==false){\n\t\t\t$md = str_replace(\">\\n\\n<p\",\">\\n<p\",$md);\n\t\t}\n\t}\n\n\t// echapper le markdown pour que SPIP n'y touche plus\n\treturn code_echappement($md,\"md\");\n}",
"function markdown2html($text)\n{\n\t$text = html($text);\n\t\n\t// Convert plain-text formatting to HTML\n\t\n\t// strong emphasis\n\t$text = preg_replace('/__(.+?)__/s', '<strong>$1</strong>', $text);\n\t$text = preg_replace('/\\*\\*(.+?)\\*\\*/s', '<strong>$1</strong>', $text);\n\t\n\t// emphasis\n\t$text = preg_replace('/_([^_]+)_/', '<em>$1</em>', $text);\n\t$text = preg_replace('/\\*([^\\*]+)\\*/', '<em>$1</em>', $text);\n\t\n\t// Convert Windows (\\r\\n) to Unix (\\n)\n\t$text = str_replace(\"\\r\\n\", \"\\n\", $text);\n\t// Convert Macintosh (\\r) to Unix (\\n)\n\t$text = str_replace(\"\\r\", \"\\n\", $text);\n\t\n\t// Paragraphs\n $text = '<p>' . str_replace(\"\\n\\n\", '</p><p>', $text) . '</p>';\n\t// Line breaks\n\t$text = str_replace(\"\\n\", '<br>', $text);\n\t\n\t// Url links\n\t$text = preg_replace(\n\t\t\t'/\\[([^\\]]+)]\\(([-a-z0-9._~:\\/?#@!$&\\'()*+,;=%]+)\\)/i',\n\t\t\t'<a href=\"$2\">$1</a>', $text);\n\t\n\treturn $text;\n}",
"function markdown(string $text): string\n\t{\n\t\t$parser = Services::markdown();\n\t\treturn $parser->convertToHtml($text);\n\t}",
"function markdown_pre_typo($texte){\n\treturn $texte;\n}",
"function markdown_pre_echappe_html_propre($texte){\n\tstatic $syntaxe_defaut = null;\n\n\tif (is_null($syntaxe_defaut)){\n\t\t// lever un flag pour dire que ce pipeline est bien OK\n\t\tif (!defined('_pre_echappe_html_propre_ok'))\n\t\t\tdefine('_pre_echappe_html_propre_ok',true);\n\t\t// on peut forcer par define, utile pour les tests unitaires\n\t\tif (defined('_MARKDOWN_SYNTAXE_PAR_DEFAUT'))\n\t\t\t$syntaxe_defaut = _MARKDOWN_SYNTAXE_PAR_DEFAUT;\n\t\telse {\n\t\t\tinclude_spip('inc/config');\n\t\t\t$syntaxe_defaut = lire_config(\"markdown/syntaxe_par_defaut\",\"spip\");\n\t\t}\n\t}\n\n\t// si syntaxe par defaut est markdown et pas de <md> dans le texte on les introduits\n\tif ($syntaxe_defaut===\"markdown\"\n\t\t// est-ce judicieux de tester cette condition ?\n\t AND strpos($texte,\"<md>\")===false\n\t ){\n\t\t$texte = str_replace(array(\"<spip>\",\"</spip>\"),array(\"</md>\",\"<md>\"),$texte);\n\t\t$texte = \"<md>$texte</md>\";\n\t\t$texte = str_replace(\"<md></md>\",\"\",$texte);\n\t}\n\n\tif (strpos($texte,\"<md>\")!==false){\n\t\t// Compat SPIP <3.0.17\n\t\tif (!function_exists(\"traiter_echap_math_dist\")){\n\t\t\t$texte = echappe_html_3017($texte,\"mdblocs\",false,',<(md)(\\s[^>]*)?'.'>(.*)</\\1>,UimsS');\n\t\t}\n\t\telse {\n\t\t\t// echapper les blocs <md>...</md> car on ne veut pas toucher au <html>, <code>, <script> qui sont dedans !\n\t\t\t$texte = echappe_html($texte,\"mdblocs\",false,',<(md)(\\s[^>]*)?'.'>(.*)</\\1>,UimsS');\n\t\t}\n\t}\n\n\n\treturn $texte;\n}",
"function markdown_pre_liens($texte){\n\t// si pas de base64 dans le texte, rien a faire\n\tif (strpos($texte,\"base64mdblocs\")!==false) {\n\t\t// il suffit de desechapper les blocs <md> (mais dont on a echappe le code)\n\t\t$texte = echappe_retour($texte,'mdblocs');\n\t}\n\n\t// ici on a le html du code SPIP echappe, mais sans avoir touche au code MD qui est echappe aussi\n\treturn $texte;\n}",
"public function parse($markdown) {\n\n if(!$this->kirby->options['markdown']) {\n return $markdown;\n } else {\n // initialize the right markdown class\n $parsedown = $this->kirby->options['markdown.extra'] ? new ParsedownExtra() : new Parsedown();\n\n // set markdown auto-breaks\n $parsedown->setBreaksEnabled($this->kirby->options['markdown.breaks']);\n\n // parse it!\n return $parsedown->text($markdown);\n }\n\n }",
"function ciniki_systemdocs_processMarkdown($ciniki, $content) {\n\n //\n // Escape any existing html\n //\n $content = htmlspecialchars($content);\n\n //\n // Break into lines\n //\n $lines = explode(\"\\n\", $content);\n\n //\n // Check for lists\n //\n $prev_line = '';\n $list_level = 0;\n $list_type = '';\n $paragraph = 0;\n $pre = 0;\n foreach($lines as $lnum => $line) {\n/*\n //\n // Check for subtitles\n //\n if( preg_match('/^\\s*\\#\\#\\s+(.*)$/', $line, $matches) ) {\n $lines[$lnum] = '<h3>' . $matches[1] . '</h3>';\n } \n // Check for list item\n // or for hex number or number unordered list\n // 1 - The first number\n else*/\n if( $pre == 0 && preg_match('/^\\s*[+-]\\s*(.*)$/', $line, $matches) ) {\n if( $list_level == 0 ) {\n if( $paragraph > 0 ) {\n $lines[$lnum-1] .= \"</p>\";\n $paragraph = 0;\n }\n $lines[$lnum] = \"<ul>\\n\" . '<li>' . $matches[1];\n $list_level++;\n $list_type = 'ul';\n } else {\n $lines[$lnum] = '<li>' . $matches[1];\n }\n }\n elseif( $pre == 0 && preg_match('/^\\s*[0-9]\\.\\s+(.*)$/', $line, $matches) ) {\n if( $list_level == 0 ) {\n if( $paragraph > 0 ) {\n $lines[$lnum-1] .= \"</p>\";\n $paragraph = 0;\n }\n $lines[$lnum] = \"<ol>\\n\" . '<li>' . $matches[1];\n $list_level++;\n $list_type = 'ol';\n } else {\n $lines[$lnum] = '<li>' . $matches[1];\n }\n }\n // 0x01 - The first flag\n elseif( $pre == 0 && preg_match('/^\\s*((0x[0-9]+|[0-9]+)\\s*-\\s*(.*))$/', $line, $matches) ) {\n if( $list_level == 0 ) {\n if( $paragraph > 0 ) {\n $lines[$lnum-1] .= \"</p>\";\n $paragraph = 0;\n }\n $lines[$lnum] = \"<dl>\\n\" . '<dt>' . $matches[2] . '</dt><dd>' . $matches[3];\n $list_level++;\n $list_type = 'dl';\n } else {\n $lines[$lnum] = '</dd><dt>' . $matches[2] . '</dt><dd>' . $matches[3];\n }\n }\n // Definition lists\n // Label text :: The first item in the list\n elseif( $pre == 0 && preg_match('/^\\s*((.*)\\s::\\s(.*))$/', $line, $matches) ) {\n if( $list_level == 0 ) {\n if( $paragraph > 0 ) {\n $lines[$lnum-1] .= \"</p>\";\n $paragraph = 0;\n }\n $lines[$lnum] = \"<dl>\\n\" . '<dt>' . $matches[2] . '</dt><dd>' . $matches[3];\n $list_level++;\n $list_type = 'dl';\n } else {\n $lines[$lnum] = '</dd><dt>' . $matches[2] . '</dt><dd>' . $matches[3];\n }\n }\n // Check for tables\n // Check for text line\n elseif( $pre == 0 && preg_match('/^\\s*((.*)\\s\\|\\s\\s*(.*))$/', $line, $matches) ) {\n if( $list_level == 0 ) {\n if( $paragraph > 0 ) {\n $lines[$lnum-1] .= \"</p>\";\n $paragraph = 0;\n }\n $lines[$lnum] = '<table><tr><td>' . $matches[2] . '</td><td>' . $matches[3];\n $list_level++;\n $list_type = 'table';\n } else {\n $lines[$lnum] = '</td></tr><tr><td>' . $matches[2] . '</td><td>' . $matches[3];\n }\n }\n elseif( preg_match('/^```/', $line, $matches) ) {\n if( $paragraph == 1 ) {\n $lines[$lnum-1] .= '</p>';\n $paragraph = 0;\n }\n if( $pre == 1 ) {\n $lines[$lnum] = '</pre>';\n $pre = 0;\n } else {\n $lines[$lnum] = '<pre>';\n $pre = 1;\n }\n }\n //\n // Check for **test**<space><space><newline>text\n //\n elseif( $paragraph == 0 && $list_level == 0 && preg_match('/^\\s*\\*\\*(.*)\\*\\*\\s*$/', $line, $matches) && isset($lines[$lnum+1]) && preg_match('/[a-zA-Z0-9]/', $lines[$lnum+1])) {\n $lines[$lnum] = '<p><strong>' . $matches[1] . '</strong><br/>';\n $paragraph = 1;\n }\n // Check for blank line, end of list\n elseif( $list_level > 0 && preg_match('/^\\s*$/', $line) ) {\n if( $list_type == 'dl' ) {\n $lines[$lnum] = '</dd></dl>';\n } elseif( $list_type == 'table' ) {\n $lines[$lnum] = '</td></tr></table>';\n } else {\n $lines[$lnum] = '</ul>';\n }\n $list_level = 0;\n }\n // Check for blank line, end of paragraph\n elseif( $paragraph > 0 && preg_match('/^\\s*$/', $line) ) {\n $lines[$lnum] = '</p>';\n $paragraph = 0;\n }\n // Check if text line and paragraph should start\n elseif( $pre == 0 && $paragraph == 0 && $list_level == 0 && preg_match('/[a-zA-Z0-9]/', $line) ) {\n $lines[$lnum] = '<p>' . $line;\n $paragraph = 1;\n }\n\n //\n // Check for emphasis\n // *em*, or **strong**\n //\n if( $pre == 0 ) {\n $lines[$lnum] = preg_replace('/\\*\\*([^\\*]+)\\*\\*/', '<strong>$1</strong>', $lines[$lnum]);\n $lines[$lnum] = preg_replace('/\\*([^\\*]+)\\*/', '<em>$1</em>', $lines[$lnum]);\n }\n }\n if( $list_level > 0 ) {\n if( $list_type == 'dl' ) {\n $lines[$lnum+1] = '</dd></dl>';\n } elseif( $list_type == 'table' ) {\n $lines[$lnum+1] = '</td></tr></table>';\n } else {\n $lines[$lnum+1] = '</ul>';\n }\n }\n elseif( $paragraph > 0 ) {\n $lines[$lnum+1] = '</p>';\n }\n\n $html_content = implode(\"\\n\", $lines);\n \n //\n // Check for URL's\n //\n // URL's with a title\n $html_content = preg_replace('/\\[([^\\]]+)\\]\\((http[^\\)]+)\\)/', '<a target=\"_blank\" href=\"$2\">$1</a>', $html_content);\n // URL's without a title\n $html_content = preg_replace('/([^\\\"])(http[^ ]+)/', '$1<a target=\"_blank\" href=\"$2\">$2</a>', $html_content);\n\n return array('stat'=>'ok', 'html_content'=>$html_content);\n}",
"function markdown_filtre_portions_md($texte,$filtre){\n\tif (strpos($texte,\"<md>\")!==false){\n\t\tpreg_match_all(\",<md>(.*)</md>,Uims\",$texte,$matches,PREG_SET_ORDER);\n\t\tforeach($matches as $m){\n\t\t\t$t = $filtre($m[1]);\n\t\t\t$p = strpos($texte,$m[1]);\n\t\t\t$texte = substr_replace($texte,$t,$p-4,strlen($m[1])+9);\n\t\t}\n\t}\n\treturn $texte;\n}",
"function markdownout($text)\n{\n\techo markdown2html($text);\n}",
"public function markdownAction()\n {\n // return __METHOD__ . \", \\$db is {$this->db}\";\n $title = \"Movie database | oophp\";\n $text = file_get_contents(__DIR__ . \"./text/bbcode.txt\");\n $txtFilter = new MyTextFilter();\n $html = $txtFilter->parse($text, [\"markdown\"]);\n\n $data = [\n \"text\" => $text,\n \"html\" => $html\n ];\n\n $this->app->page->add(\"mytextfilter/markdown\", $data);\n return $this->app->page->render([\n \"title\" => $title,\n ]);\n }",
"function markdown_pre_propre($texte){\n\tif (!class_exists(\"Parsedown\")){\n\t\tinclude_once _DIR_PLUGIN_MARKDOWN.\"lib/parsedown/Parsedown.php\";\n\t}\n\n\t$mes_notes = \"\";\n\t// traiter les notes ici si il y a du <md> pour avoir une numerotation coherente\n\tif (strpos($texte,\"<md>\")!==false\n\t AND strpos($texte,\"[[\")!==false){\n\t\t$notes = charger_fonction('notes', 'inc');\n\t\t// Gerer les notes (ne passe pas dans le pipeline)\n\t\tlist($texte, $mes_notes) = $notes($texte);\n\t}\n\n\t$texte = markdown_filtre_portions_md($texte,\"markdown_raccourcis\");\n\n\tif ($mes_notes)\n\t\t$notes($mes_notes,'traiter');\n\n\treturn $texte;\n}",
"public function parse($markdown)\n\t{\n\t\t// Reset some variables\n\t\t$this->hashTable = array();\n\t\t$this->references = array();\n\n\t\t$markdown = $this->convertToUnix($markdown);\n\t\t$markdown = $this->hashifyBlocks($markdown);\n\t\t$markdown = $this->stripReferences($markdown);\n\n\t\t$markdown = $this->encodeEscape($markdown);\n\t\t$markdown = $this->replaceBlock($markdown);\n\n\t\treturn $markdown;\n\t}",
"function markdownify( &$input ){\n return $input;\n }",
"public function markdown($txt)\n {\n return $this->parser->transformMarkdown($txt);\n }",
"private function markdown($text) {\r\n require_once(__DIR__ . '/php-markdown/Michelf/Markdown.php');\r\n require_once(__DIR__ . '/php-markdown/Michelf/MarkdownExtra.php');\r\n return \\Michelf\\MarkdownExtra::defaultTransform($text);\r\n }",
"public function parseMarkdown(): HtmlString\n {\n $text = $this->getMarkdown();\n\n if ($text instanceof Collection) {\n $text = $text->toArray();\n }\n\n // If the data is an array, or a collection, we will treat each array item as a line.\n if (is_array($text)) {\n $text = implode(PHP_EOL, $text);\n }\n\n return Markdown::parse((string)$text);\n }",
"public function markdownAction() : object\n {\n $title = \"Markdown\";\n $text = file_get_contents(__DIR__ . \"/textfiles/sample.md\");\n // $filter = new MyTextFilter();\n\n // Deal with the action and return a response.\n $this->app->page->add(\"textfilter/markdown\", [\n \"text\" => $text,\n \"html\" => $this->filter->parse($text, [\"markdown\"])\n ], \"main\");\n return $this->app->page->render([ \"title\" => $title ]);\n }",
"function processContent(string $content): string\n{\n $content = processShortcodes($content);\n return Michelf\\Markdown::defaultTransform($content);\n}",
"function traiter_echap_md_dist($regs){\n\t// echapons le code dans le markdown\n\t$texte = markdown_echappe_code($regs[3]);\n\t$texte = markdown_echappe_liens($texte);\n\t$texte = markdown_echappe_del($texte);\n\treturn \"<md\".$regs[2].\">$texte</md>\";\n}",
"function fixMarkdownLinks($md){\n return preg_replace('/([^(]+)\\.md(?=\\))/i', '?post=$1#content', $md);\n }",
"function markdown_echappe_del($texte){\n\tif (strpos($texte,\"~~\")!==false){\n\t\t$texte = echappe_html($texte,'md',true,',~~,Uims');\n\t}\n\n\treturn $texte;\n}",
"function transform(){\n\t\tif($this->request->post() && ($d = $this->form->validate($this->params))){\n\t\t\tAtk14Require::Helper(\"modifier.markdown\");\n\t\t\t$content = smarty_modifier_markdown($d[\"source\"]);\n\t\t\tif($d[\"base_href\"]){\n\t\t\t\t$base_href = $d[\"base_href\"];\n\t\t\t\tif(!preg_match('/\\/$/',$base_href)){\n\t\t\t\t\t$base_href .= \"/\";\n\t\t\t\t}\n\t\t\t\t$content = preg_replace_callback('/(<a\\b[^>]*\\bhref=\"|img\\b[^>]*\\bsrc=\")([^\"]*)/',function($matches) use($base_href){\n\t\t\t\t\t$url = $matches[2];\n\t\t\t\t\tif(!preg_match('/^https?:\\/\\//',$url) && !preg_match('/^\\//',$url)){\n\t\t\t\t\t\t$url = preg_replace('/^\\.\\/+/','',$url);\n\t\t\t\t\t\t$url = $base_href.$url;\n\t\t\t\t\t}\n\t\t\t\t\treturn $matches[1].$url.\"\";\n\t\t\t\t},$content);\n\t\t\t}\n\t\t\t$this->_report_success(array(),array(\n\t\t\t\t\"content_type\" => \"text/plain\",\n\t\t\t\t\"raw_data\" => $content,\n\t\t\t));\n\t\t}\n\t}",
"protected function formatMarkdown() :string{\n return Markdown::convertToHtml($this->body);\n }",
"function markdownToHtml($string, $config = [])\n{\n $Parsedown = new Parsedown();\n foreach ($config as $option => $value) {\n if ($option === 'breaksEnabled') {\n $Parsedown->setBreaksEnabled($value);\n } elseif ($option === 'markupEscaped') {\n $Parsedown->setMarkupEscaped($value);\n } elseif ($option === 'urlsLinked') {\n $Parsedown->setUrlsLinked($value);\n } else {\n throw new \\InvalidArgumentException(\"Invalid Parsedown option \\\"$option\\\"\");\n }\n }\n return $Parsedown->text($string);\n}",
"public static function markdownify($text)\n {\n $parser = new MarkdownParser();\n return $parser->text($text);\n }",
"function parse($string) {\n return \\Michelf\\Markdown::defaultTransform($string);\n}",
"function jabMarkdown($text, $safe=false) \n{\n\tglobal $jab;\n\t\n\t# Setup static parser variable.\n\tstatic $parser;\n\tif (!isset($parser)) \n\t{\n\t\t$parser=jabCreateMarkdownParser($safe);\n\t}\n\t\n\tif ($safe)\n\t{\n\t\t$text=str_replace(\"!!gt!!\", \">\", htmlspecialchars(str_replace(\">\", \"!!gt!!\", $text)));\n\t}\n\t\n\t$text=$parser->transform($text);\n\treturn $text;\t\n}",
"function extract_motion_text_from_wiki_text($text)\n{\n $motion = extract_motion_text_from_wiki_text_for_edit($text);\n\n if (!preg_match(\"/.*<\\/.*?>/\", $motion))\n {\n $motionlines = explode(\"\\n\", $motion);\n $binUL = 0;\n $res = array();\n $matches = array();\n foreach ($motionlines as $motionline)\n {\n $ml = preg_replace(\"/''(.*?)''/\", \"<em>\\\\1</em>\", $motionline);\n $ml = preg_replace(\"/\\[(https?:\\S*)\\s+(.*?)\\]/\", \"<a href=\\\"\\\\1\\\">\\\\2</a>\", $ml);\n $ml = preg_replace(\"/(?<![*\\s])(\\[(\\d+)\\])/\", \"<sup class=\\\"sup-\\\\2\\\"><a class=\\\"sup\\\" href=\\\"#footnote-\\\\2\\\" onclick=\\\"ClickSup(\\\\2); return false;\\\">\\\\1</a></sup>\", $ml);\n #$ml = preg_replace(\"/(\\[\\d+])/\", \"<sup>\\\\1</sup>\", $ml);\n if (preg_match(\"/^\\s\\s*$/\", $ml))\n continue;\n if (preg_match(\"/^@/\", $ml)) // skip comment lines we lift up for the short sentences\n continue;\n if (preg_match(\"/^(\\*|:)/\", $ml))\n {\n if (!$binUL)\n $res[] = \"<ul>\";\n $binUL = (preg_match(\"/^\\*\\*/\", $ml) ? 2 : 1);\n if (preg_match(\"/^:/\", $ml))\n $binUL = 3;\n else if (preg_match(\"/^\\s*\\*\\s*\\[\\d+\\]/\", $ml, $matches))\n {\n $binUL = 4; \n $footnum = preg_replace(\"/[\\s\\*\\[\\]]+/\", \"\", $matches[0]); // awful stuff because I can't pull out bits like in python\n }\n $ml = preg_replace(\"/^(\\*\\*|\\*|:)\\s*/\", \"\", $ml);\n }\n else if ($binUL != 0)\n {\n $binUL = 0;\n $res[] = \"</ul>\";\n }\n\n \n if ($binUL == 0)\n $res[] = \"<p>\";\n else if ($binUL == 2)\n $res[] = \"<li class=\\\"house\\\">\";\n else if ($binUL == 3)\n $res[] = \"<li class=\\\"block\\\">\";\n else if ($binUL == 4)\n $res[] = \"<li class=\\\"footnote\\\" id=\\\"footnote-$footnum\\\">\";\n else\n $res[] = \"<li>\";\n \n $res[] = $ml;\n \n if ($binUL == 0)\n $res[] = \"</p>\";\n else\n $res[] = \"</li>\";\n }\n if ($binUL)\n $res[] = \"</ul>\";\n $motion = implode(\"\\n\", $res);\n #$motion = preg_replace(\"/\\*/\", \"HIHI\", $motion);\n }\n $motion = guy2html(guy_strip_bad(trim($motion)));\n\n return $motion;\n}",
"public function getMarkdownFiles();",
"function parseReadme()\n{\n $Parsedown = new Parsedown();\n return $Parsedown->text(file_get_contents(dirname(__FILE__) . '/../README.md'));\n}",
"public function parseMarkdown($content)\n {\n return $this->markdownEngine->transform($content);\n }",
"public function parse()\n {\n if ($this->object->extension() == 'md') {\n return (new Markdown())->parse($this->object->getValue());\n }\n\n return $this->object->getValue();\n }",
"public function markdown($text)\n {\n $text = \\Michelf\\MarkdownExtra::defaultTransform($text);\n $text = \\Michelf\\SmartyPantsTypographer::defaultTransform(\n $text,\n \"2\"\n );\n return $text;\n }",
"public function testMarkdownFile()\n {\n $markdown = '# Celerique habitantum\n\n## Pro ubi respondit flammae\n\nLorem markdownum, obscenas ut audacia coeunt pulchro excidit obstitit vulnera!\nMedio est non protinus, *ne* et elige!\n\n computing.redundancy_power_olap(webSymbolic);\n if (internalOfNosql > dpi + agp + desktop(printer_offline)) {\n mbrVlogCircuit(truncate, cd, word_software * burn_on);\n }\n siteMemory(nybble_string, tag_output_vista.lionMacHibernate(5, artificial));\n\nTemporis circum. Non cogit dira cave iubent rursus pleno ritu inferius meus;\nflatuque agmina me. Mira ad vicimus, minus delet, ab tetigisse solet in adiuvet\ndubitas. Suo monuit coniunx ordine germanam.';\n\n // add a file to the depot\n $file = new File;\n $file->setFilespec('//depot/foo/testfile1.md')\n ->open()\n ->setLocalContents($markdown)\n ->submit('change test');\n\n $this->dispatch('/files/depot/foo/testfile1.md');\n\n $result = $this->getResult();\n $this->assertRoute('file');\n $this->assertRouteMatch('files', 'files\\controller\\indexcontroller', 'file');\n $this->assertResponseStatusCode(200);\n $this->assertInstanceOf('Zend\\View\\Model\\ViewModel', $result);\n $this->assertSame('depot/foo/testfile1.md', $result->getVariable('path'));\n $this->assertInstanceOf('P4\\File\\File', $result->getVariable('file'));\n $this->assertQueryContentContains('h1', 'testfile1.md');\n\n // verify markdown\n $this->assertQueryContentContains('h1', 'Celerique habitantum');\n $this->assertQueryContentContains('h2', 'Pro ubi respondit flammae');\n $this->assertQueryContentContains('em', 'ne');\n $this->assertQueryContentContains('pre code', 'computing.redundancy_power_olap(webSymbolic);');\n }",
"public function getMarkdown()\n {\n return $this->markdown;\n }",
"public function parse()\n {\n $time = time();\n $gmdate = gmdate('D, d M Y H:i:s', $time);\n\n Container::get('response')\n ->setHeader('MDE-Version', \\MarkdownExtended\\MarkdownExtended::VERSION)\n ->setHeader('Last-Modified', $gmdate.' GMT')\n ;\n\n $etag = '';\n $sources = $this->getSources();\n $options = Container::get('request')->getData('options', array());\n $format = Container::get('request')->getData('format');\n $extract = Container::get('request')->getData('extract', 'full');\n if (!empty($format)) {\n $options['output_format'] = $format;\n }\n if (!empty($sources)) {\n try {\n foreach ($sources as $index=>$source) {\n\n /* @var \\MarkdownExtended\\Content $mde_content */\n $mde_content = Helper::parseMdeSource($source, $options);\n //var_export($mde_content);\n\n switch ($extract) {\n case 'metadata':\n $parsed_content = $mde_content->getMetadataFormatted();\n break;\n case 'body':\n $parsed_content = $mde_content->getBody();\n break;\n case 'notes':\n $parsed_content = $mde_content->getNotesFormatted();\n break;\n case 'full':\n default:\n $parsed_content =\n $mde_content->getMetadataFormatted()\n .PHP_EOL\n .$mde_content->getBody()\n .PHP_EOL\n .$mde_content->getNotesFormatted()\n ;\n break;\n }\n $etag .= $source.'='.$parsed_content.';';\n\n $content_index = $this->addContent($parsed_content);\n if ($this->getSourceType() == 'file' && is_string($index)) {\n $source = $index;\n }\n if ($content_index !== $index) {\n $this\n ->unsetSource($index)\n ->setSource($content_index, $source)\n ;\n }\n }\n } catch (\\Exception $e) {\n throw $e;\n }\n $etag = md5($etag);\n Container::get('response')->setHeader('ETag', $etag);\n\n }\n\n // if not modified, fetch headers and exit\n $if_modified_since = Container::get('request')->getHeader('If-Modified-Since');\n $if_none_match = Container::get('request')->getHeader('If-None-Match');\n if (\n (!empty($if_modified_since) && @strtotime($if_modified_since) >= $time) ||\n (!empty($if_none_match) && !empty($etag) && trim($if_none_match) == $etag)\n ) {\n Container::get('response')\n ->setStatus(Response::STATUS_NOT_MODIFIED)\n ->fetchHeaders()\n ;\n exit(PHP_EOL);\n }\n\n return $this;\n }",
"public function markdown()\n {\n $this->params['parse_mode'] = 'markdown';\n\n return $this;\n }",
"public function parseString($textInput) {\n\t\t\treturn Markdown($textInput);\n\t\t}",
"public function markdown($text)\n {\n return MarkdownExtra::defaultTransform($text);\n }",
"public function testDangerousMarkdownFile()\n {\n $markdown = '[some text](javascript:alert(\\'xss\\'))\n\n> hello <a name=\"n\"\n> href=\"javascript:alert(\\'xss\\')\">*you*</a>\n\n{@onclick=alert(\\'hi\\')}some paragraph\n\n[xss](http://\"onmouseover=\"alert(1))';\n // add a file to the depot\n $file = new File;\n $file->setFilespec('//depot/foo/dangereux.md')\n ->open()\n ->setLocalContents($markdown)\n ->submit('change test');\n\n $this->dispatch('/files/depot/foo/dangereux.md');\n\n $result = $this->getResult();\n $this->assertRoute('file');\n $this->assertRouteMatch('files', 'files\\controller\\indexcontroller', 'file');\n $this->assertResponseStatusCode(200);\n $this->assertInstanceOf('Zend\\View\\Model\\ViewModel', $result);\n $this->assertSame('depot/foo/dangereux.md', $result->getVariable('path'));\n $this->assertInstanceOf('P4\\File\\File', $result->getVariable('file'));\n $this->assertQueryContentContains('h1', 'dangereux.md');\n\n // verify markdown\n $this->assertQueryContentContains('div.markdown a', 'some text');\n $this->assertQueryContentContains(\n 'div.markdown',\n 'hello <a name=\"n\"' . \"\\n\" . 'href=\"javascript:alert(\\'xss\\')\">'//<em>'//you</em>'//</a>'\n );\n $this->assertQueryContentContains('div.markdown', \"{@onclick=alert('hi')}some paragraph\");\n $this->assertNotQuery(\n 'div.markdown a[href=\"\"]',\n 'xss'\n );\n }",
"public function read(string $filename, array $params = null) : string\n {\n $aeEvents = \\MarkNotes\\Events::getInstance();\n\n if (mb_detect_encoding($filename)) {\n if (!file_exists($filename)) {\n $filename = utf8_decode($filename);\n }\n }\n\n $markdown = file_get_contents($filename);\n\n // --------------------------------\n // Call content plugins\n $aeEvents->loadPlugins('markdown');\n $args = array(&$markdown);\n $aeEvents->trigger('markdown.read', $args);\n $markdown = $args[0];\n // --------------------------------\n\n $aeFiles = \\MarkNotes\\Files::getInstance();\n $aeFunctions = \\MarkNotes\\Functions::getInstance();\n $aeSettings = \\MarkNotes\\Settings::getInstance();\n\n // Get the full path to this note\n $url = rtrim($aeFunctions->getCurrentURL(false, false), '/').'/'.rtrim($aeSettings->getFolderDocs(false), DS).'/';\n $noteFolder = $url.str_replace(DS, '/', dirname($params['filename'])).'/';\n\n // In the markdown file, two syntax are possible for images, the ![]() one or the <img src one\n // Be sure to have the correct relative path i.e. pointing to the folder of the note\n $matches = array();\n $markdown = self::setImagesAbsolute($markdown, $params);\n\n // And do it too for links to the files folder\n $markdown = str_replace('href=\".files/', 'href=\"'.$noteFolder.'.files/', $markdown);\n\n if (isset($params['removeConfidential'])) {\n if ($params['removeConfidential'] === '1') {\n $markdown = $this->ShowConfidential($markdown);\n }\n }\n\n return $markdown;\n }",
"public function markdown()\n\t{\n\t\techo view('sketchpad::help/output/markdown');\n\t}",
"protected function parse_content(){\n $m = array(); // we will keep here\n list( $t, $text ) = explode( \"<div class='post entry-content '>\", $this->page );\n list( $text, $t ) = explode( '</div>', $text );\n return $text;\n }",
"function my_formatter($content)\n{\n $new_content = '';\n $pattern_full = '{(\\[raw\\].*?\\[/raw\\])}is';\n $pattern_contents = '{\\[raw\\](.*?)\\[/raw\\]}is';\n $pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE);\n\n foreach ($pieces as $piece) {\n if (preg_match($pattern_contents, $piece, $matches)) {\n $new_content .= $matches[1];\n } else {\n $new_content .= wptexturize(wpautop($piece));\n }\n }\n\n return $new_content;\n}",
"function my_formatter( $content ) {\n\n\t\t$new_content = '';\n\t\t$pattern_full = '{(\\[raw\\].*?\\[/raw\\])}is';\n\t\t$pattern_contents = '{\\[raw\\](.*?)\\[/raw\\]}is';\n\t\t$pieces = preg_split( $pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE );\n\n\t\tforeach ( $pieces as $piece ) {\n\n\t\t\tif ( preg_match( $pattern_contents, $piece, $matches ) ) {\n\t\t\t\t$new_content .= $matches[1];\n\t\t\t} else {\n\t\t\t\t$new_content .= wptexturize( wpautop( $piece ) );\n\t\t\t}\n\n\t\t}\n\n\t\treturn $new_content;\n\n\t}",
"public static function Markdown($Mixed) {\n if (!is_string($Mixed)) {\n return self::To($Mixed, 'Markdown');\n } else {\n $Formatter = Gdn::Factory('HtmlFormatter');\n if (is_null($Formatter)) {\n return Gdn_Format::Display($Mixed);\n } else {\n require_once(PATH_LIBRARY.DS.'vendors'.DS.'markdown'.DS.'markdown.php');\n $Mixed = Markdown($Mixed);\n $Mixed = Gdn_Format::Mentions($Mixed);\n return $Formatter->Format($Mixed);\n }\n }\n }",
"function the_content() {\n\tglobal $discussion;\n\treturn Parsedown::instance()->parse($discussion['content']);\n}",
"function jabLeaveMarkdown()\n{\n\tglobal $jab;\n\tif (--$jab['markdown_depth']==0)\n\t{\n\t\t// Format content\n\t\t$html=jabMarkdown(ob_get_contents(), $jab['markdown_safe']);\n\n\t\tob_end_clean();\n\t\t\n\t\techo $html;\n\t}\t\n}",
"public function parse( $contents );",
"public function parseMarkup2MarkdownAction(Request $request) {\n \n $markdown = $this->get('markdown')->up2down($request->request->get('markup'));\n \n return new \\Symfony\\Component\\HttpFoundation\\Response($markdown);\n }",
"function sb_rcb_blog2html( $inData ){\n $patterns = array(\n \"@(\\r\\n|\\r|\\n)?\\\\[\\\\*\\\\](\\r\\n|\\r|\\n)?(.*?)(?=(\\\\[\\\\*\\\\])|(\\\\[/list\\\\]))@si\",\n\t\t\t\n // [b][/b], [i][/i], [u][/u], [mono][/mono]\n \"@\\\\[b\\\\](.*?)\\\\[/b\\\\]@si\",\n \"@\\\\[i\\\\](.*?)\\\\[/i\\\\]@si\",\n \"@\\\\[u\\\\](.*?)\\\\[/u\\\\]@si\",\n \"@\\\\[mono\\\\](.*?)\\\\[/mono\\\\]@si\",\n\t\t\t\n // [color=][/color], [size=][/size]\n \"@\\\\[color=([^\\\\]\\r\\n]*)\\\\](.*?)\\\\[/color\\\\]@si\",\n \"@\\\\[size=([0-9]+)\\\\](.*?)\\\\[/size\\\\]@si\",\n\t\t\t\n // [quote=][/quote], [quote][/quote], [code][/code]\n \"@\\\\[quote="([^\\r\\n]*)"\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/quote\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[quote\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/quote\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[code\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/code\\\\](\\r\\n|\\r|\\n)?@si\",\n\t\t\t\n // [center][/center], [right][/right], [justify][/justify],\n // [centerblock][/centerblock] (centers a left-aligned block of text)\n \"@\\\\[center\\\\](\\r\\n|\\r|\\n)?(.*?)(\\r\\n|\\r|\\n)?\\\\[/center\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[right\\\\](\\r\\n|\\r|\\n)?(.*?)(\\r\\n|\\r|\\n)?\\\\[/right\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[justify\\\\](\\r\\n|\\r|\\n)?(.*?)(\\r\\n|\\r|\\n)?\\\\[/justify\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[centerblock\\\\](\\r\\n|\\r|\\n)?(.*?)(\\r\\n|\\r|\\n)?\\\\[/centerblock\\\\](\\r\\n|\\r|\\n)?@si\",\n\t\t\t\n // [list][*][/list], [list=][*][/list]\n \"@\\\\[list\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/list\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[list=1\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/list\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[list=a\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/list\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[list=A\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/list\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[list=i\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/list\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[list=I\\\\](\\r\\n|\\r|\\n)*(.*?)(\\r\\n|\\r|\\n)*\\\\[/list\\\\](\\r\\n|\\r|\\n)?@si\",\n //\t\t\t\"@(\\r\\n|\\r|\\n)?\\\\[\\\\*\\\\](\\r\\n|\\r|\\n)?([^\\\\[]*)@si\",\n\t\t\t\n // [url=][/url], [url][/url], [email][/email]\n \"@\\\\[url=([^\\\\]\\r\\n]+)\\\\](.*?)\\\\[/url\\\\]@si\",\n \"@\\\\[url\\\\](.*?)\\\\[/url\\\\]@si\",\n \"@\\\\[urls=([^\\\\]\\r\\n]+)\\\\](.*?)\\\\[/urls\\\\]@si\",\n \"@\\\\[urls\\\\](.*?)\\\\[/urls\\\\]@si\",\n \"@\\\\[email\\\\](.*?)\\\\[/email\\\\]@si\",\n \"@\\\\[a=([^\\\\]\\r\\n]+)\\\\]@si\",\n\n // [youtube]c6zjwPiOHtg[/youtube]\n \"@\\\\[youtube\\\\](.*?)\\\\[/youtube\\\\]@si\",\n\n \n // using soundcloud's wordpress code\n // [soundcloud url=\"http://api.soundcloud.com/tracks/15220750\" ...]\n \"@\\\\[soundcloud\\s+url="http://api\\.soundcloud\\.com/tracks/(\\d+)"[^\\]]*\\\\]@si\",\n\n \n // [img][/img], [img=][/img], [clear]\n \"@\\\\[img\\\\](.*?)\\\\[/img\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[imgl\\\\](.*?)\\\\[/imgl\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[imgr\\\\](.*?)\\\\[/imgr\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[img=([^\\\\]\\r\\n]+)\\\\](.*?)\\\\[/img\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[imgl=([^\\\\]\\r\\n]+)\\\\](.*?)\\\\[/imgl\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[imgr=([^\\\\]\\r\\n]+)\\\\](.*?)\\\\[/imgr\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@\\\\[clear\\\\](\\r\\n|\\r|\\n)?@si\",\n\t\t\t\n // [hr], \\n\n \"@\\\\[hr\\\\](\\r\\n|\\r|\\n)?@si\",\n \"@(\\r\\n|\\r|\\n)@\");\n\t\t\n $replace = array(\n '<li>$3</li>',\n\t\t\t\n\t\t// [b][/b], [i][/i], [u][/u], [mono][/mono]\n '<b>$1</b>',\n '<i>$1</i>',\n '<span style=\"text-decoration:underline\">$1</span>',\n '<span class=\"mono\">$1</span>',\n\t\t\n // [color=][/color], [size=][/size]\n '<span style=\"color:$1\">$2</span>',\n '<span style=\"font-size:$1px\">$2</span>',\n\n // [quote][/quote], [code][/code]\n '<div class=\"quote\"><span style=\"font-size:0.9em;font-style:italic\">$1 wrote:<br /><br /></span>$3</div>',\n '<div class=\"quote\">$2</div>',\n '<div class=\"code\">$2</div>',\n\t\t\t\n // [center][/center], [right][/right], [justify][/justify],\n // [centerblock][/centerblock]\n '<div style=\"text-align:center\">$2</div>',\n '<div style=\"text-align:right\">$2</div>',\n '<div style=\"text-align:justify\">$2</div>',\n '<CENTER><TABLE BORDER=0><TR><TD>$2</TD></TR></TABLE></CENTER>',\n\t\t\t\n // [list][*][/list], [list=][*][/list]\n '<ul>$2</ul>',\n '<ol style=\"list-style-type:decimal\">$2</ol>',\n '<ol style=\"list-style-type:lower-alpha\">$2</ol>',\n '<ol style=\"list-style-type:upper-alpha\">$2</ol>',\n '<ol style=\"list-style-type:lower-roman\">$2</ol>',\n '<ol style=\"list-style-type:upper-roman\">$2</ol>',\n //\t\t\t'<li />',\n\t\t\t\n // [url=][/url], [url][/url], [email][/email]\n '<a href=\"$1\" rel=\"external\">$2</a>',\n '<a href=\"$1\" rel=\"external\">$1</a>',\n '<a href=\"$1\">$2</a>',\n '<a href=\"$1\">$1</a>',\n '<a href=\"mailto:$1\">$1</a>',\n '<a name=\"$1\"></a>',\n\n // [youtube]c6zjwPiOHtg[/youtube]\n '<iframe width=\"560\" height=\"349\" '.\n 'src=\"http://www.youtube.com/embed/$1\" '.\n 'frameborder=\"0\" allowfullscreen></iframe>',\n\n // [soundcloud url=\"http://api.soundcloud.com/tracks/15220750\" ...]\n // where $1 is the track code, extracted above\n '<object height=\"81\" width=\"100%\"> <param name=\"movie\" value=\"http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F$1&show_comments=false&auto_play=false&color=ff7700\"></param> <param name=\"allowscriptaccess\" value=\"always\"></param> <embed allowscriptaccess=\"always\" height=\"81\" src=\"http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F$1&show_comments=false&auto_play=false&color=ff7700\" type=\"application/x-shockwave-flash\" width=\"100%\"></embed> </object>',\n\n \n // [img][/img], [img=][/img], [clear]\n '<center><img border=0 src=\"$1\" alt=\"$1\" /></center>',\n '<img border=0 align=\"left\" src=\"$1\" alt=\"$1\" />',\n '<img border=0 align=\"right\" src=\"$1\" alt=\"$1\" />',\n '<img border=0 src=\"$1\" alt=\"$2\" title=\"$2\" />',\n '<img border=0 align=\"left\" src=\"$1\" alt=\"$2\" title=\"$2\" />',\n '<img border=0 align=\"right\" src=\"$1\" alt=\"$2\" title=\"$2\" />',\n '<div style=\"clear:both\"></div>',\n\t\t\t\n // [hr], \\n\n '<hr />',\n '<br />');\n return preg_replace($patterns, $replace, $inData );\n }",
"private static function convertMarkdownToHtml(string $markdown): string\n {\n $html = (new static())->getMarkdownCoverter()->convertToHtml($markdown);\n\n return static::replaceLineBreaksInsideTagsForBr((string) $html);\n }",
"private function processMarkdownContent($content, $config)\n {\n // Find all occurrences of GOOGLEMAP in content\n // ~ marks the start and end of the pattern, i is an option for caseless matching\n // The pattern to match is\n // - [GOOGLEMAPS:\n // - some identification (called tagid in the documentation and source)\n static $regex = '~\\[(GOOGLEMAPS)\\:(?P<tagid>[^\\:\\]]*)\\]~i';\n\n $matches = false;\n if (\\preg_match_all($regex, $content, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) {\n if ($config->get('enabled', true)) {\n // Found markers to replace; add necessary css and javascript to the document\n $this->addAssets($config);\n // Replace individual markers with html\n $content = $this->replaceMarkers($config, $regex, $matches, $content);\n } else {\n // note this causes havoc if another modular contains a googlemap\n $this->assetData = []; // Discard individual markers\n $content = $this->discardMarkers($regex, $matches, $content);\n }\n }\n\n return $content;\n }",
"function markdown_file_render($markdown_filename){\n\n // ensure file exists\n if (is_file($markdown_filename)){\n // using it as-is, no big deal\n } else if (path_xdrive_to_local($markdown_filename)){\n $markdown_filename = path_xdrive_to_local($markdown_filename);\n } else {\n error_box(\"<b>FILE DOES NOT EXIST:</b><br><code>$markdown_filename</code>\");\n return;\n }\n\n // ensure file is not empty\n if (filesize($markdown_filename)==0){\n error_box(\"<b>FILE IS EMPTY:</b><br><code>$markdown_filename</code>\");\n return;\n }\n\n // provide an anchor for this file\n $anchorName = basename($markdown_filename);\n $anchorName = explode('.',$anchorName)[0];\n echo \"<a name='$anchorName'></a>\";\n\n // render and echo the file\n include_once('Parsedown.php');\n $Parsedown = new Parsedown();\n $f = fopen($markdown_filename, \"r\");\n $raw = fread($f,filesize($markdown_filename));\n fclose($f);\n $html = $Parsedown->text($raw);\n echo $html;\n\n // add a button to edit the file\n $markdown_filename = path_clean($markdown_filename);\n $url=path_to_url($markdown_filename);\n echo \"<div align='right' style='font-size: 80%; color: #CCC; padding-right: 10px;'>\";\n echo \"<a href='$url' style='color: #CCC;'>$markdown_filename</a>\";\n echo \"</div>\";\n //echo \"<a href='$url' style='color: #CCC'>edit $url</a></div>\";\n //echo \"<i>Edit this text block: $markdown_filename</i></div>\";\n}",
"private static function normalizeHTMLAndMarkdown(string $text): string\n {\n $markdown = static::wrapBasicTagsInAParagraph($text);\n\n $markdown = static::wrapImagesTagsInAParagraph($markdown);\n\n $markdown = static::replaceLineBreaksInsideTagsForBr($markdown);\n\n return static::replaceParagraphsForMarkdown($markdown);\n }",
"function process_body($b)\n{\n\t$b = trim($b);\n\t$b = Markdown::defaultTransform($b);\n\treturn $b;\n}",
"private function setContentsFromFile()\n {\n $this->file->typeChecker()->assertMarkdown();\n $this->contents = $this->file->contents();\n }",
"function code_trick( $text, $markdown ) {\n\t\t// If doing markdown, first take any user formatted code blocks and turn them into backticks so that\n\t\t// markdown will preserve things like underscores in code blocks\n\t\tif ( $markdown )\n\t\t\t$text = preg_replace_callback(\"!(<pre><code>|<code>)(.*?)(</code></pre>|</code>)!s\", array( __CLASS__,'decodeit'), $text);\n\n\t\t$text = str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", $text);\n\t\tif ( !$markdown ) {\n\t\t\t// This gets the \"inline\" code blocks, but can't be used with Markdown.\n\t\t\t$text = preg_replace_callback(\"|(`)(.*?)`|\", array( __CLASS__, 'encodeit'), $text);\n\t\t\t// This gets the \"block level\" code blocks and converts them to PRE CODE\n\t\t\t$text = preg_replace_callback(\"!(^|\\n)`(.*?)`!s\", array( __CLASS__, 'encodeit'), $text);\n\t\t} else {\n\t\t\t// Markdown can do inline code, we convert bbPress style block level code to Markdown style\n\t\t\t$text = preg_replace_callback(\"!(^|\\n)([ \\t]*?)`(.*?)`!s\", array( __CLASS__, 'indent'), $text);\n\t\t}\n\t\treturn $text;\n\t}",
"function parse_content($rawcontent){\n $content = explode(\"++++\", $rawcontent);\n //the defintion of the the title\n $metablock = $content[0];\n $rawmeta = explode(\"----\", $metablock);\n $meta = [];\n foreach ($rawmeta as $metaline) {\n //splits key from value\n $metaentry = explode(\":\", $metaline);\n //removes all spaces around the value\n $key = trim($metaentry[0]);\n $value = trim($metaentry[1]);\n $meta[$key] = $value;\n }\n //the splittet version: just the value\n $title = $meta[\"title\"];\n //the splittet text\n $text = $content[1];\n $result = compact(\"title\", \"text\", \"meta\");\n //returns the result\n return $result;\n}",
"function parseText($txt,$wrap){\n\t\t\t$txt = $this->TS_links_rte($txt, $wrap);\n\t\t\t//prepend relative paths with url\n\t\t\t$txt = $this->makeAbsolutePaths($txt);\n\t\t\t$txt = $this->cleanHTML($txt);\n\t\t\treturn $txt;\n\t\t\n\t}",
"static function desc( $title ) {\n\t\tglobal $wgParser;\n\t\t$article = new Article( $title );\n\t\t$content = $article->getContent();\n\t\t$text = preg_match( \"/^.+?1=(.+?)\\|2=/s\", $content, $m ) ? $m[1] : $title->getText();\n\t\t$html = $wgParser->parse( trim( $text ), $title, new ParserOptions(), true, true )->getText();\n\t\t$html = preg_replace( '|<a[^<]+<img .+?</a>|', '', $html );\n\t\t$desc = strip_tags( $html, '<p><a><i><b><u><s>' );\n\t\t$desc = preg_replace( \"/[\\r\\n]+/\", \"\", $desc );\n\t\t$desc = preg_replace( \"|<p></p>|\", \"\", $desc );\n\t\t$desc = trim( preg_replace( \"|<p>|\", \"\\n<p>\", $desc ) );\n\t\treturn $desc;\n\t}",
"public static function markdown($str, $args = null)\r\n {\r\n // Create our markdown parse/conversion regex's\r\n $md = array(\r\n '/\\[([^\\]]++)\\]\\(([^\\)]++)\\)/' => '<a href=\"$2\">$1</a>',\r\n '/\\*\\*([^\\*]++)\\*\\*/' => '<strong>$1</strong>',\r\n '/\\*([^\\*]++)\\*/' => '<em>$1</em>'\r\n );\r\n\r\n // Let's make our arguments more \"magical\"\r\n $args = func_get_args(); // Grab all of our passed args\r\n $str = array_shift($args); // Remove the initial arg from the array (and set the $str to it)\r\n if (isset($args[0]) && is_array($args[0])) {\r\n /**\r\n * If our \"second\" argument (now the first array item is an array)\r\n * just use the array as the arguments and forget the rest\r\n */\r\n $args = $args[0];\r\n }\r\n\r\n // Encode our args so we can insert them into an HTML string\r\n foreach ($args as &$arg) {\r\n $arg = htmlentities($arg, ENT_QUOTES, 'UTF-8');\r\n }\r\n\r\n // Actually do our markdown conversion\r\n return vsprintf(preg_replace(array_keys($md), $md, $str), $args);\r\n }",
"function textile($content)\n{\n $parser = new \\Netcarver\\Textile\\Parser();\n\n return $parser\n ->setDocumentType('html5')\n ->parse($content);\n}",
"public function isMarkdown(): bool\n {\n return $this->markdown;\n }",
"public function markdown( $str, $args = null ) {\n\t\t$args = func_get_args();\n\t\t$md = array(\n\t\t\t'/\\[([^\\]]++)\\]\\(([^\\)]++)\\)/' => '<a href=\"$2\">$1</a>',\n\t\t\t'/\\*\\*([^\\*]++)\\*\\*/' => '<strong>$1</strong>',\n\t\t\t'/\\*([^\\*]++)\\*/' => '<em>$1</em>',\n\t\t);\n\t\t$str = array_shift( $args );\n\t\tif ( is_array( $args[0] ) ) {\n\t\t\t$args = $args[0];\n\t\t}\n\t\tforeach ( $args as &$arg ) {\n\t\t\t$arg = htmlentities( $arg, ENT_QUOTES );\n\t\t}\n\n\t\treturn vsprintf( preg_replace( array_keys( $md ), $md, $str ), $args );\n\t}",
"public function getContentAsMarkdown($filter = [\"markdown\"])\n {\n $filter = is_array($filter) ? $filter : [$filter];\n $textFilter = new TextFilter();\n return $textFilter->parse($this->content, $filter)->text;\n }",
"private function filterMarkdown($all) {\n foreach ($all as $value) {\n\n $value->comment = $this->textFilter->doFilter($value->comment, 'shortcode, markdown');\n }\n return $all;\n }",
"public static function markdown($str, $args = null)\n {\n $md = array(\n '/\\[([^\\]]++)\\]\\(([^\\)]++)\\)/' => '<a href=\"$2\">$1</a>',\n '/\\*\\*([^\\*]++)\\*\\*/' => '<strong>$1</strong>',\n '/\\*([^\\*]++)\\*/' => '<em>$1</em>'\n );\n\n // Let's make our arguments more \"magical\"\n $args = func_get_args(); // Grab all of our passed args\n $str = array_shift($args); // Remove the initial arg from the array (and set the $str to it)\n if (isset($args[0]) && is_array($args[0])) {\n /**\n * If our \"second\" argument (now the first array item is an array)\n * just use the array as the arguments and forget the rest\n */\n $args = $args[0];\n }\n\n // Encode our args so we can insert them into an HTML string\n foreach ($args as &$arg) {\n $arg = htmlentities($arg, ENT_QUOTES, 'UTF-8');\n }\n\n // Actually do our markdown conversion\n return vsprintf(preg_replace(array_keys($md), $md, $str), $args);\n }",
"public function toHtml(): string\n {\n return $this->parseMarkdown()->toHtml();\n }",
"private static function getHtml(string $text): string\n {\n $markdown = static::normalizeHTMLAndMarkdown($text);\n\n $html = static::convertMarkdownToHtml($markdown);\n\n return $html;\n }",
"function PKG_decodeDebconfDescription($descr, &$title)\n{\n\t//Split the utf8 decoded description into an array\n\t$tmp = explode(\"\\n\",utf8_decode($descr));\n\n\t//The first line is the title\n\t$title = \"<span class=\\\"title\\\"\\\">$tmp[0]</span>\";\n\n\t//Start a new paragraph\n\t$out = \"<p>\";\n\n\tfor ($i = 1; $i < count($tmp); $i++)\n\t{\n\t\t//Lines starting with \" .\" indicate a new paragraph => Close the old paragraph and open a new\n\t\tif ($tmp[$i] == \" .\")\n\t\t\t$out .= \"</p>\\n<p>\";\n\t\telse\n\t\t//Other lines are normal text => Just add them\n\t\t\t$out .= $tmp[$i];\n\t}\n\n\t//Close the last paragraph\n\t$out .= \"</p>\";\n\n\treturn($out);\n}",
"protected function toMarkdown($content)\n {\n $tmpfname = tempnam(sys_get_temp_dir(), 'fillet'); // good\n file_put_contents($tmpfname, $content);\n $cmd = $this->config['pandoc']['bin'] . ' --no-wrap -f html -t markdown ' . $tmpfname;\n $content = shell_exec($cmd);\n unlink($tmpfname);\n return $content;\n }",
"function process_content( string $str ): string {\n\t$str = apply_filters( 'the_content', $str ); // Shortcodes are expanded here.\n\t$str = str_replace( ']]>', ']]>', $str );\n\treturn $str;\n}",
"public function markedContent() {}",
"public function getTechnicalDescription(): ?string\r\n {\r\n\t\t$parsedown = new \\Parsedown();\r\n\t\t$stripTags = strip_tags($this->getTechnicalDescriptionOrigin());\r\n\t\t$stripTags = html_entity_decode($stripTags);\r\n//\t\t$markdown = preg_replace('@[\\n\\r]+@', \"\\n\", $stripTags);\r\n\t\treturn $parsedown->text($stripTags);\r\n }",
"public function __construct()\n {\n $this->markdown = new \\Parsedown;\n }",
"function html_wikir_render($str)\n{\n $regexps = array();\n $replacements = array();\n $refs = wikir_pages_references($str);\n foreach($refs as $ref)\n {\n $regexps[] = '/\\[\\['.preg_quote($ref).'\\]\\]/';\n \n $link = '<a href=\"';\n $link .= url_for($ref);\n $link .= '\">';\n $link .= h(str_replace('_', '\\_', $ref));\n $link .= '</a>';\n if(!WikirPage::exists($ref)) $link .= '<sup>(?)</sup>';\n $replacements[] = $link;\n }\n return Markdown(preg_replace($regexps, $replacements, $str));\n}",
"public static function convertMarkdowntoRst(&$content)\n {\n // Header\n $content = preg_replace_callback('/(\\n|^)##\\s(.*)/', function($matches)\n {\n return \"\\n\".$matches[2].\"\\n\".str_repeat('~', strlen($matches[2]));\n },$content);\n\n $content = preg_replace_callback('/(\\n|^)###\\s(.*)/', function($matches)\n {\n return \"\\n\".$matches[2].\"\\n\".str_repeat('^', strlen($matches[2]));\n },$content);\n\n // inline code\n $content = preg_replace_callback('/[^\\S\\n]`([^`]+)`[^\\S\\n]/', function($matches)\n {\n return ' ``'.$matches[1].'`` ';\n },$content);\n\n // code block\n $content = preg_replace_callback('/```(\\w+)([^`]+)```/', function($matches)\n {\n return '.. code-block:: '.$matches[1].\"\\n\".self::indent($matches[2], 4);\n },$content);\n\n // Link\n $content = preg_replace_callback('/\\[([^\\]]+)]\\(([^\\)]+)\\)/', function($matches)\n {\n return '`'.$matches[1].' <'.$matches[2].'>`_ ';\n },$content);\n\n // ul-list\n $content = preg_replace_callback('/\\n\\*\\s(.*)/', function($matches)\n {\n return \"\\n- \".$matches[1];\n },$content);\n\n return $content;\n\n }",
"function parse($data = \"\") {\n // bold, italic, h2 (Название)\n $data = preg_replace(\"/<span class=rvts78>(.+?)\\s?<\\/span>/i\",\"##**_$1_**\",$data);\n // bold. h3 (коротко)\n $data = preg_replace(\"/<span class=rvts23>(.+?)\\s?<\\/span>/i\",\"###**$1**\",$data);\n // bold (Статья)\n $data = preg_replace(\"/<span class=rvts(?:9|44)>(.+?)\\s?<\\/span>/i\",\"**$1**\",$data);\n // bold h4 (Раздел)\n $data = preg_replace(\"/<span class=rvts15>(.+?)\\s?<\\/span>/i\",\"####**$1**\",$data);\n\n $container = $data;\n\n $container = strip_tags($container);\n $container = preg_replace(\"/ /s\",\" \",$container);\n $container = preg_replace(\"/(\\r\\n|\\n|\\r)+/s\",\"\\n\\n\",$container);\n return trim($container);\n}",
"function my_formatter($content) {\r\n\t$new_content = '';\r\n\t$pattern_full = '{(\\[noformat\\].*?\\[/noformat\\])}is';\r\n\t$pattern_contents = '{\\[noformat\\](.*?)\\[/noformat\\]}is';\r\n\t$pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE);\r\n\tforeach ($pieces as $piece) {\r\n\t\tif (preg_match($pattern_contents, $piece, $matches)) {\r\n\t\t\t$new_content .= $matches[1];\r\n\t\t} else {\r\n\t\t\t$new_content .= wptexturize(wpautop($piece));\r\n\t\t}\r\n\t}\r\n\treturn $new_content;\r\n}",
"protected static function textOf($markup) {\n $line= str_repeat('=', 72);\n return strip_tags(preg_replace(array(\n '#<pre>#', '#</pre>#', '#<li>#',\n ), array(\n $line, $line, '* ',\n ), trim($markup)));\n }",
"public function convertHtmlToMarkdown($html)\n {\n return $this->htmlConverter->convert($html);\n }",
"function load_page_content($page) {\n //get text as html\n $pretext1 = html_entity_decode($page->text);\n\n //replace non-html tags with proper html tags\n // fix image tags\n $pretext2 = str_replace(array(\"<_image>\", \"</_image>\"), array(\"<img src=\\\"\", \"\\\"/>\"), $pretext1);\n // fix bullet point tags\n $pretext3 = str_replace(array(\"<_bullet>\", \"</_bullet>\"), array(\"<div>• \", \"</div>\"), $pretext2);\n // fix subtitle tags\n $text = str_replace(array(\"<subtitle>\", \"</subtitle>\"), array(\"<br/><br/><b>\", \"</b>\"), $pretext3);\n\n return $text;\n}",
"public function html_text()\n {\n return $this->dispatch(\n new MarkdownToHtml(\n $this->wrappedObject->text\n )\n );\n }",
"function admMarkupPlainText( $txt )\n{\n $html = $txt;\n\t$html = str_replace( \"<\", \"<\", $html );\n\t$html = str_replace( \">\", \">\", $html );\n\n /* articles */\n\t$html = preg_replace( \"/\\\\[a([0-9]+)(\\\\s*'(.*?)')?\\\\s*\\\\]/\", \"<a href=\\\"/adm/article?article_id=\\\\1\\\">\\\\0</a>\", $html );\n\n /* journos */\n\t$html = preg_replace( \"/\\\\[j([0-9]+)(\\\\s*(.*?))?\\\\s*\\\\]/\", \"<a href=\\\"/adm/journo?journo_id=\\\\1\\\">\\\\0</a>\", $html );\n\n /* http:// */\n $html = preg_replace( \"%http://\\\\S+%\", \"<a href=\\\"\\\\0\\\">\\\\0</a>\", $html );\n\n\treturn $html;\n}",
"public function getCommentMarkdown($ucid)\n {\n $comment_post_path = &$this->comments[\"ucid-$ucid\"];\n $comment_md = $this->html_to_md->parseString($comment_post_path['content']);\n return $comment_md;\n }",
"function extract_motion_text_from_wiki_text_for_edit($text)\n{\n if (preg_match(\"/--- MOTION EFFECT ---(.*)--- COMMENT/s\", $text, $matches)) {\n $motion = $matches[1];\n }\n\t$motion = preg_replace(\"/<p\\b.*?class=\\\"italic\\\".*?>(.*)<\\/p>/\",'<p><i>\\\\1</i></p>',$motion);\n\t$motion = preg_replace(\"/<p\\b.*?class=\\\"indent\\\".*?>(.*)<\\/p>/\",'<blockquote>\\\\1</blockquote>',$motion);\n\n return trim($motion);\n}",
"private function process($format){\n\t\t$processedData = $this->markdown;\n\t\tswitch($format):\n\t\t\tcase 'html':\n\t\t\t\t$processedData = $this->markdownToHTML($processedData);\n\t\t\t\tbreak;\n\t\tendswitch;\n\t\t$this->processed[$format] = $processedData;\n\t\treturn $this->processed[$format];\n\t}",
"private static function replaceParagraphsForMarkdown(string $text): string\n {\n // Any text inside a <p>\n $regex = '/<p\\b[^>]*>((?:\\s|\\S)*?)<\\/p>\\s*/m';\n\n // Adds two break lines\n $substitution = \"$1\\n\\n\";\n\n return preg_replace($regex, $substitution, $text);\n }"
] | [
"0.80210084",
"0.79820126",
"0.7770162",
"0.7714733",
"0.7695791",
"0.763455",
"0.7551005",
"0.7537816",
"0.73962826",
"0.7235086",
"0.7154951",
"0.70995533",
"0.7097881",
"0.708615",
"0.7036742",
"0.7031099",
"0.7010278",
"0.69859666",
"0.6965099",
"0.68865657",
"0.68549603",
"0.6852675",
"0.67882806",
"0.6780749",
"0.67514235",
"0.67431724",
"0.67180365",
"0.67068243",
"0.66670763",
"0.6625576",
"0.66186196",
"0.6601096",
"0.65401983",
"0.64921814",
"0.64902747",
"0.64781415",
"0.6432704",
"0.643218",
"0.6427852",
"0.6362581",
"0.6280227",
"0.6264698",
"0.6259528",
"0.6254511",
"0.62125504",
"0.61430967",
"0.61071503",
"0.6053094",
"0.6046749",
"0.6029668",
"0.60294515",
"0.5971847",
"0.5968322",
"0.5960183",
"0.59542966",
"0.5885906",
"0.58538264",
"0.58472437",
"0.5843763",
"0.5839017",
"0.5820538",
"0.58069265",
"0.58027065",
"0.58012617",
"0.57972026",
"0.5794068",
"0.57890016",
"0.5765159",
"0.57587725",
"0.57476753",
"0.5744675",
"0.5742402",
"0.5732725",
"0.57215345",
"0.56998646",
"0.568152",
"0.56701475",
"0.5653454",
"0.5644681",
"0.56348807",
"0.56290257",
"0.5628211",
"0.5626504",
"0.56250584",
"0.5611893",
"0.56117976",
"0.5587177",
"0.5577794",
"0.55569804",
"0.554999",
"0.5549143",
"0.5541202",
"0.55386615",
"0.552673",
"0.5518475",
"0.5509745",
"0.5506979",
"0.55047536",
"0.5495869",
"0.5491659",
"0.54833704"
] | 0.0 | -1 |
Set a value from a key. | public function put(string $key, $value = '')
{
$this->set($key, $value);
return $value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setValue($key, $value);",
"public function setValue($key, $value);",
"public function set ($key, $value);",
"public function set( $key, $value );",
"public function set( $key, $value );",
"public function set(string $key, $value);",
"public function set(string $key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set( $key , $value ) {\n\t\teval( '$this->items' . $this->nodelize( $key ) . ' = $value;' );\n\t}",
"static public function set($key, $value)\r\n {\r\n /* First we make sure we have a valid variable name */\r\n self::validateKey($key);\r\n\r\n /* Then we set the value */\r\n Fset::set(self::$values, $key, $value);\r\n }",
"public function __set($key, $value);",
"abstract public function set ($key, $value);",
"public function set(string $key, $value) {\n\t\t$this->data[$key] = $value;\n\t}",
"public function set($strKey, $varValue);",
"public function set ($key, $value) {\r\n\t\t$this->_data[$key] = $value;\r\n\t}",
"public static function set($key, $value){\n self::setRequestVar($key, $value);\n \n }",
"public static function Set($key, $val);",
"abstract public function set($key, $value);",
"abstract public function set($key, $value);",
"public function set($key, $value) {\n\t\t$this->data[$key] = $value;\n\t}",
"public function set($key, $value) {\n\n }",
"public function set(string $key, $value): void {\n\t\t$this->data[$key] = $value;\n\t}",
"public static function set($key, $value)\r\n {\r\n self::$_data[$key] = $value;\r\n }",
"public function __set($key, $value) {\n\t\t$this->{\"set_{$key}\"}($value);\n\t}",
"public function set ( $key, &$value ) { \t$this->storage[$key] = $value; }",
"public function set(string $key, $value): void;",
"public function set($key, $value)\r\n {\r\n $this->values[$key] = $value;\r\n }",
"public function set($key, $value)\n {\n $this->data[$key] = $value;\n }",
"public function set($key, $value)\n {\n $this->data[$key] = $value;\n }",
"public function set($key, $value)\n {\n $this->data[$key] = $value;\n }",
"public function set($key, $value)\n\t{\n\t\t$this->data[$key] = $value;\n\t}",
"public function set(string $key, $value): void\n {\n\t\t$this->values[$key] = $value;\n\t}",
"public function set(string $key, $data);",
"public function set($key,$value) {\n $this->_data[$key]=$value;\n }",
"public function __set($key, $val);",
"public function _set($key, $value)\n {\n $this->data[$key] = $value;\n }",
"public function _set($key, $value)\n {\n $this->data[$key] = $value;\n }",
"public function set($key, $value)\n {\n if ($this->_doValidate) {\n // validate the value passed\n ValueValidator::validate($value);\n }\n\n if ($key[0] === '_') {\n if ($key === self::ENTRY_ID) {\n $this->setInternalId($value);\n return;\n }\n\n if ($key === self::ENTRY_KEY) {\n $this->setInternalKey($value);\n return;\n }\n\n if ($key === self::ENTRY_REV) {\n $this->setRevision($value);\n return;\n }\n\n if ($key === self::ENTRY_ISNEW) {\n $this->setIsNew($value);\n return;\n }\n }\n\n if (!$this->_changed) {\n if (!isset($this->_values[$key]) || $this->_values[$key] !== $value) {\n // set changed flag\n $this->_changed = true;\n }\n }\n\n // and store the value\n $this->_values[$key] = $value;\n }",
"public function set($key, $value)\n {\n return $this->add('set', $key .' = ' . $value, true);\n }",
"public function set($key, $data);",
"public function set($key, $value)\n {\n $this->engine->assign($key, $value);\n }",
"public function set($key, $value)\n {\n $this->engine->assign($key, $value);\n }",
"public function set(string $key, $value): void\n {\n $this->data[$key] = $value;\n }",
"function set($key, $value);",
"function set($key, $value);",
"function set($key, $value);",
"static function set($key, $value)\n {\n self::$values[$key] = $value;\n }",
"abstract protected function putValue($key, $value);",
"public function __set( $key, $value ) {\n\n\t\t$this->_data[ $key ] = $value;\n\t}",
"public function __set($key, $value) {\n $this->setField($key, $value);\n }",
"public function setData($key, $value);",
"public function setData($key, $value);",
"public function set(string $key, $value = null);",
"public function set($key, $value = null);",
"public function set($key, $value = null);",
"private static function set( $key, $value ) {\n\t\t// this method will raise an exception on invalid data\n\t\tself::validate( $key, $value );\n\t\t// set the value in the cache\n\t\tself::$_cache[$key] = $value;\n\t}",
"public function set($key, $value)\n\t{\n\t\t$this->values[$this->block][$key] = $value;\n\t}",
"public function __set($key, $value) {\n $this[$key] = $value;\n }",
"public function __set($key, $value) {\n $this->pos = 0;\n $this->data[$key] = $value;\n $this->keys = array_keys($this->data);\n }",
"public function __set($key, $value)\n {\n self::$data[$key] = $value;\n }",
"public function set($key, $value): void;",
"public static function set($key, $value)\n {\n self::$__request[$key] = $value;\n }",
"public function __set($key, $value) {\n\t}",
"public function assign($key, $value) {\n $this->dwoo_data->$key = $value;\n }",
"public function set($key, $value)\n {\n return $this->data[$key] = $value;\n }",
"public function __set($key, $value)\n {\n\n $this->setData($key, $value);\n\n }",
"public function set(string $key, mixed $value): void\n {\n }",
"public function __set($key, $value){\n\t\t\t\t$this->$key = $value;\n\t\t\t}",
"public function __set($key, $value){\n\t\t\t\t$this->$key = $value;\n\t\t\t}",
"public function __set($key, $value)\n\t{\n\t\t$this[$key] = $value;\n\t}",
"function set($key, $newvalue) {\n\t\t$this->valuemap[$key]= $newvalue;\n\t}",
"public function __set($key, $value)\n\t{\n\t\t$this->data[$key] = $value;\n\t}",
"public function __set($key, $value){\n \t$this->$key = $value;\n }",
"public function __set($key, $value)\n {\n $this->data[$key] = $value;\n }",
"public function set( $key, $value ) {\n $this->cache[ $key ] = $value;\n }",
"abstract public function Set(string $key, $value) : void;",
"public function set($key, $value)\n {\n return $this->send(['command'=>'set', 'key'=>$key, 'value'=>$value, 'seq'=>$this->getSequence()]);\n }",
"public function set( $key, $value )\n {\n $this->contents[ $key ] = $value;\n }",
"function __set( $key, $value ) {\n\t\t$this->{$key} = $value;\n\t}",
"public function set(string $key, $value)\n {\n $this->items[$key] = $value;\n }",
"public function __set($key, $value)\n {\n switch ($key) {\n case self::ENTRY_NAME :\n $this->setName($value);\n break;\n case self::ENTRY_CODE :\n $this->setCode($value);\n break;\n default:\n $this->set($key, $value);\n break;\n }\n }",
"public function __set($key, $value)\n {\n }",
"public function __set($key, $value)\n {\n }",
"public function __set($key, $value)\n {\n }",
"public function __set($key, $value)\n {\n }"
] | [
"0.81006205",
"0.81006205",
"0.792443",
"0.79151964",
"0.79151964",
"0.7874486",
"0.7874486",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.7699797",
"0.7680657",
"0.76270705",
"0.75556135",
"0.752886",
"0.75280255",
"0.7511138",
"0.75016344",
"0.7483494",
"0.7482573",
"0.7482573",
"0.74565387",
"0.7449932",
"0.74441695",
"0.7404959",
"0.73642117",
"0.7342572",
"0.73320633",
"0.73287576",
"0.73253703",
"0.73253703",
"0.73253703",
"0.73243576",
"0.7314748",
"0.73121434",
"0.7301904",
"0.7286273",
"0.7282356",
"0.7282356",
"0.72761863",
"0.72604734",
"0.72582453",
"0.7249089",
"0.7249089",
"0.7248249",
"0.7245975",
"0.7245975",
"0.7245975",
"0.72388643",
"0.72305334",
"0.7227801",
"0.718419",
"0.7181812",
"0.7181812",
"0.7180817",
"0.71804976",
"0.71804976",
"0.71675",
"0.7164011",
"0.71481514",
"0.7143943",
"0.7141121",
"0.7139648",
"0.7120414",
"0.7120169",
"0.71197397",
"0.71160316",
"0.71141917",
"0.7106486",
"0.7102433",
"0.7102433",
"0.70682496",
"0.7066956",
"0.70631945",
"0.7052451",
"0.7048249",
"0.7045094",
"0.7034225",
"0.70279944",
"0.7020671",
"0.7010542",
"0.70091105",
"0.70074636",
"0.6998544",
"0.69962406",
"0.6995017",
"0.6995017"
] | 0.0 | -1 |
Set a value from a key. | public function securePut(string $key, $value = '')
{
$this->secureSet($key, $value);
return $value;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setValue($key, $value);",
"public function setValue($key, $value);",
"public function set ($key, $value);",
"public function set( $key, $value );",
"public function set( $key, $value );",
"public function set(string $key, $value);",
"public function set(string $key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set($key, $value);",
"public function set( $key , $value ) {\n\t\teval( '$this->items' . $this->nodelize( $key ) . ' = $value;' );\n\t}",
"static public function set($key, $value)\r\n {\r\n /* First we make sure we have a valid variable name */\r\n self::validateKey($key);\r\n\r\n /* Then we set the value */\r\n Fset::set(self::$values, $key, $value);\r\n }",
"public function __set($key, $value);",
"abstract public function set ($key, $value);",
"public function set(string $key, $value) {\n\t\t$this->data[$key] = $value;\n\t}",
"public function set($strKey, $varValue);",
"public function set ($key, $value) {\r\n\t\t$this->_data[$key] = $value;\r\n\t}",
"public static function set($key, $value){\n self::setRequestVar($key, $value);\n \n }",
"public static function Set($key, $val);",
"abstract public function set($key, $value);",
"abstract public function set($key, $value);",
"public function set($key, $value) {\n\t\t$this->data[$key] = $value;\n\t}",
"public function set($key, $value) {\n\n }",
"public function set(string $key, $value): void {\n\t\t$this->data[$key] = $value;\n\t}",
"public static function set($key, $value)\r\n {\r\n self::$_data[$key] = $value;\r\n }",
"public function __set($key, $value) {\n\t\t$this->{\"set_{$key}\"}($value);\n\t}",
"public function set ( $key, &$value ) { \t$this->storage[$key] = $value; }",
"public function set(string $key, $value): void;",
"public function set($key, $value)\r\n {\r\n $this->values[$key] = $value;\r\n }",
"public function set($key, $value)\n {\n $this->data[$key] = $value;\n }",
"public function set($key, $value)\n {\n $this->data[$key] = $value;\n }",
"public function set($key, $value)\n {\n $this->data[$key] = $value;\n }",
"public function set($key, $value)\n\t{\n\t\t$this->data[$key] = $value;\n\t}",
"public function set(string $key, $value): void\n {\n\t\t$this->values[$key] = $value;\n\t}",
"public function set(string $key, $data);",
"public function set($key,$value) {\n $this->_data[$key]=$value;\n }",
"public function __set($key, $val);",
"public function _set($key, $value)\n {\n $this->data[$key] = $value;\n }",
"public function _set($key, $value)\n {\n $this->data[$key] = $value;\n }",
"public function set($key, $value)\n {\n if ($this->_doValidate) {\n // validate the value passed\n ValueValidator::validate($value);\n }\n\n if ($key[0] === '_') {\n if ($key === self::ENTRY_ID) {\n $this->setInternalId($value);\n return;\n }\n\n if ($key === self::ENTRY_KEY) {\n $this->setInternalKey($value);\n return;\n }\n\n if ($key === self::ENTRY_REV) {\n $this->setRevision($value);\n return;\n }\n\n if ($key === self::ENTRY_ISNEW) {\n $this->setIsNew($value);\n return;\n }\n }\n\n if (!$this->_changed) {\n if (!isset($this->_values[$key]) || $this->_values[$key] !== $value) {\n // set changed flag\n $this->_changed = true;\n }\n }\n\n // and store the value\n $this->_values[$key] = $value;\n }",
"public function set($key, $value)\n {\n return $this->add('set', $key .' = ' . $value, true);\n }",
"public function set($key, $data);",
"public function set($key, $value)\n {\n $this->engine->assign($key, $value);\n }",
"public function set($key, $value)\n {\n $this->engine->assign($key, $value);\n }",
"public function set(string $key, $value): void\n {\n $this->data[$key] = $value;\n }",
"function set($key, $value);",
"function set($key, $value);",
"function set($key, $value);",
"static function set($key, $value)\n {\n self::$values[$key] = $value;\n }",
"abstract protected function putValue($key, $value);",
"public function __set( $key, $value ) {\n\n\t\t$this->_data[ $key ] = $value;\n\t}",
"public function __set($key, $value) {\n $this->setField($key, $value);\n }",
"public function setData($key, $value);",
"public function setData($key, $value);",
"public function set(string $key, $value = null);",
"public function set($key, $value = null);",
"public function set($key, $value = null);",
"private static function set( $key, $value ) {\n\t\t// this method will raise an exception on invalid data\n\t\tself::validate( $key, $value );\n\t\t// set the value in the cache\n\t\tself::$_cache[$key] = $value;\n\t}",
"public function set($key, $value)\n\t{\n\t\t$this->values[$this->block][$key] = $value;\n\t}",
"public function __set($key, $value) {\n $this[$key] = $value;\n }",
"public function __set($key, $value) {\n $this->pos = 0;\n $this->data[$key] = $value;\n $this->keys = array_keys($this->data);\n }",
"public function __set($key, $value)\n {\n self::$data[$key] = $value;\n }",
"public function set($key, $value): void;",
"public static function set($key, $value)\n {\n self::$__request[$key] = $value;\n }",
"public function __set($key, $value) {\n\t}",
"public function assign($key, $value) {\n $this->dwoo_data->$key = $value;\n }",
"public function set($key, $value)\n {\n return $this->data[$key] = $value;\n }",
"public function __set($key, $value)\n {\n\n $this->setData($key, $value);\n\n }",
"public function set(string $key, mixed $value): void\n {\n }",
"public function __set($key, $value){\n\t\t\t\t$this->$key = $value;\n\t\t\t}",
"public function __set($key, $value){\n\t\t\t\t$this->$key = $value;\n\t\t\t}",
"public function __set($key, $value)\n\t{\n\t\t$this[$key] = $value;\n\t}",
"function set($key, $newvalue) {\n\t\t$this->valuemap[$key]= $newvalue;\n\t}",
"public function __set($key, $value)\n\t{\n\t\t$this->data[$key] = $value;\n\t}",
"public function __set($key, $value){\n \t$this->$key = $value;\n }",
"public function __set($key, $value)\n {\n $this->data[$key] = $value;\n }",
"public function set( $key, $value ) {\n $this->cache[ $key ] = $value;\n }",
"abstract public function Set(string $key, $value) : void;",
"public function set($key, $value)\n {\n return $this->send(['command'=>'set', 'key'=>$key, 'value'=>$value, 'seq'=>$this->getSequence()]);\n }",
"public function set( $key, $value )\n {\n $this->contents[ $key ] = $value;\n }",
"function __set( $key, $value ) {\n\t\t$this->{$key} = $value;\n\t}",
"public function set(string $key, $value)\n {\n $this->items[$key] = $value;\n }",
"public function __set($key, $value)\n {\n switch ($key) {\n case self::ENTRY_NAME :\n $this->setName($value);\n break;\n case self::ENTRY_CODE :\n $this->setCode($value);\n break;\n default:\n $this->set($key, $value);\n break;\n }\n }",
"public function __set($key, $value)\n {\n }",
"public function __set($key, $value)\n {\n }",
"public function __set($key, $value)\n {\n }",
"public function __set($key, $value)\n {\n }"
] | [
"0.81006205",
"0.81006205",
"0.792443",
"0.79151964",
"0.79151964",
"0.7874486",
"0.7874486",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.78680795",
"0.7699797",
"0.7680657",
"0.76270705",
"0.75556135",
"0.752886",
"0.75280255",
"0.7511138",
"0.75016344",
"0.7483494",
"0.7482573",
"0.7482573",
"0.74565387",
"0.7449932",
"0.74441695",
"0.7404959",
"0.73642117",
"0.7342572",
"0.73320633",
"0.73287576",
"0.73253703",
"0.73253703",
"0.73253703",
"0.73243576",
"0.7314748",
"0.73121434",
"0.7301904",
"0.7286273",
"0.7282356",
"0.7282356",
"0.72761863",
"0.72604734",
"0.72582453",
"0.7249089",
"0.7249089",
"0.7248249",
"0.7245975",
"0.7245975",
"0.7245975",
"0.72388643",
"0.72305334",
"0.7227801",
"0.718419",
"0.7181812",
"0.7181812",
"0.7180817",
"0.71804976",
"0.71804976",
"0.71675",
"0.7164011",
"0.71481514",
"0.7143943",
"0.7141121",
"0.7139648",
"0.7120414",
"0.7120169",
"0.71197397",
"0.71160316",
"0.71141917",
"0.7106486",
"0.7102433",
"0.7102433",
"0.70682496",
"0.7066956",
"0.70631945",
"0.7052451",
"0.7048249",
"0.7045094",
"0.7034225",
"0.70279944",
"0.7020671",
"0.7010542",
"0.70091105",
"0.70074636",
"0.6998544",
"0.69962406",
"0.6995017",
"0.6995017"
] | 0.0 | -1 |
Just to get response for GET RESTful APIs | public function getApiResponse($queryString)
{
\error_log('CallGoogleApi:: getApiResponse($queryString)');
return \json_decode(\json_encode(\json_decode(\file_get_contents($queryString))), true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function & GetResponse ();",
"private function GET() {\n global $_GET;\n $getData = array();\n foreach($_GET as $key => $value) {\n $getData[$key] = $value;\n }\n $this -> response[\"response\"] = $getData;\n return;\n }",
"public function getResponse() {}",
"public function getResponse() {}",
"public function get() {\n // $this->isAdmin();\n\n $data = \"This is a test\";\n\n $this->sendHeaders();\n \n $resBody = (object) array();\n $resBody->status = \"200\";\n $resBody->message = \"valid request\";\n $resBody->data = \"This is the data\";\n echo json_encode($resBody);\n\n }",
"function list(){\n $res = $res = $this->client->request('GET',$this->path,[]);\n $this->checkResponse($res,array(200));\n return $res;\n }",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"public function getResponse();",
"public function getHttpResponse();",
"public function index()\n {\n $client = new Client(['base_uri' => 'http://127.0.0.1:8000/api/skorpoint']);\n $request = $client->request('GET');\n // $response = json_decode($request->getBody());\n // echo $response[0]->id;\n $response = $request->getBody();\n return $response;\n }",
"public function getResponse() {\n }",
"function get(Request &$request, Response &$response);",
"public function response ();",
"public function index()\n {\n $client = new Client();\n $kirim = $client->get(env('API_URL').'/rangkumannilai');\n return $kirim->getBody(); \n }",
"public function getResponse()\n {\n }",
"public function index_get()\n {\n $this->response([\n 'Operation' => \"error\",\n 'Message' => 'Please Post Data'\n ], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code\n }",
"public function getResponse() {\n\t}",
"public function response();",
"public function list() : Response\n {\n return $this->client->get(new Route([static::STATUSES_ROUTE]));\n }",
"protected function _response() {}",
"final public function onTest()\n {\n // identical to a GET request without the body output.\n // shodul proxy to the get method\n return array(); // MUST NOT return a message-body in the response\n }",
"function getProducts() {\n\techo \"Getting Products </br>\";\n\t$response = getRequest('/api/product');\n\tprintInfo($response);\n}",
"public function helloworld_get() {\n $users = [\n ['id' => 0, 'name' => 'John', 'email' => '[email protected]'],\n ['id' => 1, 'name' => 'Jim', 'email' => '[email protected]'],\n ];\n\n\t\t// Set the response and exit\n\t\t$this->response( $users, 200 );\n\t}",
"public static function get() {\n return self::call(\"GET\");\n }",
"public function get() {\n try {\n\n /**\n * Set up request method\n */\n $this->method = 'GET';\n /**\n * Process request and call for response\n */\n return $this->requestProcessor();\n\n\n } catch (\\Throwable $t) {\n new ErrorTracer($t);\n }\n }",
"public function index()\n\t{\n\n\t\t$response=[\"message\"=>\"method is not supported\"];\n\t\t$statusCode = 501; //not implemented by the server\n\n\t\treturn response($response, $statusCode)->header('Content-Type', 'application/json');\n\t}",
"abstract public function response();",
"public function index_get()\n {\n $ranstring = $this->common->randomString();\n $this->response([\n 'status' => FALSE,\n 'message' => $ranstring\n ], REST_Controller::HTTP_UNAUTHORIZED);\n }",
"public function testResponseGet()\n {\n $result = json_decode($this->body, true);\n\n $this->assertEquals($this->response->get('Model'), $result['Model']);\n $this->assertEquals($this->response->get('RequestId'), $result['RequestId']);\n $this->assertEquals($this->response->get('Inexistence'), null);\n $this->assertEquals($this->response->get('Inexistence', 'Inexistence'), 'Inexistence');\n }",
"public function getIndex() {\n\n return \\Response::json(array('status' => 'ok', 'timestamp' => time()), 200);\n }",
"public function index()\n {\n $response = $this->createResponse();\n return json_encode($response);\n }",
"public function getme(){\n return $this->make_http_request(__FUNCTION__);\n }",
"public function get()\n\t{\n\t\t$response = $this->builder->get( $this->buildParameters(), $this->buildUrlAdditions() );\n\n\t\treturn $response;\n\t}",
"protected function getApiResult()\n {\n return Singleton::class('ZN\\Services\\Restful')->get($this->address);\n }",
"public function testCGetAction200()\n {\n self::$_client->request(Request::METHOD_GET, self::RUTA_API);\n $response = self::$_client->getResponse();\n self::assertTrue($response->isSuccessful());\n self::assertJson($response->getContent());\n $users = json_decode($response->getContent(), true);\n self::assertArrayHasKey('users', $users);\n }",
"public function sendGet()\n\t{\n\t\t$ch = curl_init(\"http://localhost/rest/index.php/book\");\n\t\t//a true, obtendremos una respuesta de la url, en otro caso, \n\t\t//true si es correcto, false si no lo es\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t//establecemos el verbo http que queremos utilizar para la petición\n\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, \"GET\");\n\t\t//obtenemos la respuesta\n\t\t$response = curl_exec($ch);\n\t\t// Se cierra el recurso CURL y se liberan los recursos del sistema\n\t\tcurl_close($ch);\n\t\tif(!$response) {\n\t\t return false;\n\t\t}else{\n\t\t\tvar_dump($response);\n\t\t}\n\t}",
"public function index()\n {\n return response($this->service->all(), 200);\n }",
"public function getrequest()\n {\n $request = User::getrequest();\n return result::repsonse(true,$request);\n }",
"public function testBasicGET()\n\t{\n\t\t$Request = new Request(\n\t\t\tnew URL('http://' . self::TESTHOST . '/hallo'),\n\t\t\tnull, // method. Default GET\n\t\t\tnull, // Payload\n\t\t\t$this->_getDefaultOptions());\n\n\t\t// Return the body as string\n\t\t$Result = $Request->getResponseAs(new StringValue());\n\n\t\t$this->assertEquals('hallo', (string)$Result);\n\t}",
"public function get_response_object()\n {\n }",
"public function getApi();",
"public function getApi();",
"public function getApi();",
"public function get()\n {\n #HTTP method in uppercase (ie: GET, POST, PATCH, DELETE)\n $sMethod = 'GET';\n $sTimeStamp = gmdate('c');\n\n #Creating the hash\n\t\t$oHash = new Hash($this->getSecretKey());\n\t\t$oHash->addData($this->getPublicKey());\n\t\t$oHash->addData($sMethod);\n\t\t$oHash->addData($this->getApiResource());\n\t\t$oHash->addData('');\n\t\t$oHash->addData($sTimeStamp);\n\n\t\t$sHash = $oHash->hash();\n\n $rCurlHandler = curl_init();\n curl_setopt($rCurlHandler, CURLOPT_URL, $this->getApiRoot() . $this->getApiResource());\n curl_setopt($rCurlHandler, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($rCurlHandler, CURLOPT_CUSTOMREQUEST, $sMethod);\n curl_setopt($rCurlHandler, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($rCurlHandler, CURLOPT_SSL_VERIFYHOST, 0);\n\n curl_setopt($rCurlHandler, CURLOPT_HTTPHEADER, [\n \"x-date: \" . $sTimeStamp,\n \"x-hash: \" . $sHash,\n \"x-public: \" . $this->getPublicKey(),\n \"Content-Type: text/json\",\n ]);\n\n $sOutput = curl_exec($rCurlHandler);\n $iHTTPCode = curl_getinfo($rCurlHandler, CURLINFO_HTTP_CODE);\n curl_close($rCurlHandler);\n\n Log::write('WebRequest', 'GET::REQUEST', $this->getApiRoot() . $this->getApiResource());\n Log::write('WebRequest', 'GET::HTTPCODE', $iHTTPCode);\n Log::write('WebRequest', 'GET::RESPONSE', $sOutput);\n\n if ($iHTTPCode !== 200) {\n throw new InvalidApiResponse('HttpCode was ' . $iHTTPCode . '. Expected 200');\n }\n\n return $sOutput;\n }",
"public function index_get(){\n $response = $this->PersonM->all_person();\n $this->response($response);\n }",
"public function getInnerResponse();",
"public function process()\n {\n \t$client = $this->client->getClient();\n\n \ttry {\n $response = $client->get($this->buildUrl());\n return new ResponseJson((string)$response->getBody(), true);\n } catch (RequestException $e) {\n return new ResponseJson((string)$e->getResponse()->getBody(), false);\n }\n }",
"function rest()\r\n\t{\r\n\t\theader ( 'Content-Type: text/plain;' );\r\n\t\theader ( \"Cache-Control: no-cache, must-revalidate\" ); // HTTP/1.1\r\n\t\theader ( \"Expires: Sat, 26 Jul 1997 05:00:00 GMT\" ); // Date in the past\r\n\t\t\r\n\r\n\t\terror_reporting ( E_ALL ^ E_NOTICE );\r\n\t\trequire_once (LIBPATH . 'xml/objectxml.php');\r\n\t\tif (version_compare ( PHP_VERSION, '5', '>=' )) {\r\n\t\t\trequire_once (LIBPATH . 'xml/domxml-php4-to-php5.php');\r\n\t\t\tset_error_handler ( rest_error_handler, E_ALL ^ E_NOTICE );\r\n\t\t} else {\r\n\t\t\tset_error_handler ( rest_error_handler );\r\n\t\t}\r\n\t\t\r\n\t\t$args = func_get_args ();\r\n\t\t\r\n\t\t$action = array_shift ( $args );\r\n\t\tif(strtolower($args[sizeof($args)-1]) == \"json\"){\r\n\t\t\tarray_pop($args);\r\n\t\t\tif ( function_exists('json_encode') ){\r\n\t\t\t\t$this->response_format = \"json\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif ($action == NULL) {\r\n\t\t\t\r\n\t\t\t$this->rest_show_error ( '100' );\r\n\t\t\r\n\t\t} else {\r\n\t\t\t$method = 'api_' . $action;\r\n\t\t\tif (method_exists ( $this, $method )) {\r\n\t\t\t\t$result = call_user_func_array ( array (\r\n\t\t\t\t\t\t&$this, \r\n\t\t\t\t\t\t$method \r\n\t\t\t\t), $args );\r\n\t\t\t\tif (is_array ( $result ) && array_key_exists ( 'error', $result )) {\r\n\t\t\t\t\t$this->rest_show_error ( $result ['error'] ['code'] );\r\n\t\t\t\t} else {// if ($result != NULL) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t//@todo uncomment during production.\r\n\t\t\t\t\t//$this->output->cache(10);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($this->response_format == \"json\"){\r\n\t\t\t\t\t\techo json_encode($result);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tif (file_exists(APPPATH . 'views/api/rest/' . $method)){\r\n\t\t\t\t\t\t\t$this->load->view ( \"api/rest/$method\", $result );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t//} else {\r\n\t\t\t\t//\t$this->rest_show_error ( '404' );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->rest_show_error ( '400' );\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"function getResponse();",
"function getResponse();",
"public function get_response()\n {\n return $this->response; \n }",
"function get_response() {\n return $this->response;\n }",
"protected function get($uri){\n // $method = 'GET';\n\n // $res = $client->request($method, $uri);\n // $res = $res->getBody()->getContents();\n // $res = json_decode($res);\n // return $res;\n // }\n try {\n $client = new Client();\n $res = $client->request('GET', $uri);\n return json_decode($res->getBody()->getContents());\n } catch (\\Exception $e) {\n //$e stock les erreures\n return abort(500);\n } \n\n /*$client = new Client(['http_errors' => false]);\n $res = $client->request('GET', $url);\n $statuscode = $res->getStatusCode();\n\n if (200 === $statuscode) {\n return json_decode($res->getBody()->getContents());\n }\n elseif (304 === $statuscode) {\n return json_decode($res->getBody()->getContents());\n }\n elseif (404 === $statuscode) {\n return abort(500);\n }\n else {\n return abort(500);\n }*/\n }",
"public function renderApi() {\n return new JsonResponse([\n 'data' => $this->getResultsFromJson(),\n 'method' => 'GET',\n ]);\n }",
"public function listsGenericget()\r\n {\r\n $response = Generic::all();\r\n return response()->json($response,200);\r\n }",
"public function index()\n {\n $hotels = Hotel::all();\n return ApiResponse::getResponse('200 OK', null, HotelResource::collection($hotels));\n }",
"public function index()\n {\n return response()->json(test::get());\n }",
"public function getIndex()\n\t{\n\t\t$output=array(\n\t\t\t'status' => 'success', \n\t\t\t'message' =>'data fetched' , \n\t\t\t'data' =>'hi' , \n\t\t\t);\n\t\treturn Response::json($output);\n\t}",
"public function getAction()\n {\n $return = false;\n\n /* Getting Answer by id */\n $answer = Answer::getById(intval($_GET['id']));\n \n /* Return response */\n header('Content-Type: application/json');\n echo json_encode($answer);\n }",
"public function indexAction()\n {\n\n return $this->response;\n }",
"public function get_test_rest_availability()\n {\n }",
"function show_response()\n\t{\n\t\tprint_r($this->http_response);\n\t}",
"public function testIndexActionGet()\n {\n $request = $this->di->get(\"request\");\n $request->setGet(\"ip\", \"8.8.8.8\");\n\n\n $res = $this->controller->indexActionGet();\n\n $body = $res->getBody();\n\n // var_dump($body);\n $this->assertInstanceOf(\"Anax\\Response\\ResponseUtility\", $res);\n $this->assertContains(\"Kolla vädret\", $body);\n }",
"public function index()\n {\n //\n return response()->json(Service::with('providers')->get());\n }",
"public function index()\n {\n $this->repository->pushCriteria(app('Prettus\\Repository\\Criteria\\RequestCriteria'));\n $resources = $this->repository->all();\n\n return response()->json([\n 'data' => $resources,\n ]);\n }",
"private function getTestResponse()\n {\n Route::get('180cd62d-3c17-42cb-a13e-e318d312afff', function () {\n return 'hello cors';\n })->middleware(['cors']);\n return $this->get('180cd62d-3c17-42cb-a13e-e318d312afff');\n }",
"public function httpGet()\n {\n return $this->method(\"GET\");\n }",
"public function getApiEndpoint();",
"protected function getApiList() {\r\n\r\n $content = \"Available GW2 REST API methods \\n\\n\";\r\n\r\n $content .= \"GET \\t /api/rest/1.0 \\t This help list. \\n\";\r\n $content .= \"GET \\t /api/rest/1.0/<type>/<connection_name> \\t Returns a list of exported XML files. \\n\";\r\n $content .= \"GET \\t /api/rest/1.0/<type>/<connection_name>/<filename> \\t Downloads requested file. \\n\";\r\n $content .= \"POST \\t /api/rest/1.0/<type>/<connection_name> \\t Expects attached XML file (for cURL use file=@<PATH_TO_FILE>). \\n\";\r\n $content .= \"DELETE \\t /api/rest/1.0/<type>/<connection_name>/<filename> \\t Moves processed file to archive. \\n\";\r\n\r\n return new TextResponse($content);\r\n }",
"public function getResponse(){\n switch($this->format){\n case 'json':\n $this->response_type = 'application/json';\n return $this -> getJSON();\n break;\n case 'xml':\n $this->response_type = 'text/xml';\n return $this -> getXML();\n break;\n default:\n $this->response_type = 'application/json';\n return $this -> getJSON();\n break;\n }\n }",
"public function __toString()\n {\n return $this->response->get('json');\n }",
"public function apiList();",
"public function testGetAccountsUsingGET()\n {\n }",
"public function requestFromApi() \n {\n $clientApi = new \\GuzzleHttp\\Client([\n \"base_uri\" => \"https://services.mysublime.net/st4ts/data/get/type/\",\n \"timeout\" => 4.0]);\n \n try { \n $response = $clientApi->request(\"GET\", $this->_urlEndPoint);\n if ($response->getStatusCode() == \"200\") {\n $body = $response->getBody();\n $this->_jsonRequestedArr = json_decode($body); \n }\n else { \n $this->_error .= \"Bad status code: . \" . $response->getStatusCode(); \n }\n }\n catch (Exception $exc) {\n $this->_error .= $exc->getMessage();\n }\n\n }",
"public function getResponse()\n {\n // TODO: Implement getResponse() method.\n }",
"public function getResponse(string &$packageRoot, Request &$request): Response;",
"public function index()\n\t{\n\t\t// sample data\n\t\t$data = array(\n\t\t\t'kevin',\n\t\t\t'tyler'\n\t\t\t);\n\n\t\t// return as json\n\t\treturn Response::json($data);\n\t}",
"function getAllOrders() {\n\techo \"Getting All Order </br>\";\n\t$response = getRequest('/api/order');\n\tprintInfo($response);\n}",
"public function get_index() {\n\n\t\t$ext = 'json';\n\t\t$header = 'application/json';\n\n\t\tif (Request::accepts('text/xml')) {\n\t\t\t$ext = 'xml';\n\t\t\t$header = 'text/xml';\n\t\t}\n\t\t$input = Todo::all();\n\t\t$todos = array();\n\t\tforeach ($input as $todo) {\n\t\t\t$todos[] = $todo->to_array();\n\t\t}\n\n\t\t//set headers \n\t\t$response = Response::view('todo_' . $ext, array('todos' => $todos));\n\t\t$response->header('Content-Type', $header);\n\t\treturn $response;\n\t}",
"private function rest_search() {\n\t\t// return json elements here\n\t}",
"public function index()\n {\n return \\Response::json('Not Implemented', 501);\n }",
"public function indexApi()\n {\n $clientes = Cliente::select(\"clientes.*\")\n ->where('clientes.status',1)\n ->orderBy('id','asc')\n ->get()\n ->toArray();\n\n return response()->json([\n 'error' => false,\n 'clientes' => $clientes\n ],200);\n }",
"public function index()\n\t{\n\n\t\treturn response()->json(\"{}\");\n\t}",
"public function index()\n {\n return response()->json([\n 'success' => true, \n 'message' => 'Get all of M Vessel data successfully',\n 'data' => MVesselResource::collection(MVessel::all())\n ]);\n }",
"public function testResponseJson() {\n $this->visit(\"/api/users/teste\")->seeJson();\n }",
"public function index()\n {\n //\n return response(\"2\");\n }",
"public function getRawResponse();",
"public function index()\n {\n try{\n $residents = Resident::all();\n $data = response(ResidentResource::collection($residents));\n }\n catch(HttpException $error){\n $data = $error->getMessage();\n }\n return $data;\n }",
"public function getRawResponse() {\n\t}",
"public function indexAction()\n {\n $token = $this->container->get('request')->query->get('token');\n $sum = $this->container->get('request')->query->get('sum');\n\n if (!isset($token) && !isset($url)) {\n return new JsonResponse(array('error' => 'Endpoint Not Found'), 404);\n }\n\n try {\n $answer = $this->container->get('mamonCase')->getAnswer($token.'/'.$sum);\n } catch (CaseException $e) {\n return new JsonResponse(array('error' => $e->getMessage()), 404);\n }\n\n if (isset(json_decode($answer, true)['error'])) {\n return new JsonResponse(array('error' => 'Unprocessable Entity'), 422);\n }\n\n return Response::create($answer, 200, ['Content-type' => 'application/json']);\n }",
"public function index_get()\n\t{\n\t\t$employee = new EmployeeModel;\n\t\t$result_emp =$employee->get_employee();\n\t\t$this->response($result_emp,200);\n\t}",
"protected function found()\n {\n $this->response = $this->response->withStatus(200);\n $this->jsonBody($this->payload->getOutput());\n }"
] | [
"0.73422927",
"0.72622955",
"0.7133447",
"0.7133447",
"0.7065034",
"0.7049649",
"0.68866545",
"0.68866545",
"0.68866545",
"0.68866545",
"0.68866545",
"0.68866545",
"0.68866545",
"0.68866545",
"0.68866545",
"0.68866545",
"0.68866545",
"0.68546903",
"0.67981",
"0.67847705",
"0.67656994",
"0.675927",
"0.67148376",
"0.67042726",
"0.67030275",
"0.6696659",
"0.6690814",
"0.66839814",
"0.66811985",
"0.66715044",
"0.66590214",
"0.6654989",
"0.6646856",
"0.6629322",
"0.6624867",
"0.66103774",
"0.6609186",
"0.65978324",
"0.65837866",
"0.65836173",
"0.6549163",
"0.6533384",
"0.6523211",
"0.6522248",
"0.65195435",
"0.65097994",
"0.64870876",
"0.6476914",
"0.6465793",
"0.64634556",
"0.64634556",
"0.64634556",
"0.64429444",
"0.6420114",
"0.6383803",
"0.6382748",
"0.6374843",
"0.63617957",
"0.63617957",
"0.63523823",
"0.63445604",
"0.629449",
"0.62882966",
"0.62760997",
"0.62678975",
"0.6263992",
"0.6261476",
"0.6256134",
"0.62536466",
"0.6249632",
"0.6245094",
"0.6243248",
"0.6234258",
"0.6233724",
"0.62270325",
"0.6225382",
"0.6225144",
"0.6221886",
"0.6217008",
"0.6205422",
"0.6201476",
"0.6196085",
"0.6193882",
"0.6192878",
"0.6192106",
"0.61885333",
"0.6187802",
"0.6181959",
"0.6161914",
"0.6161496",
"0.6150432",
"0.6149101",
"0.6147742",
"0.6140632",
"0.6139737",
"0.6138406",
"0.6135348",
"0.61348295",
"0.6134254",
"0.6128479",
"0.6125461"
] | 0.0 | -1 |
Template Name: Gutenberg Example Example template to show how to use gutenberg blocks in combination with template files. | function fopr_template_section( $name ) {
$id = get_the_ID();
switch ( $name ) {
case 'example-template-section':
?>
<section class="[ section section--full ] example">
Hi, I'm an example section to show how to use templates mixed with Gutenberg blocks.
Just use the Template Section block and enter the name of this case.
This way you can use gutenberg blocks in one section and a section from the template in another.
</section>
<?php
break;
default:
echo 'Template section "' . esc_html( $name ) . '" not found.';
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_the_block_template_html()\n {\n }",
"function gutenberg_blocks_template_image_register_block() {\n\tif ( ! function_exists( 'register_block_type' ) ) {\n\t\t// Gutenberg is not active.\n\t\treturn;\n\t}\n\twp_register_script(\n\t\t'gutenberg_blocks_template_image_script',\n\t\tplugins_url( 'block.build.js', __FILE__ ),\n\t\tarray( 'wp-blocks', 'wp-element', 'wp-editor' ),\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'block.build.js' )\n\t);\n\twp_register_style(\n\t\t'gutenberg_blocks_template_image_style',\n\t\tplugins_url( 'style.css', __FILE__ ),\n\t\tarray( ),\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'style.css' )\n\t);\n\tregister_block_type( 'gutenberg-blocks/template-image', array(\n\t\t'style' => 'gutenberg_blocks_template_image_style',\n\t\t'editor_script' => 'gutenberg_blocks_template_image_script',\n\t) );\n}",
"function gfd_setup_page_template() {\n\n\t// Post Type to attach a template to.\n\t$post_type_object = get_post_type_object( 'post' );\n\n\t// Assign blocks to page.\n\t$post_type_object->template = array(\n\t\tarray( 'core/heading',\n\t\t\tarray(\n\t\t\t\t'content' => 'Main Heading...', // https://github.com/WordPress/gutenberg/blob/master/packages/block-library/src/heading/index.js#L30\n\t\t\t\t'level' => '1' // https://github.com/WordPress/gutenberg/blob/master/packages/block-library/src/heading/index.js#L31\n\t\t\t)\n\t\t),\n\t\tarray( 'core/gallery', array(\n\t\t\t'placeholder' => 'Add Description...',\n\t\t\tarray(\n\t\t\t\t'columns' => 3,\n\t\t\t)\n\t\t) ),\n\t\tarray( 'core/paragraph', array(\n\t\t\t'placeholder' => 'Add Description...',\n\t\t) ),\n\t\tarray( 'core/block', array( 'ref' => [34], ) )\n\t);\n\n\t/**\n\t * Lock the template from being edited.\n\t *\n\t * @link Template Lockinghttps://developer.wordpress.org/block-editor/developers/block-api/block-templates/#locking\n\t * @param string 'all' or 'insert'.\n\t */\n\t$post_type_object->template_lock = 'all';\n}",
"function register_block_core_template_part()\n {\n }",
"function register_understrap_gutenberg_blocks() {\n\n // Register our block script with WordPress\n wp_enqueue_script(\n 'understrap-blocks',\n plugins_url('/blocks/dist/blocks.build.js', __FILE__),\n array('wp-blocks', 'wp-edit-post')\n );\n \n // Register our block's editor-specific CSS\n wp_enqueue_style(\n 'gutenberg-card-block-edit-style',\n plugins_url('/blocks/dist/blocks.editor.build.css', __FILE__),\n array( 'wp-edit-blocks' )\n );\n\n // Register our block's webfonts\n/* wp_enqueue_style(\n 'gutenberg-card-block-font-style',\n 'https://fonts.googleapis.com/css?family=Karla:400,700',\n array( 'wp-edit-blocks' )\n );\n*/\n\n}",
"public function block($args, $assoc_args)\n {\n /**\n * Setup vars for directory and block names\n *\n * $blockName is the kebab-case component name\n * - used for registration, scss/partial filename\n * - used in partial for classname\n * - used in scss for classname\n *\n * $blockClassName is the PascalCase component name\n * - used for ACF_Block registration classname\n * - added to BlockServiceProvider.php\n */\n $theme_path = trailingslashit(get_template_directory());\n $blockName = strtolower($args[0]);\n $blockClassNameParts = explode('-', $args[0]);\n $blockClassName = '';\n foreach ($blockClassNameParts as $part) {\n $blockClassName .= ucfirst($part);\n }\n $blockTitle = strtolower($blockName);\n\n\n /**\n * Create block\n */\n $create_block_result = $this->createAcfBlock($theme_path, $blockClassName, $blockTitle);\n \n if ($create_block_result !== true) {\n return;\n }\n\n /**\n * Reference in block service provider\n */\n $this->addClassToBlockServiceProvider($theme_path, $blockClassName);\n\n /**\n * Create partial\n */\n $this->createBlockPartial($theme_path, $blockTitle);\n\n /**\n * Create SCSS (optional)\n */\n \\WP_CLI::confirm('Would you like SCSS?', $assoc_args_scss = array());\n $created_scss = $this->createBlockScssFile($theme_path, $blockName);\n\n /**\n * Reference SCSS in _blocks.scss\n */\n if ($created_scss) {\n $this->addScssImportStatement($theme_path, $blockName);\n }\n\n //@TODO finish me\n //$this->addBlockToAllowedBlocks($theme_path, $blockName);\n \n \\WP_CLI::success('Great Success! https://untappd.akamaized.net/photo/2017_08_05/c1e3366ff091d1b65c903dddfcd2f036_320x320.jpg');\n }",
"function register_block_core_post_template()\n {\n }",
"public function getBlockTemplate(array $params);",
"function render_block_core_post_template($attributes, $content, $block)\n {\n }",
"function block_plugin_my_block_view($delta) {\n return array(\n '#type' => 'markup',\n '#markup' => 'Yo block!'\n );\n}",
"function gutenberg_frugalisme_custom_blocks() {\n\twp_register_style(\n\t\t'frugalisme-front-end-styles',\n\t\tSB_PLUGIN_URL . '/style.css',\n\t\tarray( 'wp-edit-blocks' ),\n\t\tfilemtime( SB_PLUGIN_DIR_PATH . 'style.css' )\n\t);\n\t// Block editor styles.\n\twp_register_style(\n\t\t'frugalisme-editor-styles',\n\t\tSB_PLUGIN_URL . '/editor.css',\n\t\tarray( 'wp-edit-blocks' ),\n\t\tfilemtime( SB_PLUGIN_DIR_PATH . 'editor.css' )\n\t);\n\n\t// Block Editor Script.\n\twp_register_script(\n\t\t'frugalisme-editor-js',\n\t\tSB_PLUGIN_URL . '/youtube-feed.js',\n\t\tarray( 'wp-blocks', 'wp-element', 'wp-editor', 'wp-components', 'wp-i18n' ),\n\t\tfilemtime( SB_PLUGIN_DIR_PATH . 'youtube-feed.js' ),\n\t\ttrue\n\t);\n\tregister_block_type(\n\t\t'youtube-feed/youtube-feed',\n\t\tarray(\n\t\t\t'style' => 'frugalisme-front-end-styles',\n\t\t\t'editor_style' => 'frugalisme-editor-styles',\n\t\t\t'editor_script' => 'frugalisme-editor-js',\n\t\t\t'render_callback' => 'frugalisme_render_feed'\n\t\t)\n\t);\n\n}",
"function add_gutenberg_templates( $templates_list ) {\n\n\t\t$current_theme = apply_filters( 'ti_wl_theme_name', wp_get_theme()->Name );\n\n\t\t$templates = array(\n\t\t\tarray(\n\t\t\t\t'title' => '',\n\t\t\t\t'type' => 'block',\n\t\t\t\t'author' => $current_theme,\n\t\t\t\t'keywords' => array( 'big title', 'header' ),\n\t\t\t\t'categories' => array( 'header' ),\n\t\t\t\t'template_url' => get_template_directory_uri() . '/gutenberg/blocks/big-title/template.json',\n\t\t\t\t'screenshot_url' => get_template_directory_uri() . '/gutenberg/blocks/big-title/screenshot.png',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'title' => '',\n\t\t\t\t'type' => 'block',\n\t\t\t\t'author' => $current_theme,\n\t\t\t\t'keywords' => array( 'features', 'services', 'icons' ),\n\t\t\t\t'categories' => array( 'content' ),\n\t\t\t\t'template_url' => get_template_directory_uri() . '/gutenberg/blocks/features/template.json',\n\t\t\t\t'screenshot_url' => get_template_directory_uri() . '/gutenberg/blocks/features/screenshot.png',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'title' => '',\n\t\t\t\t'type' => 'block',\n\t\t\t\t'author' => $current_theme,\n\t\t\t\t'keywords' => array( 'about', 'description' ),\n\t\t\t\t'categories' => array( 'content' ),\n\t\t\t\t'template_url' => get_template_directory_uri() . '/gutenberg/blocks/about/template.json',\n\t\t\t\t'screenshot_url' => get_template_directory_uri() . '/gutenberg/blocks/about/screenshot.png',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'title' => '',\n\t\t\t\t'type' => 'block',\n\t\t\t\t'author' => $current_theme,\n\t\t\t\t'keywords' => array( 'testimonial', 'clients', 'customer' ),\n\t\t\t\t'categories' => array( 'content' ),\n\t\t\t\t'template_url' => get_template_directory_uri() . '/gutenberg/blocks/clients/template.json',\n\t\t\t\t'screenshot_url' => get_template_directory_uri() . '/gutenberg/blocks/clients/screenshot.png',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'title' => '',\n\t\t\t\t'type' => 'block',\n\t\t\t\t'author' => $current_theme,\n\t\t\t\t'keywords' => array( 'team', 'people' ),\n\t\t\t\t'categories' => array( 'content' ),\n\t\t\t\t'template_url' => get_template_directory_uri() . '/gutenberg/blocks/team/template.json',\n\t\t\t\t'screenshot_url' => get_template_directory_uri() . '/gutenberg/blocks/team/screenshot.png',\n\t\t\t),\n\t\t);\n\n\t\t$list = array_merge( $templates, $templates_list );\n\n\t\treturn $list;\n\t}",
"function fuxt_init_custom_block() {\n\n // Abort if ACF function does not exists.\n if( ! function_exists('acf_register_block_type') ) {\n return;\n }\n\n // Register an example \"testimonial\" block.\n acf_register_block_type(array(\n 'name' => 'testimonial',\n 'title' => __('Testimonial'),\n 'description' => __('A custom testimonial block.'),\n 'render_template' => 'template-parts/blocks/testimonial/testimonial.php',\n 'category' => 'formatting',\n 'icon' => 'admin-comments',\n 'keywords' => array( 'testimonial', 'quote' ),\n ));\n}",
"public function applyTemplateBlocks(Template $t)\n {\n\n }",
"function ticketmaster_register_block() {\n\n\tif ( ! function_exists( 'register_block_type' ) ) {\n\t\t// Gutenberg is not active.\n\t\treturn;\n\t}\n\n\twp_register_script(\n\t\t'ticketmaster',\n\t\tplugins_url( 'build/index.js', __FILE__ ),\n\t\tarray( 'wp-blocks', 'wp-element', 'wp-editor', 'wp-components'),\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'block.js' )\n\t);\n\n register_block_type('ticketmaster/event-listing', [\n 'editor_script' => 'ticketmaster',\n 'attributes' => [\n 'term' => [\n 'type' => 'string',\n 'default' => 'Concert'\n ],\n 'size' => [\n 'type' => 'number',\n 'default' => 8\n ],\n ],\n 'render_callback' => render_nova_directive('EventListing'),\n ]);\n}",
"function setup_starter_register_custom_blocks() {\n\n $blocks = array(\n 'feature' => array(\n 'name' => 'feature_pull_block',\n 'title' => __('Feature Pull Block'),\n 'render_template' => plugin_dir_path( __FILE__ ).'../blocks/block-feature-pull-setup-starter.php',\n 'category' => 'setup_starter',\n 'icon' => 'list-view',\n 'mode' => 'edit',\n 'keywords' => array( 'feature', 'highlight', 'pull' ),\n ),\n \n ); //echo $blocks[ 'feature']['render_template'];\n /*\n 'logs' => array(\n 'name' => 'log',\n 'title' => __('Log'),\n 'render_template' => 'partials/blocks/block-log-setup-starter.php',\n 'category' => 'setup_starter',\n 'icon' => 'list-view',\n 'mode' => 'edit',\n 'keywords' => array( 'update', 'log' ),\n ),\n */\n\n // Bail out if function doesn’t exist or no blocks available to register.\n if ( !function_exists( 'acf_register_block_type' ) && !$blocks ) {\n return;\n }\n \n // this loop is broken, how do we register multiple blocks in one go?\n // Register all available blocks.\n foreach ($blocks as $block) {\n acf_register_block_type( $block );\n }\n \n}",
"function jsforwpblocks_templates( $args, $post_type ) {\n\n\tif ( 'post' === $post_type ) {\n\t\t$args['template_lock'] = true;\n\t\t$args['template'] = [\n\t\t\t[\n\t\t\t\t'core/image',\n\t\t\t\t[\n\t\t\t\t\t'align' => 'left',\n\t\t\t\t],\n\t\t\t],\n\t\t\t[\n\t\t\t\t'core/paragraph',\n\t\t\t\t[\n\t\t\t\t\t'placeholder' => 'The only thing you can add',\n\t\t\t\t],\n\t\t\t],\n\t\t];\n\t}\n\n\treturn $args;\n}",
"function wp_enable_block_templates()\n {\n }",
"function render_block_core_template_part($attributes)\n {\n }",
"function block_template_part($part)\n {\n }",
"function app_template() {\n\t$template = <<<HTML\n\n\n\nHTML;\n\n $navigation = app_template_navigation();\n $dialogs = app_template_dialogs();\n\t$data['blocks'] = empty($navigation) ? array($dialogs) : array($dialogs, $navigation);\n\t$data['template'] = $template;\n\treturn $data;\n}",
"function gutenberg_block_header_area() {\n\tgutenberg_block_template_part( 'header' );\n}",
"function locate_block_template($template, $type, array $templates)\n {\n }",
"function page_render_block($block) {\n static $xtpl_block;\n \n if (!$xtpl_block) $xtpl_block = new XTemplate('html/block.xtpl');\n \n $xtpl_block->reset('block');\n $xtpl_block->assign('id', $block['id']);\n $xtpl_block->assign('title', $block['title']);\n $xtpl_block->assign('content', $block['content']);\n \n if (isset($block['links'])) {\n $xtpl_block->assign('links', $block['links']);\n $xtpl_block->parse('block.links');\n }\n \n $xtpl_block->parse('block');\n return $xtpl_block->text('block');\n}",
"function custom_acf_display_blocks( $block ) {\n\t// Convert name \"acf/example\" into path friendly slug \"example\".\n\t$slug = str_replace( 'acf/', '', $block['name'] );\n\n\t// Include a template part from within the \"components/block\" folder.\n\tif ( file_exists( get_theme_file_path( \"/components/block-{$slug}.php\" ) ) ) {\n\t\tinclude get_theme_file_path( \"/components/block-{$slug}.php\" );\n\t}\n}",
"function enqueueBlock() {\n wp_enqueue_script(\n 'ugroup-new-block',\n plugin_dir_url(__FILE__) . 'ugroup-test.js',\n array('wp-blocks','wp-editor'),\n true\n );\n}",
"public function register_cpt_blocks() {\n /* Include CPT creation file */\n //include_once( ILIO_BLOCKS_INCLUDES_DIR . '/blockss.post-type.php' );\n }",
"public static function register_blocks()\n {\n if (function_exists('acf_register_block_type')):\n\n acf_register_block_type(array(\n 'name' => 'hero',\n 'title' => __('Hero'),\n 'render_template' => 'template-parts/blocks/hero/hero.php',\n 'category' => 'custom-blocks',\n 'icon' => 'admin-site',\n 'keywords' => array('hero', 'carousel'),\n 'supports' => array(\n 'align' => false,\n ),\n ));\n\n endif;\n }",
"function get_block_template($id, $template_type = 'wp_template')\n {\n }",
"function _add_block_template_info($template_item)\n {\n }",
"function register_block_core_shortcode()\n {\n }",
"public function registerBlock()\n {\n register_block_type( 'mtk-plugin/cptshortcode' , array (\n 'editor_script' => 'mtk_cptshortcode_editor',\n 'editor_style' => 'mtk_cptshortcode_editor',\n 'style' => 'mtk_cptshortcode',\n ) );\n\n }",
"function date_tools_wizard_create_blocks($type_name) {\n $current_theme = variable_get('theme_default', 'garland');\n \n // Legend block.\n $block = new stdClass();\n $block->theme = $current_theme;\n $block->status = 1;\n $block->weight = -1;\n $block->region = 'left';\n $block->title = '';\n $block->module = 'calendar';\n $block->delta = 0;\n date_tools_wizard_add_block($block);\n \n // Mini calendar block. \n $block->module = 'views';\n $block->delta = 'calendar_'. $type_name .'-calendar_block_1';\n date_tools_wizard_add_block($block); \n \n // Upcoming events block.\n $block->module = 'views';\n $block->delta = 'calendar_'. $type_name .'-block_1';\n date_tools_wizard_add_block($block);\n return; \n}",
"function ws_blocks_register() {\n wp_register_script(\n 'ws-blocks-editor-script', \n plugins_url('dist/editor.js', __FILE__),\n //Array of dependencies\n array(\n 'wp-blocks',\n 'wp-i18n',\n 'wp-element', \n 'wp-editor', \n 'wp-components', \n 'wp-block-editor', \n 'wp-blob',\n 'wp-data'\n )\n );\n\n wp_register_style(\n 'ws-blocks-editor-style',\n plugins_url('dist/editor.css', __FILE__),\n //Array of dependencies - our stylesheet is loaded after this one\n array('wp-edit-blocks')\n );\n\n //Scripts and Styles for Front End\n wp_register_script(\n 'ws-blocks-script', \n plugins_url('dist/script.js', __FILE__),\n //load after jquery\n array('jquery')\n );\n\n wp_register_style(\n 'ws-blocks-style', \n plugins_url('dist/style.css', __FILE__)\n );\n\n ws_block_register_block_type('hero-banner');\n ws_block_register_block_type('story-block');\n ws_block_register_block_type('text-banner');\n}",
"function register_block() {\n\n\t// Define our assets.\n\t$editor_script = 'build/index.js';\n\t$editor_style = 'build/index.css';\n\t$frontend_style = 'build/style-index.css';\n\t$frontend_script = 'build/frontend.js';\n\n\t// Verify we have an editor script.\n\tif ( ! file_exists( plugin_dir_path( __FILE__ ) . $editor_script ) ) {\n\t\twp_die( esc_html__( 'Whoops! You need to run `npm run build` for the WDS Block Starter first.', 'wdsbs' ) );\n\t}\n\n\t// Autoload dependencies and version.\n\t$asset_file = require plugin_dir_path( __FILE__ ) . 'build/index.asset.php';\n\n\t// Register editor script.\n\twp_register_script(\n\t\t'wdsbs-editor-script',\n\t\tplugins_url( $editor_script, __FILE__ ),\n\t\t$asset_file['dependencies'],\n\t\t$asset_file['version'],\n\t\ttrue\n\t);\n\n\t// Register editor style.\n\tif ( file_exists( plugin_dir_path( __FILE__ ) . $editor_style ) ) {\n\t\twp_register_style(\n\t\t\t'wdsbs-editor-style',\n\t\t\tplugins_url( $editor_style, __FILE__ ),\n\t\t\t[ 'wp-edit-blocks' ],\n\t\t\tfilemtime( plugin_dir_path( __FILE__ ) . $editor_style )\n\t\t);\n\t}\n\n\t// Register frontend style.\n\tif ( file_exists( plugin_dir_path( __FILE__ ) . $frontend_style ) ) {\n\t\twp_register_style(\n\t\t\t'wdsbs-style',\n\t\t\tplugins_url( $frontend_style, __FILE__ ),\n\t\t\t[],\n\t\t\tfilemtime( plugin_dir_path( __FILE__ ) . $frontend_style )\n\t\t);\n\t}\n\n\t// Register block with WordPress.\n\tregister_block_type( 'wdsbs/rich-text-demo', array(\n\t\t'editor_script' => 'wdsbs-editor-script',\n\t\t'editor_style' => 'wdsbs-editor-style',\n\t\t'style' => 'wdsbs-style',\n\t) );\n\n\t// Register frontend script.\n\tif ( file_exists( plugin_dir_path( __FILE__ ) . $frontend_script ) ) {\n\t\twp_enqueue_script(\n\t\t\t'wdsbs-frontend-script',\n\t\t\tplugins_url( $frontend_script, __FILE__ ),\n\t\t\t$asset_file['dependencies'],\n\t\t\t$asset_file['version'],\n\t\t\ttrue\n\t\t);\n\t}\n}",
"function register_block( $name ) {\n\t\n\t\t\tacf_register_block( array(\n\t\t\t\t'name' => str_replace('-', ' ', $name),\n\t\t\t\t'title' => __( str_replace('-', ' ', ucwords( $name, '-' )), 'genlite' ),\n\t\t\t\t'description' => __( str_replace('-', ' ', ucwords( $name, '-' )) . ' block.', 'genlite' ),\n\t\t\t\t'render_callback' => function( $block, $content = '', $is_preview = false ) {\n\t\t\t\t\t$context = Timber::context();\n\t\t\t\t\n\t\t\t\t\t// Store block values.\n\t\t\t\t\t$context['block'] = $block;\n\t\t\t\t\n\t\t\t\t\t// Store field values.\n\t\t\t\t\t$context['fields'] = get_fields();\n\t\t\t\t\n\t\t\t\t\t// Store $is_preview value.\n\t\t\t\t\t$context['is_preview'] = $is_preview;\n\n\t\t\t\t\t// Render the block.\n\t\t\t\t\tTimber::render( 'templates/blocks/' . str_replace(' ', '-', strtolower( $block['title'] )) . '.twig', $context );\n\t\t\t\t},\n\t\t\t\t'category' => 'genlite-blocks',\n\t\t\t\t'icon' => '',\n\t\t\t\t'keywords' => array( $name ),\n\t\t\t\t'mode' \t\t\t => 'edit'\n\t\t\t) );\t\n\t\t}",
"protected function setupTemplate() {\r\n \r\n }",
"function event_details_cpt_single_blocks( $blocks ) {\n // Add new blocks with custom function output\n // Below is an example with an anonymous function but you can use custom functions as well ;)\n $blocks['custom_block'] = function() {\n\n echo '';\n\n };\n\n // Remove these content blocks\n unset( $blocks['comments'] );\n\t unset( $blocks['meta'] );\n\t unset( $blocks['title'] );\n\t unset( $blocks['media'] );\n\t\n // Return blocks\n return $blocks;\n\n}",
"public function locatedTemplate() {\r\n wp_enqueue_script(\r\n 'mvvwb-gallery',\r\n MVVWB_GALLERY_TEMPLATE_BASE . 'index.js',\r\n [],\r\n MVVWB_GALLERY_TEMPLATE_VERSION\r\n );\r\n\r\n foogallery_enqueue_style(\r\n 'mvvwb-gallery',\r\n MVVWB_GALLERY_TEMPLATE_BASE . 'style.css',\r\n [],\r\n MVVWB_GALLERY_TEMPLATE_VERSION\r\n );\r\n }",
"function register_dynamic_block_action() {\n\n\twp_register_script(\n\t\t'my-first-dynamic-gutenberg-block-script',\n\t\tplugins_url( 'myblock.js', __FILE__ ),\n\t\tarray( 'wp-blocks', 'wp-element' ),\n\t\ttrue\n\t);\n\n\tregister_block_type(\n\t\t'my-first-dynamic-gutenberg-block/latest-post',\n\t\tarray(\n\t\t\t'editor_script' => 'my-first-dynamic-gutenberg-block-script',\n\t\t\t'render_callback' => 'my_plugin_render_block_latest_post',\n\t\t)\n\t);\n\n}",
"function wcdet_require_gutenberg() {\n\t?>\n\t<div class=\"error\"><p><?php esc_html_e( 'WordCamp Detroit Gutenberg Blocks requires that the Gutenberg plugin is activated.', 'wcdet' ); ?></p></div>\n\t<?php\n\n\tdeactivate_plugins( array( 'wcdet-blocks/wcdet-blocks.php' ) );\n}",
"function loadMyBlock() {\n wp_enqueue_script(\n 'my-new-block',\n plugin_dir_url(__FILE__) . 'catalog-block-build.js',\n array('wp-blocks','wp-editor'),\n true\n );\n}",
"function xcontent_tag_block_cloud_show($options)\n{\n include_once XOOPS_ROOT_PATH.\"/modules/tag/blocks/block.php\";\n return tag_block_cloud_show($options, $module_dirname);\n}",
"function theme_acf_block_render_callback( $block ) {\n // convert name (\"acf/testimonial\") into path friendly slug (\"testimonial\")\n $slug = str_replace('acf/', '', $block['name']);\n\n // include a template part from within the \"template-parts/block\" folder\n if( file_exists( get_theme_file_path(\"/templates/blocks/{$slug}.php\") ) ) {\n include( get_theme_file_path(\"/templates/blocks/{$slug}.php\") );\n }\n}",
"function render_block_core_shortcode($attributes, $content)\n {\n }",
"function get_block_file_template($id, $template_type = 'wp_template')\n {\n }",
"function felix_block_names() {\n \n $blocks = array(\n 'disabled' => __( 'Disabled', 'felix-landing-page' ),\n 'header' => __( 'Header', 'felix-landing-page' ),\n 'jumbotron' => __( 'Hero', 'felix-landing-page' ),\n 'navbar' => __( 'Navigation Bar', 'felix-landing-page' ),\n 'products' => __( 'Featured Products', 'felix-landing-page' ),\n 'content' => __( 'Content', 'felix-landing-page' ),\n 'articles' => __( 'Featured Articles', 'felix-landing-page' ),\n 'footer' => __( 'Footer' )\n );\n \n return $blocks;\n \n}",
"function register_block_core_comment_template()\n {\n }",
"function render_tut06b_block( $atts, $content ) {\n\n if( function_exists( 'get_current_screen' ) ) { return; }\n\n \n $title = isset( $atts['title']) ? \"<h2>{$atts['title']}</h2>\" : '';\n $image = isset( $atts['mediaURL'] ) ? \"<img src='{$atts['mediaURL']}'>\" : '';\n $ingredients = isset( $atts['ingredients'] ) ? \"<ul>{$atts['ingredients']}</ul>\" : '';\n\n ob_start();\n\n echo \"<div class='recipe'>\n {$title}\n <h4> Ingredients </h4>\n {$ingredients}\n {$image}\n <h4> Steps </h4>\n {$content}\n </div>\";\n\n return ob_get_clean(); // prevent error when updating, I'm honestly not sure how\n}",
"function register_blocks() {\t\n\n // Fail if block editor is not supported\n\tif ( ! function_exists( 'register_block_type' ) ) {\n\t\treturn;\n\t}\n\n // List all of the blocks for your plugin\n $blocks = [\n \"antaresplugin/gallery\",\n ];\n\n // Register each block with same CSS and JS\n foreach( $blocks as $block ) {\n if( \"antaresplugin/gallery\" === $block ) { \n register_block_type( $block, [\n 'editor_script' => 'antares-plugin-editor-js',\n 'editor_style' => 'antares-plugin-editor-css',\n 'style' => 'antares-plugin-css',\n 'attributes' => [ \n 'images' => [\n 'type' => \"array\",\n 'default' => []\n ],\n 'direction' => [\n 'type'=> \"string\",\n 'default' => \"row\"\n ],\n 'isLightboxEnabled' => [\n 'type' => \"boolean\",\n 'default' => true\n ]\n ]\n ] );\t \n }\n else { \n register_block_type( $block, [\n 'editor_script' => 'antares-plugin-editor-js',\n 'editor_style' => 'antares-plugin-editor-css',\n 'style' => 'antares-plugin-css'\n ] );\t \n }\n }\n\n}",
"public function content_template()\n {\n }",
"public function content_template()\n {\n }",
"public function content_template()\n {\n }",
"public function content_template()\n {\n }",
"public function content_template()\n {\n }",
"public function content_template()\n {\n }",
"public function content_template()\n {\n }",
"public function content_template()\n {\n }",
"public function content_template()\n {\n }",
"public function content_template()\n {\n }",
"public function testCompileBlockStartSubTemplates()\n {\n $result = $this->smarty->fetch('test_block_include_root.tpl');\n $this->assertContains('page 1', $result);\n $this->assertContains('page 2', $result);\n $this->assertContains('page 3', $result);\n $this->assertContains('block 1', $result);\n $this->assertContains('block 2', $result);\n $this->assertContains('block 3', $result);\n }",
"function register_blocks() {\n\trequire_once DKOO_BLOCKS_PATH . 'blocks/background-video/index.php';\n\tBackgroundVideo\\register_block();\n}",
"function my_acf_block_render_callback( $block ) {\n $slug = str_replace('acf/', '', $block['name']);\n \n // include a template part from within the \"template-parts/block\" folder\n if( file_exists( get_theme_file_path(\"/assets/views/template-parts/block/content-{$slug}.php\") ) ) {\n include( get_theme_file_path(\"/assets/views/template-parts/block/content-{$slug}.php\") );\n }\n}",
"public function register_blocks() {\n\t\t}",
"function gutenberg_register_template_part_post_type() {\n\tif ( ! gutenberg_supports_block_templates() ) {\n\t\treturn;\n\t}\n\n\t$labels = array(\n\t\t'name' => __( 'Template Parts', 'gutenberg' ),\n\t\t'singular_name' => __( 'Template Part', 'gutenberg' ),\n\t\t'menu_name' => _x( 'Template Parts', 'Admin Menu text', 'gutenberg' ),\n\t\t'add_new' => _x( 'Add New', 'Template Part', 'gutenberg' ),\n\t\t'add_new_item' => __( 'Add New Template Part', 'gutenberg' ),\n\t\t'new_item' => __( 'New Template Part', 'gutenberg' ),\n\t\t'edit_item' => __( 'Edit Template Part', 'gutenberg' ),\n\t\t'view_item' => __( 'View Template Part', 'gutenberg' ),\n\t\t'all_items' => __( 'All Template Parts', 'gutenberg' ),\n\t\t'search_items' => __( 'Search Template Parts', 'gutenberg' ),\n\t\t'parent_item_colon' => __( 'Parent Template Part:', 'gutenberg' ),\n\t\t'not_found' => __( 'No template parts found.', 'gutenberg' ),\n\t\t'not_found_in_trash' => __( 'No template parts found in Trash.', 'gutenberg' ),\n\t\t'archives' => __( 'Template part archives', 'gutenberg' ),\n\t\t'insert_into_item' => __( 'Insert into template part', 'gutenberg' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this template part', 'gutenberg' ),\n\t\t'filter_items_list' => __( 'Filter template parts list', 'gutenberg' ),\n\t\t'items_list_navigation' => __( 'Template parts list navigation', 'gutenberg' ),\n\t\t'items_list' => __( 'Template parts list', 'gutenberg' ),\n\t);\n\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'description' => __( 'Template parts to include in your templates.', 'gutenberg' ),\n\t\t'public' => false,\n\t\t'has_archive' => false,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => 'themes.php',\n\t\t'show_in_admin_bar' => false,\n\t\t'show_in_rest' => true,\n\t\t'rest_base' => 'template-parts',\n\t\t'rest_controller_class' => 'Gutenberg_REST_Templates_Controller',\n\t\t'map_meta_cap' => true,\n\t\t'supports' => array(\n\t\t\t'title',\n\t\t\t'slug',\n\t\t\t'excerpt',\n\t\t\t'editor',\n\t\t\t'revisions',\n\t\t),\n\t);\n\n\tregister_post_type( 'wp_template_part', $args );\n}",
"protected function content_template()\n\t{\n\t\t//\n\t}",
"function register_block_core_gallery() {\n\tregister_block_type_from_metadata(\n\t\t__DIR__ . '/gallery',\n\t\tarray(\n\t\t\t'render_callback' => function ( $attributes, $content ) {\n\t\t\t\treturn $content;\n\t\t\t},\n\t\t)\n\t);\n}",
"protected function _content_template() {\n \n }",
"function ju_block($c, $data = [], string $template = '', array $vars = []) {\n\tif (is_string($data)) {\n\t\t$template = $data;\n\t\t$data = [];\n\t}\n\t/**\n\t * 2016-11-22\n\t * В отличие от Magento 1.x, в Magento 2 нам нужен синтаксис ['data' => $data]:\n\t * @see \\Magento\\Framework\\View\\Layout\\Generator\\Block::createBlock():\n\t * $block->addData(isset($arguments['data']) ? $arguments['data'] : []);\n\t * https://github.com/magento/magento2/blob/2.1.2/lib/internal/Magento/Framework/View/Layout/Generator/Block.php#L240\n\t * В Magento 1.x было не так:\n\t * https://github.com/OpenMage/magento-mirror/blob/1.9.3.1/app/code/core/Mage/Core/Model/Layout.php#L482-L491\n\t */\n\t/** @var AbstractBlock|BlockInterface|Template $r */\n\t$r = ju_layout()->createBlock(\n\t\t$c ?: (ju_is_backend() ? BackendTemplate::class : Template::class), jua($data, 'name'), ['data' => $data]\n\t);\n\t# 2019-06-11\n\tif ($r instanceof Template) {\n\t\t# 2016-11-22\n\t\t$r->assign($vars);\n\t}\n\tif ($template && $r instanceof Template) {\n\t\t$r->setTemplate(ju_phtml_add_ext($template));\n\t}\n\treturn $r;\n}",
"public static function getTemplateBlock()\n {\n return self::$templateBlock;\n }",
"public function register_blocks() {\n\t\tif ( function_exists( 'register_block_type' ) ) {\n\t\t\tregister_block_type(\n\t\t\t\t\"civil/{$this->slug}\",\n\t\t\t\t[\n\t\t\t\t\t'editor_script' => 'block-js-' . $this->slug,\n\t\t\t\t\t'render_callback' => function( array $attributes ) {\n\t\t\t\t\t\treturn $this->render_block_data( $attributes );\n\t\t\t\t\t},\n\t\t\t\t\t'attributes' => [\n\t\t\t\t\t\t'title' => [\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'default' => __( 'CTA Title', 'civil-first-fleet' ),\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'cta_text' => [\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'default' => __( 'CTA Description', 'civil-first-fleet' ),\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'cta_button_text' => [\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'default' => __( 'CTA Button', 'civil-first-fleet' ),\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'newsletter' => [\n\t\t\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'newsletter_list' => [\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t]\n\t\t\t);\n\t\t}\n\n\t\treturn $this;\n\t}",
"function myblocks() {\n $this->name=\"myblocks\";\n $this->title=\"<#LANG_MODULE_MYBLOCKS#>\";\n $this->module_category=\"<#LANG_SECTION_SETTINGS#>\";\n $this->checkInstalled();\n}",
"function ajarRegisterBlock() {\n\n //Archivo php generado del builds\n $assets = include_once get_template_directory().'/blocks/build/index.asset.php';\n\n wp_register_script(\n 'ajar-block', // handle del script\n get_template_directory_uri().'/blocks/build/index.js', //url del directorio\n $assets['dependencies'], //all dep\n $assets['version'] // cada build cambia la version, para evitaas conflictos de cache\n );\n\n register_block_type(\n 'ajar/basic',\n array(\n 'editor_script' => 'ajar-block', //copiar el script ya registrado\n 'attributes' => array( //repetimos los attr del block de index.js\n 'content' => array(\n 'type' => \"string\",\n 'default' => 'Hello World'\n ),\n 'mediaURL' => array(\n \"type\" => 'string'\n ),\n 'mediaAlt' => array(\n \"type\" => 'string'\n ),\n ),\n 'render_callback' => 'ajarRenderDinamycBlock' //funcion para generar el SSR(server side render)\n )\n );\n}",
"public function __construct() {\n // update default vars with configuration file\n SELF::updateVars();\n // filter gutenberg blocks\n if(!empty($this->WPgutenberg_AllowedBlocks)):\n add_filter( 'allowed_block_types', array($this, 'AllowGutenbergBlocks'), 100 );\n endif;\n // add gutenberg style options\n if(!empty($this->WPgutenberg_Stylesfile)):\n add_action( 'enqueue_block_editor_assets', array($this, 'AddBackendStyleOptions'), 100 );\n endif;\n // disable gutenberg\n if($this->WPgutenberg_active == 0):\n SELF::DisableGutenberg();\n endif;\n // disable Gutenberg block styles\n if($this->WPgutenberg_css == 0):\n add_action( 'wp_enqueue_scripts', array($this, 'DisableGutenbergCSS'), 100 );\n endif;\n // add theme support\n SELF::CustomThemeSupport();\n // register custom blocks\n add_action( 'init', array($this, 'WPgutenbergCustomBlocks') );\n // Change inline font size to var\n if($this->WPgutenberg_fontsizeScaler == 0):\n add_filter('the_content', array($this, 'InlineFontSize') );\n endif;\n }",
"function get_default_block_template_types()\n {\n }",
"function render_block_core_block($attributes)\n {\n }",
"function _resolve_home_block_template()\n {\n }",
"protected function _content_template() {\n ?>\n\n\n\n <section id=\"intro\">\n\n <div class=\"intro-content\">\n <h2>{{{settings.title}}}</h2>\n <div>\n <a href=\"#about\" class=\"btn-get-started scrollto\">\n {{{settings.button1_text}}}\n </a>\n <a href=\"#portfolio\" class=\"btn-projects scrollto\">\n {{{settings.button2_text}}}\n </a>\n </div>\n </div>\n\n <div id=\"intro-carousel\" class=\"owl-carousel\" >\n\n <# _.each( settings.gallery, function( image ) { #>\n\n <div class=\"item\" style=\"background-image: url('{{ image.url }}');\"></div>\n <# }); #>\n\n </div>\n\n </section><!-- #intro -->\n \n <?php\n }",
"public function createACFBlock()\n {\n if (function_exists('acf_register_block_type')) {\n acf_register_block_type(\n array(\n 'name' => 'acfBlock',\n 'title' => __('ACF Block'),\n 'description' => __('A custom block that incorporates ACF fields.'),\n 'render_callback' => array($this, 'renderACFBlock'),\n 'category' => 'widgets',\n 'icon' => array('background' => '#ecf6f6', 'src' => 'email'),\n 'keywords' => array('example', 'acf'),\n 'mode' => 'edit'\n )\n );\n }\n }",
"public function page_content__main() {\n\n echo '<h3>' . __('Blocks', 'wpucacheblocks') . '</h3>';\n foreach ($this->blocks as $id => $block) {\n echo '<p>';\n echo '<strong>' . $id . ' - ' . $block['path'] . '</strong><br />';\n $_expiration = (is_bool($block['expires']) ? __('never', 'wpucacheblocks') : $block['expires'] . 's');\n echo sprintf(__('Expiration: %s', 'wpucacheblocks'), $_expiration);\n\n $prefixes = $this->get_block_prefixes($id);\n\n foreach ($prefixes as $prefix) {\n echo $this->display_block_cache_status($id, $prefix);\n }\n\n echo '<br />';\n if (!apply_filters('wpucacheblocks_bypass_cache', false, $id)) {\n if (isset($block['callback_prefix'])) {\n submit_button(__('Clear', 'wpucacheblocks'), 'secondary', 'clear__' . $id, false);\n } else {\n submit_button(__('Reload', 'wpucacheblocks'), 'secondary', 'reload__' . $id, false);\n }\n } else {\n echo __('A bypass exists for this block. Regeneration is only available in front mode.', 'wpucacheblocks');\n }\n echo '</p>';\n echo '<hr />';\n }\n }",
"function gutenberg_cardContent_block_admin()\n{\n wp_enqueue_script(\n 'gutenberg-block-card-content',\n CH_THEME_URI . '/blocks/card-content/block.js',\n array('wp-blocks', 'wp-element'),\n CH_VERSION\n\n );\n\n wp_enqueue_style(\n 'gutenberg-notice-block-editor',\n CH_THEME_URI . '/blocks/card-content/block.css',\n array(),\n CH_VERSION\n );\n}",
"protected function _content_template()\n {\n\n }",
"function render_block_core_file($attributes, $content, $block)\n {\n }",
"function _inject_theme_attribute_in_block_template_content($template_content)\n {\n }",
"function _build_block_template_result_from_file($template_file, $template_type)\n {\n }",
"function ca_design_system_custom_wp_block_pattern_agenda()\n{\n\n if (!function_exists('register_block_pattern')) {\n // Gutenberg is not active.\n return;\n }\n\n /**\n * Register Block Pattern\n */\n register_block_pattern(\n 'ca-design-system/agenda',\n array(\n 'title' => __('Agenda', 'ca-design-system'),\n 'description' => __('Agenda layout', 'Block pattern description', 'ca-design-system'),\n 'content' => '<!-- wp:columns -->\n <div class=\"wp-block-columns has-2-columns\">\n <!-- wp:column {\"width\":\"66.66%\"} -->\n <div id=\"main-content\" class=\"wp-block-column\" style=\"flex-basis:66.66%\">\n \n </div>\n <!-- /wp:column -->\n\n <!-- wp:column {\"width\":\"33.33%\"} -->\n <div class=\"wp-block-column\" style=\"flex-basis:33.33%\">\n\n </div>\n <!-- /wp:column --> \n </div><!-- /wp:columns -->',\n \"categories\" => array('ca-design-system'),\n )\n );\n}",
"function theme_allowed_block_types($allowed_blocks, $post) {\n\n // if(get_page_template_slug( $post ) === 'template-name.php') {\n // return array();\n // }\n\n return array(\n 'acf/xxx',\n 'acf/home-hero',\n 'acf/text-image-right',\n 'acf/image-left-text', \n 'acf/prospectives-listen',\n 'acf/perspectives-read',\n 'acf/perspectives-learn', \n 'acf/perspectives-generic', \n );\n}",
"function sk_the_page_blocks(){\n\n // check for the existance of ACF\n if ( function_exists( 'have_rows' ) === false ){\n return false;\n }\n\n // the page blocks repeater field\n $newBlocks = 'sk_page_blocks';\n\n\n if( have_rows( $newBlocks ) ) : ?>\n \n <div class=\"secondary-content\">\n\n <?php // loop through the rows of data ?>\n <?php while ( have_rows($newBlocks) ) : the_row(); ?>\n <?php $block = get_row_layout(); ?>\n\n <section class=\"sk-block<?php echo $block ? \" block--$block\" : \"\"; ?>\">\n <?php\n //\n // - example implementation of getting the header field\n // for each of the blocks\n //\n // sk_block_field( 'sk_page_block_title' , array(\n // 'before' => '<header class=\"page-module-title\"><h2>',\n // 'after' => '</h2></header>'\n // ));\n\n get_template_part('blocks/block', $block);\n ?>\n\n </section><!-- .sk-module -->\n <?php endwhile; ?>\n\n </div><!-- .secondary-content -->\n<?php\n endif;\n}",
"function render_block_core_comment_template($attributes, $content, $block)\n {\n }",
"public function processBlockTemplate(Block $block)\n {\n $templateFileRawContents = $this->getThemeTemplateFileContents($block);\n $blockNameInTemplate = $this->addBlockToTheResultViewParamsSet($block);\n\n // Check if the required directive present in the template file\n if (!strstr($templateFileRawContents, self::BLOCK_TEMPLATE_DIRECTIVE)) {\n throw new \\Exception(\n \"There is no required directive {self::BLOCK_TEMPLATE_DIRECTIVE} in template {$block->getRoute()}\"\n );\n }\n $templateFileRawContents = str_replace(\n self::BLOCK_TEMPLATE_DIRECTIVE,\n \"\\$page->renderParam('$blockNameInTemplate')\",\n $templateFileRawContents\n );\n\n $this->content .= $templateFileRawContents . \"\\n\";\n }",
"public function loadTemplate()\n\t{\n\t\t$t_location = \\IPS\\Request::i()->t_location;\n\t\t$t_key = \\IPS\\Request::i()->t_key;\n\t\t\n\t\tif ( $t_location === 'block' and $t_key === '_default_' and isset( \\IPS\\Request::i()->block_key ) )\n\t\t{\n\t\t\t/* Find it from the normal template system */\n\t\t\tif ( isset( \\IPS\\Request::i()->block_app ) )\n\t\t\t{\n\t\t\t\t$plugin = \\IPS\\Widget::load( \\IPS\\Application::load( \\IPS\\Request::i()->block_app ), \\IPS\\Request::i()->block_key, mt_rand() );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$plugin = \\IPS\\Widget::load( \\IPS\\Plugin::load( \\IPS\\Request::i()->block_plugin ), \\IPS\\Request::i()->block_key, mt_rand() );\n\t\t\t}\n\t\t\t\n\t\t\t$location = $plugin->getTemplateLocation();\n\t\t\t\n\t\t\t$templateBits = \\IPS\\Theme::master()->getRawTemplates( $location['app'], $location['location'], $location['group'], \\IPS\\Theme::RETURN_ALL );\n\t\t\t$templateBit = $templateBits[ $location['app'] ][ $location['location'] ][ $location['group'] ][ $location['name'] ];\n\t\t\t\n\t\t\tif ( ! isset( \\IPS\\Request::i()->noencode ) OR ! \\IPS\\Request::i()->noencode )\n\t\t\t{\n\t\t\t\t$templateBit['template_content'] = htmlentities( $templateBit['template_content'], ENT_DISALLOWED, 'UTF-8', TRUE );\n\t\t\t}\n\t\t\t\n\t\t\t$templateArray = array(\n\t\t\t\t'template_id' \t\t\t=> $templateBit['template_id'],\n\t\t\t\t'template_key' \t\t\t=> 'template_' . $templateBit['template_name'] . '.' . $templateBit['template_id'],\n\t\t\t\t'template_title'\t\t=> $templateBit['template_name'],\n\t\t\t\t'template_desc' \t\t=> null,\n\t\t\t\t'template_content' \t\t=> $templateBit['template_content'],\n\t\t\t\t'template_location' \t=> null,\n\t\t\t\t'template_group' \t\t=> null,\n\t\t\t\t'template_container' \t=> null,\n\t\t\t\t'template_rel_id' \t\t=> null,\n\t\t\t\t'template_user_created' => null,\n\t\t\t\t'template_user_edited' => null,\n\t\t\t\t'template_params' \t => $templateBit['template_data']\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif ( \\is_numeric( $t_key ) )\n\t\t\t\t{\n\t\t\t\t\t$template = \\IPS\\cms\\Templates::load( $t_key, 'template_id' );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$template = \\IPS\\cms\\Templates::load( $t_key );\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch( \\OutOfRangeException $ex )\n\t\t\t{\n\t\t\t\t\\IPS\\Output::i()->json( array( 'error' => true ) );\n\t\t\t}\n\n\t\t\tif ( $template !== null )\n\t\t\t{\n\t\t\t\t$templateArray = array(\n\t 'template_id' \t\t\t=> $template->id,\n\t 'template_key' \t\t\t=> $template->key,\n\t 'template_title'\t\t=> $template->title,\n\t 'template_desc' \t\t=> $template->desc,\n\t 'template_content' \t\t=> ( isset( \\IPS\\Request::i()->noencode ) AND \\IPS\\Request::i()->noencode ) ? $template->content : htmlentities( $template->content, ENT_DISALLOWED, 'UTF-8', TRUE ),\n\t 'template_location' \t=> $template->location,\n\t 'template_group' \t\t=> $template->group,\n\t 'template_container' \t=> $template->container,\n\t 'template_rel_id' \t\t=> $template->rel_id,\n\t 'template_user_created' => $template->user_created,\n\t 'template_user_edited' => $template->user_edited,\n\t 'template_params' \t => $template->params\n\t );\n\t\t\t}\n\t\t}\n\n\t\tif ( \\IPS\\Request::i()->show == 'json' )\n\t\t{\n\t\t\t\\IPS\\Output::i()->json( $templateArray );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\\IPS\\Output::i()->sendOutput( \\IPS\\Theme::i()->getTemplate( 'global', 'core' )->blankTemplate( \\IPS\\Theme::i()->getTemplate( 'templates', 'cms', 'admin' )->viewTemplate( $templateArray ) ), 200, 'text/html', \\IPS\\Output::i()->httpHeaders );\n\t\t}\n\t}",
"function achtvier_beitraege_block_init() {\n\t// Skip block registration if Gutenberg is not enabled/merged.\n\tif ( ! function_exists( 'register_block_type' ) ) {\n\t\treturn;\n\t}\n\t$dir = dirname( __FILE__ );\n\n\t$index_js = 'achtvier-beitraege/index.js';\n\twp_register_script(\n\t\t'achtvier-beitraege-block-editor',\n\t\tplugins_url( $index_js, __FILE__ ),\n\t\tarray(\n\t\t\t'wp-blocks',\n\t\t\t'wp-i18n',\n\t\t\t'wp-element',\n\t\t\t'wp-components',\n\t\t\t'wp-editor'\n\t\t),\n\t\tfilemtime( \"$dir/$index_js\" )\n\t);\n\n\t$editor_css = 'achtvier-beitraege/editor.css';\n\twp_register_style(\n\t\t'achtvier-beitraege-block-editor',\n\t\tplugins_url( $editor_css, __FILE__ ),\n\t\tarray(),\n\t\tfilemtime( \"$dir/$editor_css\" )\n\t);\n\n\t$style_css = 'achtvier-beitraege/style.css';\n\twp_register_style(\n\t\t'achtvier-beitraege-block',\n\t\tplugins_url( $style_css, __FILE__ ),\n\t\tarray(),\n\t\tfilemtime( \"$dir/$style_css\" )\n\t);\n\n\tregister_block_type( 'achtvier-blocks/achtvier-beitraege', array(\n\t\t'editor_script' => 'achtvier-beitraege-block-editor',\n\t\t'editor_style' => 'achtvier-beitraege-block-editor',\n\t\t'style' => 'achtvier-beitraege-block',\n\t\t'attributes' => array(\n\t'categories' => array(\n\t\t'type' => 'string',\n\t),\n\t'className' => array(\n\t\t'type' => 'string',\n\t),\n\t'postsToShow' => array(\n\t\t'type' => 'number',\n\t\t'default' => 5,\n\t),\n\t'displayPostDate' => array(\n\t\t'type' => 'boolean',\n\t\t'default' => false,\n\t),\n 'teaserLength' => array(\n\t\t'type' => 'number',\n\t\t'default' => 70,\n\t),\t\n\t'order' => array(\n\t\t'type' => 'string',\n\t\t'default' => 'desc',\n\t),\n\t'orderBy' => array(\n\t\t'type' => 'string',\n\t\t'default' => 'date',\n\t),\n),\n'render_callback' => 'render_achtvier_beitraege',\n\t) );\n}",
"protected function content_template()\n {\n }",
"protected function content_template()\n {\n }",
"protected function content_template()\n {\n }",
"protected function content_template()\n {\n }",
"protected function content_template()\n {\n }",
"protected function content_template()\n {\n }",
"protected function content_template() {}",
"protected function content_template() {}",
"protected function content_template() {\n\t}"
] | [
"0.6986451",
"0.6847508",
"0.67784405",
"0.6715505",
"0.66145074",
"0.6545084",
"0.6538023",
"0.64643425",
"0.6439282",
"0.6375696",
"0.63715935",
"0.6328911",
"0.627969",
"0.6213782",
"0.6187054",
"0.6170287",
"0.6125298",
"0.6106771",
"0.6093603",
"0.6089617",
"0.6086349",
"0.6078587",
"0.607278",
"0.60560566",
"0.603273",
"0.6022675",
"0.6022579",
"0.60224956",
"0.60219455",
"0.5985425",
"0.5973913",
"0.5970248",
"0.5965064",
"0.593783",
"0.5937182",
"0.5933611",
"0.5919135",
"0.5909413",
"0.5905189",
"0.59047097",
"0.5897364",
"0.5884235",
"0.5879369",
"0.5836875",
"0.58070856",
"0.58012855",
"0.5772719",
"0.57695574",
"0.5759494",
"0.5759037",
"0.57512623",
"0.57512623",
"0.57512623",
"0.57512623",
"0.57512623",
"0.57512623",
"0.57512623",
"0.57512623",
"0.57512623",
"0.57512623",
"0.5748213",
"0.5745751",
"0.5734466",
"0.5730641",
"0.57300264",
"0.56959826",
"0.5693316",
"0.56873226",
"0.5685985",
"0.5684965",
"0.56784683",
"0.56773174",
"0.56768894",
"0.56697553",
"0.5658004",
"0.5656946",
"0.56510097",
"0.56494814",
"0.56444186",
"0.5640765",
"0.56343573",
"0.5631662",
"0.5630748",
"0.5630191",
"0.562854",
"0.5627632",
"0.56105834",
"0.56084096",
"0.560826",
"0.55982494",
"0.5593619",
"0.559212",
"0.55891263",
"0.55891263",
"0.55891263",
"0.55891263",
"0.55891263",
"0.55891263",
"0.5586331",
"0.5586331",
"0.55832356"
] | 0.0 | -1 |
Render the element contents. | public function renderContents()
{
if ($this->close) {
echo '<button class="close" data-dismiss="alert">×</button>';
}
echo $this->message;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"final public function render() {\n\t\treturn $this->_view->getBaseView()->element($this->_name, $this->_data, $this->_options);\n\t}",
"public static function renderContent() {}",
"public function renderContent() {}",
"protected abstract function renderContent();",
"public function render() {\n if ($this->shouldRender) {\n $this->rendered = true;\n\n return $this->renderElement();\n }\n\n return \"\";\n }",
"public function render() {\n echo $this->getHtml();\n }",
"abstract protected function RenderContent();",
"public function render()\n {\n return $this->content;\n }",
"protected function renderElement() {\n $result = \"\";\n $result .= $this->getOpeningTag();\n $result .= (!empty($this->options['content'])) ? $this->options['content'] : \"\";\n $result .= $this->getClosingTag();\n return $result;\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render_content()\n {\n }",
"public function render()\n {\n $content = $this->__layoutContent();\n\n extract($this->getViewData());\n ob_start();\n include $content;\n ob_get_flush();\n }",
"public function render()\n {\n // dd( $this->createItemArray() );\n return $this->htmlFromArray($this->createItemArray());\n }",
"public function render()\n {\n return $this->renderChildren();\n }",
"public function render() {\n\n echo $this->html;\n\n }",
"final public function render()\n {\n echo $this->generateMarkup($this->sanitizeData());\n }",
"protected function render_content()\n {\n }",
"protected function render_content()\n {\n }",
"protected function render_content()\n {\n }",
"protected function render_content()\n {\n }",
"public function render( ){\n\t\treturn $this->__childWidget->render();\n\t}",
"public function render()\n {\n if ($this->enabled) {\n return $this->getRenderer()->render();\n }\n }",
"public function render()\n {\n return $this->getRenderer()->render($this);\n }",
"public function renderContent()\n {\n return $this->renderWith(static::class);\n }",
"public function render() {\n return $this->getRenderer()->render($this->getLayout() . $this->getContainer()->get('config')->get('template.extension'), $this->getData());\n }",
"public function render_content() {\n\t}",
"public function render() {\n\t\t$this->rendered = false;\n\t\tob_start();\n\t\t\t//RENDERING VIEW HERE\n\t\t\trequire_once(\"pages/View/\" . $this->_view);\n\t\t\t$this->content = ob_get_contents();\n\t\tob_end_clean();\n\t\t$this->rendered = true;\n\t\treturn ($this->content);\n\t}",
"public function run()\n {\n $this->renderContent();\n echo ob_get_clean();\n }",
"public function render() {\n\t\t$this->render_page_content();\n\t}",
"public function render ()\r\n\t{\r\n\t\t$this->decorate(); // decorate bofore render\r\n\t\treturn parent::render();\r\n\t}",
"public function render()\n {\n \n }",
"function Render() {\n $this->RenderChildren();\n }",
"public function render() {\n echo \"<!DOCTYPE html>\\n\";\n echo \"<html>\\n\";\n $this->show_head();\n \n echo\"\\n<body>\\n\";\n echo $this->show_contents();\n\n echo \"\\n</body>\";\n echo \"\\n</html>\\n\\n\";\n }",
"protected function render_content()\n {\n $value = $this->value();\n\n\n try {\n $this->value_array = json_decode($value, true);\n\n $this->value_json = $value;\n\n } catch (Exception $e) {\n $this->value_array = array();\n $this->value_json = \"{}\";\n }\n $this->render_default_values();\n\n $this->render_styling();\n }",
"public function renderContent() {\r\n\t\t$data\t= array(\r\n\t\t\t'id'\t\t=> $this->getID(),\r\n\t\t\t'statuses'\t=> $this->getStatusesInfos(),\r\n\t\t\t'selected'\t=> $this->getSelectedStatuses()\r\n\t\t);\r\n\r\n\t\treturn Todoyu::render($this->tmpl, $data);\r\n\t}",
"private function renderContent()\n {\n $this->tabs[$this->currentlyActiveTab()]->view()->render();\n }",
"public function render() {\n\t\t\t\n\t\t\t$this->_content = ob_get_contents();\n\t\t\tob_clean();\n\t\t\t\n\t\t\t$this->outputLine($this->_doctype);\n\t\t\t$this->outputLine('<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"' . $this->_lang . '\" lang=\"' . $this->_lang . '\" dir=\"' . $this->_dir . '\">');\n\t\t\t\n\t\t\t$this->renderHead();\n\t\t\t\n\t\t\t$this->renderBody();\n\t\t\t\n\t\t\t$this->outputLine('</html>');\n\t\t\t\n\t\t}",
"public function render() {\n\t\t\tif ( ! empty( $this->field['include'] ) && file_exists( $this->field['include'] ) ) {\n\t\t\t\trequire_once $this->field['include'];\n\t\t\t}\n\n\t\t\tif ( isset( $this->field['content_path'] ) && ! empty( $this->field['content_path'] ) && file_exists( $this->field['content_path'] ) ) {\n\t\t\t\t$this->field['content'] = $this->parent->filesystem->execute( 'get_contents', $this->field['content_path'] );\n\t\t\t}\n\n\t\t\tif ( ! empty( $this->field['content'] ) && isset( $this->field['content'] ) ) {\n\t\t\t\tif ( isset( $this->field['markdown'] ) && true === $this->field['markdown'] && ! empty( $this->field['content'] ) ) {\n\t\t\t\t\trequire_once dirname( __FILE__ ) . '/parsedown.php';\n\t\t\t\t\t$parsedown = new Parsedown();\n\n\t\t\t\t\techo( $parsedown->text( $this->field['content'] ) ); // WPCS: XSS ok.\n\t\t\t\t} else {\n\t\t\t\t\techo( $this->field['content'] ); // WPCS: XSS ok.\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// phpcs:ignore WordPress.NamingConventions.ValidHookName\n\t\t\tdo_action( 'redux-field-raw-' . $this->parent->args['opt_name'] . '-' . $this->field['id'] );\n\t\t}",
"public function renderElement($element);",
"public function render()\n {\n echo $this->__toString();\n\n }",
"public function render()\n {\n return $this->xmlDocument->saveHTML();\n }",
"public function renderAll() {\n return $this->render($this->getElements());\n }",
"public function render() {\r\n\t\t\r\n\t}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}",
"public function render() {}"
] | [
"0.7848687",
"0.77644217",
"0.76441365",
"0.75450087",
"0.7518432",
"0.7515462",
"0.74836475",
"0.74733484",
"0.7386198",
"0.724959",
"0.724959",
"0.724959",
"0.724959",
"0.724959",
"0.724959",
"0.724959",
"0.724959",
"0.724959",
"0.724959",
"0.724959",
"0.724959",
"0.724959",
"0.724959",
"0.7227997",
"0.7216399",
"0.7215311",
"0.7209461",
"0.7199821",
"0.7154531",
"0.7154531",
"0.7154531",
"0.7153882",
"0.71429783",
"0.7141315",
"0.7117431",
"0.71171266",
"0.7066429",
"0.7038323",
"0.70317143",
"0.7015319",
"0.7013317",
"0.6996802",
"0.6971254",
"0.6964018",
"0.6911214",
"0.6911042",
"0.6901765",
"0.6882644",
"0.68782336",
"0.6874405",
"0.68697894",
"0.6864059",
"0.6843753",
"0.68332744",
"0.68306816",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.6827838",
"0.682757",
"0.682757",
"0.682757",
"0.682757",
"0.682757",
"0.682757",
"0.682757",
"0.682757",
"0.682757",
"0.682757",
"0.682757"
] | 0.0 | -1 |
Create an info alert. | public static function info($message)
{
return new self($message, ['class' => 'alert alert-info']);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function _note($info){\n $confirm = array(\n 'class' => 'alert-info',\n 'head' => '提示:',\n 'body' => $info\n );\n $this->assign('confirmInfo',$confirm);\n }",
"public static function info($text)\n {\n \\Yii::$app->getSession()->addFlash('alerts', new Alert($text, 'info'));\n }",
"public static function info($title, $message, $class = \"\")\n {\n $alert = new Alert($title, $message, \"info\");\n\n if (strlen($class)) {\n $alert->addClass($class);\n }\n\n return $alert->render();\n }",
"function info(){\n global $tpl, $ilTabs;\n\n $ilTabs->activateTab(\"info\");\n\n $my_tpl = new ilTemplate(\"tpl.info.html\", true, true,\n \"Customizing/global/plugins/Services/Repository/RepositoryObject/MobileQuiz\");\n\n // info text\n $my_tpl->setVariable(\"INFO_TEXT\", $this->txt(\"info_text\"));\n // mail to\n $my_tpl->setVariable(\"MAIL_TO\", $this->txt(\"info_mailto\"));\n // Instructions\n $my_tpl->setVariable(\"INSTRUCTIONS\",$this->txt(\"info_instructions\"));\n\n $html = $my_tpl->get();\n\n $tpl->setContent($html);\n }",
"public function generateInfo($message) {\n\t\t\techo \"\n\t\t\t\t<div class='alert alert-info' role='alert'>\n\t\t\t\t\t{$message}\n\t\t\t\t</div>\n\t\t\t\";\n\t\t}",
"public function info($title, $message)\n\t{\n\t\treturn $this->create($title, $message, 'info');\n\t}",
"public function addInfoMessage($message)\r\n {\n $message = new Alert($message, Alert::ALERT_INFO);\n $this->fm->addMessage($message);\n \n return $this;\n }",
"public function toInfo() {\n\n\t\t# Set message type\n\t\t$type = \"error\";\n\t\tif($this->type == \"success\" || $this->type == \"notice\")\n\t\t\t$type = $this->type;\n\n\t\t# Add message\n\t\tInfo::add($this->getMessage(), $type);\n\n\t}",
"public static function info($message)\n {\n return '<div class=\"alert alert-info\">' . $message . '</div>';\n }",
"public abstract function showInfo();",
"public function detail(Alert $alert) : string;",
"function displayInfoMessage($index,$params = array()) {\n\t\tglobal $lang;\n\t\n\t\treturn '<div class=\"alert alert-info\">'.getLang('form_info_'.$index,$params).'</div>';\n\t}",
"public static function info() {\n\t\t# Get arguments to this function:\n\t\t$args = func_get_args();\n\n\t\t# Add message to log:\n\t\treturn self::add(LOG_INFO, $args);\n\t}",
"public function info($message, $title = null)\n {\n return $this->alert($message);\n }",
"public function _info($info){\r\n return array('title'=>$info->full, 'block'=>false);\r\n }",
"protected function _createAlertItem()\n {\n $alert = $this->_helper->createAlert(\n array(\n 'email' => NoShipmentsAlert_Helper_Data::PATH_EMAIL,\n 'identity' => NoShipmentsAlert_Helper_Data::PATH_IDENTITY,\n 'alert_template' => NoShipmentsAlert_Helper_Data::PATH_ALERT_TEMPLATE,\n 'alert_time' => NoShipmentsAlert_Helper_Data::PATH_ALERT_TIME,\n 'alert_type' => NoShipmentsAlert_Helper_Data::ALERT_TYPE,\n 'store_id' => $this->_storeId\n )\n );\n\n return $alert;\n }",
"function info($message, array $context = array());",
"public static function info($text = null)\n {\n self::message($text, 'info');\n }",
"public function info();",
"public function info();",
"public static function info($message)\n\t{\n\t\tstatic::write('Info', $message);\n\t}",
"public static function create()\n {\n list(\n $message,\n $callbackService,\n $callbackMethod,\n $callbackParams\n ) = array_pad( func_get_args(), 4, null);\n\n static::addToEventQueue( array(\n 'type' => \"alert\",\n 'properties' => array(\n 'message' => $message\n ),\n 'service' => $callbackService,\n 'method' => $callbackMethod,\n 'params' => $callbackParams ?? []\n ));\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"private function _warning($info){\n $confirm = array(\n 'class' => 'alert-warning',\n 'head' => '警告!',\n 'body' => $info\n );\n $this->assign('confirmInfo',$confirm);\n }",
"public static function info( $message, $name = '' ) {\n return self::add( $message, $name, 'info' );\n }",
"public function info($message) {}",
"public function actionInfo()\n {\n return $this->render('info');\n }",
"public function show(Info $info)\n {\n //\n }",
"public function show(Info $info)\n {\n //\n }",
"public static function info($message, $context);",
"protected function info()\n\t\t{\n\t\t}",
"public function info( $message )\n {\n $this->write( $this->success_file, $message );\n }",
"public function showConfirmInfo($info,$type){\n if(is_array($info)) $info = implode('<br />',$info);\n switch($type){\n case 1: // note info\n $this->_note($info);\n break;\n case 2: // waring info\n $this->_warning($info);\n break;\n case 3: // error info\n $this->_error($info);\n break;\n case 0:\n default: // success info\n $this->_success($info);\n break;\n }\n }",
"public function _insert_alert($info){\n global $dbconn, $config;\n $data = array( \"zabbix_eventid\" => intval($info['eventid']),\n\t\t\t\t\t\t\t\"is_ack\" => new MongoInt32($info['acknowledged']),\n\t\t\t\t\t\t\t\"zbx_host\" => $info['host'],\n\t\t\t\t\t\t\t\"zabbix_hostid\" => intval($info['hostid']),\n\t\t\t\t\t\t\t\"zabbix_server_id\" => (((intval($info['hostid']) - 10000) * 256) + 2),\n\t\t\t\t\t\t\t\"alert_message\" => $info['msg'],\n\t\t\t\t\t\t\t\"zabbix_trigger_description\" => $info['msg'],\n \"is_show\" => new MongoInt32(SHOW),\n\t\t\t\t\t\t\t\"clock\" => intval($info['clock']),\n\t\t\t\t\t\t\t\"create_date\" => intval($info['clock']),\n\t\t\t\t\t\t\t\"priority\" => new MongoInt32($info['priority']),\n\t\t\t\t\t\t\t\"zabbix_trigger_priority\" => new MongoInt32($info['priority']),\n\t\t\t\t\t\t\t\"source_from\" => SRC_FRM_ZABBIX,\n\t\t\t\t\t\t\t\"source_id\" => $info['triggerid'],\n\t\t\t\t\t\t\t\"zbx_zabbix_server_id\" => new MongoInt32(2),\n\t\t\t\t\t\t\t\"zbx_maintenance\" => new MongoInt32(0),\n\t\t\t\t\t\t\t\"level\" => new MongoInt32(0),\n\t\t\t\t\t\t\t\"num_of_case\" => new MongoInt32(0),\n\t\t\t\t\t\t\t\"zabbix_version\" => \"1.8\",\n\t\t\t\t\t\t\t\"ack_msg\" => \"\",\n\t\t\t\t\t\t\t\"affected_deals\" => \"\",\n\t\t\t\t\t\t\t\"attachments\" => \"\",\n\t\t\t\t\t\t\t\"description\" => \"\",\n\t\t\t\t\t\t\t\"external_status\" => \"\",\n\t\t\t\t\t\t\t\"internal_status\" => \"\",\n\t\t\t\t\t\t\t\"itsm_incident_id\" => \"\",\n\t\t\t\t\t\t\t\"ticket_id\" => \"\",\n\t\t\t\t\t\t\t\"title\" => \"\",\n\t\t\t\t\t\t\t\"update_date\" => \"\"\n );\n InsertAll($data,ZABBIX_MONITOR_ALERT_TABLE);\n }",
"public function info()\n {\n }",
"function info($message);",
"public function info($message)\n {\n $this->message($message, 'info');\n }",
"public function info($message)\n {\n }",
"public function info($message, array $context = array())\n {\n file_put_contents($this->filename, 'INFO: '. json_encode($context) . ' - ' . $message . \"\\r\\n\", FILE_APPEND);\n }",
"public function info($message)\n {\n $flash = $this->flashtype['info'];\n $flash['message'] = $message;\n $this->add($flash);\n }",
"public function info()\n {\n $this->appendLog('info', \\func_get_args());\n }",
"private function _success($info){\n $confirm = array(\n 'class' => 'alert-success',\n 'head' => '成功!',\n 'body' => $info\n );\n $this->assign('confirmInfo',$confirm);\n }",
"protected function infoScreenAction() {}",
"public function info($message, $title = null, $options = []) {\n $this->add('info', $message, $title, $options);\n }",
"public function info()\n {\n $this->isUser();\n\n $this->data['noCabinetOrAdmin'] = true;\n\n $userModel = new UserModel();\n\n $userInfo = $userModel->getUserByEmail(Session::get('login'));\n\n $this->data['info'] = $userInfo;\n\n $this->render('info');\n }",
"public function info($msg) {\n $this->writeLine($msg, 'info');\n }",
"public function info(): \\iota\\schemas\\response\\info {\n return $this->fetch([\n 'route' => \"info\",\n 'return' => \\iota\\schemas\\response\\Info::class,\n ]);\n }",
"public static function info($message = '') {\n self::writeLine($message, SELF::CLI_COLOR_DEFAULT, self::CLI_TYPE_INFO);\n }",
"public function info($message, array $context = array())\n {\n }",
"public function infoAction()\r\n\t{\r\n\t // load the helper and the registry\r\n\t $helper = Mage::helper('manager');\r\n\t $registry = $helper->getRegistry();\r\n // load the ID of the package to initialize and the package itself\r\n\t $id = $this->getRequest()->getParam('id');\r\n\t $package = Mage::getModel('manager/package');\r\n\t $package->load($id);\r\n // load the package information packagename and the channel's URL\r\n $info = $this->_packageInfo(\r\n $package->getName(),\r\n $package->getChannel()->getUrl()\r\n );\r\n // attach a message to the session\r\n\t\tMage::getSingleton('adminhtml/session')->addSuccess(\r\n\t\t Mage::helper('manager')->__(\r\n\t\t var_export($info, true)\r\n\t\t )\r\n\t\t);\r\n // redirect to the licence overview\r\n $this->_redirect('*/*/');\r\n\t}",
"abstract public function info(string $message, array $extra_data = []);",
"public static function alert() {\n\t\t# Get arguments to this function:\n\t\t$args = func_get_args();\n\n\t\t# Add message to log:\n\t\treturn self::add(LOG_ALERT, $args);\n\t}",
"public function add_info($info)\r\n { \r\n }",
"private function info() {\n $this->client->info();\n }",
"public function create()\n\t{\n\t\t$this->auth->restrict('Informations.Settings.Create');\n\n\t\tif (isset($_POST['save']))\n\t\t{\n\t\t\tif ($insert_id = $this->save_informations())\n\t\t\t{\n\t\t\t\t// Log the activity\n\t\t\t\t$this->activity_model->log_activity($this->current_user->id, lang('informations_act_create_record').': ' . $insert_id . ' : ' . $this->input->ip_address(), 'informations');\n\n\t\t\t\tTemplate::set_message(lang('informations_create_success'), 'success');\n\t\t\t\tredirect(SITE_AREA .'/settings/informations');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tTemplate::set_message(lang('informations_create_failure') . $this->informations_model->error, 'error');\n\t\t\t}\n\t\t}\n\t\tAssets::add_module_js('informations', 'informations.js');\n\n\t\tTemplate::set('toolbar_title', lang('informations'));\n\t\tTemplate::render();\n\t}",
"function info ($message, $class = NULL, $function = NULL, $file = NULL,\n $line = NULL)\n {\n\n $message =& new Message(array('m' => $message,\n 'c' => $class,\n 'F' => $function,\n 'f' => $file,\n 'l' => $line,\n 'N' => 'INFO',\n 'p' => LEVEL_INFO));\n\n $this->log($message);\n\n }",
"public function addInfoMessage($message) {\n\t\t$message = '<i class=\"fa fa-info\"></i> ' . $message;\n\t\t$this->addMessage($message, 'info');\n\t}",
"public function info($message = null, $newlines = 1, $level = Shell::NORMAL) {\n\t\t$this->out('<info>' . $message . '</info>', $newlines, $level);\n\t}",
"function appendInfo($info) {\n\t\t\t$this->responseVar['info'] .= $info.\"\\n<br>\\n\";\n\t\t}",
"public function info($title, $fields = array(), $header = true, $solid = false)\n\t{\n\t\treturn $this->box($title, 'info', $fields, $header, $solid);\n\t}",
"public function it_can_be_constructed_forINFO(): void\n {\n $sut = ChannelNotificationSeverity::INFO();\n self::assertInstanceOf(ChannelNotificationSeverity::class, $sut);\n }",
"public function info(string $message, array $extra_data = []);",
"abstract public function information();",
"public static function createAlert($id,$text,$type = ALERT_TYPE_INFO,$dismissible = FALSE,$saveDismiss = FALSE){\r\n\t\t$cookieName = \"registeredAlert\" . $id;\r\n\r\n\t\tif($dismissible == false){\r\n\t\t\techo '<div id=\"registeredalert' . $id . '\" class=\"alert alert-' . $type . '\">' . $text . '</div>';\r\n\t\t} else {\r\n\t\t\tif($saveDismiss == false || ($saveDismiss == true && !isset($_COOKIE[$cookieName]))){\r\n\t\t\t\t$d = $saveDismiss == true ? ' onClick=\"saveDismiss(\\'' . $id . '\\');\"' : \"\";\r\n\t\t\t\techo '<div id=\"registeredalert' . $id . '\" class=\"text-left alert alert-dismissible alert-' . $type . '\"><button id=\"registeredalertclose' . $id . '\" type=\"button\" class=\"close\" data-dismiss=\"alert\"' . $d . '>×</button>' . $text . '</div>';\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"function osc_add_flash_info_message($msg, $section = 'pubMessages') {\n Session::newInstance()->_setMessage($section, $msg, 'info');\n }",
"public function info(string $message)\n {\n $this->message('info', $message);\n }",
"function loggerInformation($msgInfo) {\n\t$logger = new Logger('./log');\n $logger->log('Information', 'infos', $msgInfo, Logger::GRAN_MONTH);\n}",
"function buildAlert($heading, $description, $type) {\n\t\techo \"<div class='alert $type' role='alert'><strong>$heading</strong>$description</div>\";\n\t}",
"public function create()\n {\n return view('infos.create');\n }",
"public function create()\n {\n return view('cli.informacion.create');\n }",
"public function infoAction() {\n $form = new Yourdelivery_Form_Testing_Specialresponse();\n if ($form->isValid($this->getRequest()->getPost())) {\n $email = new Yourdelivery_Sender_Email_Template('testing_cms_response');\n $email->setSubject('Testing-CMS-Special-Response');\n $email->assign('msg', $form->getValue('response'));\n $email->assign('tester', $form->getValue('executor'));\n $email->addTo('[email protected]');\n $email->addTo('[email protected]');\n if ($form->imagePath->isUploaded()) {\n $storage = new Default_File_Storage();\n $storage->setStorage(APPLICATION_PATH . '/../storage/');\n $storage->setSubFolder('testing/tmp/');\n $imageStorageName = time() . '_' . $form->getValue('imagePath');\n $storage->store($imageStorageName, file_get_contents($form->imagePath->getFileName()));\n $email->attachFile(APPLICATION_PATH . '/../storage/testing/tmp/' . $imageStorageName, \"image/png\", $form->getValue('imagePath'));\n unlink(APPLICATION_PATH . '/../storage/testing/tmp/' . $imageStorageName);\n }\n\n if ($email->send()) {\n $this->success('Email has been send.');\n } else {\n $this->error('Email failed.');\n }\n } else {\n $this->error($form->getMessages());\n }\n $this->_redirect('/testing_cms/');\n }",
"public static function info( $message ){\n return self::add( new Loco_error_Notice($message) );\n }",
"function alert($message, array $context = array());",
"public static function render_info_box() {\n\t\tinclude_once 'views/estimate/info.php';\n\t}",
"public function actionInfo() {\n\t\t$content = ModelBase::factory('Setting')->handleInfo($this->data);\n\n\t\tif ($content->get('updated')) $this->setAlert('info', 'Informasi terupdate!');\n\n\t\t// Template configuration\n\t\t$this->layout = 'modules/setting/index.tpl';\n\t\t$data = ModelBase::factory('Template')->getSettingData(compact('content'));\n\n\t\t// Render\n\t\treturn $this->render($data);\n\t}",
"public function infoAction() {\n\t\tob_clean();\n\t\tif(ini_get('zlib.output_compression')) {\n\t\t\theader(\"Content-encoding: gzip\");\t\t\n\t\t}\n\n\t\theader(\"Content-type: text/xml\");\t\t\n\t\techo '<?xml version=\"1.0\" encoding=\"UTF-8\"?><info>';\n\t\techo self::toXmlTag('version', $this->getExtensionVersion());\n\t\t$access = $this->verifyAccess(true);\n\t\techo self::toXmlTag('access', $access ? 'true' : 'false');\n\t\techo self::toXmlTag('clientIp', self::getClientIp());\n\t\tif($access) {\n\t\t\t$attributes = Mage::getResourceModel('catalog/product_attribute_collection')->getItems();\n\t\t\techo '<product_attributes>';\n\t\t\tforeach ($attributes as $attribute){\n\t\t\t\techo '<attribute>';\n\t\t\t \techo self::toXmlTag('attribute_code', $attribute->getAttributeCode());\n\t\t\t \techo self::toXmlTag('attribute_name', $attribute->getFrontendLabel());\n\t\t\t echo '</attribute>';\n\t\t\t}\n\t\t\techo '</product_attributes>';\n\t\t} \n\n\t\techo '</info>';\n\t\texit;\n\t}",
"public function info($message) {\n\t\techo \"{$message}\\n\";\n\t}",
"public function info($message, $trance = null)\n {\n $this->write('info', $message, $trance);\n }",
"private function _error($info){\n $confirm = array(\n 'class' => 'alert-danger',\n 'head' => '错误!',\n 'body' => $info\n );\n $this->assign('confirmInfo',$confirm);\n }",
"public function info($message, array $context = [])\n {\n }",
"public function info()\n {\n $info = [\n 'id' => $this->id,\n 'action' => $this->action,\n 'condition' => $this->condition,\n 'expressions' => $this->expressions,\n 'logMessageFormat' => $this->logMessageFormat,\n 'logLevel' => $this->logLevel,\n 'isFinalState' => $this->isFinalState,\n 'createTime' => $this->createTime,\n 'finalTime' => $this->finalTime,\n 'stackFrames' => array_map(function ($sf) {\n return $sf->info();\n }, $this->stackFrames),\n 'evaluatedExpressions' => array_map(function ($exp) {\n return $exp->info();\n }, $this->evaluatedExpressions),\n ];\n if ($this->labels) {\n $info['labels'] = $this->labels;\n }\n if ($this->userEmail) {\n $info['userEmail'] = $this->userEmail;\n }\n if ($this->location) {\n $info['location'] = $this->location->info();\n }\n if ($this->status) {\n $info['status'] = $this->status->info();\n }\n if ($this->variableTable) {\n $info['variableTable'] = $this->variableTable->info();\n }\n return $info;\n }",
"public function welcomInformations() {\n echo \"\\t\\t####################################\\t\\t\\n\";\n echo \"\\t\\t#\\n\";\n echo \"\\t\\t# \" . Utils::red(\"This is a Enterprise Backup Tool!\") . \"\\n\";\n echo \"\\t\\t#\\n\";\n echo \"\\t\\t####################################\\t\\t\\n\\n\";\n }",
"public function info() {\n $plugin = $this->viewVars['vv_authenticator']['Authenticator']['plugin'];\n $this->Authenticator->$plugin->setConfig($this->viewVars['vv_authenticator']); \n \n $this->set('vv_status', $this->Authenticator->$plugin->status($this->request->params['named']['copersonid']));\n \n $this->set('title_for_layout', $this->viewVars['vv_authenticator']['Authenticator']['description']);\n }",
"public function create()\n {\n return 'Cette action n\\'existe pas';\n }",
"public function info(){\n }",
"public function info(string $message): Notification\n {\n return $this->createMessageObject(Notification::TYPE_INFO, $message);\n }",
"public function displayFormCreatedMessage($info)\n {\n $L = $this->getLangStrings();\n\n $flag = $info[\"flag\"];\n\n if ($flag != \"notify_form_builder_form_created\") {\n return;\n }\n\n $message =<<< END\n{$L[\"notify_form_builder_form_created\"]}\n<ul style=\"margin-bottom: 0px\">\n <li><a href=\"https://docs.formtools.org/modules/form_builder/usage/tutorials/\" target=\"_blank\">{$L[\"phrase_quick_intro\"]}</a></li>\n <li><a href=\"https://docs.formtools.org/modules/form_builder/\" target=\"_blank\">{$L[\"phrase_form_builder_doc\"]}</a></li>\n</ul>\nEND;\n\n return array(\n \"found\" => true,\n \"g_success\" => true,\n \"g_message\" => $message\n );\n }",
"function print_alert($name=\"\") {\n\t\techo \"<br />\";\n\t\techo \"<div class='row'>\";\n\t\techo \"<div data-alert class='alert-box info round'>\".$name;\n\t\t\n\t\techo \"</div>\";\n\t\techo \"</div>\";\n\t}",
"public static function info($message, $attributes = array())\n\t{\n\t\treturn static::show(Labels::INFO, $message, $attributes);\n\t}",
"function setInfo($info) {\n\t\t\t$this->updateResponse('info', $info);\n\t\t}",
"protected function show($info=array()){\r\n $this->template->set($info);\r\n $this->template->toHtml($this);\r\n }",
"function showAlert($type, $alert) {\n $alert = \"<div class='alert alert-$type' role='alert'>\n <center>$alert</center>\n </div>\";\n return $alert;\n }",
"public static function info_box() {\n\t\tglobal $hook_suffix;\n\n\t\tif ( 'post.php' !== $hook_suffix ) {\n\t\t\treturn;\n\t\t}\n\n\t\tadd_meta_box(\n\t\t\t'munim_estimate_info_box',\n\t\t\t'Quick Info',\n\t\t\t[ __CLASS__, 'render_info_box' ],\n\t\t\t'munim_estimate',\n\t\t\t'side'\n\t\t);\n\t}",
"public function testInfoMessage()\n {\n $this->throwInfoException();\n\n // test if code actually gets here\n $this->assertTrue(true);\n }",
"public function info(string $text);",
"public static function factory(array $info);",
"public function info($message) {\n\t\t\t$this->log('info', $message);\n\t\t}",
"public function info($message, array $context = array())\n {\n return $this->addRecord(self::INFO, $message, $context);\n }",
"function info() {\n global $_TABLE, $_ADMIN;\n if(!isset($_POST['window'])) exit();\n\n $_MODULE['output'] = '[';\n $_MODULE['output'] .= '{';\n $_MODULE['output'] .= 'run:\"getware.ui.content.info.add\",';\n $_MODULE['output'] .= 'window:\"'.$_POST['window'].'\",';\n\n $rows = 'rows:[';\n $data = 'data:[';\n for($i = $_ADMIN['ini']; $i < $_ADMIN['end']; $i++) {\n # GENERA LOS POST QUE NO EXISTEN\n if($this->restrict($i))\n $value = 1;\n else $value = 0;\n\n $rows .= '\"' . $i . '\"';\n $data .= '\"' . $value . '\"';\n if($i < $_ADMIN['end'] - 1) {\n $rows .= ',';\n $data .= ',';\n }\n }\n $rows .= '],';\n $data .= ']';\n\n $_MODULE['output'] .= $rows;\n $_MODULE['output'] .= $data;\n\n $_MODULE['output'] .= '}';\n $_MODULE['output'] .= ']';\n //exit($_MODULE['output']);\n if(preg_match('/\"0\"/', $_MODULE['output']))\n exit($_MODULE['output']);\n else return true;\n}",
"function info($args)\n {\n $data['version'] = $this->view->version;\n return $data;\n }"
] | [
"0.66782737",
"0.6521923",
"0.63600296",
"0.63496655",
"0.6290926",
"0.62659985",
"0.6256639",
"0.6221046",
"0.6197816",
"0.61498046",
"0.61161137",
"0.60792154",
"0.60430175",
"0.6016249",
"0.5949514",
"0.5943097",
"0.5924529",
"0.5896398",
"0.58704615",
"0.58704615",
"0.58608615",
"0.5853517",
"0.5840307",
"0.58109146",
"0.58096373",
"0.5807564",
"0.5798089",
"0.5793523",
"0.5793523",
"0.57859004",
"0.57797456",
"0.5779636",
"0.57764167",
"0.5769389",
"0.5764763",
"0.5747937",
"0.5731175",
"0.5727369",
"0.571463",
"0.5713873",
"0.5707289",
"0.56881666",
"0.5687256",
"0.5682231",
"0.5669749",
"0.56684583",
"0.5668202",
"0.565874",
"0.56460303",
"0.5645043",
"0.5644007",
"0.563124",
"0.5626202",
"0.5620998",
"0.5606595",
"0.56047106",
"0.5602227",
"0.5592181",
"0.5583029",
"0.55744886",
"0.5573542",
"0.5566162",
"0.5562967",
"0.5556478",
"0.5541828",
"0.553514",
"0.55065256",
"0.5504559",
"0.5487902",
"0.54858595",
"0.5481402",
"0.5476183",
"0.5465547",
"0.54597247",
"0.54580843",
"0.54524106",
"0.54383177",
"0.54267114",
"0.54187",
"0.54080594",
"0.5376264",
"0.5372447",
"0.537069",
"0.53624034",
"0.5359386",
"0.5355997",
"0.5354636",
"0.5350286",
"0.5343685",
"0.5336853",
"0.53294957",
"0.5326746",
"0.53202754",
"0.5317824",
"0.5316431",
"0.5306544",
"0.5302025",
"0.52948916",
"0.52907836",
"0.5289443"
] | 0.65096074 | 2 |
Create an error alert. | public static function error($message)
{
return new self($message, ['class' => 'alert alert-error']);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function showError(){\n\t\techo json_encode(array(\n\t\t\t\"alert\" => \"error\",\n\t\t\t\"title\" => \"Failed to Create!\",\n\t\t\t\"message\" => \"Course Creation has been Failed\"\n\t\t));\n\t}",
"function errorCallbackReceiver()\n{\n echo ('\n <script>\n document.body.innerHTML=\"\";\n var new_element = document.createElement(\"h2\");\n new_element.innerHTML = \"Fatal error occurred on our service core system.\";\n document.body.appendChild(new_element);\n new_element = document.createElement(\"h2\");\n new_element.innerHTML = \"Please try again later.\";\n document.body.appendChild(new_element);\n </script>');\n die();\n}",
"public static function customErrorMsg()\n {\n echo \"\\n<p>An error occured, The error has been reported.</p>\";\n exit();\n }",
"public function alert() {\n\t\t/*$alert = \"<div class='alert alert-dismissible'>\";\n\t\t$alert .= \"<button type='button' class='close' data-dismiss='alert' aria-label='Close'><span aria-hidden='true'>×</span></button>\";\n\t\t$alert .= $this->message.\"</div>\";*/\n\t\treturn \"alert('danger','A database error has occurred');\";\n\t}",
"public function showError();",
"public function alert($message, array $context = []) {\n\t\t$this->log(Util::ERROR, $message, $context);\n\t}",
"function errorAlert($msgText)\n\t{\n\t\t$msgError = \"<div class='alert alert-danger alert-dismissible fade show'>\n\t\t\t\t\t\t<button type='button' class='close' data-dismiss='alert'>×</button>\n\t\t\t\t\t\t\" . $msgText . \"\n\t\t\t\t\t</div>\";\n\t\treturn $msgError;\n\t}",
"public function actionError() {\n \n }",
"function showError(){\n\t\techo json_encode(array(\n\t\t\t\"alert\" => \"error\",\n\t\t\t\"title\" => \"Failed to Update!\",\n\t\t\t\"message\" => \"Program Updating has been Failed\"\n\t\t));\n\t}",
"private function alert($message) {\n\t $this->load->helper('html'); \n\t $this->data['error'] = heading($message,3);\n\t}",
"public function errorAction() {\n $errors = $this->_getParam(\"error_handler\");\n \n // assegno i valori alla view\n $this->viewInit();\n switch ($errors->type) {\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\n // 404 error -- controller or action not found \n $this->getResponse()->setRawHeader(\"HTTP/1.1 404 Not Found\");\n $this->view->title = \"HTTP/1.1 404 Not Found\";\n break;\n default:\n // application error; display error page, but don't change \n // status code\n $this->view->title = \"Application Error\";\n break;\n }\n $this->view->message = $errors->exception;\n }",
"function throw_error($error, $key){\n\t$alert = \" \";\n\n\tif (isset($error[$key]) && !empty($key)){\n\t\t$alert = \"<div class='error-alert'>\" . $error[$key] . \"</div>\";\n\t}\n\n\treturn $alert;\n}",
"protected function createValidationErrorMessage() {}",
"function alert(){\r\n\tglobal $errors, $success,$warning;\r\n\r\n\t if (isset($errors) && !empty($errors)){\r\n\t\t$allerror = \"<ul>\";\r\n\t\tforeach($errors as $value){\r\n\t\t\t$allerror .= \"<li>$value </li>\";\r\n\t\t}\r\n\t\t$allerror .= \"</ul>\";\r\n\r\n\t\techo '<br><div class=\"alert alert-danger alert-block\"><h4>Error!</h4>'.$allerror.'</div>';\r\n\r\n\t}\r\n\r\n\telse if (isset($success)){\r\n\t\techo '<div class=\"alert alert-success\"><strong>Success! </strong>'.$success.'</div>';\r\n\t\t}\r\n\r\n\telse if (isset($warning)){\r\n\t\techo '<div class=\"alert\"><strong>Warning! </strong>'.$warning.'</div>';\r\n\t}\r\n}",
"function error(){}",
"function showError($feedback)\n{\n showFeedback(new AlertMessage(AlertMessage::STYLE_ERROR, $feedback));\n}",
"public function error();",
"protected function errorAction() {}",
"public function generateError($message) {\n\t\t\techo \"\n\t\t\t\t<div class='alert alert-danger' role='alert'>\n\t\t\t\t\t{$message}\n\t\t\t\t</div>\n\t\t\t\";\n\t\t}",
"function show_error ()\n {\n global $errormessage;\n global $lang;\n global $ts_template;\n if (!empty ($errormessage))\n {\n eval ($ts_template['show_error']);\n }\n\n }",
"protected function addErrorFlashMessage() {}",
"protected function _createAlertItem()\n {\n $alert = $this->_helper->createAlert(\n array(\n 'email' => NoShipmentsAlert_Helper_Data::PATH_EMAIL,\n 'identity' => NoShipmentsAlert_Helper_Data::PATH_IDENTITY,\n 'alert_template' => NoShipmentsAlert_Helper_Data::PATH_ALERT_TEMPLATE,\n 'alert_time' => NoShipmentsAlert_Helper_Data::PATH_ALERT_TIME,\n 'alert_type' => NoShipmentsAlert_Helper_Data::ALERT_TYPE,\n 'store_id' => $this->_storeId\n )\n );\n\n return $alert;\n }",
"function newErr($type, $message) {\n $response = array(\n 'error' => $type,\n 'message' => $message\n );\n return json_encode($response);\n \n }",
"public function actionError()\n\t{\n\t\t$this->layout = '//layouts/error';\n\t\tif($error=Yii::app()->errorHandler->error)\n\t\t{\n\t\t\tif ( empty($error['message']) && isset(Config::$errors[ $error['code'] ]) ) {\n\t\t\t\t$error['message'] = Config::$errors[$error['code']];\n\t\t\t}\n\n\t\t\tif(Yii::app()->getRequest()->getIsAjaxRequest()) {\n\t\t\t\tYii::app()->end( json_encode( array('error'=>$error['code'], 'message'=>$error['message']), JSON_NUMERIC_CHECK ) );\n\t\t\t} else\n\t\t\t\t$this->render('error',array('error' => $error));\n\t\t}\n\t}",
"public function error($message, $title = null)\n {\n return $this->alert($message);\n }",
"public function error() {\n\t\tnonce_generate();\n\t\t$this->title = !empty($_SESSION['title']) ? $_SESSION['title'] : 'Error';\n\t\tif (!empty($_SESSION['data'])) {\n\t\t\t$data = $_SESSION['data'];\n\t\t} else {\n\t\t\t$data = array(\n\t\t\t\t'error' => 'An unknown error ocurred.',\n\t\t\t\t'link' => ''\n\t\t\t);\n\t\t}\n\t\t$this->content = $this->View->getHtml('content-error', $data, $this->title);\n\t}",
"public function errorAction() {\n\t\t\n\t\t$errors = $this->_getParam('error_handler');\n\t\t\n\t\tswitch ($errors->type) {\n\t\t\t \n\t\t\tcase Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\n\t\t\tcase Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\n\t\t\t\t\n\t\t\t\t// stranka nebyla nalezena - HTTP chybova hlaska 404\n\t\t\t\t$this->getResponse()->setHttpResponseCode(404);\n\t\t\t\t$this->view->message = 'Stránka nenalezena';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\t\n\t\t\t\t// chyba v aplikaci - HTTP chybova hlaska 500\n\t\t\t\t$this->getResponse()->setHttpResponseCode(500);\n\t\t\t\t$this->view->message = 'Chyba v aplikaci';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t}\n\t\t\n $this->view->env = APPLICATION_ENV;\n\t\t$this->view->exception = $errors->exception;\n\t\t$this->view->request = $errors->request;\n\t\t$this->view->title = 'Objevila se chyba';\r\n\t\t$this->view->showDetails = ini_get('display_errors');\r\n\t\t\n\t\t$this->_helper->layout->setLayout('error');\n\t\t\n\t}",
"function error($message, array $context = array());",
"static function error ($error, $data=null) {\n\t\tView::render ('error', array ('error'=>$error));\n\t\ttrigger_error (print_r (array ($error, $data), true));\n\t\texit ();\n\t}",
"public function errorOccured();",
"static function showError($errno, $errstr, $errfile, $errline, $errcontext, $errtype) {\n\t\tif(!headers_sent()) {\n\t\t\t$errText = \"$errtype: \\\"$errstr\\\" at line $errline of $errfile\";\n\t\t\t$errText = str_replace(array(\"\\n\",\"\\r\"),\" \",$errText);\n\t\t\tif(!headers_sent()) header($_SERVER['SERVER_PROTOCOL'] . \" 500 $errText\");\n\t\t\t\n\t\t\t// if error is displayed through ajax with CliDebugView, use plaintext output\n\t\t\tif(Director::is_ajax()) header('Content-Type: text/plain');\n\t\t}\n\t\t\n\t\t// Legacy error handling for customized prototype.js Ajax.Base.responseIsSuccess()\n\t\t// if(Director::is_ajax()) echo \"ERROR:\\n\";\n\t\t\n\t\t$reporter = self::create_debug_view();\n\t\t\n\t\t// Coupling alert: This relies on knowledge of how the director gets its URL, it could be improved.\n\t\t$httpRequest = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : $_REQUEST['url'];\n\t\tif(isset($_SERVER['REQUEST_METHOD'])) $httpRequest = $_SERVER['REQUEST_METHOD'] . ' ' . $httpRequest;\n\n\t\t$reporter->writeHeader($httpRequest);\n\t\t$reporter->writeError($httpRequest, $errno, $errstr, $errfile, $errline, $errcontext);\n\n\t\t$lines = file($errfile);\n\n\t\t// Make the array 1-based\n\t\tarray_unshift($lines,\"\");\n\t\tunset($lines[0]);\n\n\t\t$offset = $errline-10;\n\t\t$lines = array_slice($lines, $offset, 16, true);\n\t\t$reporter->writeSourceFragment($lines, $errline);\n\n\t\t$reporter->writeTrace($lines);\n\t\t$reporter->writeFooter();\n\t\texit(1);\n\t}",
"function report_error($error)\r\n\t{\t\r\n\t\t?>alert('<?php echo $error;?>');<?php\r\n\t}",
"public static function alertFailure($msg) {\n\t\t\techo \"<div class=\\\"alert failure\\\">\n\t\t\t\t<p>\n\t\t\t\t\t<strong>\".$msg.\"</strong>\n\t\t\t\t</p>\n\t\t\t</div>\";\n\t\t}",
"public function errorAction()\n {\n $errors = $this->_getParam('error_handler');\n\n switch ($errors->type) {\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\n\n // 404 error -- controller or action not found\n $this->getResponse()->setHttpResponseCode(404);\n $this->view->message = 'Page not found';\n break;\n default:\n // Generic application error\n $this->getResponse()->setHttpResponseCode(500);\n $this->view->message = 'Application error';\n break;\n }\n\n $this->view->exception = $errors->exception;\n $this->view->request = $errors->request;\n $this->_response->clearBody();\n }",
"public function showError($result = null) {\n if (Configure::read() > 0) {\n if ($this->error) {\n trigger_error('<span style = \"color:Red;text-align:left\"><b>SOAP Error:</b> <pre>' . print_r($this->error) . '</pre></span>', E_USER_WARNING);\n }\n if ($result) {\n e(sprintf(\"<p><b>Result:</b> %s </p>\", $result));\n }\n }\n }",
"function customError($errno, $errstr)\n {\n echo \"<b>Error:</b> [$errno] $errstr\";\n }",
"function customError($errno, $errstr)\n {\n echo \"<b>Error:</b> [$errno] $errstr\";\n }",
"function error($message);",
"abstract public function error();",
"function error_and_die($msg) {\n echo ('<p><span style=\"color:#ff0000; font-size:1.5em;\">SubmissionBox Error Encountered</span></p>');\n echo ('<p><span style=\"color:#ff0000;\">Message: ' . $msg . '</span></p></body></html>');\n die;\n }",
"function error($message) {\n die(\"{\\\"error\\\":\\\"$message\\\"}\");\n }",
"function print_error(){\r\n\t\techo '<script type=\"text/javascript\">\r\n\t\t\t window.alert(\"ERROR CONNECTING WITH DATABASE\");\r\n\t\t\t </script>';\r\n\t\t}",
"public static function create()\n {\n list(\n $message,\n $callbackService,\n $callbackMethod,\n $callbackParams\n ) = array_pad( func_get_args(), 4, null);\n\n static::addToEventQueue( array(\n 'type' => \"alert\",\n 'properties' => array(\n 'message' => $message\n ),\n 'service' => $callbackService,\n 'method' => $callbackMethod,\n 'params' => $callbackParams ?? []\n ));\n }",
"function Error($message, $vars = array()) {\n $this->setMessage($message, $vars);\n }",
"function HandleError($message) {\r\n echo '<script type=\"text/javascript\">alert(\"'.$message.'\");</script>'.$message.'';\r\n }",
"public function actionError()\n {\n if($error=Yii::app()->errorHandler->error)\n {\n if($error['code'] != 404 || !isset($aErrorMsg[$error['errorCode']])){\n Yii::log(' error : ' . $error['file'] .\":\". $error['line'] .\":\". $error['message'], 'error', 'system');\n }\n $ret = new ReturnInfo(FAIL_RET, Yii::t('exceptions', $error['message']), intval($error['errorCode']));\n if(Yii::app()->request->getIsAjaxRequest()){\n echo json_encode($ret);\n \n }else{\n if( empty($error['errorCode']) ){\n if(isset($this->aErrorMsg[$error['code']])){\n if(empty($this->aErrorMsg[$error['code']]['message'])) {\n $this->aErrorMsg[$error['code']]['message'] = $error['message'];\n }\n $this->render('error', $this->aErrorMsg[$error['code']]);\n }else{\n $this->render('error', $this->aErrorMsg['1000']);\n }\n }else{\n $this->render('error', $this->aErrorMsg[ $error['errorCode'] ]);\n \n }\n }\n \n } \n }",
"protected function prompt_error($message) {\n echo PHP_EOL . \"\\033[41mERROR: \" . $message . \"\\033[0m\" . PHP_EOL;\n exit;\n }",
"function HandleError($message) {\r\n echo '<script type=\"text/javascript\">alert(\"'.$message.'\");</script>'.$message.'';\r\n }",
"public function trigger_error($error_msg, $error_type = E_USER_WARNING) {\n throw new tx_pttools_exception('Smarty error: \"'.$error_msg.'\" (Type: \"'.$error_type.'\")');\n }",
"public function actionError()\n {\n if(Core::getLoggedDeliveryBoyID() > 0)\n {\n\t \t $exception = Yii::$app->errorHandler->exception;\n\t \t $error = array('statusCode' => $exception->statusCode, 'message' => $exception->getMessage(), 'name' => $exception->getName());\n \t\t return $this->render('/error', ['error' => $error]);\n }\n else\n {\n\t \t\treturn Yii::$app->getResponse()->redirect(Yii::$app->getHomeUrl().'delivery')->send();\n }\n }",
"private static function createErrorMessage($errors)\n\t{\n\t\t$mess = null;\n\t\tif (isset($errors) && count($errors) > 0) {\n\t\t\t$mess .= '<div class=\"alert alert-danger\">';\n\t\t\tforeach ($errors as $err) {\n\t\t\t\t$mess .= $err . '<br />';\n\t\t\t}\n\t\t\t$mess .= '</div>';\n\t\t}\n\t\treturn $mess;\n\t}",
"function divAlert($msg, $type='error')\n{\n\n $alert = \"<div class='alert alert-{$type}'>\";\n $alert.= \"<a class='close' data-dismiss='alert'>×</a>\";\n $alert.= $msg;\n $alert.= \"</div>\";\n\n return $alert;\n}",
"public function errorAction()\r\n {\r\n $errors = $this->_getParam('error_handler');\r\n $messages = array();\r\n\r\n switch ((string)$errors->type) {\r\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\r\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\r\n // 404 error -- controller or action not found\r\n $this->getResponse()->setRawHeader('HTTP/1.1 404 Not Found');\r\n\r\n $messages[] = Zoo::_(\"The page you requested was not found.\");\r\n if (ZfApplication::getEnvironment() == \"development\" || ZfApplication::getEnvironment() == \"staging\") {\r\n $messages[] = $errors->exception->getMessage();\r\n }\r\n break;\r\n\r\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_OTHER:\r\n case 0:\r\n // application error\r\n //$messages[] = Zoo::_(\"An unexpected error occurred with your request. Please try again later.\");\r\n $messages[] = $errors->exception->getMessage();\r\n if (ZfApplication::getEnvironment() == \"development\" || ZfApplication::getEnvironment() == \"staging\") {\r\n $trace = $errors->exception->getTrace();\r\n foreach (array_keys($trace) as $i) {\r\n if ($trace[$i]['args']) {\r\n foreach ($trace[$i]['args'] as $index => $arg) {\r\n if (is_object($arg)) {\r\n $trace[$i]['args'][$index] = get_class($arg);\r\n }\r\n elseif (is_array($arg)) {\r\n $trace[$i]['args'][$index] = \"array\";\r\n }\r\n }\r\n }\r\n $trace[$i]['file_short'] = \"..\".substr($trace[$i]['file'], strrpos(str_replace(\"\\\\\", DIRECTORY_SEPARATOR, $trace[$i]['file']), DIRECTORY_SEPARATOR));\r\n }\r\n $this->view->assign('trace', $trace);\r\n }\r\n break;\r\n\r\n default:\r\n // application error\r\n $this->getResponse()->setRawHeader('HTTP/1.1 '.$errors->type);\r\n $messages[] = $errors->exception->getMessage();\r\n break;\r\n }\r\n\r\n // Clear previous content\r\n $this->getResponse()->clearBody();\r\n\r\n $this->view->assign('errormessages', $messages);\r\n }",
"public static function error($message, $context);",
"function rError($e_number, $e_message, $e_file, $e_line, $e_vars)\n{\n\t//Build the error message:\n\t$message = \"An error has occured in script {$e_file} on line {$e_line}: $e_message\\n\";\n\n\t//Add the date and time:\n\t$message .= \"Date/time: \" . date(\"n-j-Y H:i:s\") . \"\\n\";\n\n\tif(!LIVE)\n\t{\n\t\t//Show the error message;\n\t\techo '<div class=\"error\">';\n\t\t\techo nl2br($message);\n\t\t\techo '<pre>';\n\t\t\t\tprint_r($e_vars, 1) . '\\n';\n\t\t\t\tdebug_print_backtrace();\n\t\t\techo '</pre>';\n\t\techo '</div>';\n\t}\n\telse\n\t{\n\t\t//Send an email to the admin:\n\t\t$body = $message. \"\\n\" . print_r($e_vars, 1);\n\t\t// mail(EMAIL, \"Site Error!\", $body, \"From: [email protected]\");\n\n\t\tif($e_number != E_NOTICE)\n\t\t{\n\t\t\techo '<div class=\"error\">';\n\t\t\t\techo 'A system error occured. We apologize for the inconvenience.';\n\t\t\techo '</div>';\n\t\t}\n\t}\n}",
"protected function errorAction()\n\t{\n\t\t$this->handleTargetNotFoundError();\n\n\t\treturn $this->getFlattenedValidationErrorMessage();\n\t}",
"function errorPage ($s_template, $s_title, $a_data=array ()) {\n\t//template the error, swapping custom replacement fields\n\tdie (templatePage (\n\t\treMarkable (template_tags (template_load (\"errors/$s_template\"), $a_data)), $s_title,\n\t\ttemplateHeader (),\n\t\ttemplateFooter (\".system/design/templates/errors/\".pathinfo ($s_template, PATHINFO_FILENAME))\n\t));\n}",
"public function error() {\n // The tests cover errors, so there will be plenty to sift through\n // $msg = func_get_arg(0);\n // $err = 'API ERROR: ' . $msg . PHP_EOL;\n\n // $objs = func_get_args();\n // array_splice($objs, 0, 1);\n\n // ob_start();\n // foreach($objs as $obj) {\n // var_dump($obj);\n // }\n // $strings = ob_get_clean();\n\n // file_put_contents('tests.log', [$err, $strings], FILE_APPEND);\n }",
"function error( $error, $title = 'Error', $report = true ){\n\n\t/**\n\t * enable language file errors, this should be phased in\n\t * and eventually implemented in all possible situations\n\t */\n\tif( is_int( $error ) ){\n\t\t$Template = Template::getInstance( );\n\t\t$error_id = $error;\n\t\t$error = $Template->errorToString( $error ); \n\t}\n\n\t/**\n\t * if ajax loaded then error output\n\t * will be dfferent\n\t */\n\tif( defined( 'AJAX_LOADED' ) ){\n\t\techo '<span style=\"font-weight:bold\">' . $title . '</span><br />' . $error;\n\t\tif( $report ){\n\t\t\tgenerate_error_report( @$error_id, $error, $title );\n\t\t\tif( User::verify( ) )\n\t\t\t\techo '<br /><a href=\"' . SITE_URL . 'files/error-report.txt\">Download Error Report</a>';\n\t\t}\n\t\texit;\t\n\t}\n\n\t$Template = Template::getInstance( true );\n\t$Template->add( 'content', '<h1>' . $title . '</h1>' );\n\t$Template->add( 'content', '<p>' . $error . '</p>' );\n\t$Template->add( 'title', 'Fatal Error' );\n\tif( $report ){\n\t\tgenerate_error_report( @$error_id, $error, $title );\n\t\tif( User::verify( ) )\n\t\t\t$Template->add( 'content', '<br/><p><a href=\"' . SITE_URL . 'files/error-report.txt\">Download Error Report</a></p>' );\n\t}\n\trequire HOME . 'admin/layout/error.php';\n\texit;\n\n}",
"function sysError( $err = NULL, $errHeader = NULL, $errTitle = NULL ){\n\t\n\tglobal $output, $sys;\n\t\n\t$err = ( $err === NULL ) ? \"We apologize for the trouble! Please try again later.\" : $err;\n\t\n\tif( defined( \"NO_STYLING\" ) && NO_STYLING == true )\n\t\t// Ajax generated error - do not return HTML\n\t\tdie( $err );\n\t\n\t$errHeader = ( $errHeader === NULL ) ? \"We've hit an error\" : $errHeader;\n\t$errTitle = ( $errTitle === NULL ) ? \"Oops!\" : $errTitle;\n\t\n\t$output['message']['title'] = $errHeader;\n\t$output['message']['text'] = $err;\n\t\n\t$screen = new Screen();\n\t$screen->show( 'master/error_message.tpl', $errTitle );\n\t\n\texit();\n\t\n}",
"public function error($message) {}",
"public function error() \n\t{\n\t\trequire $this->view('error', 'error');\n\t\texit;\n\t}",
"function error ($errormsg, $lvl=E_USER_WARNING) {\n global $MAGPIE_ERROR;\n \n // append PHP's error message if track_errors enabled\n if ( isset($php_errormsg) ) { \n $errormsg .= \" ($php_errormsg)\";\n }\n if ( $errormsg ) {\n $errormsg = \"MagpieRSS: $errormsg\";\n $MAGPIE_ERROR = $errormsg;\n //trigger_error( $errormsg, $lvl); \n }\n}",
"public function actionError() {\n if ($error = Yii::app()->errorHandler->error) {\n\t\t\t$this->sendRestResponse(500,array(\n\t\t\t\t'status' => false,\n\t\t\t\t'message' => $error['message'],\n\t\t\t\t'data' => $error,\n\t\t\t));\t\t\t\n }\n\t}",
"public function errorAction()\n\t{\n\t}",
"function errorPage(string $title, string $message, int $code, string $template = null)\n{\n $data = [];\n // page information\n $data['code'] = $code;\n $data['title'] = $title;\n $data['message'] = $message;\n // the default template\n $render = 'error.twig';\n // template from the env file\n if (Env::has('ERROR_PAGE')) {\n $render = Env::get('ERROR_PAGE');\n }\n // custom template\n if (isset($template)) {\n $render = $template;\n }\n // check if the file exists\n if (!file_exists(VIEWS_DIR . 'renders' . DS . $render)) {\n throw new Exception(\"ERROR PAGE '{$render}' NOT EXISTS \");\n }\n // display the page\n view($render, $data, $code);\n}",
"public function actionError()\n\t{\n\t\treturn $this->render('error');\n\t}",
"public function errorAction()\n {\n $this->_logger->debug(__('Calling errorAction'));\n try {\n $this->loadLayout()\n ->_initLayoutMessages('checkout/session')\n ->_initLayoutMessages('catalog/session')\n ->_initLayoutMessages('customer/session');\n $this->renderLayout();\n $this->_logger->info(__('Successful to redirect to error page.'));\n } catch (\\Exception $e) {\n $this->_logger->error(json_encode($this->getRequest()->getParams()));\n $this->_getCheckoutSession()->addError(__('An error occurred during redirecting to error page.'));\n }\n }",
"function HandleError($message) {\r\n\t\techo '<script type=\"text/javascript\">alert(\"'.$message.'\");</script>'.$message.'';\r\n\t}",
"function display_error($message = -1)\n{\n $string = \"\";\n if ($message == -1) {\n $string = \"<script>alert('invalid input try again');</script>\";\n } else {\n $string = \"<script>alert('\" . $message . \"');</script>\";\n }\n return $string;\n}",
"private function createErrorResponse($body) {\r\n\t\treturn $this->createResponse('<div class=\"yammer-error-body\"><h2>Error:</h2>'.$body.'</div>');\r\n\t}",
"static function error(int $errorCode, string $errorMsg, string $ex = null) {\n self::$error = array(\"type\" => \"error\", \"code\" => $errorCode, \"msg\" => $errorMsg,\n \"ex\" => $ex);\n }",
"static function error($error)\n {\n global $template_vars;\n $template_vars['errors'][] = $error;\n }",
"protected function renderAsError() {}",
"public static function error($message)\n {\n return '<div class=\"alert alert-danger\">' . $message . '</div>';\n }",
"function error($error_msg)\n\t{\n\t\tdie(\"<b>\" . $this->app_name . \" FATAL ERROR</b>: \" . $error_msg);\n\t}",
"private function _error($info){\n $confirm = array(\n 'class' => 'alert-danger',\n 'head' => '错误!',\n 'body' => $info\n );\n $this->assign('confirmInfo',$confirm);\n }",
"public function actionError()\n {\n if(Core::getLoggedUserID() > 0)\n {\n\t \t $exception = Yii::$app->errorHandler->exception;\n\t \t $error = array('statusCode' => $exception->statusCode, 'message' => $exception->getMessage(), 'name' => $exception->getName());\n \t\t return $this->render('/error', ['error' => $error]);\n }\n else\n {\n\t \t\treturn Yii::$app->getResponse()->redirect(Yii::$app->getHomeUrl().'admin')->send();\n }\n }",
"public function notice_error() {\n\t\t$class = 'notice notice-error';\n\t\t$message = __( 'An error occurred during synchronization.', 'elemarjr' );\n\t\treturn sprintf( '<div class=\"%1$s\"><p>%2$s</p></div>', esc_attr( $class ), esc_html( $message ) );\n\t}",
"function PushError($fctname, $msg, $desc = \\false)\n {\n }",
"public function __construct(\n $title = 'Application error',\n $message = 'An application error has occurred. Sorry for the temporary inconvenience'\n ) {\n $this->title = $title;\n $this->message = $message;\n }",
"public static function alert() {\n\t\t# Get arguments to this function:\n\t\t$args = func_get_args();\n\n\t\t# Add message to log:\n\t\treturn self::add(LOG_ALERT, $args);\n\t}",
"public function actionError()\n {\n $this->layout = '//layouts/blank_error';\n if($error = Yii::app()->errorHandler->error)\n {\n if(Yii::app()->request->isAjaxRequest)\n echo $error['message'];\n else\n $this->render('error', $error);\n }\n }",
"protected function getErrorFlashMessage() {}",
"abstract public function sendAlert( );",
"public function actionError() {\n\n $this->layout = '//layouts/layoutSite';\n\n if ($error = Yii::app()->errorHandler->error) {\n if (Yii::app()->request->isAjaxRequest)\n echo $error['message'];\n else\n $this->render('error', $error);\n }\n }",
"function pushError( $error );",
"public static function error($message)\n\t{\n\t\tstatic::write('Error', $message);\n\t}",
"function alert($message, array $context = array());",
"abstract protected function _getErrorString();",
"function triggerError(&$rec, $attrib, $err, $msg=\"\", $tab=\"\", $label='', $module='atk')\n{\n\tif($msg==\"\") $msg = atktext($err, $module);\n\t$rec['atkerror'][] = array( \"attrib_name\"=> $attrib, \"err\" => $err, \"msg\" => $msg, \"tab\" => $tab, \"label\" => $label);\n}",
"public function actionError() {\n $this->layout = '//layouts/error';\n if ($error = Yii::app()->errorHandler->error) {\n if (Yii::app()->request->isAjaxRequest)\n echo $error['message'];\n else\n $this->render('error', $error);\n }\n }",
"public function error(string $text);",
"public function errors();",
"public function errors();",
"function raiseError ($message)\r\n{\r\n\ttrigger_error ($message, E_USER_ERROR);\r\n}",
"public function errorAction() {\n\t\tZend_Layout::getMvcInstance ()->setLayout ( \"light\" );\n\t\t$errors = $this->_getParam ( 'error_handler' );\n\t\tif ($errors->exception->getCode () == 404 || in_array ( $errors->type, array (\n\t\t\t\tZend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE,\n\t\t\t\tZend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER,\n\t\t\t\tZend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION \n\t\t) )) {\n\t\t\t$this->getResponse ()->setHttpResponseCode ( 404 );\n\t\t\t$this->_helper->viewRenderer ( '404' );\n\t\t}\n\t\t\n\t\t\n\t\t$this->view->content = $errors->exception->getMessage ();\n\t}",
"public function showFailed();",
"public function showToastForValidationError()\n {\n $errorBag = $this->getErrorBag()->all();\n\n if (count($errorBag) > 0) $this->toast($errorBag[0], 'error');\n }",
"function Error($error)\n {\n \t$override = 0;\n \t\n \t//-----------------------------------------\n \t// Showing XML / AJAX functions?\n \t//-----------------------------------------\n \t\n \tif ( $this->input['act'] == 'xmlout' )\n \t{\n \t\t@header( \"Content-type: text/plain\" );\n\t\t\tprint 'error';\n\t\t\texit();\n\t\t}\n \t\n \t//-----------------------------------------\n \t// Initialize if not done so yet\n \t//-----------------------------------------\n \t\n \tif ( isset($error['INIT']) AND $error['INIT'] == 1)\n \t{\n \t\t$this->quick_init();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->session_id = $this->my_session;\n\t\t}\n\t\t\n\t\tif ( !isset($this->compiled_templates['skin_global']) OR !is_object( $this->compiled_templates['skin_global'] ) )\n\t\t{\n\t\t\t$this->load_template('skin_global');\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get error words\n\t\t//-----------------------------------------\n\t\t\n \t$this->load_language('lang_error');\n \t\n \tlist($em_1, $em_2) = explode( '@', $this->vars['email_in'] );\n \t\n \t$msg = $this->lang[ $error['MSG'] ];\n \t\n \t//-----------------------------------------\n \t// Extra info?\n \t//-----------------------------------------\n \t\n \tif ( isset($error['EXTRA']) AND $error['EXTRA'] )\n \t{\n \t\t$msg = str_replace( '<#EXTRA#>', $error['EXTRA'], $msg );\n \t}\n \t\n \t//-----------------------------------------\n \t// Show error\n \t//-----------------------------------------\n \t\n \t$html = $this->compiled_templates['skin_global']->Error( $msg, $em_1, $em_2, 1);\n \t\n \t//-----------------------------------------\n \t// If we're a guest, show the log in box..\n \t//-----------------------------------------\n \t\n \tif ($this->member['id'] == \"\" and $error['MSG'] != 'server_too_busy' and $error['MSG'] != 'account_susp')\n \t{\n \t\t$safe_string = $this->base_url . str_replace( '&', '&', $this->parse_clean_value($this->my_getenv('QUERY_STRING')) );\n \t\t\n \t\t$html = str_replace( \"<!--IBF.LOG_IN_TABLE-->\", $this->compiled_templates['skin_global']->error_log_in( str_replace( '&', '&', $safe_string ) ), $html);\n \t\t$override = 1;\n \t}\n \t\n \t//-----------------------------------------\n \t// Do we have any post data to keepy?\n \t//-----------------------------------------\n \t\n \tif ( $this->input['act'] == 'Post' OR $this->input['act'] == 'Msg' OR $this->input['act'] == 'calendar' )\n \t{\n \t\tif ( $_POST['Post'] )\n \t\t{\n \t\t\t$post_thing = $this->compiled_templates['skin_global']->error_post_textarea($this->txt_htmlspecialchars($this->txt_stripslashes($_POST['Post'])) );\n \t\t\t\n \t\t\t$html = str_replace( \"<!--IBF.POST_TEXTAREA-->\", $post_thing, $html );\n \t\t}\n \t}\n \t\n \t//-----------------------------------------\n \t// Update session\n \t//-----------------------------------------\n \t\n \t$this->DB->do_shutdown_update( 'sessions', array( 'in_error' => 1 ), \"id='{$this->my_session}'\" );\n \t\n \t//-----------------------------------------\n \t// Print\n \t//-----------------------------------------\n \t\n \t$print = new display();\n \t$print->ipsclass =& $this;\n \t\n \t$print->add_output($html);\n \t\t\n \t$print->do_output( array( 'OVERRIDE' => $override, 'TITLE' => $this->lang['error_title'] ) );\n }"
] | [
"0.6478585",
"0.6304897",
"0.6141487",
"0.6133177",
"0.6120544",
"0.60558116",
"0.60323614",
"0.59677255",
"0.5906146",
"0.59028524",
"0.5852144",
"0.58498955",
"0.5846045",
"0.5835472",
"0.58246225",
"0.5820117",
"0.58095944",
"0.579135",
"0.57888234",
"0.5753118",
"0.5714018",
"0.57072335",
"0.56892705",
"0.56862164",
"0.56819767",
"0.5674407",
"0.5673834",
"0.56738263",
"0.56647897",
"0.5661909",
"0.5658489",
"0.56508756",
"0.5639216",
"0.56377035",
"0.5616563",
"0.5611227",
"0.5611227",
"0.55984074",
"0.559808",
"0.5573139",
"0.557013",
"0.55677605",
"0.5551242",
"0.5547061",
"0.55460066",
"0.55446917",
"0.5538917",
"0.5536358",
"0.5532817",
"0.55321676",
"0.55149245",
"0.55148447",
"0.551086",
"0.55027646",
"0.54927474",
"0.5492094",
"0.5491629",
"0.54882884",
"0.5485077",
"0.54840636",
"0.5481415",
"0.54813623",
"0.5479337",
"0.5476661",
"0.54635686",
"0.5461319",
"0.5458703",
"0.5458014",
"0.5434331",
"0.54303217",
"0.542967",
"0.54291886",
"0.5429111",
"0.5427809",
"0.54170966",
"0.5412102",
"0.54102933",
"0.5402209",
"0.5400574",
"0.5396665",
"0.53952825",
"0.5389415",
"0.53816926",
"0.5369147",
"0.5365563",
"0.5365089",
"0.53631973",
"0.53615075",
"0.5360134",
"0.53600246",
"0.53589547",
"0.5358473",
"0.5352339",
"0.5352099",
"0.5352099",
"0.5348734",
"0.5338162",
"0.5337966",
"0.5333293",
"0.5331804"
] | 0.6078431 | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.